use qt5-qtbase for qgit and remove qt5-base packages (#303)

This commit is contained in:
Simeon Huang 2021-05-09 16:12:15 +01:00 committed by Yaksh Bariya
parent cc67e0e0aa
commit a995fe6a42
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
20 changed files with 5 additions and 1016 deletions

View File

@ -2,20 +2,15 @@ TERMUX_PKG_HOMEPAGE=https://github.com/tibirna/qgit
TERMUX_PKG_DESCRIPTION="A git GUI viewer"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
# Version update requires also bumping the qt5-base package in order to get tools
# working on host (x86_64).
TERMUX_PKG_VERSION=2.9
TERMUX_PKG_REVISION=18
TERMUX_PKG_REVISION=19
TERMUX_PKG_SRCURL=https://github.com/tibirna/qgit/archive/qgit-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=69788efda7d434d1bc094bb414bd92c269dc7894326320634500b05d63c008e8
TERMUX_PKG_DEPENDS="git, hicolor-icon-theme, qt5-base"
TERMUX_PKG_DEPENDS="git, hicolor-icon-theme, qt5-qtbase"
TERMUX_PKG_BUILD_DEPENDS="qt5-qtbase-cross-tools"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_configure() {
termux_setup_cmake
cmake . \
-DCMAKE_INSTALL_PREFIX="${TERMUX_PREFIX}" \
-DQt5_DIR="${TERMUX_PREFIX}/lib/cmake/Qt5" \
-DQt5Core_DIR="${TERMUX_PREFIX}/lib/cmake/Qt5Core"
"${TERMUX_PREFIX}/opt/qt/cross/bin/qmake" \
-spec "${TERMUX_PREFIX}/lib/qt/mkspecs/termux-cross"
}

View File

@ -1,334 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://www.qt.io/
TERMUX_PKG_DESCRIPTION="A cross-platform application and UI framework"
TERMUX_PKG_LICENSE="LGPL-3.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=5.11.3
TERMUX_PKG_REVISION=29
#TERMUX_PKG_SRCURL="http://master.qt.io/archive/qt/${TERMUX_PKG_VERSION%.*}/${TERMUX_PKG_VERSION}/single/qt-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SRCURL="https://ftp.osuosl.org/pub/blfs/conglomeration/qt5/qt-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
TERMUX_PKG_SHA256=859417642713cee2493ee3646a7fee782c9f1db39e41d7bb1322bba0c5f0ff4d
TERMUX_PKG_DEPENDS="dbus, harfbuzz, libandroid-shmem, libc++, libice, libicu, libjpeg-turbo, libpng, libsm, libuuid, libx11, libxcb, libxi, libxkbcommon, openssl, pcre2, ttf-dejavu, xcb-util-image, xcb-util-keysyms, xcb-util-renderutil, xcb-util-wm, zlib"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_RM_AFTER_INSTALL="
bin/fixqt4headers.pl
bin/syncqt.pl
lib/qt/mkspecs/termux-cross
"
termux_step_pre_configure () {
if [ "${TERMUX_ARCH}" = "arm" ]; then
## -mfpu=neon causes build failure on ARM.
CFLAGS="${CFLAGS/-mfpu=neon/} -mfpu=vfp"
CXXFLAGS="${CXXFLAGS/-mfpu=neon/} -mfpu=vfp"
fi
## Create qmake.conf suitable for cross-compiling.
sed \
-e "s|@TERMUX_CC@|${TERMUX_HOST_PLATFORM}-clang|" \
-e "s|@TERMUX_CXX@|${TERMUX_HOST_PLATFORM}-clang++|" \
-e "s|@TERMUX_AR@|${TERMUX_HOST_PLATFORM}-ar|" \
-e "s|@TERMUX_NM@|${TERMUX_HOST_PLATFORM}-nm|" \
-e "s|@TERMUX_OBJCOPY@|${TERMUX_HOST_PLATFORM}-objcopy|" \
-e "s|@TERMUX_PKGCONFIG@|${TERMUX_HOST_PLATFORM}-pkg-config|" \
-e "s|@TERMUX_STRIP@|${TERMUX_HOST_PLATFORM}-strip|" \
-e "s|@TERMUX_CFLAGS@|${CPPFLAGS} ${CFLAGS}|" \
-e "s|@TERMUX_CXXFLAGS@|${CPPFLAGS} ${CXXFLAGS}|" \
-e "s|@TERMUX_LDFLAGS@|${LDFLAGS}|" \
"${TERMUX_PKG_BUILDER_DIR}/qmake.conf" > "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross/qmake.conf"
}
termux_step_configure () {
export PKG_CONFIG_SYSROOT_DIR="${TERMUX_PREFIX}"
unset CC CXX LD CFLAGS LDFLAGS
"${TERMUX_PKG_SRCDIR}"/configure -v \
-opensource \
-confirm-license \
-release \
-xplatform termux-cross \
-optimized-qmake \
-no-rpath \
-no-use-gold-linker \
-prefix "${TERMUX_PREFIX}" \
-docdir "${TERMUX_PREFIX}/share/doc/qt" \
-headerdir "${TERMUX_PREFIX}/include/qt" \
-archdatadir "${TERMUX_PREFIX}/lib/qt" \
-datadir "${TERMUX_PREFIX}/share/qt" \
-sysconfdir "${TERMUX_PREFIX}/etc/xdg" \
-examplesdir "${TERMUX_PREFIX}/share/doc/qt/examples" \
-plugindir "$TERMUX_PREFIX/libexec/qt" \
-nomake examples \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtcharts \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdoc \
-skip qtgamepad \
-skip qtgraphicaleffects \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtmultimedia \
-skip qtnetworkauth \
-skip qtpurchasing \
-skip qtquickcontrols \
-skip qtquickcontrols2 \
-skip qtremoteobjects \
-skip qtscript \
-skip qtscxml \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtspeech \
-skip qtsvg \
-skip qttranslations \
-skip qtvirtualkeyboard \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebglplugin \
-skip qtwebsockets \
-skip qtwebview \
-skip qtwinextras \
-skip qtxmlpatterns \
-no-accessibility \
-no-glib \
-no-eventfd \
-icu \
-system-pcre \
-system-zlib \
-ssl \
-openssl-linked \
-no-system-proxies \
-no-cups \
-system-harfbuzz \
-no-opengl \
-no-vulkan \
-qpa xcb \
-no-eglfs \
-no-gbm \
-no-kms \
-no-linuxfb \
-no-mirclient \
-system-xcb \
-no-libudev \
-no-evdev \
-no-libinput \
-no-mtdev \
-no-tslib \
-system-xkbcommon-x11 \
-no-xkbcommon-evdev \
-gif \
-ico \
-system-libpng \
-system-libjpeg \
-sql-sqlite \
-no-feature-dnslookup
}
termux_step_make() {
make -j "${TERMUX_MAKE_PROCESSES}"
}
termux_step_make_install() {
make install
#######################################################
##
## Save host-compiled Qt dev tools for
## later use (e.g. cross-compiling Qt application).
##
#######################################################
cd "${TERMUX_PKG_SRCDIR}/qtbase" && {
cp -a bin bin.host
}
cd "${TERMUX_PKG_SRCDIR}/qttools" && {
mkdir -p bin.host
cp -a bin/{lconvert,lrelease,lupdate,qtattributionsscanner} bin.host/
}
#######################################################
##
## Compiling necessary libraries for target.
##
#######################################################
## libQt5Bootstrap.a (qt5-base)
cd "${TERMUX_PKG_SRCDIR}/qtbase/src/tools/bootstrap" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../../lib/libQt5Bootstrap.a "${TERMUX_PREFIX}/lib/libQt5Bootstrap.a"
install -Dm644 ../../../lib/libQt5Bootstrap.prl "${TERMUX_PREFIX}/lib/libQt5Bootstrap.prl"
}
## libQt5QmlDevTools.a (qt5-declarative)
cd "${TERMUX_PKG_SRCDIR}/qtdeclarative/src/qmldevtools" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../lib/libQt5QmlDevTools.a "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.a"
install -Dm644 ../../lib/libQt5QmlDevTools.prl "${TERMUX_PREFIX}/lib/libQt5QmlDevTools.prl"
}
## libQt5PacketProtocol.a (qt5-declarative)
cd "${TERMUX_PKG_SRCDIR}/qtdeclarative/src/plugins/qmltooling/packetprotocol" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm644 ../../../../lib/libQt5PacketProtocol.a "${TERMUX_PREFIX}/lib/libQt5PacketProtocol.a"
install -Dm644 ../../../../lib/libQt5PacketProtocol.prl "${TERMUX_PREFIX}/lib/libQt5PacketProtocol.prl"
}
#######################################################
##
## Compiling necessary programs for target.
##
#######################################################
## Qt Declarative utilities.
for i in qmlcachegen qmlimportscanner qmllint qmlmin; do
cd "${TERMUX_PKG_SRCDIR}/qtdeclarative/tools/${i}" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
## Qt Linguist utilities (qt5-tools).
## Note: linguist application is not built !
for i in lconvert lrelease lupdate; do
cd "${TERMUX_PKG_SRCDIR}/qttools/src/linguist/${i}" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
## qtattributionsscanner (part of qt5-tools).
cd "${TERMUX_PKG_SRCDIR}/qttools/src/qtattributionsscanner" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../bin/qtattributionsscanner" "${TERMUX_PREFIX}/bin/qtattributionsscanner"
}
## Qt5 Base utilities.
## Note: qmake can be built only on host so it is omitted here.
for i in moc qlalr qvkgen rcc uic; do
cd "${TERMUX_PKG_SRCDIR}/qtbase/src/tools/${i}" && {
make clean
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/termux-cross"
## Ensure that no '-lpthread' specified in makefile.
sed \
-i 's@-lpthread@@g' \
"${TERMUX_PKG_SRCDIR}/qtbase/src/tools/${i}/Makefile"
## Fix build failure on at least 'i686'.
sed \
-i 's@$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)@$(LINK) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(LFLAGS) -lz@g' \
Makefile
make -j "${TERMUX_MAKE_PROCESSES}"
install -Dm700 "../../../bin/${i}" "${TERMUX_PREFIX}/bin/${i}"
}
done
unset i
## Unpacking prebuilt qmake from archive.
cd "${TERMUX_PKG_SRCDIR}" && {
tar xf "${TERMUX_PKG_BUILDER_DIR}/termux-prebuilt-qmake.txz"
install \
-Dm700 "./termux-prebuilt-qmake/bin/termux-${TERMUX_HOST_PLATFORM}-qmake" \
"${TERMUX_PREFIX}/bin/qmake"
}
#######################################################
##
## Fixes & cleanup.
##
#######################################################
## Drop QMAKE_PRL_BUILD_DIR because reference the build dir.
find "${TERMUX_PREFIX}/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' "{}" \;
## Remove *.la files.
find "${TERMUX_PREFIX}/lib" -iname \*.la -delete
## Set qt spec path suitable for target.
sed -i \
's|/lib/qt//mkspecs/termux-cross"|/lib/qt/mkspecs/termux"|g' \
"${TERMUX_PREFIX}/lib/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake"
}
termux_step_create_debscripts() {
## FIXME: Qt should be built with fontconfig somehow instead
## of using direct path to fonts.
## Currently, using post-installation script to create symlink
## from /system/bin/fonts to $PREFIX/lib/fonts if possible.
cp -f "${TERMUX_PKG_BUILDER_DIR}/postinst" ./
}
termux_step_post_massage() {
#######################################################
##
## Restoring utilities compiled for host.
##
#######################################################
## qt5-tools
for i in lconvert lrelease lupdate qtattributionsscanner; do
install \
-Dm755 "${TERMUX_PKG_SRCDIR}/qttools/bin.host/${i}" \
"${TERMUX_PREFIX}/bin/${i}"
done
## qt5-base
for i in moc qlalr qvkgen rcc uic; do
install \
-Dm755 "${TERMUX_PKG_SRCDIR}/qtbase/bin.host/${i}" \
"${TERMUX_PREFIX}/bin/${i}"
done
unset i
## qmake
install \
-Dm755 "${TERMUX_PKG_SRCDIR}/qtbase/qmake/qmake" \
"${TERMUX_PREFIX}/bin/qmake"
## Restore qt spec path used for cross compiling.
sed -i \
's|/lib/qt/mkspecs/termux"|/lib/qt/mkspecs/termux-cross"|g' \
"${TERMUX_PREFIX}/lib/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake"
}

