diff --git a/contrib/depends/packages/native_qt.mk b/contrib/depends/packages/native_qt.mk index 4a3d38c..b90009a 100644 --- a/contrib/depends/packages/native_qt.mk +++ b/contrib/depends/packages/native_qt.mk @@ -8,8 +8,6 @@ $(package)_qt_libs=corelib network widgets gui plugins testlib $(package)_patches = dont_hardcode_pwd.patch $(package)_patches += fast_fixed_dtoa_no_optimize.patch $(package)_patches += guix_cross_lib_path.patch -$(package)_patches += mac-qmake.conf -$(package)_patches += no_pthread_cond_clockwait.patch $(package)_patches += qtbase-moc-ignore-gcc-macro.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += root_CMakeLists.txt @@ -38,90 +36,83 @@ $(package)_config_opts_debug += -optimized-tools $(package)_config_opts += -libexecdir $(build_prefix)/qt-host/bin $(package)_config_opts += -c++std c++17 $(package)_config_opts += -confirm-license +$(package)_config_opts += -opensource +$(package)_config_opts += -pkg-config +$(package)_config_opts += -prefix $(build_prefix)/qt-host +$(package)_config_opts += -static +$(package)_config_opts += -platform linux-g++ -xplatform linux-g++ +ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx))) +$(package)_config_opts_x86_64 = -xplatform linux-clang-libc++ +endif + $(package)_config_opts += -no-cups $(package)_config_opts += -no-egl $(package)_config_opts += -no-eglfs $(package)_config_opts += -no-evdev +$(package)_config_opts += -no-feature-androiddeployqt +$(package)_config_opts += -no-feature-colordialog +$(package)_config_opts += -no-feature-dbus +$(package)_config_opts += -no-feature-dial +$(package)_config_opts += -no-feature-fontcombobox +$(package)_config_opts += -no-feature-fontconfig +$(package)_config_opts += -no-feature-freetype +$(package)_config_opts += -no-feature-harfbuzz +$(package)_config_opts += -no-feature-http +$(package)_config_opts += -no-feature-image_heuristic_mask +$(package)_config_opts += -no-feature-keysequenceedit +$(package)_config_opts += -no-feature-lcdnumber +$(package)_config_opts += -no-feature-networkdiskcache +$(package)_config_opts += -no-feature-pdf +$(package)_config_opts += -no-feature-png +$(package)_config_opts += -no-feature-printdialog +$(package)_config_opts += -no-feature-printer +$(package)_config_opts += -no-feature-printpreviewdialog +$(package)_config_opts += -no-feature-printpreviewwidget +$(package)_config_opts += -no-feature-qmake +$(package)_config_opts += -no-feature-sessionmanager +$(package)_config_opts += -no-feature-spatialaudio +$(package)_config_opts += -no-feature-sql +$(package)_config_opts += -no-feature-syntaxhighlighter +$(package)_config_opts += -no-feature-testlib +$(package)_config_opts += -no-feature-textmarkdownwriter +$(package)_config_opts += -no-feature-textodfwriter +$(package)_config_opts += -no-feature-topleveldomain +$(package)_config_opts += -no-feature-undocommand +$(package)_config_opts += -no-feature-undogroup +$(package)_config_opts += -no-feature-undostack +$(package)_config_opts += -no-feature-undoview +$(package)_config_opts += -no-feature-vnc +$(package)_config_opts += -no-feature-vulkan +$(package)_config_opts += -no-feature-widgets +$(package)_config_opts += -no-feature-xkbcommon +$(package)_config_opts += -no-feature-xlib $(package)_config_opts += -no-gif $(package)_config_opts += -no-glib -$(package)_config_opts += -no-icu $(package)_config_opts += -no-ico +$(package)_config_opts += -no-icu $(package)_config_opts += -no-kms -$(package)_config_opts += -no-linuxfb -#$(package)_config_opts += -no-libjpeg # Needed -#$(package)_config_opts += -no-libproxy # Needed +$(package)_config_opts += -no-libjpeg $(package)_config_opts += -no-libudev +$(package)_config_opts += -no-linuxfb +$(package)_config_opts += -nomake examples +$(package)_config_opts += -nomake tests $(package)_config_opts += -no-mtdev +$(package)_config_opts += -no-opengl $(package)_config_opts += -no-openssl -#$(package)_config_opts += -openssl-linked $(package)_config_opts += -no-openvg +$(package)_config_opts += -no-pch $(package)_config_opts += -no-reduce-relocations $(package)_config_opts += -no-schannel $(package)_config_opts += -no-sctp $(package)_config_opts += -no-securetransport $(package)_config_opts += -no-system-proxies $(package)_config_opts += -no-use-gold-linker -$(package)_config_opts += -no-zstd -$(package)_config_opts += -nomake examples -$(package)_config_opts += -nomake tests -$(package)_config_opts += -opensource -$(package)_config_opts += -pkg-config -$(package)_config_opts += -prefix $(build_prefix)/qt-host -$(package)_config_opts += -qt-libpng -$(package)_config_opts += -qt-pcre -$(package)_config_opts += -qt-harfbuzz -$(package)_config_opts += -qt-zlib -$(package)_config_opts += -static -$(package)_config_opts += -no-feature-colordialog -#$(package)_config_opts += -no-feature-concurrent # Needed -$(package)_config_opts += -no-feature-dial -$(package)_config_opts += -no-feature-fontcombobox -$(package)_config_opts += -no-feature-http -$(package)_config_opts += -no-feature-image_heuristic_mask -$(package)_config_opts += -no-feature-keysequenceedit -$(package)_config_opts += -no-feature-lcdnumber -$(package)_config_opts += -no-feature-networkdiskcache -#$(package)_config_opts += -no-feature-networkproxy # Needed -$(package)_config_opts += -no-feature-pdf -$(package)_config_opts += -no-feature-printdialog -$(package)_config_opts += -no-feature-printer -$(package)_config_opts += -no-feature-printpreviewdialog -$(package)_config_opts += -no-feature-printpreviewwidget -$(package)_config_opts += -no-feature-sessionmanager -#$(package)_config_opts += -no-feature-socks5 # Needed -$(package)_config_opts += -no-feature-spatialaudio -$(package)_config_opts += -no-feature-sql -$(package)_config_opts += -no-feature-syntaxhighlighter -#$(package)_config_opts += -no-feature-textbrowser # Needed -$(package)_config_opts += -no-feature-textmarkdownwriter -$(package)_config_opts += -no-feature-textodfwriter -$(package)_config_opts += -no-feature-topleveldomain -#$(package)_config_opts += -no-feature-udpsocket # Neede -$(package)_config_opts += -no-feature-undocommand -$(package)_config_opts += -no-feature-undogroup -$(package)_config_opts += -no-feature-undostack -$(package)_config_opts += -no-feature-undoview -$(package)_config_opts += -no-feature-vnc -#$(package)_config_opts += -no-feature-wizard # Needed -$(package)_config_opts += -no-feature-fontconfig - $(package)_config_opts += -no-xcb-xlib -$(package)_config_opts += -no-feature-xlib -$(package)_config_opts += -no-feature-xkbcommon +$(package)_config_opts += -no-zstd -# https://bugreports.qt.io/browse/QTBUG-99957 -$(package)_config_opts += -no-pch - -$(package)_config_opts += -no-opengl -$(package)_config_opts += -no-feature-vulkan ifneq ($(LTO),) $(package)_config_opts += -ltcg endif -$(package)_config_opts += -platform linux-g++ -xplatform linux-g++ -ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx))) -$(package)_config_opts_x86_64 = -xplatform linux-clang-libc++ -endif - endef define $(package)_fetch_cmds @@ -158,8 +149,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \ - patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \ - patch -p1 -i $($(package)_patch_dir)/no_pthread_cond_clockwait.patch + patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch endef define $(package)_config_cmds diff --git a/contrib/depends/patches/native_qt/mac-qmake.conf b/contrib/depends/patches/native_qt/mac-qmake.conf deleted file mode 100644 index cb94bf0..0000000 --- a/contrib/depends/patches/native_qt/mac-qmake.conf +++ /dev/null @@ -1,22 +0,0 @@ -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental lib_version_first absolute_library_soname -QMAKE_INCREMENTAL_STYLE = sublib -include(../common/macx.conf) -include(../common/gcc-base-mac.conf) -include(../common/clang.conf) -include(../common/clang-mac.conf) -QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH} -QMAKE_XCODE_VERSION = $${XCODE_VERSION} -QMAKE_XCODE_DEVELOPER_PATH=/Developer -QMAKE_MAC_SDK=macosx -QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH} -QMAKE_MAC_SDK.macosx.platform_name = macosx -QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION} -QMAKE_MAC_SDK.macosx.PlatformPath = /phony -!host_build: QMAKE_CFLAGS += -target $${MAC_TARGET} -!host_build: QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS -!host_build: QMAKE_CXXFLAGS += -target $${MAC_TARGET} -!host_build: QMAKE_LFLAGS += -target $${MAC_TARGET} -QMAKE_AR = $${CROSS_COMPILE}ar cq -QMAKE_RANLIB=$${CROSS_COMPILE}ranlib -load(qt_config) diff --git a/contrib/depends/patches/native_qt/no_pthread_cond_clockwait.patch b/contrib/depends/patches/native_qt/no_pthread_cond_clockwait.patch deleted file mode 100644 index 336434a..0000000 --- a/contrib/depends/patches/native_qt/no_pthread_cond_clockwait.patch +++ /dev/null @@ -1,174 +0,0 @@ -From e062494e888e4dfbb42cb0b2f2c9d41dd76b9bfb Mon Sep 17 00:00:00 2001 -From: tobtoht -Date: Mon, 31 Oct 2022 00:38:39 +0100 -Subject: [PATCH] Revert "Re-apply "QReadWriteLock: replace (QWaitCondition, - QMutex) with std::(condition_variable, mutex)"" - -This reverts commit fd8f81f3859fe92082caec925223e08cf61c69d4. ---- - src/corelib/thread/qreadwritelock.cpp | 35 ++++++++++++--------------- - src/corelib/thread/qreadwritelock_p.h | 12 ++++----- - 2 files changed, 22 insertions(+), 25 deletions(-) - -diff --git a/qtbase/src/corelib/thread/qreadwritelock.cpp b/qtbase/src/corelib/thread/qreadwritelock.cpp -index c31782d684..a46b70180c 100644 ---- a/qtbase/src/corelib/thread/qreadwritelock.cpp -+++ b/qtbase/src/corelib/thread/qreadwritelock.cpp -@@ -31,9 +31,6 @@ QT_BEGIN_NAMESPACE - */ - - namespace { -- --using ms = std::chrono::milliseconds; -- - enum { - StateMask = 0x3, - StateLockedForRead = 0x1, -@@ -243,7 +240,7 @@ bool QReadWriteLock::tryLockForRead(int timeout) - d = d_ptr.loadAcquire(); - continue; - } -- return d->lockForRead(lock, timeout); -+ return d->lockForRead(timeout); - } - } - -@@ -347,7 +344,7 @@ bool QReadWriteLock::tryLockForWrite(int timeout) - d = d_ptr.loadAcquire(); - continue; - } -- return d->lockForWrite(lock, timeout); -+ return d->lockForWrite(timeout); - } - } - -@@ -431,9 +428,9 @@ QReadWriteLock::StateForWaitCondition QReadWriteLock::stateForWaitCondition() co - - } - --bool QReadWriteLockPrivate::lockForRead(std::unique_lock &lock, int timeout) -+bool QReadWriteLockPrivate::lockForRead(int timeout) - { -- Q_ASSERT(!mutex.try_lock()); // mutex must be locked when entering this function -+ Q_ASSERT(!mutex.tryLock()); // mutex must be locked when entering this function - - QElapsedTimer t; - if (timeout > 0) -@@ -447,10 +444,10 @@ bool QReadWriteLockPrivate::lockForRead(std::unique_lock &lock - if (elapsed > timeout) - return false; - waitingReaders++; -- readerCond.wait_for(lock, ms{timeout - elapsed}); -+ readerCond.wait(&mutex, QDeadlineTimer(timeout - elapsed)); - } else { - waitingReaders++; -- readerCond.wait(lock); -+ readerCond.wait(&mutex); - } - waitingReaders--; - } -@@ -459,9 +456,9 @@ bool QReadWriteLockPrivate::lockForRead(std::unique_lock &lock - return true; - } - --bool QReadWriteLockPrivate::lockForWrite(std::unique_lock &lock, int timeout) -+bool QReadWriteLockPrivate::lockForWrite(int timeout) - { -- Q_ASSERT(!mutex.try_lock()); // mutex must be locked when entering this function -+ Q_ASSERT(!mutex.tryLock()); // mutex must be locked when entering this function - - QElapsedTimer t; - if (timeout > 0) -@@ -476,15 +473,15 @@ bool QReadWriteLockPrivate::lockForWrite(std::unique_lock &loc - if (waitingReaders && !waitingWriters && !writerCount) { - // We timed out and now there is no more writers or waiting writers, but some - // readers were queued (probably because of us). Wake the waiting readers. -- readerCond.notify_all(); -+ readerCond.wakeAll(); - } - return false; - } - waitingWriters++; -- writerCond.wait_for(lock, ms{timeout - elapsed}); -+ writerCond.wait(&mutex, QDeadlineTimer(timeout - elapsed)); - } else { - waitingWriters++; -- writerCond.wait(lock); -+ writerCond.wait(&mutex); - } - waitingWriters--; - } -@@ -497,11 +494,11 @@ bool QReadWriteLockPrivate::lockForWrite(std::unique_lock &loc - - void QReadWriteLockPrivate::unlock() - { -- Q_ASSERT(!mutex.try_lock()); // mutex must be locked when entering this function -+ Q_ASSERT(!mutex.tryLock()); // mutex must be locked when entering this function - if (waitingWriters) -- writerCond.notify_one(); -+ writerCond.wakeOne(); - else if (waitingReaders) -- readerCond.notify_all(); -+ readerCond.wakeAll(); - } - - static auto handleEquals(Qt::HANDLE handle) -@@ -523,7 +520,7 @@ bool QReadWriteLockPrivate::recursiveLockForRead(int timeout) - return true; - } - -- if (!lockForRead(lock, timeout)) -+ if (!lockForRead(timeout)) - return false; - - Reader r = {self, 1}; -@@ -542,7 +539,7 @@ bool QReadWriteLockPrivate::recursiveLockForWrite(int timeout) - return true; - } - -- if (!lockForWrite(lock, timeout)) -+ if (!lockForWrite(timeout)) - return false; - - currentWriter = self; -diff --git a/qtbase/src/corelib/thread/qreadwritelock_p.h b/qtbase/src/corelib/thread/qreadwritelock_p.h -index e1d42fbbf3..c88eb15e1b 100644 ---- a/qtbase/src/corelib/thread/qreadwritelock_p.h -+++ b/qtbase/src/corelib/thread/qreadwritelock_p.h -@@ -17,8 +17,8 @@ - // - - #include --#include - #include -+#include - - QT_REQUIRE_CONFIG(thread); - -@@ -30,9 +30,9 @@ public: - explicit QReadWriteLockPrivate(bool isRecursive = false) - : recursive(isRecursive) {} - -- QtPrivate::mutex mutex; -- QtPrivate::condition_variable writerCond; -- QtPrivate::condition_variable readerCond; -+ QMutex mutex; -+ QWaitCondition writerCond; -+ QWaitCondition readerCond; - int readerCount = 0; - int writerCount = 0; - int waitingReaders = 0; -@@ -40,8 +40,8 @@ public: - const bool recursive; - - //Called with the mutex locked -- bool lockForWrite(std::unique_lock &lock, int timeout); -- bool lockForRead(std::unique_lock &lock, int timeout); -+ bool lockForWrite(int timeout); -+ bool lockForRead(int timeout); - void unlock(); - - //memory management --- -2.38.1 -