qt5-base: manually build tools for custom spec (linux-termux-clang)
Seems that tools like 'qmake' are build only for host (x86_64) architecture.
This commit is contained in:
parent
df1e4d8ec1
commit
d4fd3e0d6d
@ -8,8 +8,6 @@ TERMUX_PKG_SHA256=39602cb08f9c96867910c375d783eed00fc4a244bffaa93b801225d17950fb
|
||||
TERMUX_PKG_DEPENDS="libsqlite, libjpeg-turbo, libpng, pcre2, openssl, libandroid-support, freetype, harfbuzz, libwebp, fontconfig, libopus, libevent, jsoncpp"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="bin/"
|
||||
|
||||
termux_step_pre_configure () {
|
||||
sed -e "s|@TERMUX_HOST_PLATFORM@|$TERMUX_HOST_PLATFORM|g" \
|
||||
-e "s|@CFLAGS@|$CPPFLAGS $CFLAGS|" \
|
||||
@ -28,7 +26,7 @@ termux_step_configure () {
|
||||
-datadir "${TERMUX_PREFIX}/share/qt" \
|
||||
-sysconfdir "${TERMUX_PREFIX}/etc/xdg" \
|
||||
-examplesdir "${TERMUX_PREFIX}/share/doc/qt/examples" \
|
||||
-xplatform linux-termux-clang \
|
||||
-xplatform "linux-termux-clang" \
|
||||
-plugindir "$TERMUX_PREFIX/libexec/qt" \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
@ -36,7 +34,6 @@ termux_step_configure () {
|
||||
-optimized-qmake \
|
||||
-nomake examples \
|
||||
-gui \
|
||||
-no-widgets \
|
||||
-no-dbus \
|
||||
-no-accessibility \
|
||||
-no-glib \
|
||||
@ -78,4 +75,51 @@ termux_step_make() {
|
||||
|
||||
termux_step_make_install() {
|
||||
make -C qtbase install
|
||||
|
||||
cd "${TERMUX_PKG_SRCDIR}/qtbase/src/tools/bootstrap" && {
|
||||
make clean
|
||||
|
||||
"${TERMUX_PKG_SRCDIR}/qtbase/bin/qmake" \
|
||||
-spec "${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/linux-termux-clang"
|
||||
|
||||
make -j "${TERMUX_MAKE_PROCESSES}"
|
||||
}
|
||||
|
||||
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/linux-termux-clang"
|
||||
|
||||
sed \
|
||||
-i 's@-lpthread@@g' \
|
||||
"${TERMUX_PKG_SRCDIR}/qtbase/src/tools/${i}/Makefile"
|
||||
|
||||
make -j "${TERMUX_MAKE_PROCESSES}"
|
||||
|
||||
install \
|
||||
-Dm700 "${TERMUX_PKG_BUILDDIR}/qtbase/bin/${i}" \
|
||||
"${TERMUX_PREFIX}/bin/${i}"
|
||||
}
|
||||
done
|
||||
unset i
|
||||
|
||||
cd "${TERMUX_PKG_SRCDIR}/qtbase/qmake" && {
|
||||
make clean
|
||||
|
||||
make \
|
||||
-j "${TERMUX_MAKE_PROCESSES}" \
|
||||
AR="${AR} cqs" \
|
||||
CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
LINK="${CXX}" \
|
||||
STRIP="${STRIP}" \
|
||||
QMAKESPEC="${TERMUX_PKG_SRCDIR}/qtbase/mkspecs/linux-termux-clang" \
|
||||
QMAKE_LFLAGS="${TERMUX_PREFIX}/lib/libc++_shared.so"
|
||||
|
||||
install \
|
||||
-Dm700 "${TERMUX_PKG_BUILDDIR}/qtbase/bin/qmake" \
|
||||
"${TERMUX_PREFIX}/bin/qmake"
|
||||
}
|
||||
}
|
||||
|
@ -23,15 +23,15 @@
|
||||
+QMAKE_CXXFLAGS = @CXXFLAGS@
|
||||
+QMAKE_LFLAGS = @LDFLAGS@
|
||||
+
|
||||
+QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
||||
+QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack
|
||||
+QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
||||
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
|
||||
+QMAKE_LFLAGS_PLUGIN = -Wl,--no-undefined -Wl,-z,noexecstack -shared
|
||||
+QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
|
||||
+
|
||||
+QMAKE_LIBS_THREAD =
|
||||
+QMAKE_LIBS_X11 =
|
||||
+QMAKE_LIBS_OPENGL =
|
||||
+QMAKE_LIBS_OPENGL_ES2 = -lGLESv3
|
||||
+QMAKE_LIBS_OPENGL_ES2 =
|
||||
+load(qt_config)
|
||||
--- ./qtbase/mkspecs/linux-termux-clang/qplatformdefs.h 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ ./qtbase/mkspecs/linux-termux-clang/qplatformdefs.h 2017-07-14 23:08:02.031153237 +0530
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/corelib/global/qsystemdetection.h qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/global/qsystemdetection.h
|
||||
--- qt-everywhere-src-5.11.1/qtbase/src/corelib/global/qsystemdetection.h 2018-06-15 10:29:31.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/global/qsystemdetection.h 2018-09-13 18:07:43.498639468 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/global/qsystemdetection.h 2018-09-15 15:10:50.014669337 +0300
|
||||
@@ -108,9 +108,6 @@
|
||||
# else
|
||||
# error "Qt has not been ported to this Apple platform - see http://www.qt.io/developers"
|
||||
|
@ -0,0 +1,48 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/io/qfilesystemengine_unix.cpp
|
||||
--- qt-everywhere-src-5.11.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2018-06-15 10:29:31.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/io/qfilesystemengine_unix.cpp 2018-09-15 15:16:25.709705452 +0300
|
||||
@@ -98,7 +98,7 @@
|
||||
# define FICLONE _IOW(0x94, 9, int)
|
||||
#endif
|
||||
|
||||
-# if defined(Q_OS_ANDROID)
|
||||
+# if defined(Q_OS_ANDROID) || defined (__ANDROID__)
|
||||
// renameat2() and statx() are 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.
|
||||
@@ -127,7 +127,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
|
||||
@@ -722,7 +722,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()));
|
||||
@@ -736,7 +736,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))
|
||||
@@ -886,7 +886,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;
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/corelib/thread/qthread_unix.cpp qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/thread/qthread_unix.cpp
|
||||
--- qt-everywhere-src-5.11.1/qtbase/src/corelib/thread/qthread_unix.cpp 2018-06-15 10:29:31.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/thread/qthread_unix.cpp 2018-09-13 18:07:43.501972824 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/corelib/thread/qthread_unix.cpp 2018-09-15 15:10:50.018002688 +0300
|
||||
@@ -92,7 +92,7 @@
|
||||
# define SCHED_IDLE 5
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtbase/src/network/kernel/qhostinfo_unix.cpp qt-everywhere-src-5.11.1.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp
|
||||
--- qt-everywhere-src-5.11.1/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-06-15 10:29:31.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-09-13 18:10:03.589583706 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtbase/src/network/kernel/qhostinfo_unix.cpp 2018-09-15 15:10:50.021336038 +0300
|
||||
@@ -84,6 +84,61 @@
|
||||
NeedResNInit
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtlocation/src/plugins/geoservices/geoservices.pro qt-everywhere-src-5.11.1.mod/qtlocation/src/plugins/geoservices/geoservices.pro
|
||||
--- qt-everywhere-src-5.11.1/qtlocation/src/plugins/geoservices/geoservices.pro 2018-06-12 21:44:12.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtlocation/src/plugins/geoservices/geoservices.pro 2018-09-13 18:07:43.501972824 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtlocation/src/plugins/geoservices/geoservices.pro 2018-09-15 15:10:50.028002739 +0300
|
||||
@@ -8,11 +8,3 @@
|
||||
qtConfig(geoservices_itemsoverlay): SUBDIRS += itemsoverlay
|
||||
qtConfig(geoservices_osm): SUBDIRS += osm
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtsensors/src/plugins/sensors/linux/linux.pro qt-everywhere-src-5.11.1.mod/qtsensors/src/plugins/sensors/linux/linux.pro
|
||||
--- qt-everywhere-src-5.11.1/qtsensors/src/plugins/sensors/linux/linux.pro 2018-06-12 12:10:20.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtsensors/src/plugins/sensors/linux/linux.pro 2018-09-13 18:07:43.505306179 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtsensors/src/plugins/sensors/linux/linux.pro 2018-09-15 15:10:50.028002739 +0300
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
OTHER_FILES = plugin.json
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -uNr qt-everywhere-src-5.11.1/qtserialport/src/serialport/qserialport_unix.cpp qt-everywhere-src-5.11.1.mod/qtserialport/src/serialport/qserialport_unix.cpp
|
||||
--- qt-everywhere-src-5.11.1/qtserialport/src/serialport/qserialport_unix.cpp 2018-06-09 14:09:14.000000000 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtserialport/src/serialport/qserialport_unix.cpp 2018-09-13 18:07:43.508639535 +0300
|
||||
+++ qt-everywhere-src-5.11.1.mod/qtserialport/src/serialport/qserialport_unix.cpp 2018-09-15 15:10:50.031336089 +0300
|
||||
@@ -73,7 +73,7 @@
|
||||
# define __ANDROID_API__ 21
|
||||
# endif
|
||||
|
Loading…
Reference in New Issue
Block a user