View File

@ -1,11 +0,0 @@
diff -uNr qt-everywhere-src-5.11.3/qtbase/src/corelib/global/qrandom.cpp qt-everywhere-src-5.11.3.mod/qtbase/src/corelib/global/qrandom.cpp
--- qt-everywhere-src-5.11.3/qtbase/src/corelib/global/qrandom.cpp 2018-11-25 14:51:11.000000000 +0200
+++ qt-everywhere-src-5.11.3.mod/qtbase/src/corelib/global/qrandom.cpp 2020-02-05 19:37:27.660672838 +0200
@@ -218,6 +218,7 @@
#endif // Q_OS_WINRT
static SystemGenerator &self();
+ typedef quint32 result_type;
void generate(quint32 *begin, quint32 *end) Q_DECL_NOEXCEPT_EXPR(FillBufferNoexcept);
// For std::mersenne_twister_engine implementations that use something

View File

@ -1,12 +0,0 @@
#!/data/data/com.termux/files/usr/bin/sh
PREFIX="/data/data/com.termux/files/usr"
if [ ! -e "${PREFIX}/lib/fonts" ]; then
ln -sf "${PREFIX}/share/fonts/TTF" "${PREFIX}/lib/fonts"
else
if [ -h "${PREFIX}/lib/fonts" ]; then
rm -f "${PREFIX}/lib/fonts"
ln -sf "${PREFIX}/share/fonts/TTF" "${PREFIX}/lib/fonts"
fi
fi

