diff --git a/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch b/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch index 5a13930024fb..6724e0d28adb 100644 --- a/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch +++ b/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch @@ -1,4 +1,4 @@ -From 8880bc263a366aeb82056f0bf3f1b17b6ec26900 Mon Sep 17 00:00:00 2001 +From 69d9faa9e4420d3cb0d1466c1b95ceadb2cd75f3 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Thu, 13 Apr 2023 23:42:29 +0800 Subject: [PATCH 1/6] qtbase: qmake: always use libname instead of absolute @@ -14,10 +14,10 @@ paths can be incorrect. 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake -index 32169e418c..4e754af367 100644 +index 1cf9377e6ce..ac4428bd7a1 100644 --- a/cmake/QtFinishPrlFile.cmake +++ b/cmake/QtFinishPrlFile.cmake -@@ -61,9 +61,10 @@ foreach(line ${lines}) +@@ -64,9 +64,10 @@ foreach(line ${lines}) endif() list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}") else() @@ -32,10 +32,10 @@ index 32169e418c..4e754af367 100644 endif() else() diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake -index e3f4bbf881..f8bd26acc7 100644 +index 3ffe354fd8d..441332d4582 100644 --- a/cmake/QtGenerateLibHelpers.cmake +++ b/cmake/QtGenerateLibHelpers.cmake -@@ -70,9 +70,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_ +@@ -73,9 +73,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_ string(TOLOWER "${dir}" dir_lower) # If library_path isn't in default link directories, we should add it to link flags. list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index) diff --git a/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch index c628f9f25071..ee4af1730eb8 100644 --- a/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch +++ b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch @@ -1,6 +1,6 @@ -From 034db4e75ec749ac78fcf8235fa659b0eca83c30 Mon Sep 17 00:00:00 2001 +From 41e32c41f781261726722628122c924abb532575 Mon Sep 17 00:00:00 2001 From: Nick Cao -Date: Fri, 14 Apr 2023 09:34:08 +0800 +Date: Fri, 14 Apr 2023 21:43:04 +0800 Subject: [PATCH 2/6] qtbase: qmake: fix mkspecs for darwin --- @@ -13,7 +13,7 @@ Subject: [PATCH 2/6] qtbase: qmake: fix mkspecs for darwin 6 files changed, 1 insertion(+), 415 deletions(-) diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf -index 61bea952b2..9909dae726 100644 +index 61bea952b22..9909dae7260 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ @@ -26,7 +26,7 @@ index 61bea952b2..9909dae726 100644 QMAKE_LFLAGS_REL_RPATH = diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index 09db1764b1..aadfce875e 100644 +index 4acf3b19d5c..aadfce875e2 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,9 +1,5 @@ @@ -155,7 +155,7 @@ index 09db1764b1..aadfce875e 100644 - QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS - QMAKE_MAC_XCODE_SETTINGS += arch_device - -- simulator { +- ios:simulator { - arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" - arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS @@ -168,7 +168,7 @@ index 09db1764b1..aadfce875e 100644 - QMAKE_MAC_XCODE_SETTINGS += only_active_arch -} else { - device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS -- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS +- ios:simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS - VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS - - single_arch: VALID_ARCHS = $$first(VALID_ARCHS) @@ -207,7 +207,7 @@ index 09db1764b1..aadfce875e 100644 - # and makes it easier for people to override EXPORT_VALID_ARCHS to limit - # individual rules to a different set of architecture(s) from the overall - # build (such as machtest in QtCore). -- simulator:device { +- ios:simulator:device { - QMAKE_XARCH_CFLAGS = - QMAKE_XARCH_LFLAGS = - QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS @@ -245,7 +245,7 @@ index 09db1764b1..aadfce875e 100644 - QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) - QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) - } else { -- simulator { +- ios:simulator { - version_identifier = $$simulator.deployment_identifier - platform_identifier = $$simulator.sdk - sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk) @@ -313,7 +313,7 @@ index 09db1764b1..aadfce875e 100644 generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS generate_xcode_project.target = xcodeproj diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf -index e3534561a5..3b01424e67 100644 +index e3534561a56..3b01424e67b 100644 --- a/mkspecs/features/mac/default_pre.prf +++ b/mkspecs/features/mac/default_pre.prf @@ -1,60 +1,2 @@ @@ -378,7 +378,7 @@ index e3534561a5..3b01424e67 100644 -xcode_copy_phase_strip_setting.value = NO -QMAKE_MAC_XCODE_SETTINGS += xcode_copy_phase_strip_setting diff --git a/mkspecs/features/mac/sdk.mk b/mkspecs/features/mac/sdk.mk -index a32ceacb6c..e69de29bb2 100644 +index a32ceacb6ce..e69de29bb2d 100644 --- a/mkspecs/features/mac/sdk.mk +++ b/mkspecs/features/mac/sdk.mk @@ -1,27 +0,0 @@ @@ -410,7 +410,7 @@ index a32ceacb6c..e69de29bb2 100644 - endif -endif diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf -index 3a9c2778bb..e69de29bb2 100644 +index 3a9c2778bbe..e69de29bb2d 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -1,61 +0,0 @@ @@ -476,7 +476,7 @@ index 3a9c2778bb..e69de29bb2 100644 - cache($$tool_variable, set stash, $$tool) -} diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf -index df191eb13c..e69de29bb2 100644 +index df191eb13c4..e69de29bb2d 100644 --- a/mkspecs/features/mac/toolchain.prf +++ b/mkspecs/features/mac/toolchain.prf @@ -1,5 +0,0 @@ diff --git a/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch b/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch index df1effff83ef..759c71365d7e 100644 --- a/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch +++ b/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch @@ -1,4 +1,4 @@ -From bc91f05db85b774f26d6bce86e2e618dfc7a6883 Mon Sep 17 00:00:00 2001 +From f52f3c2cb1703592eaeb43e80f585a24ce8402d7 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 14 Apr 2023 09:34:46 +0800 Subject: [PATCH 3/6] qtbase: qmake: fix includedir in generated pkg-config @@ -8,10 +8,10 @@ Subject: [PATCH 3/6] qtbase: qmake: fix includedir in generated pkg-config 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp -index da585bd9b2..3abf9cee83 100644 +index cc985a878b4..4e3b383d812 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3402,8 +3402,7 @@ MakefileGenerator::writePkgConfigFile() +@@ -3403,8 +3403,7 @@ MakefileGenerator::writePkgConfigFile() << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") ; diff --git a/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch b/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch index 1e66804a5c10..0b4da29afd7c 100644 --- a/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch +++ b/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch @@ -1,4 +1,4 @@ -From d612c1d7161f95864b9383df84b16d8c24fbcc9b Mon Sep 17 00:00:00 2001 +From dd0dfc9cf87966f5d7493a943ec04c665be83cb6 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 14 Apr 2023 09:35:25 +0800 Subject: [PATCH 4/6] qtbase: fix locating tzdir on NixOS @@ -8,7 +8,7 @@ Subject: [PATCH 4/6] qtbase: fix locating tzdir on NixOS 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp -index e87e34f76d..39bd79d4a4 100644 +index 960a0944185..a5186acbd91 100644 --- a/src/corelib/time/qtimezoneprivate_tz.cpp +++ b/src/corelib/time/qtimezoneprivate_tz.cpp @@ -51,7 +51,11 @@ typedef QHash QTzTimeZoneHash; @@ -24,7 +24,7 @@ index e87e34f76d..39bd79d4a4 100644 if (!QFile::exists(path)) path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); -@@ -729,18 +733,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) +@@ -730,18 +734,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) if (!tzif.open(QIODevice::ReadOnly)) return ret; } else { diff --git a/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch b/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch index 121fc09b6451..606be2d5ac19 100644 --- a/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch +++ b/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch @@ -1,4 +1,4 @@ -From 5bd3672c7870b2e46e2a734dc9a9cb1837375a1c Mon Sep 17 00:00:00 2001 +From 4e8c14f1af9c332826e0454f4fd63e541edbaf5c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 21 Mar 2023 15:48:49 +0800 Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for @@ -10,10 +10,10 @@ Reference: https://bugreports.qt.io/browse/QTBUG-111994 1 file changed, 1 insertion(+) diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp -index 9b60cf2963..5a42ef6a68 100644 +index 474644b871f..c7a117fd134 100644 --- a/src/gui/text/unix/qfontconfigdatabase.cpp +++ b/src/gui/text/unix/qfontconfigdatabase.cpp -@@ -554,6 +554,7 @@ void QFontconfigDatabase::populateFontDatabase() +@@ -556,6 +556,7 @@ void QFontconfigDatabase::populateFontDatabase() FcObjectSetAdd(os, *p); ++p; } diff --git a/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch b/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch index addd7a868317..4933534caffb 100644 --- a/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch +++ b/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch @@ -1,4 +1,4 @@ -From f0017e872297168ab616096180891c7f312ef1a1 Mon Sep 17 00:00:00 2001 +From 61ae6e04388dd40e11c214d56f22f8f2007bf35f Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 12 Apr 2023 10:13:50 +0800 Subject: [PATCH 6/6] qtbase: qt-cmake: always use cmake from path @@ -10,7 +10,7 @@ during the build of qtbase, bloating the runtime closure of qtbase. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in -index f719257f60..571ffe788f 100755 +index f719257f602..571ffe788fa 100755 --- a/bin/qt-cmake.in +++ b/bin/qt-cmake.in @@ -4,12 +4,7 @@