View File

@ -1,31 +0,0 @@
QT_QPA_DEFAULT_PLATFORM = xcb
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/clang.conf)
QMAKE_CC = @TERMUX_CC@
QMAKE_CXX = @TERMUX_CXX@
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}
QMAKE_AR = @TERMUX_AR@ cqs
QMAKE_NM = @TERMUX_NM@ -P
QMAKE_OBJCOPY = @TERMUX_OBJCOPY@
QMAKE_PKG_CONFIG = @TERMUX_PKGCONFIG@
QMAKE_STRIP = @TERMUX_STRIP@
QMAKE_CFLAGS += @TERMUX_CFLAGS@
QMAKE_CXXFLAGS += @TERMUX_CXXFLAGS@
QMAKE_LFLAGS += @TERMUX_LDFLAGS@
QMAKE_LFLAGS_SHLIB += -shared
QMAKE_LFLAGS_PLUGIN += -shared
## Should be -lpthread, but Termux does not provide
## libpthread.so library.
QMAKE_LIBS_THREAD =
load(qt_config)

View File

@ -1,8 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/mkspecs/termux-cross/qplatformdefs.h qt-everywhere-src-5.11.2.mod/qtbase/mkspecs/termux-cross/qplatformdefs.h
--- qt-everywhere-src-5.11.2/qtbase/mkspecs/termux-cross/qplatformdefs.h 1970-01-01 03:00:00.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/mkspecs/termux-cross/qplatformdefs.h 2018-09-21 16:25:01.055329471 +0300
@@ -0,0 +1,4 @@
+#include "../android-clang/qplatformdefs.h"
+#define fseeko64 fseeko
+#define ftello64 ftello
+#define fopen64 fopen

View File

@ -1,35 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/mkspecs/termux/qmake.conf qt-everywhere-src-5.11.2.mod/qtbase/mkspecs/termux/qmake.conf
--- qt-everywhere-src-5.11.2/qtbase/mkspecs/termux/qmake.conf 1970-01-01 03:00:00.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/mkspecs/termux/qmake.conf 2018-09-21 16:26:18.042253449 +0300
@@ -0,0 +1,31 @@
+QT_QPA_DEFAULT_PLATFORM = xcb
+
+MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+include(../common/gcc-base-unix.conf)
+include(../common/clang.conf)
+
+QMAKE_CC = clang
+QMAKE_CXX = clang++
+QMAKE_LINK = $${QMAKE_CXX}
+QMAKE_LINK_SHLIB = $${QMAKE_CXX}
+QMAKE_AR = ar cqs
+QMAKE_NM = nm -P
+QMAKE_OBJCOPY = objcopy
+QMAKE_PKG_CONFIG = pkg-config
+QMAKE_STRIP = strip
+
+QMAKE_CFLAGS += -I/data/data/com.termux/files/usr/include
+QMAKE_CXXFLAGS += -I/data/data/com.termux/files/usr/include
+QMAKE_LFLAGS += -L/data/data/com.termux/files/usr/lib
+QMAKE_LFLAGS_SHLIB += -shared
+QMAKE_LFLAGS_PLUGIN += -shared
+
+## Should be -lpthread, but Termux does not provide
+## libpthread.so library.
+QMAKE_LIBS_THREAD =
+
+load(qt_config)

View File

@ -1,8 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/mkspecs/termux/qplatformdefs.h qt-everywhere-src-5.11.2.mod/qtbase/mkspecs/termux/qplatformdefs.h
--- qt-everywhere-src-5.11.2/qtbase/mkspecs/termux/qplatformdefs.h 1970-01-01 03:00:00.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/mkspecs/termux/qplatformdefs.h 2018-09-21 16:25:01.055329471 +0300
@@ -0,0 +1,4 @@
+#include "../android-clang/qplatformdefs.h"
+#define fseeko64 fseeko
+#define ftello64 ftello
+#define fopen64 fopen

View File

@ -1,13 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/src/corelib/global/qsystemdetection.h qt-everywhere-src-5.11.2.mod/qtbase/src/corelib/global/qsystemdetection.h
--- qt-everywhere-src-5.11.2/qtbase/src/corelib/global/qsystemdetection.h 2018-09-13 07:25:10.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/src/corelib/global/qsystemdetection.h 2018-09-21 16:25:01.055329471 +0300
@@ -108,9 +108,6 @@
# else
# error "Qt has not been ported to this Apple platform - see http://www.qt.io/developers"
# endif
-#elif defined(__ANDROID__) || defined(ANDROID)
-# define Q_OS_ANDROID
-# define Q_OS_LINUX
#elif defined(__CYGWIN__)
# define Q_OS_CYGWIN
#elif !defined(SAG_COM) && (!defined(WINAPI_FAMILY) || WINAPI_FAMILY==WINAPI_FAMILY_DESKTOP_APP) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))

View File

@ -1,48 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/src/corelib/thread/qthread_unix.cpp qt-everywhere-src-5.11.2.mod/qtbase/src/corelib/thread/qthread_unix.cpp
--- qt-everywhere-src-5.11.2/qtbase/src/corelib/thread/qthread_unix.cpp 2018-09-13 07:25:10.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/src/corelib/thread/qthread_unix.cpp 2018-09-21 16:25:01.058662816 +0300
@@ -92,7 +92,7 @@
# define SCHED_IDLE 5
#endif
-#if defined(Q_OS_DARWIN) || !defined(Q_OS_ANDROID) && !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#if !defined(__ANDROID__) && (defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0))
#define QT_HAS_THREAD_PRIORITY_SCHEDULING
#endif
@@ -312,7 +312,7 @@
void *QThreadPrivate::start(void *arg)
{
-#if !defined(Q_OS_ANDROID)
+#if !defined(__ANDROID__)
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
#endif
pthread_cleanup_push(QThreadPrivate::finish, arg);
@@ -360,7 +360,7 @@
#endif
emit thr->started(QThread::QPrivateSignal());
-#if !defined(Q_OS_ANDROID)
+#if !defined(__ANDROID__)
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_testcancel();
#endif
@@ -747,7 +747,7 @@
void QThread::terminate()
{
-#if !defined(Q_OS_ANDROID)
+#if !defined(__ANDROID__)
Q_D(QThread);
QMutexLocker locker(&d->mutex);
@@ -789,7 +789,7 @@
"Current thread was not started with QThread.");
Q_UNUSED(thr)
-#if defined(Q_OS_ANDROID)
+#if defined(__ANDROID__)
Q_UNUSED(enabled);
#else
pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, NULL);

View File

@ -1,69 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/src/network/kernel/qdnslookup_unix.cpp qt-everywhere-src-5.11.2.mod/qtbase/src/network/kernel/qdnslookup_unix.cpp
--- qt-everywhere-src-5.11.2/qtbase/src/network/kernel/qdnslookup_unix.cpp 2018-09-13 07:25:10.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/src/network/kernel/qdnslookup_unix.cpp 2018-09-21 16:25:01.061996160 +0300
@@ -65,9 +65,63 @@
#if QT_CONFIG(library)
-#if defined(Q_OS_OPENBSD)
-typedef struct __res_state* res_state;
+#include <sys/types.h>
+#include <linux/in.h>
+
+/* res_state: the global state used by the resolver stub. */
+#define MAXNS 3 /* max # name servers we'll track */
+#define MAXDFLSRCH 3 /* # default domain levels to try */
+#define MAXDNSRCH 6 /* max # domains in search path */
+#define MAXRESOLVSORT 10 /* number of net to sort on */
+
+struct __res_state {
+ int retrans; /* retransmition time interval */
+ int retry; /* number of times to retransmit */
+ unsigned long options; /* option flags - see below. */
+ int nscount; /* number of name servers */
+ struct sockaddr_in
+ nsaddr_list[MAXNS]; /* address of name server */
+ unsigned short id; /* current message id */
+ /* 2 byte hole here. */
+ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
+ char defdname[256]; /* default domain (deprecated) */
+ unsigned long pfcode; /* RES_PRF_ flags - see below. */
+ unsigned ndots:4; /* threshold for initial abs. query */
+ unsigned nsort:4; /* number of elements in sort_list[] */
+ unsigned ipv6_unavail:1; /* connecting to IPv6 server failed */
+ unsigned unused:23;
+ struct {
+ struct in_addr addr;
+ uint32_t mask;
+ } sort_list[MAXRESOLVSORT];
+ /* 4 byte hole here on 64-bit architectures. */
+ void * __glibc_unused_qhook;
+ void * __glibc_unused_rhook;
+ int res_h_errno; /* last one set for this context */
+ int _vcsock; /* PRIVATE: for res_send VC i/o */
+ unsigned int _flags; /* PRIVATE: see below */
+ /* 4 byte hole here on 64-bit architectures. */
+ union {
+ char pad[52]; /* On an i386 this means 512b total. */
+ struct {
+ uint16_t nscount;
+ uint16_t nsmap[MAXNS];
+ int nssocks[MAXNS];
+ uint16_t nscount6;
+ uint16_t nsinit;
+ struct sockaddr_in6 *nsaddrs[MAXNS];
+#ifdef _LIBC
+ unsigned long long int __glibc_extension_index
+ __attribute__((packed));
+#else
+ unsigned int __glibc_reserved[2];
#endif
+ } _ext;
+ } _u;
+};
+
+typedef struct __res_state* res_state;
+
typedef int (*dn_expand_proto)(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
static dn_expand_proto local_dn_expand = 0;
typedef void (*res_nclose_proto)(res_state);

View File

@ -1,65 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtbase/src/network/kernel/qhostinfo_unix.cpp qt-everywhere-src-5.11.2.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp
--- qt-everywhere-src-5.11.2/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-09-13 07:25:10.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-09-21 16:25:01.061996160 +0300
@@ -84,6 +84,61 @@
NeedResNInit
};
+#include <sys/types.h>
+#include <linux/in.h>
+
+/* res_state: the global state used by the resolver stub. */
+#define MAXNS 3 /* max # name servers we'll track */
+#define MAXDFLSRCH 3 /* # default domain levels to try */
+#define MAXDNSRCH 6 /* max # domains in search path */
+#define MAXRESOLVSORT 10 /* number of net to sort on */
+
+struct __res_state {
+ int retrans; /* retransmition time interval */
+ int retry; /* number of times to retransmit */
+ unsigned long options; /* option flags - see below. */
+ int nscount; /* number of name servers */
+ struct sockaddr_in
+ nsaddr_list[MAXNS]; /* address of name server */
+ unsigned short id; /* current message id */
+ /* 2 byte hole here. */
+ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
+ char defdname[256]; /* default domain (deprecated) */
+ unsigned long pfcode; /* RES_PRF_ flags - see below. */
+ unsigned ndots:4; /* threshold for initial abs. query */
+ unsigned nsort:4; /* number of elements in sort_list[] */
+ unsigned ipv6_unavail:1; /* connecting to IPv6 server failed */
+ unsigned unused:23;
+ struct {
+ struct in_addr addr;
+ uint32_t mask;
+ } sort_list[MAXRESOLVSORT];
+ /* 4 byte hole here on 64-bit architectures. */
+ void * __glibc_unused_qhook;
+ void * __glibc_unused_rhook;
+ int res_h_errno; /* last one set for this context */
+ int _vcsock; /* PRIVATE: for res_send VC i/o */
+ unsigned int _flags; /* PRIVATE: see below */
+ /* 4 byte hole here on 64-bit architectures. */
+ union {
+ char pad[52]; /* On an i386 this means 512b total. */
+ struct {
+ uint16_t nscount;
+ uint16_t nsmap[MAXNS];
+ int nssocks[MAXNS];
+ uint16_t nscount6;
+ uint16_t nsinit;
+ struct sockaddr_in6 *nsaddrs[MAXNS];
+#ifdef _LIBC
+ unsigned long long int __glibc_extension_index
+ __attribute__((packed));
+#else
+ unsigned int __glibc_reserved[2];
+#endif
+ } _ext;
+ } _u;
+};
+
typedef struct __res_state *res_state_ptr;
typedef int (*res_init_proto)(void);

View File

@ -1,15 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtlocation/src/plugins/geoservices/geoservices.pro qt-everywhere-src-5.11.2.mod/qtlocation/src/plugins/geoservices/geoservices.pro
--- qt-everywhere-src-5.11.2/qtlocation/src/plugins/geoservices/geoservices.pro 2018-08-31 15:50:06.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtlocation/src/plugins/geoservices/geoservices.pro 2018-09-21 16:25:01.061996160 +0300
@@ -8,11 +8,3 @@
qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
qtConfig(geoservices_osm): SUBDIRS += osm
-qtConfig(geoservices_mapboxgl) {
- !exists(../../3rdparty/mapbox-gl-native/mapbox-gl-native.pro) {
- warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
- } else {
- SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native
- mapboxgl.depends = ../../3rdparty/mapbox-gl-native
- }
-}

View File

@ -1,11 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtsensors/src/plugins/sensors/linux/linux.pro qt-everywhere-src-5.11.2.mod/qtsensors/src/plugins/sensors/linux/linux.pro
--- qt-everywhere-src-5.11.2/qtsensors/src/plugins/sensors/linux/linux.pro 2018-08-28 16:10:03.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtsensors/src/plugins/sensors/linux/linux.pro 2018-09-21 16:25:01.061996160 +0300
@@ -3,7 +3,6 @@
OTHER_FILES = plugin.json
-!android:LIBS += -lrt
HEADERS += linuxsysaccelerometer.h
SOURCES += linuxsysaccelerometer.cpp \
main.cpp

View File

@ -1,12 +0,0 @@
diff -uNr qt-everywhere-src-5.11.2/qtserialport/src/serialport/qserialport_unix.cpp qt-everywhere-src-5.11.2.mod/qtserialport/src/serialport/qserialport_unix.cpp
--- qt-everywhere-src-5.11.2/qtserialport/src/serialport/qserialport_unix.cpp 2018-08-29 13:18:41.000000000 +0300
+++ qt-everywhere-src-5.11.2.mod/qtserialport/src/serialport/qserialport_unix.cpp 2018-09-21 16:25:01.061996160 +0300
@@ -73,7 +73,7 @@
# define __ANDROID_API__ 21
# endif
-# if !defined(Q_OS_ANDROID) || (!defined(Q_PROCESSOR_X86) && __ANDROID_API__ < 21)
+# if 0
struct termios2 {
tcflag_t c_iflag; /* input mode flags */
tcflag_t c_oflag; /* output mode flags */

View File

@ -1,48 +0,0 @@
diff -uNr qt-everywhere-src-5.11.3/qtbase/src/corelib/io/qfilesystemengine_unix.cpp qt-everywhere-src-5.11.3.mod/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
--- qt-everywhere-src-5.11.3/qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2018-11-25 14:51:11.000000000 +0200
+++ qt-everywhere-src-5.11.3.mod/qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2019-07-19 18:45:35.433356132 +0300
@@ -97,7 +97,7 @@
#endif
#endif
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(__ANDROID__)
// statx() is disabled on Android because quite a few systems
// come with sandboxes that kill applications that make system calls outside a
// whitelist and several Android vendors can't be bothered to update the list.
@@ -111,7 +111,7 @@
QT_BEGIN_NAMESPACE
enum {
-#ifdef Q_OS_ANDROID
+#if defined(Q_OS_ANDROID) || defined(__ANDROID__)
// On Android, the link(2) system call has been observed to always fail
// with EACCES, regardless of whether there are permission problems or not.
SupportsHardlinking = false
@@ -692,7 +692,7 @@
if (entry.isRoot())
return entry;
-#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L
+#if !defined(Q_OS_MAC) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(__ANDROID__) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L
// realpath(X,0) is not supported
Q_UNUSED(data);
return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));
@@ -706,7 +706,7 @@
errno = savedErrno;
ret = 0;
}
-# elif defined(Q_OS_ANDROID)
+# elif defined(Q_OS_ANDROID) || defined(__ANDROID__)
// On some Android versions, realpath() will return a path even if it does not exist
// To work around this, we check existence in advance.
if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute))
@@ -856,7 +856,7 @@
#if !defined(Q_OS_INTEGRITY)
struct group *gr = 0;
-#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS) && (!defined(Q_OS_ANDROID) || defined(Q_OS_ANDROID) && (__ANDROID_API__ >= 24))
+#if !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) && !defined(Q_OS_VXWORKS) && (!defined(Q_OS_ANDROID) || !defined(__ANDROID__) || defined(Q_OS_ANDROID) && (__ANDROID_API__ >= 24))
size_max = sysconf(_SC_GETGR_R_SIZE_MAX);
if (size_max == -1)
size_max = 1024;

View File

@ -1,70 +0,0 @@
TERMUX_SUBPKG_DESCRIPTION="Classes for QML and JavaScript languages"
TERMUX_SUBPKG_DEPENDS="qt5-base"
TERMUX_SUBPKG_BREAKS="qt5-declarative-dev"
TERMUX_SUBPKG_REPLACES="qt5-declarative-dev"
TERMUX_SUBPKG_INCLUDE="
bin/qml
bin/qmlcachegen
bin/qmleasing
bin/qmlimportscanner
bin/qmllint
bin/qmlmin
bin/qmlplugindump
bin/qmlprofiler
bin/qmlscene
bin/qmltestrunner
include/qt/QtPacketProtocol
include/qt/QtQml
include/qt/QtQmlDebug
include/qt/QtQuick
include/qt/QtQuickParticles
include/qt/QtQuickTest
include/qt/QtQuickWidgets
lib/cmake/Qt5Qml
lib/cmake/Qt5Quick
lib/cmake/Qt5QuickCompiler
lib/cmake/Qt5QuickTest
lib/cmake/Qt5QuickWidgets
lib/libQt5PacketProtocol.a
lib/libQt5PacketProtocol.prl
lib/libQt5Qml.prl
lib/libQt5Qml.so
lib/libQt5Qml.so.*
lib/libQt5QmlDebug.a
lib/libQt5QmlDebug.prl
lib/libQt5QmlDevTools.a
lib/libQt5QmlDevTools.prl
lib/libQt5Quick.prl
lib/libQt5Quick.so
lib/libQt5Quick.so.*
lib/libQt5QuickParticles.prl
lib/libQt5QuickParticles.so
lib/libQt5QuickParticles.so.*
lib/libQt5QuickTest.prl
lib/libQt5QuickTest.so
lib/libQt5QuickTest.so.*
lib/libQt5QuickWidgets.prl
lib/libQt5QuickWidgets.so
lib/libQt5QuickWidgets.so.*
lib/pkgconfig/Qt5Qml.pc
lib/pkgconfig/Qt5Quick.pc
lib/pkgconfig/Qt5QuickTest.pc
lib/pkgconfig/Qt5QuickWidgets.pc
lib/qt/mkspecs/features/qmlcache.prf
lib/qt/mkspecs/features/qtquickcompiler.prf
lib/qt/mkspecs/modules/qt_lib_packetprotocol_private.pri
lib/qt/mkspecs/modules/qt_lib_qml.pri
lib/qt/mkspecs/modules/qt_lib_qml_private.pri
lib/qt/mkspecs/modules/qt_lib_qmldebug_private.pri
lib/qt/mkspecs/modules/qt_lib_qmldevtools_private.pri
lib/qt/mkspecs/modules/qt_lib_qmltest.pri
lib/qt/mkspecs/modules/qt_lib_qmltest_private.pri
lib/qt/mkspecs/modules/qt_lib_quick.pri
lib/qt/mkspecs/modules/qt_lib_quick_private.pri
lib/qt/mkspecs/modules/qt_lib_quickparticles_private.pri
lib/qt/mkspecs/modules/qt_lib_quickwidgets.pri
lib/qt/mkspecs/modules/qt_lib_quickwidgets_private.pri
lib/qt/qml
libexec/qt/qmltooling
"

View File

@ -1,33 +0,0 @@
TERMUX_SUBPKG_DESCRIPTION="Qt development tools (incomplete !)"
TERMUX_SUBPKG_DEPENDS="qt5-base"
TERMUX_SUBPKG_BREAKS="qt5-tools-dev"
TERMUX_SUBPKG_REPLACES="qt5-tools-dev"
TERMUX_SUBPKG_INCLUDE="
bin/lrelease
bin/lupdate
bin/lconvert
bin/qtattributionsscanner
bin/qtplugininfo
bin/qtpaths
bin/qtdiag
include/qt/QtHelp
include/qt/QtUiPlugin
include/qt/QtUiTools
lib/cmake/Qt5Help
lib/cmake/Qt5UiPlugin
lib/cmake/Qt5UiTools
lib/cmake/Qt5LinguistTools
lib/libQt5Help.prl
lib/libQt5Help.so
lib/libQt5Help.so.*
lib/libQt5UiTools.prl
lib/libQt5UiTools.a
lib/pkgconfig/Qt5Help.pc
lib/pkgconfig/Qt5UiTools.pc
lib/qt/mkspecs/modules/qt_lib_help.pri
lib/qt/mkspecs/modules/qt_lib_help_private.pri
lib/qt/mkspecs/modules/qt_lib_uiplugin.pri
lib/qt/mkspecs/modules/qt_lib_uitools.pri
lib/qt/mkspecs/modules/qt_lib_uitools_private.pri
"

View File

@ -1,15 +0,0 @@
TERMUX_SUBPKG_DESCRIPTION="Qt platform-specific APIs for X11"
TERMUX_SUBPKG_DEPENDS="qt5-base"
TERMUX_PKG_BREAKS="qt5-x11extras-dev"
TERMUX_PKG_REPLACES="qt5-x11extras-dev"
TERMUX_SUBPKG_INCLUDE="
include/qt/QtX11Extras
lib/cmake/Qt5X11Extras
lib/libQt5X11Extras.prl
lib/libQt5X11Extras.so
lib/libQt5X11Extras.so.*
lib/pkgconfig/Qt5X11Extras.pc
lib/qt/mkspecs/modules/qt_lib_x11extras.pri
lib/qt/mkspecs/modules/qt_lib_x11extras_private.pri
"

View File

@ -1,168 +0,0 @@
#!/bin/sh
##
## A script for building qmake on device.
## Use in Termux only !
##
## Usage:
##
## git clone https://github.com/termux/x11-packages
## cp termux-build-qmake.sh x11-packages/packages/qt5-base/
## cd x11-packages/packages/qt5-base/
## bash termux-build-qmake.sh
set -e
TERMUX_PREFIX=/data/data/com.termux/files/usr
if [ $(uname -o) != Android ]; then
echo "This script should be run in Termux !"
exit 1
fi
if [ -e "build.sh" ]; then
source ./build.sh
fi
apt update
apt upgrade -y
apt install -y coreutils clang curl make
hash -r
## Override function from build.sh since we are
## building for host.
termux_step_configure () {
export PKG_CONFIG_SYSROOT_DIR="${TERMUX_PREFIX}"
./configure -v \
-opensource \
-confirm-license \
-release \
-platform termux \
-optimized-qmake \
-no-rpath \
-no-use-gold-linker \
-prefix "${TERMUX_PREFIX}" \
-docdir "${TERMUX_PREFIX}/share/doc/qt" \
-headerdir "${TERMUX_PREFIX}/include/qt" \
-archdatadir "${TERMUX_PREFIX}/lib/qt" \
-datadir "${TERMUX_PREFIX}/share/qt" \
-sysconfdir "${TERMUX_PREFIX}/etc/xdg" \
-examplesdir "${TERMUX_PREFIX}/share/doc/qt/examples" \
-plugindir "$TERMUX_PREFIX/libexec/qt" \
-nomake examples \
-skip qt3d \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtcanvas3d \
-skip qtcharts \
-skip qtconnectivity \
-skip qtdatavis3d \
-skip qtdeclarative \
-skip qtdoc \
-skip qtgamepad \
-skip qtgraphicaleffects \
-skip qtimageformats \
-skip qtlocation \
-skip qtmacextras \
-skip qtmultimedia \
-skip qtnetworkauth \
-skip qtpurchasing \
-skip qtquickcontrols \
-skip qtquickcontrols2 \
-skip qtremoteobjects \
-skip qtscript \
-skip qtscxml \
-skip qtsensors \
-skip qtserialbus \
-skip qtserialport \
-skip qtspeech \
-skip qtsvg \
-skip qttools \
-skip qttranslations \
-skip qtvirtualkeyboard \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebglplugin \
-skip qtwebsockets \
-skip qtwebview \
-skip qtwinextras \
-skip qtx11extras \
-skip qtxmlpatterns \
-no-dbus \
-no-accessibility \
-no-glib \
-no-eventfd \
-no-inotify \
-icu \
-system-pcre \
-system-zlib \
-ssl \
-openssl-linked \
-no-system-proxies \
-no-cups \
-system-harfbuzz \
-no-opengl \
-no-vulkan \
-qpa xcb \
-no-eglfs \
-no-gbm \
-no-kms \
-no-linuxfb \
-no-mirclient \
-system-xcb \
-no-libudev \
-no-evdev \
-no-libinput \
-no-mtdev \
-no-tslib \
-system-xkbcommon-x11 \
-no-xkbcommon-evdev \
-gif \
-ico \
-system-libpng \
-system-libjpeg \
-sql-sqlite \
-no-feature-dnslookup
}
if [ ! -e "qt-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz" ]; then
echo "[*] Downloading Qt sources..."
curl -L --output "qt-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz" "${TERMUX_PKG_SRCURL}"
fi
echo "[*] Unpacking Qt sources..."
rm -rf "qt-everywhere-src-${TERMUX_PKG_VERSION}"
tar xf "qt-everywhere-src-${TERMUX_PKG_VERSION}.tar.xz"
tar xf termux-prebuilt-qmake.txz
cd "qt-everywhere-src-${TERMUX_PKG_VERSION}" && {
## On-device hostbuild patch.
patch -p1 -i ../termux-prebuilt-qmake/misc/qt5-termux-build-host.patch
## We need only qmake generated by configure, so ignoring
## errors here.
set +e
echo "[*] Running ./configure..."
termux_step_configure
set -e
cd qtbase/qmake && {
## Bootstrap qmake.
echo "[*] Bootstrapping qmake..."
../bin/qmake -spec termux -o Makefile.qmake-aux qmake-aux.pro
make -f Makefile.qmake-aux
## Just verify.
echo "[*] Verifying..."
./qmake -spec termux -o Makefile.qmake-aux qmake-aux.pro
make -f Makefile.qmake-aux
cd -
}
cd ../
}
echo "[*] Done. Check file './qmake-android-$(uname -m)'."
cp "qt-everywhere-src-${TERMUX_PKG_VERSION}/qtbase/qmake/qmake" "./qmake-android-$(uname -m)"