diff options
Diffstat (limited to 'pkgs/development/libraries/qt-5')
93 files changed, 4100 insertions, 551 deletions
diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index e89c0a8b403..77b8c3f525a 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -8,7 +8,7 @@ top-level attribute to `top-level/all-packages.nix`. 1. Update the URL in `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`. 2. From the top of the Nixpkgs tree, run - `./maintainers/scripts/fetch-kde-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`. + `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION`. 3. Check that the new packages build correctly. 4. Commit the changes and open a pull request. @@ -16,7 +16,7 @@ top-level attribute to `top-level/all-packages.nix`. { newScope, - stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper, + lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper, bison, cups ? null, harfbuzz, libGL, perl, gstreamer, gst-plugins-base, gtk3, dconf, llvmPackages_5, @@ -27,7 +27,7 @@ top-level attribute to `top-level/all-packages.nix`. debug ? false, }: -with stdenv.lib; +with lib; let @@ -51,12 +51,15 @@ let patches = { qtbase = - optionals stdenv.isDarwin [ + [ ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch ./qtbase.patch.d/0002-qtbase-mac.patch ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch - ] - ++ [ + + # Patch framework detection to support X.framework/X.tbd, + # extending the current support for X.framework/X. + ./qtbase.patch.d/0015-qtbase-tbd-frameworks.patch + ./qtbase.patch.d/0003-qtbase-mkspecs.patch ./qtbase.patch.d/0004-qtbase-replace-libdir.patch ./qtbase.patch.d/0005-qtbase-cmake.patch @@ -71,21 +74,9 @@ let # Ensure -I${includedir} is added to Cflags in pkg-config files. # See https://github.com/NixOS/nixpkgs/issues/52457 ./qtbase.patch.d/0014-qtbase-pkg-config.patch - - # https://bugreports.qt.io/browse/QTBUG-81715 - # remove after updating to qt > 5.12.7 - (fetchpatch { - name = "fix-qt5_make_output_file-cmake-macro.patch"; - url = "https://code.qt.io/cgit/qt/qtbase.git/patch/?id=8a3fde00bf53d99e9e4853e8ab97b0e1bcf74915"; - sha256 = "1gpcbdpyazdxnmldvhsf3pfwr2gjvi08x3j6rxf543rq01bp6cpx"; - }) - (fetchpatch { - name = "QTBUG-78937.patch"; - url = "https://code.qt.io/cgit/qt/qtbase.git/patch/?id=67a9c600ad14ee44501a6df3509daa8234b97606"; - sha256 = "1jiky1w9j8rka78r4q0yabb8w2l5j6csdjysynz7gs1ry4xjfdxd"; - }) ]; qtdeclarative = [ ./qtdeclarative.patch ]; + qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; qtwebengine = [ @@ -94,18 +85,30 @@ let # https://bugreports.qt.io/browse/QTBUG-77037 (fetchpatch { name = "fix-build-with-pulseaudio-13.0.patch"; - url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtbug-77037-workaround.patch?h=packages/qt5-webengine&id=fc77d6b3d5ec74e421b58f199efceb2593cbf951"; + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/fc77d6b3d5ec74e421b58f199efceb2593cbf951/trunk/qtbug-77037-workaround.patch"; sha256 = "1gv733qfdn9746nbqqxzyjx4ijjqkkb7zb71nxax49nna5bri3am"; }) - ] ++ optionals stdenv.isDarwin [ + ./qtwebengine-darwin-no-platform-check.patch ./qtwebengine-darwin-fix-failed-static-assertion.patch ]; - qtwebkit = [ ./qtwebkit.patch ] - ++ optionals stdenv.isDarwin [ - ./qtwebkit-darwin-no-readline.patch - ./qtwebkit-darwin-no-qos-classes.patch - ]; + qtwebkit = [ + (fetchpatch { + name = "qtwebkit-bison-3.7-build.patch"; + url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch"; + sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n"; + }) + (fetchpatch { + name = "qtwebkit-glib-2.68.patch"; + url = "https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b.patch"; + sha256 = "0a3xv0h4lv8wggckgy8cg8xnpkg7n9h45312pdjdnnwy87xvzss0"; + }) + ./qtwebkit.patch + ./qtwebkit-icu68.patch + + ./qtwebkit-darwin-no-readline.patch + ./qtwebkit-darwin-no-qos-classes.patch + ]; qttools = [ ./qttools.patch ]; }; @@ -113,12 +116,12 @@ let import ../qtModule.nix { inherit perl; - inherit (stdenv) lib; + inherit lib; # Use a variant of mkDerivation that does not include wrapQtApplications # to avoid cyclic dependencies between Qt modules. mkDerivation = import ../mkDerivation.nix - { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; } + { inherit lib; inherit debug; wrapQtAppsHook = null; } stdenvActual.mkDerivation; } { inherit self srcs patches; }; @@ -130,7 +133,7 @@ let mkDerivationWith = import ../mkDerivation.nix - { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; }; + { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; }; mkDerivation = mkDerivationWith stdenvActual.mkDerivation; @@ -139,7 +142,7 @@ let patches = patches.qtbase; inherit bison cups harfbuzz libGL; withGtk3 = true; inherit dconf gtk3; - inherit developerBuild decryptSslTraffic; + inherit debug developerBuild decryptSslTraffic; }; qtcharts = callPackage ../modules/qtcharts.nix {}; @@ -191,6 +194,7 @@ let qmake = makeSetupHook { deps = [ self.qtbase.dev ]; substitutions = { + inherit debug; fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh; }; } ../hooks/qmake-hook.sh; diff --git a/pkgs/development/libraries/qt-5/5.12/fetch.sh b/pkgs/development/libraries/qt-5/5.12/fetch.sh index 016b4985ed1..6d2cf551dd5 100644 --- a/pkgs/development/libraries/qt-5/5.12/fetch.sh +++ b/pkgs/development/libraries/qt-5/5.12/fetch.sh @@ -1 +1,2 @@ -WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.7/submodules/ ) +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.10/submodules/ \ + -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch index bb535b8a0c0..6646e1e0b2b 100644 --- a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch +++ b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch @@ -1,18 +1,5 @@ -From 361a9395704ca1ee170a8bb3823ba860293eecee Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel <ttuegel@mailbox.org> -Date: Tue, 17 Sep 2019 05:34:00 -0500 -Subject: [PATCH 01/12] qtbase-mkspecs-mac - ---- - mkspecs/common/mac.conf | 2 +- - mkspecs/features/mac/default_post.prf | 202 ---------------------------------- - mkspecs/features/mac/default_pre.prf | 58 ---------- - mkspecs/features/mac/sdk.mk | 25 ----- - mkspecs/features/mac/sdk.prf | 61 ---------- - 5 files changed, 1 insertion(+), 347 deletions(-) - diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf -index b77494ec9b..470c38e772 100644 +index b77494ec..470c38e7 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -24,7 +24,7 @@ QMAKE_INCDIR_OPENGL = \ @@ -25,7 +12,7 @@ index b77494ec9b..470c38e772 100644 QMAKE_LFLAGS_REL_RPATH = diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index 993f4d56a9..b80ec1e801 100644 +index d052808c..b80ec1e8 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -68,208 +68,6 @@ qt { @@ -161,7 +148,7 @@ index 993f4d56a9..b80ec1e801 100644 - -isysroot$$xcodeSDKInfo(Path, $$sdk) - QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ - -Xarch_$${arch} \ -- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk) +- -isysroot$$xcodeSDKInfo(Path, $$sdk) - - QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) - QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) @@ -182,7 +169,7 @@ index 993f4d56a9..b80ec1e801 100644 - version_min_flag = -m$${version_identifier}-version-min=$$deployment_target - QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag - QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag -- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag +- QMAKE_LFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag - } - - # Enable precompiled headers for multiple architectures @@ -238,7 +225,7 @@ index 993f4d56a9..b80ec1e801 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 e3534561..3b01424e 100644 --- a/mkspecs/features/mac/default_pre.prf +++ b/mkspecs/features/mac/default_pre.prf @@ -1,60 +1,2 @@ @@ -303,7 +290,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 c40f58c987..e69de29bb2 100644 +index c40f58c9..e69de29b 100644 --- a/mkspecs/features/mac/sdk.mk +++ b/mkspecs/features/mac/sdk.mk @@ -1,25 +0,0 @@ @@ -333,7 +320,7 @@ index c40f58c987..e69de29bb2 100644 - endif -endif diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf -index 3a9c2778bb..e69de29bb2 100644 +index 3a9c2778..e69de29b 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -1,61 +0,0 @@ @@ -398,6 +385,3 @@ index 3a9c2778bb..e69de29bb2 100644 - $$tool = $$sysrooted $$member(value, 1, -1) - cache($$tool_variable, set stash, $$tool) -} --- -2.23.GIT - diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch index d5d8e70b788..506397bc605 100644 --- a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch +++ b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0003-qtbase-mkspecs.patch @@ -1,6 +1,6 @@ -From 8bdbddc2e5fef1553b1ba0297d3c03b38e9b947b Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel <ttuegel@mailbox.org> -Date: Wed, 18 Sep 2019 05:39:39 -0500 +From 9ffbcc5e362d17aea3e3d67e43cd3cd993e987eb Mon Sep 17 00:00:00 2001 +From: OPNA2608 <christoph.neidahl@gmail.com> +Date: Mon, 12 Apr 2021 20:05:25 +0200 Subject: [PATCH 03/12] qtbase-mkspecs --- @@ -12,13 +12,13 @@ Subject: [PATCH 03/12] qtbase-mkspecs mkspecs/features/qt_build_paths.prf | 4 +- mkspecs/features/qt_docs.prf | 10 +-- mkspecs/features/qt_example_installs.prf | 2 +- - mkspecs/features/qt_functions.prf | 2 +- + mkspecs/features/qt_functions.prf | 27 ++++--- mkspecs/features/qt_installs.prf | 22 ++--- mkspecs/features/qt_plugin.prf | 2 +- - 11 files changed, 39 insertions(+), 142 deletions(-) + 11 files changed, 53 insertions(+), 153 deletions(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf -index 00da9bd33f..bd166fbfea 100644 +index 02e5775983..3782949d32 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -21,7 +21,7 @@ load(cmake_functions) @@ -96,7 +96,7 @@ index 00da9bd33f..bd166fbfea 100644 INSTALLS += cmake_qt5_plugin_file return() -@@ -333,7 +308,7 @@ exists($$cmake_macros_file.input) { +@@ -334,7 +309,7 @@ exists($$cmake_macros_file.input) { cmake_qt5_module_files.files += $$cmake_macros_file.output } @@ -370,18 +370,44 @@ index 43b58817fe..e635b8f67a 100644 check_examples { diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf -index 1903e509c8..ae7b585989 100644 +index 1903e509c8..1dc117a388 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf -@@ -69,7 +69,7 @@ defineTest(qtHaveModule) { +@@ -69,19 +69,22 @@ defineTest(qtHaveModule) { defineTest(qtPrepareTool) { cmd = $$eval(QT_TOOL.$${2}.binary) isEmpty(cmd) { - cmd = $$[QT_HOST_BINS]/$$2 -+ cmd = $$system("command -v $$2") - exists($${cmd}.pl) { - $${1}_EXE = $${cmd}.pl - cmd = perl -w $$system_path($${cmd}.pl) +- exists($${cmd}.pl) { +- $${1}_EXE = $${cmd}.pl +- cmd = perl -w $$system_path($${cmd}.pl) +- } else: contains(QMAKE_HOST.os, Windows) { +- $${1}_EXE = $${cmd}.exe +- cmd = $$system_path($${cmd}.exe) +- } else:contains(QMAKE_HOST.os, Darwin) { +- BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2 +- exists($$BUNDLENAME) { +- cmd = $$BUNDLENAME ++ cmd = $$system("command -v $${2}") ++ isEmpty(cmd) { ++ cmd = $$system("command -v $${2}.pl") ++ !isEmpty(cmd) { ++ $${1}_EXE = $$cmd ++ cmd = perl -w $$system_path($${cmd}) ++ } else: contains(QMAKE_HOST.os, Windows) { ++ cmd = $$system("command -v $${2}.exe") ++ $${1}_EXE = $$cmd ++ } else: contains(QMAKE_HOST.os, Darwin) { ++ cmd = $$system("command -v $${2}.app") ++ !isEmpty(cmd) { ++ cmd = $${cmd}/Contents/MacOS/$${2} ++ $${1}_EXE = $$cmd ++ } + } +- $${1}_EXE = $$cmd + } else { + $${1}_EXE = $$cmd + } diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf index 1ebca17366..b784441da0 100644 --- a/mkspecs/features/qt_installs.prf @@ -461,5 +487,5 @@ index 40528a65e2..903f795284 100644 TARGET = $$qt5LibraryTarget($$TARGET) -- -2.23.GIT +2.29.3 diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0015-qtbase-tbd-frameworks.patch b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0015-qtbase-tbd-frameworks.patch new file mode 100644 index 00000000000..8a5939978a6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0015-qtbase-tbd-frameworks.patch @@ -0,0 +1,15 @@ +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 84dbbfebd4..615bfed124 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -119,6 +119,10 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) + if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") + set(Qt5Gui_${_cmake_lib_name}_LIBRARY) + endif() ++ set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}.tbd") ++ if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") ++ set(Qt5Gui_${_cmake_lib_name}_LIBRARY) ++ endif() + !!ENDIF + if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) + # The above find_library call doesn\'t work for finding diff --git a/pkgs/development/libraries/qt-5/5.12/qtlocation-gcc-9.patch b/pkgs/development/libraries/qt-5/5.12/qtlocation-gcc-9.patch new file mode 100644 index 00000000000..1791313e560 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtlocation-gcc-9.patch @@ -0,0 +1,21 @@ +diff --git a/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp b/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp +index d475c38..c1710a6 100644 +--- a/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp ++++ b/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp +@@ -5,6 +5,7 @@ + #include <unicode/ushape.h> + + #include <memory> ++#include <stdexcept> + + namespace mbgl { + +diff --git a/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp b/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp +index 97bfe91..56d3e17 100644 +--- a/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp ++++ b/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp +@@ -1,3 +1,4 @@ ++#include <cstdint> + #include <mbgl/util/convert.hpp> + + namespace mbgl { diff --git a/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch b/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch index 8ed3fe59a5a..cd2343e42ca 100644 --- a/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch +++ b/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch @@ -1,5 +1,5 @@ diff --git a/configure.pri b/configure.pri -index 897bea54..6f834c20 100644 +index 897bea540..6f834c202 100644 --- a/configure.pri +++ b/configure.pri @@ -269,7 +269,7 @@ defineReplace(webEngineGetMacOSVersion) { @@ -12,7 +12,7 @@ index 897bea54..6f834c20 100644 } diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf -index 35eb6b89..7eed640a 100644 +index 35eb6b89c..7eed640a5 100644 --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -40,8 +40,6 @@ defineTest(isPlatformSupported) { @@ -43,10 +43,10 @@ index 35eb6b89..7eed640a 100644 isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) { skipBuild("Could not resolve SDK product version for \'$$QMAKE_MAC_SDK\'.") diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri -index 4426901c..3aa6057e 100644 +index 7b77a8bf7..0e1284ee4 100644 --- a/src/core/config/mac_osx.pri +++ b/src/core/config/mac_osx.pri -@@ -5,16 +5,16 @@ load(functions) +@@ -5,7 +5,7 @@ load(functions) # otherwise query for it. QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion) isEmpty(QMAKE_MAC_SDK_VERSION) { @@ -55,17 +55,15 @@ index 4426901c..3aa6057e 100644 isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'") } +@@ -14,11 +14,6 @@ isEmpty(QMAKE_MAC_SDK_VERSION) { + QMAKE_MAC_SDK_VERSION_MAJOR_MINOR = $$section(QMAKE_MAC_SDK_VERSION, ".", 0, 1) + QMAKE_CLANG_DIR = "/usr" -QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) -!isEmpty(QMAKE_CLANG_PATH) { - clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../") - exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir -} -+# QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX) -+# !isEmpty(QMAKE_CLANG_PATH) { -+# clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../") -+# exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir -+# } QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++" message("Using clang++ from $${QMAKE_CLANG_PATH}") diff --git a/pkgs/development/libraries/qt-5/5.12/qtwebkit-icu68.patch b/pkgs/development/libraries/qt-5/5.12/qtwebkit-icu68.patch new file mode 100644 index 00000000000..73463d7567a --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtwebkit-icu68.patch @@ -0,0 +1,170 @@ +Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844 + +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:31: +Source/WebCore/platform/text/TextCodecICU.cpp:311:42: error: use of undeclared identifier 'TRUE' + ucnv_setFallback(m_converterICU, TRUE); + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:40: +In file included from Source/WebCore/platform/text/icu/UTextProvider.cpp:27: +Source/WebCore/platform/text/icu/UTextProvider.h:83:28: error: use of undeclared identifier 'TRUE' + isAccessible = TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:88:28: error: use of undeclared identifier 'FALSE' + isAccessible = FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:97:28: error: use of undeclared identifier 'TRUE' + isAccessible = TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:102:28: error: use of undeclared identifier 'FALSE' + isAccessible = FALSE; + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:41: +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:103:20: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:108:20: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:114:20: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:119:20: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:147:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:339:16: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:359:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:42: +Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:128:16: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:148:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ + +--- a/Source/WebCore/platform/text/TextCodecICU.cpp ++++ b/Source/WebCore/platform/text/TextCodecICU.cpp +@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const + m_converterICU = ucnv_open(m_canonicalConverterName, &err); + ASSERT(U_SUCCESS(err)); + if (m_converterICU) +- ucnv_setFallback(m_converterICU, TRUE); ++ ucnv_setFallback(m_converterICU, true); + } + + int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err) +--- a/Source/WebCore/platform/text/icu/UTextProvider.h ++++ b/Source/WebCore/platform/text/icu/UTextProvider.h +@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) { + text->chunkOffset = text->chunkLength; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } else { +@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex <= 0 && !text->chunkNativeStart) { + text->chunkOffset = 0; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } +--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp +@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t i + if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (index >= length && uText->chunkNativeLimit == length) { + // Off the end of the buffer, but we can't get it. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return FALSE; ++ return false; + } + } else { + if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (!index && !uText->chunkNativeStart) { + // Already at the beginning; can't go any farther. + uText->chunkOffset = 0; +- return FALSE; ++ return false; + } + } + +@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t i + + uText->nativeIndexingLimit = uText->chunkLength; + +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status) +@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UTe + static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text + ASSERT(newContext == UTextProviderContext::PriorContext); + textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) +--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp +@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLeng + static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, + ASSERT(newContext == UTextProviderContext::PriorContext); + textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) diff --git a/pkgs/development/libraries/qt-5/5.12/srcs.nix b/pkgs/development/libraries/qt-5/5.12/srcs.nix index 293d017c2dc..03f8973766a 100644 --- a/pkgs/development/libraries/qt-5/5.12/srcs.nix +++ b/pkgs/development/libraries/qt-5/5.12/srcs.nix @@ -1,325 +1,326 @@ -# DO NOT EDIT! This file is generated automatically by fetch-kde-qt.sh +# DO NOT EDIT! This file is generated automatically. +# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/5.12 { fetchurl, mirror }: { qt3d = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qt3d-everywhere-src-5.12.7.tar.xz"; - sha256 = "2030de3dc93fd4062f677f61938229af9cd7aa4c3d2932cdda2ccb663d681126"; - name = "qt3d-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qt3d-everywhere-src-5.12.10.tar.xz"; + sha256 = "1fnhdy0vwh1npq04pw3lzb15rsp0nx8wh57c8lvz9jn945xwc3vd"; + name = "qt3d-everywhere-src-5.12.10.tar.xz"; }; }; qtactiveqt = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtactiveqt-everywhere-src-5.12.7.tar.xz"; - sha256 = "302ce1e74dae8ead602ac663e208e6c9b98bdf9a2b7795de4198a28eba2d895d"; - name = "qtactiveqt-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtactiveqt-everywhere-src-5.12.10.tar.xz"; + sha256 = "0lf96ziba5g8izwcjzzaf4n2j336j6627rb3dzwvmsdkd9168zax"; + name = "qtactiveqt-everywhere-src-5.12.10.tar.xz"; }; }; qtandroidextras = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtandroidextras-everywhere-src-5.12.7.tar.xz"; - sha256 = "a5acc927bd46ed87627e2ae0f0bfc199189d383a3e17c2f34b8c34ea57b2aea1"; - name = "qtandroidextras-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtandroidextras-everywhere-src-5.12.10.tar.xz"; + sha256 = "0blapv4jd80wcvzp96zxlrsyca7lwax17y6yij1d14a51353hrnc"; + name = "qtandroidextras-everywhere-src-5.12.10.tar.xz"; }; }; qtbase = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtbase-everywhere-src-5.12.7.tar.xz"; - sha256 = "b18939cb25d90aef8721fb12ec34c3632d3490ced958e41f6c7a52064643665d"; - name = "qtbase-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtbase-everywhere-src-5.12.10.tar.xz"; + sha256 = "0h39r3irahdms4gidg5l4a1kr7kagc4bd0y02sapg3njwrsg3240"; + name = "qtbase-everywhere-src-5.12.10.tar.xz"; }; }; qtcanvas3d = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtcanvas3d-everywhere-src-5.12.7.tar.xz"; - sha256 = "b63a513a2ee11548b122e0fd640b1fa22d3eb83cdc51ddfdf3b97c2ecd0d0c50"; - name = "qtcanvas3d-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtcanvas3d-everywhere-src-5.12.10.tar.xz"; + sha256 = "0pbxw89m2s19yk2985c49msd7s1mapydka9b7nzg9phs9nrzvf1m"; + name = "qtcanvas3d-everywhere-src-5.12.10.tar.xz"; }; }; qtcharts = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtcharts-everywhere-src-5.12.7.tar.xz"; - sha256 = "434065526d0b1d8921e96cc1827b1a3579e073b930fe536455c4c1da2f15cf5f"; - name = "qtcharts-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtcharts-everywhere-src-5.12.10.tar.xz"; + sha256 = "0cndm8llvfl9jdzn34b886gxgxwsibb24amhblh96cadhhkpwadc"; + name = "qtcharts-everywhere-src-5.12.10.tar.xz"; }; }; qtconnectivity = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtconnectivity-everywhere-src-5.12.7.tar.xz"; - sha256 = "647148b9b1a0d3e54f788b66797b81bb87434faf6fb12ac481f9165eda0d071a"; - name = "qtconnectivity-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtconnectivity-everywhere-src-5.12.10.tar.xz"; + sha256 = "19l816zfpx87vwzj18mbib5x3mb9hy1msacpy8i9bagfw9p0i6c0"; + name = "qtconnectivity-everywhere-src-5.12.10.tar.xz"; }; }; qtdatavis3d = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtdatavis3d-everywhere-src-5.12.7.tar.xz"; - sha256 = "07ff5713cfcdf073681d905912e8d871e4451508494c789df805eb241ed98b27"; - name = "qtdatavis3d-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtdatavis3d-everywhere-src-5.12.10.tar.xz"; + sha256 = "1ximhph17kkh40v2ksk51lq21mbjs2ajyf5l32ckhc7n7bmaryb6"; + name = "qtdatavis3d-everywhere-src-5.12.10.tar.xz"; }; }; qtdeclarative = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtdeclarative-everywhere-src-5.12.7.tar.xz"; - sha256 = "5cdc05a035f240ab73b6b37dd3831c1350cd80e5799da47929974085f6eae9bd"; - name = "qtdeclarative-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtdeclarative-everywhere-src-5.12.10.tar.xz"; + sha256 = "05la1zlijcaargfh4ljnmxvvksdwzl409wl7w3m96kwm8s370mmf"; + name = "qtdeclarative-everywhere-src-5.12.10.tar.xz"; }; }; qtdoc = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtdoc-everywhere-src-5.12.7.tar.xz"; - sha256 = "6c07918cec8494ea05a42234d8f281a2958de7380458f3fb5a189949ce1233e9"; - name = "qtdoc-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtdoc-everywhere-src-5.12.10.tar.xz"; + sha256 = "0ljc29hnn8knncvq8hsk0rdcwrxbsk1ywlprknkvyb4pggp9rkp6"; + name = "qtdoc-everywhere-src-5.12.10.tar.xz"; }; }; qtgamepad = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtgamepad-everywhere-src-5.12.7.tar.xz"; - sha256 = "07638c42be94be1e5e622b020c6192341b5bb87be34d7b38f2899672d83a1e94"; - name = "qtgamepad-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtgamepad-everywhere-src-5.12.10.tar.xz"; + sha256 = "1bs50wghy3n8af656angkkkaac0swkq3mfllg3dkjg236ngzdhdh"; + name = "qtgamepad-everywhere-src-5.12.10.tar.xz"; }; }; qtgraphicaleffects = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtgraphicaleffects-everywhere-src-5.12.7.tar.xz"; - sha256 = "02f0328420c623da8f9ae949fec01e99ba84213dd2ad559cb00c204502bbcace"; - name = "qtgraphicaleffects-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtgraphicaleffects-everywhere-src-5.12.10.tar.xz"; + sha256 = "0hnsb757ircqmid34d0cxbh0mi4qnil22k5ka9a1b8xy00ydkfky"; + name = "qtgraphicaleffects-everywhere-src-5.12.10.tar.xz"; }; }; qtimageformats = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtimageformats-everywhere-src-5.12.7.tar.xz"; - sha256 = "9bd19ee24fb85f249d01c78e637c95377dd738feb61da0deeee6b770fa62f70b"; - name = "qtimageformats-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtimageformats-everywhere-src-5.12.10.tar.xz"; + sha256 = "1bh38xp4v914ksg91p9pij1gsdzs3y7sn7diy3d7wn5i039syn0i"; + name = "qtimageformats-everywhere-src-5.12.10.tar.xz"; }; }; qtlocation = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtlocation-everywhere-src-5.12.7.tar.xz"; - sha256 = "d1e905b80befda3c9aaad92ea984e6dbf722568b5c91e8d15b027bc5bc22781f"; - name = "qtlocation-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtlocation-everywhere-src-5.12.10.tar.xz"; + sha256 = "1czg0z69ilnxp1sqk0jawlnyp2gx87yb57g8dwjznqxxvaq744dc"; + name = "qtlocation-everywhere-src-5.12.10.tar.xz"; }; }; qtmacextras = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtmacextras-everywhere-src-5.12.7.tar.xz"; - sha256 = "265b5607664927e1c92af3abc4b034244f37abd83db1f0a8f22f6952f7d6abb8"; - name = "qtmacextras-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtmacextras-everywhere-src-5.12.10.tar.xz"; + sha256 = "0mh9p3f1f22pj4i8yxnn56amy53dapmcikza04ll4fvx5hy340v8"; + name = "qtmacextras-everywhere-src-5.12.10.tar.xz"; }; }; qtmultimedia = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtmultimedia-everywhere-src-5.12.7.tar.xz"; - sha256 = "28bdaa81371f922223775ae5171c4d589a2c07f255abbe5ccf130ecbbdb4db1d"; - name = "qtmultimedia-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtmultimedia-everywhere-src-5.12.10.tar.xz"; + sha256 = "0g50jzhwbrl5r0lmfz5ffpkp54mf0zfc8m884x51yn2bnngg366c"; + name = "qtmultimedia-everywhere-src-5.12.10.tar.xz"; }; }; qtnetworkauth = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtnetworkauth-everywhere-src-5.12.7.tar.xz"; - sha256 = "cbfb7c71a25e74b92b927a5aeae2d099e4142968424a0fcebc1a52fa4fb4576b"; - name = "qtnetworkauth-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtnetworkauth-everywhere-src-5.12.10.tar.xz"; + sha256 = "12n3xqlskrk2mbcgz5p613sx219j6rmpq8yn7p97xdv7li61gzl2"; + name = "qtnetworkauth-everywhere-src-5.12.10.tar.xz"; }; }; qtpurchasing = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtpurchasing-everywhere-src-5.12.7.tar.xz"; - sha256 = "6f7ecb1e6b6d290b268344ddb031bb7114cd36139c76323732d12661eeb15a76"; - name = "qtpurchasing-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtpurchasing-everywhere-src-5.12.10.tar.xz"; + sha256 = "1azdg03vxyk140i9z93x0zzlazbmd3qrqxgwk747jsd1ibns9ddy"; + name = "qtpurchasing-everywhere-src-5.12.10.tar.xz"; }; }; qtquickcontrols = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtquickcontrols-everywhere-src-5.12.7.tar.xz"; - sha256 = "1038bbc76bba53f9634f40cd9c8ebf0ed8ae82e791f727b228bd81bdcf1859e5"; - name = "qtquickcontrols-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtquickcontrols-everywhere-src-5.12.10.tar.xz"; + sha256 = "1cy9vjl9zf95frnydzljqwbx3is8p8w27kdgszvmb67p6xkpblk7"; + name = "qtquickcontrols-everywhere-src-5.12.10.tar.xz"; }; }; qtquickcontrols2 = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtquickcontrols2-everywhere-src-5.12.7.tar.xz"; - sha256 = "3a9526e5ad01edbfb796a6631983c391ea1b7e22ae6e07840048156a9e92a237"; - name = "qtquickcontrols2-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtquickcontrols2-everywhere-src-5.12.10.tar.xz"; + sha256 = "0541n8n012d0xwxrfznv1jwh28d35mdx6cl8jadsaxaspgwz4vb3"; + name = "qtquickcontrols2-everywhere-src-5.12.10.tar.xz"; }; }; qtremoteobjects = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtremoteobjects-everywhere-src-5.12.7.tar.xz"; - sha256 = "6d6aaec4e9c140c027b0badaabc6322ea3c16cf649495a27fec1f261e891120f"; - name = "qtremoteobjects-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtremoteobjects-everywhere-src-5.12.10.tar.xz"; + sha256 = "147p0xdi22xz2d3501ig78bs97gbyz8ccyhn6dhbw2yalx33gma6"; + name = "qtremoteobjects-everywhere-src-5.12.10.tar.xz"; }; }; qtscript = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtscript-everywhere-src-5.12.7.tar.xz"; - sha256 = "ca1dbc66d4125a678638dd0c9c030b72fdfc4ec2c229b9316a8bc80a86104019"; - name = "qtscript-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtscript-everywhere-src-5.12.10.tar.xz"; + sha256 = "1cfcfwq4shr6yphgwq2jnvgzjjqjrz10qnzr7dccksmfg3i0ad02"; + name = "qtscript-everywhere-src-5.12.10.tar.xz"; }; }; qtscxml = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtscxml-everywhere-src-5.12.7.tar.xz"; - sha256 = "afa950bc95f881c90eea564511f3e9918d53fddf0823afb641d20dc6f794fbb6"; - name = "qtscxml-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtscxml-everywhere-src-5.12.10.tar.xz"; + sha256 = "057zchhm1s5ly2a685y4105pgmzgqp1jkkf9w0ca8xd05z4clb4r"; + name = "qtscxml-everywhere-src-5.12.10.tar.xz"; }; }; qtsensors = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtsensors-everywhere-src-5.12.7.tar.xz"; - sha256 = "2b9aea9f4e2f681b4067f2b9d97c5073c135e41d26601c71f18f199bc980e740"; - name = "qtsensors-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtsensors-everywhere-src-5.12.10.tar.xz"; + sha256 = "10f00njvc7kwjci0g4g3pibl9ra798iplvj2ymql3zppxqqdq25m"; + name = "qtsensors-everywhere-src-5.12.10.tar.xz"; }; }; qtserialbus = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtserialbus-everywhere-src-5.12.7.tar.xz"; - sha256 = "82201edf971e957d849b041ab2914f7497226939c62884ec2906b37576987eae"; - name = "qtserialbus-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtserialbus-everywhere-src-5.12.10.tar.xz"; + sha256 = "0zd0crs2nrsvncj070fl05g0nm3j5bf16g54c7m9603b6q7bryrx"; + name = "qtserialbus-everywhere-src-5.12.10.tar.xz"; }; }; qtserialport = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtserialport-everywhere-src-5.12.7.tar.xz"; - sha256 = "224c282ebed750f46b72dfe18260c3d26fbb74e928dec64bd8c51e7beed8721f"; - name = "qtserialport-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtserialport-everywhere-src-5.12.10.tar.xz"; + sha256 = "0anndf6pyssiygj0kk2j80vwil2z0765gccs87djhsni1xvk3n9r"; + name = "qtserialport-everywhere-src-5.12.10.tar.xz"; }; }; qtspeech = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtspeech-everywhere-src-5.12.7.tar.xz"; - sha256 = "0cc4f14aa21172b84c8ebca442037cd94927dad4921f6f6bfb4d7f2468aa6060"; - name = "qtspeech-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtspeech-everywhere-src-5.12.10.tar.xz"; + sha256 = "11fycm604r1xswb9dg1g568jxd68zd9m2dzfy4qda6sr4mdaj6jg"; + name = "qtspeech-everywhere-src-5.12.10.tar.xz"; }; }; qtsvg = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtsvg-everywhere-src-5.12.7.tar.xz"; - sha256 = "4bf60916d4e398d9609f1b3a17fc7345a0e13c7c1cc407298df20da4c7c67bb8"; - name = "qtsvg-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtsvg-everywhere-src-5.12.10.tar.xz"; + sha256 = "0jrkz8y225g93pznsvc1icanxxc5cfm23ic2y6rprqaqw77z9zxm"; + name = "qtsvg-everywhere-src-5.12.10.tar.xz"; }; }; qttools = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qttools-everywhere-src-5.12.7.tar.xz"; - sha256 = "860a97114d518f83c0a9ab3742071da16bb018e6eb387179d5764a8dcca03948"; - name = "qttools-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qttools-everywhere-src-5.12.10.tar.xz"; + sha256 = "0v339a1w3kqvfl8hcds032g8zafp8d4c1b2rzihpq6y4mbksdkxh"; + name = "qttools-everywhere-src-5.12.10.tar.xz"; }; }; qttranslations = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qttranslations-everywhere-src-5.12.7.tar.xz"; - sha256 = "2c8d1169f1f20ba32639181f1853b4159940cbaaac41adaa018b6f43ca31323f"; - name = "qttranslations-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qttranslations-everywhere-src-5.12.10.tar.xz"; + sha256 = "1pjkkkkjvs9harz70sir67yf3i528vyn1shmi09hlzlb23nmipp1"; + name = "qttranslations-everywhere-src-5.12.10.tar.xz"; }; }; qtvirtualkeyboard = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtvirtualkeyboard-everywhere-src-5.12.7.tar.xz"; - sha256 = "aaa52aaff923df22de8472d71843dadb80f3f6fe0312122e64ffe5436db40daa"; - name = "qtvirtualkeyboard-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtvirtualkeyboard-everywhere-src-5.12.10.tar.xz"; + sha256 = "0afw3lj5cg3zj0hzxlhz5l7s1j2y491yxwylc4vchbqjpyvsadgg"; + name = "qtvirtualkeyboard-everywhere-src-5.12.10.tar.xz"; }; }; qtwayland = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwayland-everywhere-src-5.12.7.tar.xz"; - sha256 = "fc1ab8e25461580e37090e4f82422411dee71a3de48a54be1f4b6569e00f66c5"; - name = "qtwayland-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwayland-everywhere-src-5.12.10.tar.xz"; + sha256 = "1bs61xmc4l03w21wkrxx0llfg5bbnq5ij7w0bnfkx3rk0vncy0q6"; + name = "qtwayland-everywhere-src-5.12.10.tar.xz"; }; }; qtwebchannel = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwebchannel-everywhere-src-5.12.7.tar.xz"; - sha256 = "b0ae72e5957aa4b281a37d2e169fcf91f92382bc36bd0cf09c80b2bb961bce75"; - name = "qtwebchannel-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwebchannel-everywhere-src-5.12.10.tar.xz"; + sha256 = "1jmprqgavqwknnnl6qp0psxz7bc69ivxhm7y4qci95vpx9k5yjg8"; + name = "qtwebchannel-everywhere-src-5.12.10.tar.xz"; }; }; qtwebengine = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwebengine-everywhere-src-5.12.7.tar.xz"; - sha256 = "83b754dca3dafeb21be6c7cb5ea99f11f5dbe9055bc1680f5bd7159224bb46fa"; - name = "qtwebengine-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwebengine-everywhere-src-5.12.10.tar.xz"; + sha256 = "16zbyfc7qy9f20anfrdi25f6nf1j7zw8kps60mqb18nfjw411d50"; + name = "qtwebengine-everywhere-src-5.12.10.tar.xz"; }; }; qtwebglplugin = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwebglplugin-everywhere-src-5.12.7.tar.xz"; - sha256 = "e049ed855bc772a56808844a803aac653d2d64f092a1fd1fe6a73ab460b55c3b"; - name = "qtwebglplugin-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwebglplugin-everywhere-src-5.12.10.tar.xz"; + sha256 = "0nhim67rl9dbshnarismnd54qzks8v14a08h8qi7x0dm9bj9ij7q"; + name = "qtwebglplugin-everywhere-src-5.12.10.tar.xz"; }; }; qtwebsockets = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwebsockets-everywhere-src-5.12.7.tar.xz"; - sha256 = "6fd13c2558f532a32f20d977b44c0146107a0e93861df84978e4fd72af283b17"; - name = "qtwebsockets-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwebsockets-everywhere-src-5.12.10.tar.xz"; + sha256 = "0p74ds53d3a30i7pq85b9ql9i4z1p0yyanhmaizw2bv9225py4jr"; + name = "qtwebsockets-everywhere-src-5.12.10.tar.xz"; }; }; qtwebview = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwebview-everywhere-src-5.12.7.tar.xz"; - sha256 = "d3f82d2ceab59dc4dee3b6f54f4b70869c199d63f4534b299d900cdacc9b7be7"; - name = "qtwebview-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwebview-everywhere-src-5.12.10.tar.xz"; + sha256 = "07pz7wfhyijfdlxnaqpn4hwgvpglma6dfmkcb8xw6hfhg30riaxd"; + name = "qtwebview-everywhere-src-5.12.10.tar.xz"; }; }; qtwinextras = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtwinextras-everywhere-src-5.12.7.tar.xz"; - sha256 = "cfeec81ee1f75b9786ed28382deecc5e38fd142c0b48476beccadb587f93118c"; - name = "qtwinextras-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtwinextras-everywhere-src-5.12.10.tar.xz"; + sha256 = "1x5k0z0p94zppqsw2fz8ki9v5abf0crzva16wllznn89ylqjyn0j"; + name = "qtwinextras-everywhere-src-5.12.10.tar.xz"; }; }; qtx11extras = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtx11extras-everywhere-src-5.12.7.tar.xz"; - sha256 = "23895f4b1e84f3783526b9e17680df38c587601d4dfa6ff1b81ace432c480b96"; - name = "qtx11extras-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtx11extras-everywhere-src-5.12.10.tar.xz"; + sha256 = "0xk10iynkfs31vgpadrmw30k4s1hlnggxy2f3q988qyqd37dh5h8"; + name = "qtx11extras-everywhere-src-5.12.10.tar.xz"; }; }; qtxmlpatterns = { - version = "5.12.7"; + version = "5.12.10"; src = fetchurl { - url = "${mirror}/official_releases/qt/5.12/5.12.7/submodules/qtxmlpatterns-everywhere-src-5.12.7.tar.xz"; - sha256 = "9002014129a1f2a44700df333a7776e23bdfd689e7a619c3540fd9f6819b417b"; - name = "qtxmlpatterns-everywhere-src-5.12.7.tar.xz"; + url = "${mirror}/official_releases/qt/5.12/5.12.10/submodules/qtxmlpatterns-everywhere-src-5.12.10.tar.xz"; + sha256 = "1qg09yxagz36sry03kv3swwfjc8lrik1asjk2lxlpzzcl2q95lbv"; + name = "qtxmlpatterns-everywhere-src-5.12.10.tar.xz"; }; }; } diff --git a/pkgs/development/libraries/qt-5/5.14/default.nix b/pkgs/development/libraries/qt-5/5.14/default.nix index 1a90c610a5b..02b170e0eb1 100644 --- a/pkgs/development/libraries/qt-5/5.14/default.nix +++ b/pkgs/development/libraries/qt-5/5.14/default.nix @@ -8,7 +8,7 @@ top-level attribute to `top-level/all-packages.nix`. 1. Update the URL in `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`. 2. From the top of the Nixpkgs tree, run - `./maintainers/scripts/fetch-kde-qt.sh > pkgs/development/libraries/qt-5/$VERSION/srcs.nix`. + `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION`. 3. Check that the new packages build correctly. 4. Commit the changes and open a pull request. @@ -16,7 +16,7 @@ top-level attribute to `top-level/all-packages.nix`. { newScope, - stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper, + lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, makeSetupHook, makeWrapper, bison, cups ? null, harfbuzz, libGL, perl, gstreamer, gst-plugins-base, gtk3, dconf, llvmPackages_5, @@ -27,7 +27,7 @@ top-level attribute to `top-level/all-packages.nix`. debug ? false, }: -with stdenv.lib; +with lib; let @@ -54,7 +54,14 @@ let qtbase = optionals stdenv.isDarwin [ ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch - ./qtbase.patch.d/0002-qtbase-mac.patch + + # Downgrade minimal required SDK to 10.12 + ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch + ./qtbase.patch.d/qtbase-sdk-10.12-mac.patch + + # Patch framework detection to support X.framework/X.tbd, + # extending the current support for X.framework/X. + ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch ] ++ [ ./qtbase.patch.d/0003-qtbase-mkspecs.patch @@ -68,28 +75,67 @@ let ./qtbase.patch.d/0011-fix-header_module.patch ]; qtdeclarative = [ ./qtdeclarative.patch ]; + qtlocation = [ ./qtlocation-gcc-9.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; - qtwebengine = [ ] + qtwebengine = [ + # Fix build with bison-3.7: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=1a53f599 + (fetchpatch { + name = "qtwebengine-bison-3.7-build.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=1a53f599"; + sha256 = "1nqpyn5fq37q7i9nasag6i14lnz0d7sld5ikqhlm8qwq9d7gbmjy"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) + # Fix build with GCC 10 (part 1): https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=fad3e27b + (fetchpatch { + name = "qtwebengine-gcc10-part1.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=fad3e27bfb50d1e23a07577f087a826b5e00bb1d"; + sha256 = "0c55j9zww8jyif6wl7jy1qqidgw9fdhiyfjgzhzi85r716m4pwwd"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) + # Fix build with GCC 10 (part 2): https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?id=193c5bed + (fetchpatch { + name = "qtwebengine-gcc10-part2.patch"; + url = "https://code.qt.io/cgit/qt/qtwebengine-chromium.git/patch/?id=193c5bed1cff123e21b7e6d12f464d6709ace2e3"; + sha256 = "1jb6s32ara6l4rbn4h3gg95mzv8sd8dl1zpjaqwywf1w7p8ymk86"; + stripLen = 1; + extraPrefix = "src/3rdparty/"; + }) + ] ++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch; - qtwebkit = [ ./qtwebkit.patch ] - ++ optionals stdenv.isDarwin [ - ./qtwebkit-darwin-no-readline.patch - ./qtwebkit-darwin-no-qos-classes.patch - ]; + qtwebkit = [ + (fetchpatch { + name = "qtwebkit-bison-3.7-build.patch"; + url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch"; + sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n"; + }) + (fetchpatch { + name = "qtwebkit-glib-2.68.patch"; + url = "https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b.patch"; + sha256 = "0a3xv0h4lv8wggckgy8cg8xnpkg7n9h45312pdjdnnwy87xvzss0"; + }) + ./qtwebkit.patch + ./qtwebkit-icu68.patch + ] ++ optionals stdenv.isDarwin [ + ./qtwebkit-darwin-no-readline.patch + ./qtwebkit-darwin-no-qos-classes.patch + ]; qttools = [ ./qttools.patch ]; + qtwayland = [ ./qtwayland-libdrm-build.patch ]; }; qtModule = import ../qtModule.nix { inherit perl; - inherit (stdenv) lib; + inherit lib; # Use a variant of mkDerivation that does not include wrapQtApplications # to avoid cyclic dependencies between Qt modules. mkDerivation = import ../mkDerivation.nix - { inherit (stdenv) lib; inherit debug; wrapQtAppsHook = null; } + { inherit lib; inherit debug; wrapQtAppsHook = null; } stdenvActual.mkDerivation; } { inherit self srcs patches; }; @@ -101,7 +147,7 @@ let mkDerivationWith = import ../mkDerivation.nix - { inherit (stdenv) lib; inherit debug; inherit (self) wrapQtAppsHook; }; + { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; }; mkDerivation = mkDerivationWith stdenvActual.mkDerivation; @@ -110,7 +156,7 @@ let patches = patches.qtbase; inherit bison cups harfbuzz libGL; withGtk3 = true; inherit dconf gtk3; - inherit developerBuild decryptSslTraffic; + inherit debug developerBuild decryptSslTraffic; }; qtcharts = callPackage ../modules/qtcharts.nix {}; @@ -160,6 +206,7 @@ let qmake = makeSetupHook { deps = [ self.qtbase.dev ]; substitutions = { + inherit debug; fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh; }; } ../hooks/qmake-hook.sh; diff --git a/pkgs/development/libraries/qt-5/5.14/fetch.sh b/pkgs/development/libraries/qt-5/5.14/fetch.sh index 2d266b52977..e4e02bd82ed 100644 --- a/pkgs/development/libraries/qt-5/5.14/fetch.sh +++ b/pkgs/development/libraries/qt-5/5.14/fetch.sh @@ -1 +1,2 @@ -WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ ) +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.14/5.14.2/submodules/ \ + -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch index 0951b6646ab..0f38ce0d7f6 100644 --- a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch +++ b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch @@ -309,10 +309,8 @@ 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 -deleted file mode 100644 -index c40f58c987..0000000000 --- a/mkspecs/features/mac/sdk.mk -+++ /dev/null ++++ b/mkspecs/features/mac/sdk.mk @@ -1,25 +0,0 @@ - -ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),) diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0002-qtbase-mac.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0002-qtbase-mac.patch deleted file mode 100644 index 2e28466c503..00000000000 --- a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0002-qtbase-mac.patch +++ /dev/null @@ -1,116 +0,0 @@ -From ccaa916eab33093704293bc911eedd85fbe5f160 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc> -Date: Fri, 3 Apr 2020 21:15:27 +0200 -Subject: [PATCH 02/10] qtbase-mac - ---- - src/corelib/kernel/qcore_mac_p.h | 16 ++++++++++++++-- - src/testlib/qappletestlogger.cpp | 2 +- - src/testlib/qappletestlogger_p.h | 2 +- - src/testlib/qtestcase.cpp | 2 +- - src/testlib/qtestlog.cpp | 2 +- - src/testlib/qtestlog_p.h | 2 +- - 6 files changed, 19 insertions(+), 7 deletions(-) - -diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h -index 535d3579b2..3d70bf39c1 100644 ---- a/src/corelib/kernel/qcore_mac_p.h -+++ b/src/corelib/kernel/qcore_mac_p.h -@@ -225,7 +225,7 @@ private: - - // -------------------------------------------------------------------------- - --#if !defined(QT_BOOTSTRAPPED) -+#if 0 - - QT_END_NAMESPACE - #include <os/activity.h> -@@ -303,7 +303,19 @@ QT_MAC_WEAK_IMPORT(_os_activity_current); - - #define QT_APPLE_SCOPED_LOG_ACTIVITY(...) QAppleLogActivity scopedLogActivity = QT_APPLE_LOG_ACTIVITY(__VA_ARGS__).enter(); - --#endif // !defined(QT_BOOTSTRAPPED) -+#else // !defined(QT_BOOTSTRAPPED) -+ -+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT3(...) -+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT2(...) -+#define QT_APPLE_LOG_ACTIVITY_WITH_PARENT(...) -+ -+#define QT_APPLE_LOG_ACTIVITY2(...) -+#define QT_APPLE_LOG_ACTIVITY1(...) -+#define QT_APPLE_LOG_ACTIVITY(...) -+ -+#define QT_APPLE_SCOPED_LOG_ACTIVITY(...) -+ -+#endif - - // ------------------------------------------------------------------------- - -diff --git a/src/testlib/qappletestlogger.cpp b/src/testlib/qappletestlogger.cpp -index dfeadebdef..2a74330c1d 100644 ---- a/src/testlib/qappletestlogger.cpp -+++ b/src/testlib/qappletestlogger.cpp -@@ -43,7 +43,7 @@ - - QT_BEGIN_NAMESPACE - --#if defined(QT_USE_APPLE_UNIFIED_LOGGING) -+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 - - using namespace QTestPrivate; - -diff --git a/src/testlib/qappletestlogger_p.h b/src/testlib/qappletestlogger_p.h -index 62c6d95c5a..f8e0a3b767 100644 ---- a/src/testlib/qappletestlogger_p.h -+++ b/src/testlib/qappletestlogger_p.h -@@ -57,7 +57,7 @@ - - QT_BEGIN_NAMESPACE - --#if defined(QT_USE_APPLE_UNIFIED_LOGGING) -+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 - class QAppleTestLogger : public QAbstractTestLogger - { - public: -diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp -index 70733a692a..8bcda17858 100644 ---- a/src/testlib/qtestcase.cpp -+++ b/src/testlib/qtestcase.cpp -@@ -852,7 +852,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool - - bool addFallbackLogger = !explicitLoggerRequested; - --#if defined(QT_USE_APPLE_UNIFIED_LOGGING) -+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 - // Any explicitly requested loggers will be added by now, so we can check if they use stdout - const bool safeToAddAppleLogger = !AppleUnifiedLogger::willMirrorToStderr() || !QTestLog::loggerUsingStdout(); - if (safeToAddAppleLogger && QAppleTestLogger::debugLoggingEnabled()) { -diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp -index f3ebf343c5..9b4f526b2e 100644 ---- a/src/testlib/qtestlog.cpp -+++ b/src/testlib/qtestlog.cpp -@@ -465,7 +465,7 @@ void QTestLog::addLogger(LogMode mode, const char *filename) - case QTestLog::TAP: - logger = new QTapTestLogger(filename); - break; --#if defined(QT_USE_APPLE_UNIFIED_LOGGING) -+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 - case QTestLog::Apple: - logger = new QAppleTestLogger; - break; -diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h -index fff36f290d..f737ccf064 100644 ---- a/src/testlib/qtestlog_p.h -+++ b/src/testlib/qtestlog_p.h -@@ -72,7 +72,7 @@ public: - - enum LogMode { - Plain = 0, XML, LightXML, XunitXML, CSV, TeamCity, TAP --#if defined(QT_USE_APPLE_UNIFIED_LOGGING) -+#if defined(QT_USE_APPLE_UNIFIED_LOGGING) && 0 - , Apple - #endif - #if defined(HAVE_XCTEST) --- -2.25.1 - diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch index b704d0dc872..dbd6b366344 100644 --- a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch +++ b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0003-qtbase-mkspecs.patch @@ -1,6 +1,6 @@ -From 1cb5581d7f20bf87ac8d67a7295447a78a1d9645 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc> -Date: Sat, 4 Apr 2020 00:25:52 +0200 +From 87c81a31d65862a2f32fdc575cfb47b7a46bfae7 Mon Sep 17 00:00:00 2001 +From: OPNA2608 <christoph.neidahl@gmail.com> +Date: Mon, 12 Apr 2021 20:05:25 +0200 Subject: [PATCH 03/10] qtbase-mkspecs --- @@ -12,10 +12,10 @@ Subject: [PATCH 03/10] qtbase-mkspecs mkspecs/features/qt_build_paths.prf | 4 +- mkspecs/features/qt_docs.prf | 10 +-- mkspecs/features/qt_example_installs.prf | 2 +- - mkspecs/features/qt_functions.prf | 2 +- + mkspecs/features/qt_functions.prf | 27 ++++--- mkspecs/features/qt_installs.prf | 22 ++--- mkspecs/features/qt_plugin.prf | 2 +- - 11 files changed, 38 insertions(+), 141 deletions(-) + 11 files changed, 52 insertions(+), 152 deletions(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 0e71fd0015..ba071d9a70 100644 @@ -369,18 +369,44 @@ index 72b47bce27..d59e949e78 100644 check_examples { diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf -index 7777e615bd..abeb03a663 100644 +index 7777e615bd..b0c6880a74 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf -@@ -87,7 +87,7 @@ defineTest(qtHaveModule) { +@@ -87,19 +87,22 @@ defineTest(qtHaveModule) { defineTest(qtPrepareTool) { cmd = $$eval(QT_TOOL.$${2}.binary) isEmpty(cmd) { - cmd = $$[QT_HOST_BINS]/$$2 -+ cmd = $$system("command -v $$2") - exists($${cmd}.pl) { - $${1}_EXE = $${cmd}.pl - cmd = perl -w $$system_path($${cmd}.pl) +- exists($${cmd}.pl) { +- $${1}_EXE = $${cmd}.pl +- cmd = perl -w $$system_path($${cmd}.pl) +- } else: contains(QMAKE_HOST.os, Windows) { +- $${1}_EXE = $${cmd}.exe +- cmd = $$system_path($${cmd}.exe) +- } else:contains(QMAKE_HOST.os, Darwin) { +- BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2 +- exists($$BUNDLENAME) { +- cmd = $$BUNDLENAME ++ cmd = $$system("command -v $${2}") ++ isEmpty(cmd) { ++ cmd = $$system("command -v $${2}.pl") ++ !isEmpty(cmd) { ++ $${1}_EXE = $$cmd ++ cmd = perl -w $$system_path($${cmd}) ++ } else: contains(QMAKE_HOST.os, Windows) { ++ cmd = $$system("command -v $${2}.exe") ++ $${1}_EXE = $$cmd ++ } else: contains(QMAKE_HOST.os, Darwin) { ++ cmd = $$system("command -v $${2}.app") ++ !isEmpty(cmd) { ++ cmd = $${cmd}/Contents/MacOS/$${2} ++ $${1}_EXE = $$cmd ++ } + } +- $${1}_EXE = $$cmd + } else { + $${1}_EXE = $$cmd + } diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf index 1ebca17366..a8f958eae8 100644 --- a/mkspecs/features/qt_installs.prf @@ -460,5 +486,5 @@ index 573d717eea..024c624cb6 100644 qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX -- -2.25.1 +2.29.3 diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch new file mode 100644 index 00000000000..8a5939978a6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch @@ -0,0 +1,15 @@ +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 84dbbfebd4..615bfed124 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -119,6 +119,10 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) + if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") + set(Qt5Gui_${_cmake_lib_name}_LIBRARY) + endif() ++ set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}.tbd") ++ if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") ++ set(Qt5Gui_${_cmake_lib_name}_LIBRARY) ++ endif() + !!ENDIF + if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) + # The above find_library call doesn\'t work for finding diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0013-define-kiosurfacesuccess.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0013-define-kiosurfacesuccess.patch new file mode 100644 index 00000000000..a43a46d8a69 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0013-define-kiosurfacesuccess.patch @@ -0,0 +1,16 @@ +diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm +index a367487e..c3aeca1d 100644 +--- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm ++++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm +@@ -49,6 +49,11 @@ + // but was only added in the 10.14 SDK, so declare it just in case. + extern "C" CFPropertyListRef CGColorSpaceCopyPropertyList(CGColorSpaceRef space); + ++// Introduced in 10.13: http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.13/IOSurface.html ++#if !defined(kIOSurfaceSuccess) ++#define kIOSurfaceSuccess KERN_SUCCESS ++#endif ++ + QT_BEGIN_NAMESPACE + + Q_LOGGING_CATEGORY(lcQpaIOSurface, "qt.qpa.backingstore.iosurface"); diff --git a/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/qtbase-sdk-10.12-mac.patch b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/qtbase-sdk-10.12-mac.patch new file mode 100644 index 00000000000..b2dff5aba8f --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/qtbase-sdk-10.12-mac.patch @@ -0,0 +1,77 @@ +diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf +--- a/mkspecs/common/macx.conf ++++ b/mkspecs/common/macx.conf +@@ -10,7 +10,7 @@ QMAKE_APPLE_DEVICE_ARCHS = x86_64 + + # Should be 10.15, but as long as the CI builds with + # older SDKs we have to keep this. +-QT_MAC_SDK_VERSION_MIN = 10.14 ++QT_MAC_SDK_VERSION_MIN = 10.12 + + QT_MAC_SDK_VERSION_MAX = 10.15 + +diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm +--- a/src/corelib/kernel/qcore_mac_objc.mm ++++ b/src/corelib/kernel/qcore_mac_objc.mm +@@ -142,16 +142,10 @@ QMacAutoReleasePool::QMacAutoReleasePool() + + #ifdef QT_DEBUG + void *poolFrame = nullptr; +- if (__builtin_available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 5.0, *)) { +- void *frame; +- if (backtrace_from_fp(__builtin_frame_address(0), &frame, 1)) +- poolFrame = frame; +- } else { + static const int maxFrames = 3; + void *callstack[maxFrames]; + if (backtrace(callstack, maxFrames) == maxFrames) + poolFrame = callstack[maxFrames - 1]; +- } + + if (poolFrame) { + Dl_info info; +diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp +--- a/src/gui/rhi/qrhi.cpp ++++ b/src/gui/rhi/qrhi.cpp +@@ -4050,7 +4050,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh + #endif + case Metal: + //#ifdef Q_OS_DARWIN +-#ifdef Q_OS_MACOS ++#if 0 + r->d = new QRhiMetal(static_cast<QRhiMetalInitParams *>(params), + static_cast<QRhiMetalNativeHandles *>(importDevice)); + break; +diff --git a/src/gui/rhi/rhi.pri b/src/gui/rhi/rhi.pri +--- a/src/gui/rhi/rhi.pri ++++ b/src/gui/rhi/rhi.pri +@@ -44,7 +44,7 @@ win32 { + } + + # darwin { +-macos { ++false { + HEADERS += \ + rhi/qrhimetal_p.h \ + rhi/qrhimetal_p_p.h +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm +--- a/src/plugins/platforms/cocoa/qcocoadrag.mm ++++ b/src/plugins/platforms/cocoa/qcocoadrag.mm +@@ -134,7 +134,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + NSImage *nsimage = qt_mac_create_nsimage(pm); + [nsimage setSize:NSSizeFromCGSize(pmDeviceIndependentSize.toCGSize())]; + +- QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND); ++ QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacInternalPasteboardMime::MIME_DND); + m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy")); + dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest); + +@@ -145,7 +145,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + CGFloat flippedY = pmDeviceIndependentSize.height() - hotSpot.y(); + event_location.y -= flippedY; + NSSize mouseOffset_unused = NSMakeSize(0.0, 0.0); +- NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; ++ NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; + + [theWindow dragImage:nsimage + at:event_location diff --git a/pkgs/development/libraries/qt-5/5.14/qtlocation-gcc-9.patch b/pkgs/development/libraries/qt-5/5.14/qtlocation-gcc-9.patch new file mode 100644 index 00000000000..1791313e560 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtlocation-gcc-9.patch @@ -0,0 +1,21 @@ +diff --git a/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp b/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp +index d475c38..c1710a6 100644 +--- a/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp ++++ b/src/3rdparty/mapbox-gl-native/platform/default/bidi.cpp +@@ -5,6 +5,7 @@ + #include <unicode/ushape.h> + + #include <memory> ++#include <stdexcept> + + namespace mbgl { + +diff --git a/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp b/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp +index 97bfe91..56d3e17 100644 +--- a/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp ++++ b/src/3rdparty/mapbox-gl-native/src/mbgl/util/convert.cpp +@@ -1,3 +1,4 @@ ++#include <cstdint> + #include <mbgl/util/convert.hpp> + + namespace mbgl { diff --git a/pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch b/pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch new file mode 100644 index 00000000000..fb3d6327e45 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtwayland-libdrm-build.patch @@ -0,0 +1,56 @@ +commit 7217ea9cf297e664be876eb82b66a1b4f157ca80 +Author: Peter Seiderer <ps.report@gmx.net> +Date: Fri Apr 3 21:52:30 2020 +0200 + + fix libdrm related configure test failure + + Fixes: + + Project ERROR: Test config.qtwayland_client.tests.dmabuf-server-buffer tries to use undeclared library 'drm' + Project ERROR: Test config.qtwayland_compositor.tests.dmabuf-server-buffer tries to use undeclared library 'drm' + Project ERROR: Test config.qtwayland_compositor.tests.dmabuf-client-buffer tries to use undeclared library 'drm' + + Task-number: QTBUG-83303 + Change-Id: I3970f4e3855fcfa760493631a14adb6a16950aa9 + Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> + Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> + Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> + (cherry picked from commit ca63fe81df8ac910f43539719566ed6745700c2b) + (cherry picked from commit 1344ca6b5a8fbc1b28727feea6d856af8bf3bc93) + +diff --git a/src/client/configure.json b/src/client/configure.json +index 06213968..27c73f89 100644 +--- a/src/client/configure.json ++++ b/src/client/configure.json +@@ -74,7 +74,8 @@ + "label": "Linux dma-buf Buffer Sharing", + "type": "compile", + "test": "dmabuf_server_buffer", +- "use": "egl drm" ++ "libs": "-ldrm", ++ "use": "egl" + }, + "vulkan-server-buffer": { + "label": "Vulkan Buffer Sharing", +diff --git a/src/compositor/configure.json b/src/compositor/configure.json +index 0dbb3364..73e4c1a8 100644 +--- a/src/compositor/configure.json ++++ b/src/compositor/configure.json +@@ -80,13 +80,15 @@ + "label": "Linux dma-buf Buffer Sharing", + "type": "compile", + "test": "dmabuf_server_buffer", +- "use": "egl drm" ++ "libs": "-ldrm", ++ "use": "egl" + }, + "dmabuf-client-buffer": { + "label": "Linux Client dma-buf Buffer Sharing", + "type": "compile", + "test": "dmabuf_client_buffer", +- "use": "egl drm" ++ "libs": "-ldrm", ++ "use": "egl" + }, + "vulkan-server-buffer": { + "label": "Vulkan Buffer Sharing", diff --git a/pkgs/development/libraries/qt-5/5.14/qtwebkit-darwin-no-readline.patch b/pkgs/development/libraries/qt-5/5.14/qtwebkit-darwin-no-readline.patch index 26d189d8601..4871032f6f2 100644 --- a/pkgs/development/libraries/qt-5/5.14/qtwebkit-darwin-no-readline.patch +++ b/pkgs/development/libraries/qt-5/5.14/qtwebkit-darwin-no-readline.patch @@ -28,18 +28,3 @@ diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h #define HAVE_SYS_TIMEB_H 1 #if !PLATFORM(GTK) && !PLATFORM(QT) -diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake ---- a/Source/WTF/wtf/PlatformMac.cmake -+++ b/Source/WTF/wtf/PlatformMac.cmake -@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED) - - find_library(COCOA_LIBRARY Cocoa) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) --find_library(READLINE_LIBRARY Readline) - list(APPEND WTF_LIBRARIES - ${COREFOUNDATION_LIBRARY} - ${COCOA_LIBRARY} -- ${READLINE_LIBRARY} - libicucore.dylib - ) - diff --git a/pkgs/development/libraries/qt-5/5.14/qtwebkit-icu68.patch b/pkgs/development/libraries/qt-5/5.14/qtwebkit-icu68.patch new file mode 100644 index 00000000000..73463d7567a --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.14/qtwebkit-icu68.patch @@ -0,0 +1,170 @@ +Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844 + +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:31: +Source/WebCore/platform/text/TextCodecICU.cpp:311:42: error: use of undeclared identifier 'TRUE' + ucnv_setFallback(m_converterICU, TRUE); + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:40: +In file included from Source/WebCore/platform/text/icu/UTextProvider.cpp:27: +Source/WebCore/platform/text/icu/UTextProvider.h:83:28: error: use of undeclared identifier 'TRUE' + isAccessible = TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:88:28: error: use of undeclared identifier 'FALSE' + isAccessible = FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:97:28: error: use of undeclared identifier 'TRUE' + isAccessible = TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:102:28: error: use of undeclared identifier 'FALSE' + isAccessible = FALSE; + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:41: +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:103:20: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:108:20: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:114:20: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:119:20: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:147:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:339:16: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:359:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:42: +Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:128:16: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:148:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ + +--- a/Source/WebCore/platform/text/TextCodecICU.cpp ++++ b/Source/WebCore/platform/text/TextCodecICU.cpp +@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const + m_converterICU = ucnv_open(m_canonicalConverterName, &err); + ASSERT(U_SUCCESS(err)); + if (m_converterICU) +- ucnv_setFallback(m_converterICU, TRUE); ++ ucnv_setFallback(m_converterICU, true); + } + + int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err) +--- a/Source/WebCore/platform/text/icu/UTextProvider.h ++++ b/Source/WebCore/platform/text/icu/UTextProvider.h +@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) { + text->chunkOffset = text->chunkLength; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } else { +@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex <= 0 && !text->chunkNativeStart) { + text->chunkOffset = 0; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } +--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp +@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t i + if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (index >= length && uText->chunkNativeLimit == length) { + // Off the end of the buffer, but we can't get it. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return FALSE; ++ return false; + } + } else { + if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (!index && !uText->chunkNativeStart) { + // Already at the beginning; can't go any farther. + uText->chunkOffset = 0; +- return FALSE; ++ return false; + } + } + +@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t i + + uText->nativeIndexingLimit = uText->chunkLength; + +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status) +@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UTe + static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text + ASSERT(newContext == UTextProviderContext::PriorContext); + textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) +--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp +@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLeng + static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, + ASSERT(newContext == UTextProviderContext::PriorContext); + textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix new file mode 100644 index 00000000000..5d8688cfdc7 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -0,0 +1,255 @@ +/* + +# Updates + +Before a major version update, make a copy of this directory. (We like to +keep the old version around for a short time after major updates.) Add a +top-level attribute to `top-level/all-packages.nix`. + +1. Update the URL in `pkgs/development/libraries/qt-5/$VERSION/fetch.sh`. +2. From the top of the Nixpkgs tree, run + `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/$VERSION`. +3. Check that the new packages build correctly. +4. Commit the changes and open a pull request. + +*/ + +{ + newScope, + lib, stdenv, fetchurl, fetchpatch, fetchgit, fetchFromGitHub, makeSetupHook, makeWrapper, + bison, cups ? null, harfbuzz, libGL, perl, + gstreamer, gst-plugins-base, gtk3, dconf, + llvmPackages_5, + + # options + developerBuild ? false, + decryptSslTraffic ? false, + debug ? false, +}: + +with lib; + +let + + qtCompatVersion = srcs.qtbase.version; + + stdenvActual = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv; + + mirror = "https://download.qt.io"; + srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; } // { + # qtwebkit does not have an official release tarball on the qt mirror and is + # mostly maintained by the community. + qtwebkit = rec { + src = fetchFromGitHub { + owner = "qt"; + repo = "qtwebkit"; + rev = "v${version}"; + sha256 = "0x8rng96h19xirn7qkz3lydal6v4vn00bcl0s3brz36dfs0z8wpg"; + }; + version = "5.212.0-alpha4"; + }; + + # Even if developed in the public, QtWebEngine does not have official + # releases or new tags since the Qt company made 5.15.3 proprietary. + # Apparently they care more about licensing than the security of their users. + # See https://lists.qt-project.org/pipermail/interest/2021-March/036387.html + qtwebengine = + let + branchName = "5.15.3"; + rev = "a059e7404a6db799f4da0ad696e65ae9c854b4b0"; + in + { + version = "${branchName}-${lib.substring 0 7 rev}"; + + src = fetchgit { + url = "https://github.com/qt/qtwebengine.git"; + sha256 = "1vdgxfbmx4z4qrm2g61dl64gqn3fv5f83jwpp7h1gyfx5z2qvfmv"; + inherit rev branchName; + fetchSubmodules = true; + leaveDotGit = true; + name = "qtwebengine-${substring 0 7 rev}.tar.gz"; + postFetch = '' + # remove submodule .git directory + rm -rf $out/src/3rdparty/.git + + # compress to not exceed the 2GB output limit + mv $out source + # try to make a deterministic tarball + tar -I 'gzip -n' \ + --sort name \ + --mtime 1970-01-01 \ + --owner=root --group=root \ + --numeric-owner --mode=go=rX,u+rw,a-s \ + -cf $out source + ''; + }; + }; + }; + + patches = { + qtbase = + optionals stdenv.isDarwin [ + ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch + + # Downgrade minimal required SDK to 10.12 + ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch + ./qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch + ./qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch + ./qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch + ./qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch + ./qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch + ./qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch + ./qtbase.patch.d/qtbase-sdk-10.12-mac.patch + + # Patch framework detection to support X.framework/X.tbd, + # extending the current support for X.framework/X. + ./qtbase.patch.d/0012-qtbase-tbd-frameworks.patch + ] + ++ [ + ./qtbase.patch.d/0003-qtbase-mkspecs.patch + ./qtbase.patch.d/0004-qtbase-replace-libdir.patch + ./qtbase.patch.d/0005-qtbase-cmake.patch + ./qtbase.patch.d/0006-qtbase-gtk3.patch + ./qtbase.patch.d/0007-qtbase-xcursor.patch + ./qtbase.patch.d/0008-qtbase-tzdir.patch + ./qtbase.patch.d/0009-qtbase-qtpluginpath.patch + ./qtbase.patch.d/0010-qtbase-assert.patch + ./qtbase.patch.d/0011-fix-header_module.patch + ]; + qtdeclarative = [ ./qtdeclarative.patch ]; + qtscript = [ ./qtscript.patch ]; + qtserialport = [ ./qtserialport.patch ]; + qtwebengine = [ + # Fix crashes with non en_US.UTF-8 locales + (fetchpatch { + url = "https://github.com/qt/qtwebengine/commit/199ea00a9eea13315a652c62778738629185b059.patch"; + sha256 = "1b5k2g1v8913cvsgvp6ja4mcprjlk5vcwqzi0p1qq7b1wyi4f0g2"; + }) + # Fix invisible fonts with glibc 2.33: https://github.com/NixOS/nixpkgs/issues/131074 + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/qt5-qtwebengine/raw/d122c011631137b79455850c363676c655cf9e09/f/qtwebengine-everywhere-src-5.15.5-%231904652.patch"; + name = "qtwebengine-everywhere-src-5.15.5-_1904652.patch"; + sha256 = "01q7hagq0ysii1jnrh5adm97vdm9cis592xr6im7accyw6hgcn7b"; + }) + ] ++ optionals stdenv.isDarwin [ + ./qtwebengine-darwin-no-platform-check.patch + ./qtwebengine-mac-dont-set-dsymutil-path.patch + ]; + qtwebkit = [ + (fetchpatch { + name = "qtwebkit-bison-3.7-build.patch"; + url = "https://github.com/qtwebkit/qtwebkit/commit/d92b11fea65364fefa700249bd3340e0cd4c5b31.patch"; + sha256 = "0h8ymfnwgkjkwaankr3iifiscsvngqpwb91yygndx344qdiw9y0n"; + }) + (fetchpatch { + name = "qtwebkit-glib-2.68.patch"; + url = "https://github.com/qtwebkit/qtwebkit/pull/1058/commits/5b698ba3faffd4e198a45be9fe74f53307395e4b.patch"; + sha256 = "0a3xv0h4lv8wggckgy8cg8xnpkg7n9h45312pdjdnnwy87xvzss0"; + }) + ./qtwebkit.patch + ./qtwebkit-icu68.patch + ] ++ optionals stdenv.isDarwin [ + ./qtwebkit-darwin-no-readline.patch + ./qtwebkit-darwin-no-qos-classes.patch + ]; + qttools = [ ./qttools.patch ]; + }; + + qtModule = + import ../qtModule.nix + { + inherit perl; + inherit lib; + # Use a variant of mkDerivation that does not include wrapQtApplications + # to avoid cyclic dependencies between Qt modules. + mkDerivation = + import ../mkDerivation.nix + { inherit lib; inherit debug; wrapQtAppsHook = null; } + stdenvActual.mkDerivation; + } + { inherit self srcs patches; }; + + addPackages = self: with self; + let + callPackage = self.newScope { inherit qtCompatVersion qtModule srcs; }; + in { + + mkDerivationWith = + import ../mkDerivation.nix + { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; }; + + mkDerivation = mkDerivationWith stdenvActual.mkDerivation; + + qtbase = callPackage ../modules/qtbase.nix { + inherit (srcs.qtbase) src version; + patches = patches.qtbase; + inherit bison cups harfbuzz libGL; + withGtk3 = true; inherit dconf gtk3; + inherit developerBuild decryptSslTraffic; + }; + + qtcharts = callPackage ../modules/qtcharts.nix {}; + qtconnectivity = callPackage ../modules/qtconnectivity.nix {}; + qtdeclarative = callPackage ../modules/qtdeclarative.nix {}; + qtdoc = callPackage ../modules/qtdoc.nix {}; + qtgamepad = callPackage ../modules/qtgamepad.nix {}; + qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {}; + qtimageformats = callPackage ../modules/qtimageformats.nix {}; + qtlocation = callPackage ../modules/qtlocation.nix {}; + qtmacextras = callPackage ../modules/qtmacextras.nix {}; + qtmultimedia = callPackage ../modules/qtmultimedia.nix { + inherit gstreamer gst-plugins-base; + }; + qtnetworkauth = callPackage ../modules/qtnetworkauth.nix {}; + qtquick1 = null; + qtquickcontrols = callPackage ../modules/qtquickcontrols.nix {}; + qtquickcontrols2 = callPackage ../modules/qtquickcontrols2.nix {}; + qtscript = callPackage ../modules/qtscript.nix {}; + qtsensors = callPackage ../modules/qtsensors.nix {}; + qtserialport = callPackage ../modules/qtserialport.nix {}; + qtspeech = callPackage ../modules/qtspeech.nix {}; + qtsvg = callPackage ../modules/qtsvg.nix {}; + qtscxml = callPackage ../modules/qtscxml.nix {}; + qttools = callPackage ../modules/qttools.nix {}; + qttranslations = callPackage ../modules/qttranslations.nix {}; + qtvirtualkeyboard = callPackage ../modules/qtvirtualkeyboard.nix {}; + qtwayland = callPackage ../modules/qtwayland.nix {}; + qtwebchannel = callPackage ../modules/qtwebchannel.nix {}; + qtwebengine = callPackage ../modules/qtwebengine.nix { + inherit (srcs.qtwebengine) version; + }; + qtwebglplugin = callPackage ../modules/qtwebglplugin.nix {}; + qtwebkit = callPackage ../modules/qtwebkit.nix {}; + qtwebsockets = callPackage ../modules/qtwebsockets.nix {}; + qtwebview = callPackage ../modules/qtwebview.nix {}; + qtx11extras = callPackage ../modules/qtx11extras.nix {}; + qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; + + env = callPackage ../qt-env.nix {}; + full = env "qt-full-${qtbase.version}" ([ + qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects + qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 + qtscript qtsensors qtserialport qtsvg qttools qttranslations + qtvirtualkeyboard qtwebchannel qtwebengine qtwebkit qtwebsockets + qtwebview qtx11extras qtxmlpatterns + ] ++ optional (!stdenv.isDarwin) qtwayland + ++ optional (stdenv.isDarwin) qtmacextras); + + qmake = makeSetupHook { + deps = [ self.qtbase.dev ]; + substitutions = { + inherit debug; + fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh; + }; + } ../hooks/qmake-hook.sh; + + wrapQtAppsHook = makeSetupHook { + deps = + [ self.qtbase.dev makeWrapper ] + ++ optional stdenv.isLinux self.qtwayland.dev; + } ../hooks/wrap-qt-apps-hook.sh; + }; + + self = makeScope newScope addPackages; + +in self diff --git a/pkgs/development/libraries/qt-5/5.15/fetch.sh b/pkgs/development/libraries/qt-5/5.15/fetch.sh new file mode 100644 index 00000000000..81ceb3ef77e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/fetch.sh @@ -0,0 +1,2 @@ +WGET_ARGS=( http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ \ + -A '*.tar.xz' ) diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch new file mode 100644 index 00000000000..3a2900abdd6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0001-qtbase-mkspecs-mac.patch @@ -0,0 +1,409 @@ +From 5ec1d1009d9943f20e82ffc087deabb31d447e75 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc> +Date: Fri, 3 Apr 2020 21:07:58 +0200 +Subject: [PATCH 01/11] qtbase-mkspecs-mac + +--- + mkspecs/common/mac.conf | 2 +- + mkspecs/features/mac/default_post.prf | 206 -------------------------- + mkspecs/features/mac/default_pre.prf | 58 -------- + mkspecs/features/mac/sdk.mk | 25 ---- + mkspecs/features/mac/sdk.prf | 61 -------- + 5 files changed, 1 insertion(+), 351 deletions(-) + delete mode 100644 mkspecs/features/mac/sdk.mk + delete mode 100644 mkspecs/features/mac/sdk.prf + +diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf +index 61bea952b2..9909dae726 100644 +--- a/mkspecs/common/mac.conf ++++ b/mkspecs/common/mac.conf +@@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ + + QMAKE_FIX_RPATH = install_name_tool -id + +-QMAKE_LFLAGS_RPATH = -Wl,-rpath, ++QMAKE_LFLAGS_RPATH = + QMAKE_LFLAGS_GCSECTIONS = -Wl,-dead_strip + + QMAKE_LFLAGS_REL_RPATH = +diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf +index 92a9112bca..b80ec1e801 100644 +--- a/mkspecs/features/mac/default_post.prf ++++ b/mkspecs/features/mac/default_post.prf +@@ -68,212 +68,6 @@ qt { + } + } + +-# Add the same default rpaths as Xcode does for new projects. +-# This is especially important for iOS/tvOS/watchOS where no other option is possible. +-!no_default_rpath { +- uikit: QMAKE_RPATHDIR += @executable_path/Frameworks +- else: QMAKE_RPATHDIR += @executable_path/../Frameworks +- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks +-} +- +-# Don't pass -headerpad_max_install_names when using Bitcode. +-# In that case the linker emits a warning stating that the flag is ignored when +-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). +-# Using this flag is also unnecessary in practice on UIKit platforms since they +-# are sandboxed, and only UIKit platforms support bitcode to begin with. +-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD +- +-app_extension_api_only { +- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION +-} +- +-macx-xcode { +- qmake_pkginfo_typeinfo.name = QMAKE_PKGINFO_TYPEINFO +- !isEmpty(QMAKE_PKGINFO_TYPEINFO): \ +- qmake_pkginfo_typeinfo.value = $$QMAKE_PKGINFO_TYPEINFO +- else: \ +- qmake_pkginfo_typeinfo.value = "????" +- QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo +- +- bundle_version = $$VERSION +- isEmpty(bundle_version): bundle_version = 1.0.0 +- +- l = $$split(bundle_version, '.') 0 0 # make sure there are at least three +- VER_MAJ = $$member(l, 0, 0) +- VER_MIN = $$member(l, 1, 1) +- VER_PAT = $$member(l, 2, 2) +- unset(l) +- +- qmake_full_version.name = QMAKE_FULL_VERSION +- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +- QMAKE_MAC_XCODE_SETTINGS += qmake_full_version +- +- qmake_short_version.name = QMAKE_SHORT_VERSION +- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN} +- QMAKE_MAC_XCODE_SETTINGS += qmake_short_version +- +- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { +- debug_information_format.name = DEBUG_INFORMATION_FORMAT +- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT +- debug_information_format.build = debug +- QMAKE_MAC_XCODE_SETTINGS += debug_information_format +- } +- +- QMAKE_XCODE_ARCHS = +- +- arch_device.name = "ARCHS[sdk=$${device.sdk}*]" +- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS +- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS +- QMAKE_MAC_XCODE_SETTINGS += arch_device +- +- simulator { +- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" +- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS +- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS +- QMAKE_MAC_XCODE_SETTINGS += arch_simulator +- } +- +- only_active_arch.name = ONLY_ACTIVE_ARCH +- only_active_arch.value = YES +- only_active_arch.build = debug +- 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 +- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS +- +- isEmpty(VALID_ARCHS): \ +- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture") +- +- single_arch: VALID_ARCHS = $$first(VALID_ARCHS) +- +- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS)) +- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch)) +- +- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS +- +- arch_flags = $(EXPORT_ARCH_ARGS) +- +- QMAKE_CFLAGS += $$arch_flags +- QMAKE_CXXFLAGS += $$arch_flags +- QMAKE_LFLAGS += $$arch_flags +- +- QMAKE_PCH_ARCHS = $$VALID_ARCHS +- +- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET +- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET +- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET +- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET +- +- # If we're doing a simulator and device build, device and simulator +- # architectures use different paths and flags for the sysroot and +- # deployment target switch, so we must multiplex them across multiple +- # architectures using -Xarch. Otherwise we fall back to the simple path. +- # This is not strictly necessary, but results in cleaner command lines +- # 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 { +- QMAKE_XARCH_CFLAGS = +- QMAKE_XARCH_LFLAGS = +- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS +- +- for (arch, VALID_ARCHS) { +- contains(VALID_SIMULATOR_ARCHS, $$arch) { +- sdk = $$simulator.sdk +- version_identifier = $$simulator.deployment_identifier +- } else { +- sdk = $$device.sdk +- version_identifier = $$device.deployment_identifier +- } +- +- version_min_flags = \ +- -Xarch_$${arch} \ +- -m$${version_identifier}-version-min=$$deployment_target +- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \ +- -Xarch_$${arch} \ +- -isysroot$$xcodeSDKInfo(Path, $$sdk) +- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \ +- -Xarch_$${arch} \ +- -isysroot$$xcodeSDKInfo(Path, $$sdk) +- +- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch}) +- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch}) +- +- QMAKE_EXTRA_VARIABLES += \ +- QMAKE_XARCH_CFLAGS_$${arch} \ +- QMAKE_XARCH_LFLAGS_$${arch} +- } +- +- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) +- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) +- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) +- } else { +- simulator { +- version_identifier = $$simulator.deployment_identifier +- sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk) +- } else { +- version_identifier = $$device.deployment_identifier +- sysroot_path = $$xcodeSDKInfo(Path, $$device.sdk) +- } +- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target +- QMAKE_CFLAGS += -isysroot $$sysroot_path $$version_min_flag +- QMAKE_CXXFLAGS += -isysroot $$sysroot_path $$version_min_flag +- QMAKE_LFLAGS += -isysroot $$sysroot_path $$version_min_flag +- } +- +- # Enable precompiled headers for multiple architectures +- QMAKE_CFLAGS_USE_PRECOMPILE = +- for (arch, VALID_ARCHS) { +- icc_pch_style: \ +- use_flag = "-pch-use " +- else: \ +- use_flag = -include +- +- # Only use Xarch with multi-arch, as the option confuses ccache +- count(VALID_ARCHS, 1, greaterThan): \ +- QMAKE_CFLAGS_USE_PRECOMPILE += \ +- -Xarch_$${arch} +- +- QMAKE_CFLAGS_USE_PRECOMPILE += \ +- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}} +- } +- icc_pch_style { +- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT} +- QMAKE_CFLAGS_USE_PRECOMPILE = +- } else { +- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE +- } +- +- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT} +-} +- +-!equals(sdk_version, $$QMAKE_MAC_SDK_VERSION) { +- # Explicit SDK version has been set, respect that +- QMAKE_LFLAGS += -Wl,-sdk_version -Wl,$$sdk_version +-} +- +-cache(QMAKE_XCODE_DEVELOPER_PATH, stash) +-!isEmpty(QMAKE_XCODE_VERSION): \ +- cache(QMAKE_XCODE_VERSION, stash) +- +-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() +- +-xcode_product_bundle_identifier_setting.name = PRODUCT_BUNDLE_IDENTIFIER +-xcode_product_bundle_identifier_setting.value = $$QMAKE_TARGET_BUNDLE_PREFIX +-isEmpty(xcode_product_bundle_identifier_setting.value): \ +- xcode_product_bundle_identifier_setting.value = "com.yourcompany" +-xcode_product_bundle_target = $$QMAKE_BUNDLE +-isEmpty(xcode_product_bundle_target): \ +- xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier} +-xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}" +-QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting +- + !macx-xcode { + 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 +--- a/mkspecs/features/mac/default_pre.prf ++++ b/mkspecs/features/mac/default_pre.prf +@@ -1,60 +1,2 @@ + CONFIG = asset_catalogs rez $$CONFIG + load(default_pre) +- +-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) { +- # Get path of Xcode's Developer directory +- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null") +- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \ +- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.") +- +- # Make sure Xcode path is valid +- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \ +- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.") +-} +- +-isEmpty(QMAKE_XCODEBUILD_PATH): \ +- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null") +- +-!isEmpty(QMAKE_XCODEBUILD_PATH) { +- # Make sure Xcode is set up properly +- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \ +- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.") +- +- isEmpty(QMAKE_XCODE_VERSION) { +- # Extract Xcode version using xcodebuild +- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version") +- QMAKE_XCODE_VERSION = $$member(xcode_version, 1) +- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.") +- unset(xcode_version) +- } +-} +- +-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) { +- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist +- exists($$QMAKE_XCODE_PREFERENCES_FILE): \ +- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null") +- +- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ +- cache(QMAKE_TARGET_BUNDLE_PREFIX) +-} +- +-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon +- +-# Make the default debug info format for static debug builds +-# DWARF instead of DWARF with dSYM. This cuts down build times +-# for application debug builds significantly, as Xcode doesn't +-# have to pull out all the DWARF info from the Qt static libs +-# and put it into a dSYM file. We don't need that dSYM file in +-# the first place, since the information is available in the +-# object files inside the archives (static libraries). +-macx-xcode:qtConfig(static): \ +- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf +- +-# This variable is used by the xcode_dynamic_library_suffix +-# feature, which allows Xcode to choose the Qt libraries to link to +-# at build time, depending on the current Xcode SDK and configuration. +-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX +- +-xcode_copy_phase_strip_setting.name = COPY_PHASE_STRIP +-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 +--- a/mkspecs/features/mac/sdk.mk ++++ b/mkspecs/features/mac/sdk.mk +@@ -1,25 +0,0 @@ +- +-ifeq ($(QT_MAC_SDK_NO_VERSION_CHECK),) +- CHECK_SDK_COMMAND = /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version 2>&1 +- CURRENT_MAC_SDK_VERSION := $(shell DEVELOPER_DIR=$(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) $(CHECK_SDK_COMMAND)) +- ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION)) +- # We don't want to complain about out of date SDK unless the target needs to be remade. +- # This covers use-cases such as running 'make check' after moving the build to a +- # computer without Xcode or with a different Xcode version. +- TARGET_UP_TO_DATE := $(shell QT_MAC_SDK_NO_VERSION_CHECK=1 $(MAKE) --question $(QMAKE_TARGET) && echo 1 || echo 0) +- ifeq ($(TARGET_UP_TO_DATE),0) +- ifneq ($(findstring missing DEVELOPER_DIR path,$(CURRENT_MAC_SDK_VERSION)),) +- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) is no longer valid.) +- else ifneq ($(findstring SDK "$(EXPORT_QMAKE_MAC_SDK)" cannot be located,$(CURRENT_MAC_SDK_VERSION)),) +- $(info The developer dir $(EXPORT_QMAKE_XCODE_DEVELOPER_PATH) no longer contains the $(EXPORT_QMAKE_MAC_SDK_VERSION) platform SDK.) +- else ifneq ($(CURRENT_MAC_SDK_VERSION),) +- $(info The platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).) +- else +- $(info Unknown error resolving current platform SDK version.) +- endif +- $(info This requires a fresh build. Please wipe the build directory completely,) +- $(info including any .qmake.stash and .qmake.cache files generated by qmake.) +- $(error ^) +- endif +- endif +-endif +diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf +deleted file mode 100644 +index 3a9c2778bb..0000000000 +--- a/mkspecs/features/mac/sdk.prf ++++ /dev/null +@@ -1,61 +0,0 @@ +- +-isEmpty(QMAKE_MAC_SDK): \ +- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.") +- +-contains(QMAKE_MAC_SDK, .*/.*): \ +- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") +- +-defineReplace(xcodeSDKInfo) { +- info = $$1 +- equals(info, "Path"): \ +- infoarg = --show-sdk-path +- equals(info, "PlatformPath"): \ +- infoarg = --show-sdk-platform-path +- equals(info, "SDKVersion"): \ +- infoarg = --show-sdk-version +- sdk = $$2 +- isEmpty(sdk): \ +- sdk = $$QMAKE_MAC_SDK +- +- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) { +- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$infoarg 2>/dev/null") +- # --show-sdk-platform-path won't work for Command Line Tools; this is fine +- # only used by the XCTest backend to testlib +- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(infoarg, "--show-sdk-platform-path")): \ +- error("Could not resolve SDK $$info for \'$$sdk\' using $$infoarg") +- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info}) +- } +- +- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info})) +-} +- +-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path) +-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) +-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) +- +-isEmpty(QMAKE_EXPORT_INCDIR_OPENGL) { +- QMAKE_EXPORT_INCDIR_OPENGL = $$QMAKE_INCDIR_OPENGL +- sysrootified = +- for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val +- QMAKE_INCDIR_OPENGL = $$sysrootified +-} +- +-QMAKESPEC_NAME = $$basename(QMAKESPEC) +- +-# Resolve SDK version of various tools +-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL QMAKE_LINK_C QMAKE_LINK_C_SHLIB)) { +- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool} +- !isEmpty($$tool_variable) { +- $$tool = $$eval($$tool_variable) +- next() +- } +- +- value = $$eval($$tool) +- isEmpty(value): next() +- +- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null") +- isEmpty(sysrooted): next() +- +- $$tool = $$sysrooted $$member(value, 1, -1) +- cache($$tool_variable, set stash, $$tool) +-} +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch new file mode 100644 index 00000000000..1c9012c0f2e --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0003-qtbase-mkspecs.patch @@ -0,0 +1,490 @@ +From 03a5a7eab673d18d00c9b5eb8c7d5b790079e8ff Mon Sep 17 00:00:00 2001 +From: OPNA2608 <christoph.neidahl@gmail.com> +Date: Mon, 12 Apr 2021 20:20:46 +0200 +Subject: [PATCH 03/11] qtbase-mkspecs + +--- + mkspecs/features/create_cmake.prf | 51 +++--------- + .../data/cmake/Qt5BasicConfig.cmake.in | 80 +------------------ + mkspecs/features/qml_module.prf | 2 +- + mkspecs/features/qml_plugin.prf | 2 +- + mkspecs/features/qt_app.prf | 2 +- + mkspecs/features/qt_build_paths.prf | 4 +- + mkspecs/features/qt_docs.prf | 10 +-- + mkspecs/features/qt_example_installs.prf | 2 +- + mkspecs/features/qt_functions.prf | 27 ++++--- + mkspecs/features/qt_installs.prf | 22 ++--- + mkspecs/features/qt_plugin.prf | 2 +- + 11 files changed, 52 insertions(+), 152 deletions(-) + +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index 24ed125f12..f0666a1986 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -21,7 +21,7 @@ load(cmake_functions) + # at cmake time whether package has been found via a symlink, and correct + # that to an absolute path. This is only done for installations to + # the /usr or / prefix. +-CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS]) ++CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$NIX_OUTPUT_OUT/lib/) + contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR + + CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake +@@ -77,45 +77,20 @@ split_incpath { + $$cmake_extra_source_includes.output + } + +-CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { +- CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ +- CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True +-} ++CMAKE_INCLUDE_DIR = $$NIX_OUTPUT_DEV/include/ ++CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True + +-CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_LIB_DIR,"^\\.\\./.*") { +- CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ +- CMAKE_LIB_DIR_IS_ABSOLUTE = True +-} else { +- CMAKE_RELATIVE_INSTALL_LIBS_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS]) +- # We need to go up another two levels because the CMake files are +- # installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME} +- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}../../" +-} ++CMAKE_BIN_DIR = $$NIX_OUTPUT_BIN/bin/ ++CMAKE_BIN_DIR_IS_ABSOLUTE = True + +-CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_BIN_DIR, "^\\.\\./.*") { +- CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ +- CMAKE_BIN_DIR_IS_ABSOLUTE = True +-} ++CMAKE_LIB_DIR = $$NIX_OUTPUT_OUT/lib/ ++CMAKE_LIB_DIR_IS_ABSOLUTE = True + +-CMAKE_PLUGIN_DIR = $$cmakeRelativePath($$[QT_INSTALL_PLUGINS], $$[QT_INSTALL_PREFIX]) +-contains(CMAKE_PLUGIN_DIR, "^\\.\\./.*") { +- CMAKE_PLUGIN_DIR = $$[QT_INSTALL_PLUGINS]/ +- CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True +-} ++CMAKE_PLUGIN_DIR = $$NIX_OUTPUT_PLUGIN/ ++CMAKE_PLUGIN_DIR_IS_ABSOLUTE = True + +-win32:!static:!staticlib { +- CMAKE_DLL_DIR = $$cmakeRelativePath($$[QT_INSTALL_BINS], $$[QT_INSTALL_PREFIX]) +- contains(CMAKE_DLL_DIR, "^\\.\\./.*") { +- CMAKE_DLL_DIR = $$[QT_INSTALL_BINS]/ +- CMAKE_DLL_DIR_IS_ABSOLUTE = True +- } +-} else { +- CMAKE_DLL_DIR = $$CMAKE_LIB_DIR +- CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE +-} ++CMAKE_DLL_DIR = $$NIX_OUTPUT_OUT/lib/ ++CMAKE_DLL_DIR_IS_ABSOLUTE = True + + static|staticlib:CMAKE_STATIC_TYPE = true + +@@ -258,7 +233,7 @@ contains(CONFIG, plugin) { + + cmake_qt5_plugin_file.files = $$cmake_target_file.output + static|staticlib: cmake_qt5_plugin_file.files += $$cmake_qt5_plugin_import_file.output +- cmake_qt5_plugin_file.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} ++ cmake_qt5_plugin_file.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME} + INSTALLS += cmake_qt5_plugin_file + + return() +@@ -400,7 +375,7 @@ exists($$cmake_macros_file.input) { + cmake_qt5_module_files.files += $$cmake_macros_file.output + } + +-cmake_qt5_module_files.path = $$[QT_INSTALL_LIBS]/cmake/Qt5$${CMAKE_MODULE_NAME} ++cmake_qt5_module_files.path = $$NIX_OUTPUT_OUT/lib/cmake/Qt5$${CMAKE_MODULE_NAME} + + # We are generating cmake files. Most developers of Qt are not aware of cmake, + # so we require automatic tests to be available. The only module which should +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index db18dbece6..8246f37931 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -2,30 +2,6 @@ if (CMAKE_VERSION VERSION_LESS 3.1.0) + message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\") + endif() + +-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND) +-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +-!!ELSE +-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH) +-# Use original install prefix when loaded through a +-# cross-prefix symbolic link such as /lib -> /usr/lib. +-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH) +-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH) +-if(_realCurr STREQUAL _realOrig) +- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE) +-else() +- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +-endif() +-unset(_realOrig) +-unset(_realCurr) +-unset(_IMPORT_PREFIX) +-!!ENDIF +-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE) +-!!ELSE +-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\") +-!!ENDIF +- + !!IF !equals(TEMPLATE, aux) + # For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead. + set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)") +@@ -145,11 +121,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + IsDebugAndRelease) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") +-!!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set(_deps + ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES} +@@ -209,11 +181,7 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + !!ENDIF + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") +-!!ELSE + set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib}) + if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\") + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES +@@ -229,24 +197,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !no_module_headers + !!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK) + set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\" ++ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\" ++ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\" + ) + !!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" +- ) +-!!ELSE +- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") +-!!ENDIF +-!!ELSE +-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\") +-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES) +- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\" +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\" ++ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/\" ++ \"$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, .,0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\" + ) + !!ELSE + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") +@@ -262,7 +219,6 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\") + !!ENDIF + !!ENDIF +-!!ENDIF + !!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS) + include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL) + !!ENDIF +@@ -491,25 +447,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) + !!IF isEmpty(CMAKE_DEBUG_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" +-!!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" +-!!ENDIF + AND EXISTS +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) +-!!ENDIF + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) + !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + endif() +@@ -528,25 +472,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) + !!IF isEmpty(CMAKE_RELEASE_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS +-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" +-!!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" +-!!ENDIF + AND EXISTS +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) +-!!ENDIF + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) + !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD + endif() +@@ -573,11 +505,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + IsDebugAndRelease) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ELSE + set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") +-!!ENDIF + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::${Plugin} PROPERTIES + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} +diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf +index 3d6cd9b3db..ca8b0b2701 100644 +--- a/mkspecs/features/qml_module.prf ++++ b/mkspecs/features/qml_module.prf +@@ -51,7 +51,7 @@ builtin_resources { + # Install rules + qmldir.base = $$qmldir_path + qmldir.files = $$qmldir_file +-qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH ++qmldir.path = $$NIX_OUTPUT_QML/$$TARGETPATH + + qmlfiles.base = $$_PRO_FILE_PWD_ + qmlfiles.files = $$fq_aux_qml_files +diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf +index 1b67435787..24a1f78c17 100644 +--- a/mkspecs/features/qml_plugin.prf ++++ b/mkspecs/features/qml_plugin.prf +@@ -50,7 +50,7 @@ load(qt_build_paths) + + DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH + +-target.path = $$[QT_INSTALL_QML]/$$TARGETPATH ++target.path = $$NIX_OUTPUT_QML/$$TARGETPATH + INSTALLS += target + + # Some final setup +diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf +index 8354f30eea..62028fef8e 100644 +--- a/mkspecs/features/qt_app.prf ++++ b/mkspecs/features/qt_app.prf +@@ -30,7 +30,7 @@ host_build:force_bootstrap { + target.path = $$[QT_HOST_BINS] + } else { + !build_pass:qtConfig(debug_and_release): CONFIG += release +- target.path = $$[QT_INSTALL_BINS] ++ target.path = $$NIX_OUTPUT_BIN/bin + CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } + INSTALLS += target +diff --git a/mkspecs/features/qt_build_paths.prf b/mkspecs/features/qt_build_paths.prf +index 3bb3823a8e..655b7b7db8 100644 +--- a/mkspecs/features/qt_build_paths.prf ++++ b/mkspecs/features/qt_build_paths.prf +@@ -24,6 +24,6 @@ exists($$MODULE_BASE_INDIR/.git): \ + !force_independent { + # If the module is not built independently, everything ends up in qtbase. + # This is the case in non-prefix builds, except for selected modules. +- MODULE_BASE_OUTDIR = $$[QT_HOST_PREFIX] +- MODULE_QMAKE_OUTDIR = $$[QT_HOST_PREFIX] ++ MODULE_BASE_OUTDIR = $$NIX_OUTPUT_OUT ++ MODULE_QMAKE_OUTDIR = $$NIX_OUTPUT_OUT + } +diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf +index 095bf15dac..4cc977bea5 100644 +--- a/mkspecs/features/qt_docs.prf ++++ b/mkspecs/features/qt_docs.prf +@@ -65,7 +65,7 @@ QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR + + QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR) + !build_online_docs: \ +- QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS]) ++ QDOC += -installdir $$shell_quote($$NIX_OUTPUT_DOC) + PREP_DOC_INDEXES = + DOC_INDEXES = + !isEmpty(QTREPOS) { +@@ -84,8 +84,8 @@ DOC_INDEXES = + DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc) + } else { + prepare_docs: \ +- PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get]) +- DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get]) ++ PREP_DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC) ++ DOC_INDEXES += -indexdir $$shell_quote($$NIX_OUTPUT_DOC) + } + + qtattributionsscanner.target = qtattributionsscanner +@@ -108,12 +108,12 @@ prepare_docs { + qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch) + + inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR +- inst_html_docs.path = $$[QT_INSTALL_DOCS] ++ inst_html_docs.path = $$NIX_OUTPUT_DOC + inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build + INSTALLS += inst_html_docs + + inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch +- inst_qch_docs.path = $$[QT_INSTALL_DOCS] ++ inst_qch_docs.path = $$NIX_OUTPUT_DOC + inst_qch_docs.CONFIG += no_check_exist no_default_install no_build + INSTALLS += inst_qch_docs + +diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf +index 15b373ba40..5c373fe1d5 100644 +--- a/mkspecs/features/qt_example_installs.prf ++++ b/mkspecs/features/qt_example_installs.prf +@@ -91,7 +91,7 @@ sourcefiles += \ + $$SOURCES $$HEADERS $$FORMS $$RESOURCES $$TRANSLATIONS \ + $$DBUS_ADAPTORS $$DBUS_INTERFACES + addInstallFiles(sources.files, $$sourcefiles) +-sources.path = $$[QT_INSTALL_EXAMPLES]/$$probase ++sources.path = $$NIX_OUTPUT_DEV/share/examples/$$probase + INSTALLS += sources + + check_examples { +diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf +index 7777e615bd..b0c6880a74 100644 +--- a/mkspecs/features/qt_functions.prf ++++ b/mkspecs/features/qt_functions.prf +@@ -87,19 +87,22 @@ defineTest(qtHaveModule) { + defineTest(qtPrepareTool) { + cmd = $$eval(QT_TOOL.$${2}.binary) + isEmpty(cmd) { +- cmd = $$[QT_HOST_BINS]/$$2 +- exists($${cmd}.pl) { +- $${1}_EXE = $${cmd}.pl +- cmd = perl -w $$system_path($${cmd}.pl) +- } else: contains(QMAKE_HOST.os, Windows) { +- $${1}_EXE = $${cmd}.exe +- cmd = $$system_path($${cmd}.exe) +- } else:contains(QMAKE_HOST.os, Darwin) { +- BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2 +- exists($$BUNDLENAME) { +- cmd = $$BUNDLENAME ++ cmd = $$system("command -v $${2}") ++ isEmpty(cmd) { ++ cmd = $$system("command -v $${2}.pl") ++ !isEmpty(cmd) { ++ $${1}_EXE = $$cmd ++ cmd = perl -w $$system_path($${cmd}) ++ } else: contains(QMAKE_HOST.os, Windows) { ++ cmd = $$system("command -v $${2}.exe") ++ $${1}_EXE = $$cmd ++ } else: contains(QMAKE_HOST.os, Darwin) { ++ cmd = $$system("command -v $${2}.app") ++ !isEmpty(cmd) { ++ cmd = $${cmd}/Contents/MacOS/$${2} ++ $${1}_EXE = $$cmd ++ } + } +- $${1}_EXE = $$cmd + } else { + $${1}_EXE = $$cmd + } +diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf +index 1ebca17366..a8f958eae8 100644 +--- a/mkspecs/features/qt_installs.prf ++++ b/mkspecs/features/qt_installs.prf +@@ -12,16 +12,10 @@ + #library + !qt_no_install_library { + win32 { +- host_build: \ +- dlltarget.path = $$[QT_HOST_BINS] +- else: \ +- dlltarget.path = $$[QT_INSTALL_BINS] ++ dlltarget.path = $$NIX_OUTPUT_BIN/bin + INSTALLS += dlltarget + } +- host_build: \ +- target.path = $$[QT_HOST_LIBS] +- else: \ +- target.path = $$[QT_INSTALL_LIBS] ++ target.path = $$NIX_OUTPUT_OUT/lib + !static: target.CONFIG = no_dll + INSTALLS += target + } +@@ -29,35 +23,35 @@ + #headers + qt_install_headers { + gen_headers.files = $$SYNCQT.GENERATED_HEADER_FILES +- gen_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME ++ gen_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME + INSTALLS += gen_headers + + targ_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.INJECTED_HEADER_FILES +- targ_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME ++ targ_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME + INSTALLS += targ_headers + + private_headers.files = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.INJECTED_PRIVATE_HEADER_FILES +- private_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private ++ private_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/private + generated_privates: \ + private_headers.CONFIG += no_check_exist + INSTALLS += private_headers + + qpa_headers.files = $$SYNCQT.QPA_HEADER_FILES +- qpa_headers.path = $$[QT_INSTALL_HEADERS]/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa ++ qpa_headers.path = $$NIX_OUTPUT_DEV/include/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME/qpa + INSTALLS += qpa_headers + } + + #module + qt_install_module { + !isEmpty(MODULE_PRI) { +- pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules ++ pritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules + pritarget.files = $$MODULE_PRI + INSTALLS += pritarget + } else: isEmpty(MODULE_PRIVATE_PRI) { + warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.") + } + !isEmpty(MODULE_PRIVATE_PRI) { +- privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules ++ privpritarget.path = $$NIX_OUTPUT_DEV/mkspecs/modules + privpritarget.files = $$MODULE_PRIVATE_PRI + INSTALLS += privpritarget + } +diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf +index 573d717eea..024c624cb6 100644 +--- a/mkspecs/features/qt_plugin.prf ++++ b/mkspecs/features/qt_plugin.prf +@@ -88,7 +88,7 @@ CONFIG(static, static|shared)|prefix_build { + } + } + +-target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE ++target.path = $$NIX_OUTPUT_PLUGIN/$$PLUGIN_TYPE + INSTALLS += target + + qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX +-- +2.29.3 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch new file mode 100644 index 00000000000..bbfc9389787 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0004-qtbase-replace-libdir.patch @@ -0,0 +1,68 @@ +From 30d3906ff5e8671e9c97c5336c6c549656c0e293 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc> +Date: Sat, 4 Apr 2020 00:27:41 +0200 +Subject: [PATCH 04/11] qtbase-replace-libdir + +--- + mkspecs/features/qt_common.prf | 20 ++------------------ + mkspecs/features/qt_module.prf | 5 +---- + 2 files changed, 3 insertions(+), 22 deletions(-) + +diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf +index 8df94aa4ee..414029f31c 100644 +--- a/mkspecs/features/qt_common.prf ++++ b/mkspecs/features/qt_common.prf +@@ -31,32 +31,16 @@ contains(TEMPLATE, .*lib)|contains(TEMPLATE, aux) { + rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]* + else: \ + rplbase = $$MODULE_BASE_OUTDIR +- host_build { +- qqt_libdir = \$\$\$\$[QT_HOST_LIBS] +- qt_libdir = $$[QT_HOST_LIBS] +- } else { +- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS] +- qt_libdir = $$[QT_INSTALL_LIBS] +- } ++ qt_libdir = $$NIX_OUTPUT_OUT/lib + contains(QMAKE_DEFAULT_LIBDIRS, $$qt_libdir) { +- lib_replace0.match = $$rplbase/lib/ +- lib_replace0.replace = $$qqt_libdir/ +- lib_replace0.CONFIG = path +- QMAKE_PRL_INSTALL_REPLACE += lib_replace0 + lib_replace.match = "[^ ']*$$rplbase/lib" + lib_replace.replace = + } else { + lib_replace.match = $$rplbase/lib +- lib_replace.replace = $$qqt_libdir ++ lib_replace.replace = $$qt_libdir + } + lib_replace.CONFIG = path + QMAKE_PRL_INSTALL_REPLACE += lib_replace +- !equals(qt_libdir, $$rplbase/lib) { +- qtlibdir_replace.match = $$qt_libdir +- qtlibdir_replace.replace = $$qqt_libdir +- qtlibdir_replace.CONFIG = path +- QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace +- } + } + contains(TEMPLATE, .*lib)|darwin { + if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols +diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf +index 828a9621b9..b9e5d35026 100644 +--- a/mkspecs/features/qt_module.prf ++++ b/mkspecs/features/qt_module.prf +@@ -305,10 +305,7 @@ load(qt_targets) + } + !lib_bundle:unix { + CONFIG += create_libtool +- host_build: \ +- QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS] +- else: \ +- QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]" ++ QMAKE_LIBTOOL_LIBDIR = $$NIX_OUTPUT_OUT/lib + !isEmpty(lib_replace0.match) { + ltlib_replace0.match = $$lib_replace0.match + ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/ +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch new file mode 100644 index 00000000000..19646df1666 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0005-qtbase-cmake.patch @@ -0,0 +1,194 @@ +From 7871fbcefc7596a458cec005edafd9d4962baea3 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Tue, 17 Sep 2019 05:34:28 -0500 +Subject: [PATCH 05/11] qtbase-cmake + +--- + mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 2 +- + mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in | 4 ++-- + src/corelib/Qt5CoreConfigExtras.cmake.in | 10 +++++----- + src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in | 2 +- + .../Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in | 2 +- + src/dbus/Qt5DBusConfigExtras.cmake.in | 12 ++---------- + src/gui/Qt5GuiConfigExtras.cmake.in | 6 +++--- + src/widgets/Qt5WidgetsConfigExtras.cmake.in | 2 +- + 8 files changed, 16 insertions(+), 24 deletions(-) + +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index b6c3ab8609..edb6a89316 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -513,7 +513,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + IsDebugAndRelease) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + +- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ set(imported_location \"${PLUGIN_LOCATION}\") + _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) + set_target_properties(Qt5::${Plugin} PROPERTIES + \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} +diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +index b550a52c60..dbd3243885 100644 +--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +@@ -53,10 +53,10 @@ set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES + !!ENDIF + + !!IF !isEmpty(CMAKE_RELEASE_TYPE) +-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) ++_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) + !!ENDIF + !!IF !isEmpty(CMAKE_DEBUG_TYPE) +-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) ++_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) + !!ENDIF + + list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) +diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in +index 4c1c3a612b..bb8ab08143 100644 +--- a/src/corelib/Qt5CoreConfigExtras.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtras.cmake.in +@@ -6,7 +6,7 @@ if (NOT TARGET Qt5::qmake) + add_executable(Qt5::qmake IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -21,7 +21,7 @@ if (NOT TARGET Qt5::moc) + add_executable(Qt5::moc IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -38,7 +38,7 @@ if (NOT TARGET Qt5::rcc) + add_executable(Qt5::rcc IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\") + !!ENDIF +@@ -121,7 +121,7 @@ if (NOT TARGET Qt5::WinMain) + !!IF !isEmpty(CMAKE_RELEASE_TYPE) + set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") + !!ELSE + set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_RELEASE}\") + !!ENDIF +@@ -135,7 +135,7 @@ if (NOT TARGET Qt5::WinMain) + set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") + !!ELSE + set(imported_location \"$${CMAKE_LIB_DIR}$${CMAKE_WINMAIN_FILE_LOCATION_DEBUG}\") + !!ENDIF +diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +index c357237d0e..6f0c75de3c 100644 +--- a/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDir.cmake.in +@@ -1,6 +1,6 @@ + + !!IF isEmpty(CMAKE_HOST_DATA_DIR_IS_ABSOLUTE) +-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") ++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_HOST_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") + !!ELSE + set(_qt5_corelib_extra_includes \"$${CMAKE_HOST_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") + !!ENDIF +diff --git a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +index 706304cf34..546420f6ad 100644 +--- a/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in ++++ b/src/corelib/Qt5CoreConfigExtrasMkspecDirForInstall.cmake.in +@@ -1,6 +1,6 @@ + + !!IF isEmpty(CMAKE_INSTALL_DATA_DIR_IS_ABSOLUTE) +-set(_qt5_corelib_extra_includes \"${_qt5Core_install_prefix}/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") ++set(_qt5_corelib_extra_includes \"$$NIX_OUTPUT_DEV/$${CMAKE_INSTALL_DATA_DIR}/mkspecs/$${CMAKE_MKSPEC}\") + !!ELSE + set(_qt5_corelib_extra_includes \"$${CMAKE_INSTALL_DATA_DIR}mkspecs/$${CMAKE_MKSPEC}\") + !!ENDIF +diff --git a/src/dbus/Qt5DBusConfigExtras.cmake.in b/src/dbus/Qt5DBusConfigExtras.cmake.in +index a814678f7b..b13b964ec8 100644 +--- a/src/dbus/Qt5DBusConfigExtras.cmake.in ++++ b/src/dbus/Qt5DBusConfigExtras.cmake.in +@@ -2,11 +2,7 @@ + if (NOT TARGET Qt5::qdbuscpp2xml) + add_executable(Qt5::qdbuscpp2xml IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") +-!!ELSE +- set(imported_location \"$${CMAKE_BIN_DIR}qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbuscpp2xml$$CMAKE_BIN_SUFFIX\") + _qt5_DBus_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qdbuscpp2xml PROPERTIES +@@ -17,11 +13,7 @@ endif() + if (NOT TARGET Qt5::qdbusxml2cpp) + add_executable(Qt5::qdbusxml2cpp IMPORTED) + +-!!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5DBus_install_prefix}/$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") +-!!ELSE +- set(imported_location \"$${CMAKE_BIN_DIR}qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") +-!!ENDIF ++ set(imported_location \"$$NIX_OUTPUT_DEV/bin/qdbusxml2cpp$$CMAKE_BIN_SUFFIX\") + _qt5_DBus_check_file_exists(${imported_location}) + + set_target_properties(Qt5::qdbusxml2cpp PROPERTIES +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 84dbbfebd4..8ad0720c5c 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -2,7 +2,7 @@ + !!IF !isEmpty(CMAKE_ANGLE_EGL_DLL_RELEASE) + + !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE) +-set(Qt5Gui_EGL_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR/QtANGLE\") ++set(Qt5Gui_EGL_INCLUDE_DIRS \"$$NIX_OUTPUT_DEV/$$CMAKE_INCLUDE_DIR/QtANGLE\") + !!ELSE + set(Qt5Gui_EGL_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR/QtANGLE\") + !!ENDIF +@@ -17,13 +17,13 @@ macro(_populate_qt5gui_gl_target_properties TargetName Configuration LIB_LOCATIO + set_property(TARGET Qt5::${TargetName} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Gui_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ set(imported_location \"$$NIX_OUTPUT_OUT/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF + + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5Gui_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ set(imported_implib \"$$NIX_OUTPUT_OUT/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ELSE + set(imported_implib \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ENDIF +diff --git a/src/widgets/Qt5WidgetsConfigExtras.cmake.in b/src/widgets/Qt5WidgetsConfigExtras.cmake.in +index 83d8004a08..ca0b8e4bfb 100644 +--- a/src/widgets/Qt5WidgetsConfigExtras.cmake.in ++++ b/src/widgets/Qt5WidgetsConfigExtras.cmake.in +@@ -3,7 +3,7 @@ if (NOT TARGET Qt5::uic) + add_executable(Qt5::uic IMPORTED) + + !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") ++ set(imported_location \"$$NIX_OUTPUT_DEV/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") + !!ELSE + set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\") + !!ENDIF +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch new file mode 100644 index 00000000000..48f4c9b3f99 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0006-qtbase-gtk3.patch @@ -0,0 +1,48 @@ +From 7a9f4f875053aed8ab387161eea623bf8325cfa8 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Tue, 17 Sep 2019 05:35:33 -0500 +Subject: [PATCH 06/11] qtbase-gtk3 + +--- + src/plugins/platformthemes/gtk3/main.cpp | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/platformthemes/gtk3/main.cpp b/src/plugins/platformthemes/gtk3/main.cpp +index 860fc3a26e..8cd4663d49 100644 +--- a/src/plugins/platformthemes/gtk3/main.cpp ++++ b/src/plugins/platformthemes/gtk3/main.cpp +@@ -39,6 +39,7 @@ + + #include <qpa/qplatformthemeplugin.h> + #include "qgtk3theme.h" ++#include <QFile> + + QT_BEGIN_NAMESPACE + +@@ -54,8 +55,22 @@ public: + QPlatformTheme *QGtk3ThemePlugin::create(const QString &key, const QStringList ¶ms) + { + Q_UNUSED(params); +- if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) ++ if (!key.compare(QLatin1String(QGtk3Theme::name), Qt::CaseInsensitive)) { ++ ++#ifdef NIXPKGS_QGTK3_XDG_DATA_DIRS ++ QStringList XDG_DATA_DIRS = QFile::decodeName(qgetenv("XDG_DATA_DIRS")).split(':'); ++ XDG_DATA_DIRS << QLatin1String(NIXPKGS_QGTK3_XDG_DATA_DIRS); ++ qputenv("XDG_DATA_DIRS", QFile::encodeName(XDG_DATA_DIRS.join(':'))); ++#endif ++ ++#ifdef NIXPKGS_QGTK3_GIO_EXTRA_MODULES ++ QStringList GIO_EXTRA_MODULES = QFile::decodeName(qgetenv("GIO_EXTRA_MODULES")).split(':'); ++ GIO_EXTRA_MODULES << QLatin1String(NIXPKGS_QGTK3_GIO_EXTRA_MODULES); ++ qputenv("GIO_EXTRA_MODULES", QFile::encodeName(GIO_EXTRA_MODULES.join(':'))); ++#endif ++ + return new QGtk3Theme; ++ } + + return nullptr; + } +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch new file mode 100644 index 00000000000..617b0684df6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0007-qtbase-xcursor.patch @@ -0,0 +1,29 @@ +From 707098eada20ba074e642a73248de74407bc261c Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Tue, 17 Sep 2019 05:35:58 -0500 +Subject: [PATCH 07/11] qtbase-xcursor + +--- + src/plugins/platforms/xcb/qxcbcursor.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp +index 42c7a52bd4..ba670ddb44 100644 +--- a/src/plugins/platforms/xcb/qxcbcursor.cpp ++++ b/src/plugins/platforms/xcb/qxcbcursor.cpp +@@ -317,10 +317,10 @@ QXcbCursor::QXcbCursor(QXcbConnection *conn, QXcbScreen *screen) + #if QT_CONFIG(xcb_xlib) && QT_CONFIG(library) + static bool function_ptrs_not_initialized = true; + if (function_ptrs_not_initialized) { +- QLibrary xcursorLib(QLatin1String("Xcursor"), 1); ++ QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1); + bool xcursorFound = xcursorLib.load(); + if (!xcursorFound) { // try without the version number +- xcursorLib.setFileName(QLatin1String("Xcursor")); ++ xcursorLib.setFileName(QLatin1String(NIXPKGS_LIBXCURSOR)); + xcursorFound = xcursorLib.load(); + } + if (xcursorFound) { +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch new file mode 100644 index 00000000000..319de315bfb --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0008-qtbase-tzdir.patch @@ -0,0 +1,64 @@ +From da003b582ee8823b29b1ff5c0aca8e06e7741b94 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Tue, 17 Sep 2019 05:36:25 -0500 +Subject: [PATCH 08/11] qtbase-tzdir + +--- + src/corelib/time/qtimezoneprivate_tz.cpp | 31 +++++++++++++++--------- + 1 file changed, 19 insertions(+), 12 deletions(-) + +diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp +index 01f9a6cce0..910338205a 100644 +--- a/src/corelib/time/qtimezoneprivate_tz.cpp ++++ b/src/corelib/time/qtimezoneprivate_tz.cpp +@@ -77,7 +77,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash; + // Parse zone.tab table, assume lists all installed zones, if not will need to read directories + static QTzTimeZoneHash loadTzTimeZones() + { +- QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); ++ // Try TZDIR first, in case we're running on NixOS. ++ QString path = QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/zone.tab"); ++ // Fallback to traditional paths in case we are not on NixOS. ++ if (!QFile::exists(path)) ++ path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); + if (!QFile::exists(path)) + path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); + +@@ -672,20 +676,23 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) + if (!tzif.open(QIODevice::ReadOnly)) + return ret; + } else { +- // Open named tz, try modern path first, if fails try legacy path +- tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ // Try TZDIR first, in case we're running on NixOS ++ tzif.setFileName(QFile::decodeName(qgetenv("TZDIR")) + QStringLiteral("/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { +- tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ tzif.setFileName(QLatin1String("/usr/share/zoneinfo/") + QString::fromLocal8Bit(ianaId)); + if (!tzif.open(QIODevice::ReadOnly)) { +- // ianaId may be a POSIX rule, taken from $TZ or /etc/TZ +- const QByteArray zoneInfo = ianaId.split(',').at(0); +- const char *begin = zoneInfo.constBegin(); +- if (PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset() +- && (begin == zoneInfo.constEnd() +- || PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset())) { +- ret.m_posixRule = ianaId; ++ tzif.setFileName(QLatin1String("/usr/lib/zoneinfo/") + QString::fromLocal8Bit(ianaId)); ++ if (!tzif.open(QIODevice::ReadOnly)) { ++ // ianaId may be a POSIX rule, taken from $TZ or /etc/TZ ++ const QByteArray zoneInfo = ianaId.split(',').at(0); ++ const char *begin = zoneInfo.constBegin(); ++ if (PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset() ++ && (begin == zoneInfo.constEnd() ++ || PosixZone::parse(begin, zoneInfo.constEnd()).hasValidOffset())) { ++ ret.m_posixRule = ianaId; ++ } ++ return ret; + } +- return ret; + } + } + } +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch new file mode 100644 index 00000000000..28013ec1048 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch @@ -0,0 +1,33 @@ +From 9fc6efaf774a8716932c98c0b0ea6408ed2614c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc> +Date: Sun, 10 May 2020 12:47:28 +0200 +Subject: [PATCH 09/11] qtbase-qtpluginpath + +--- + src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp +index 5fdcc9b914..1a126ef359 100644 +--- a/src/corelib/kernel/qcoreapplication.cpp ++++ b/src/corelib/kernel/qcoreapplication.cpp +@@ -2691,6 +2691,16 @@ QStringList QCoreApplication::libraryPathsLocked() + QStringList *app_libpaths = new QStringList; + coreappdata()->app_libpaths.reset(app_libpaths); + ++ // Add library paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir)); ++ } ++ } ++ ++ + auto setPathsFromEnv = [&](QString libPathEnv) { + if (!libPathEnv.isEmpty()) { + QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts); +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch new file mode 100644 index 00000000000..c5b099c4ca3 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0010-qtbase-assert.patch @@ -0,0 +1,32 @@ +From 015845b3c320d02691f28373097d1e6dbbac79f7 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel <ttuegel@mailbox.org> +Date: Tue, 17 Sep 2019 05:37:04 -0500 +Subject: [PATCH 10/11] qtbase-assert + +--- + src/testlib/qtestassert.h | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/testlib/qtestassert.h b/src/testlib/qtestassert.h +index 6498ea84ef..d821ced7fc 100644 +--- a/src/testlib/qtestassert.h ++++ b/src/testlib/qtestassert.h +@@ -44,10 +44,13 @@ + + QT_BEGIN_NAMESPACE + +- ++#if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) ++#define QTEST_ASSERT(cond) do { } while ((false) && (cond)) ++#define QTEST_ASSERT_X(cond, where, what) do { } while ((false) && (cond)) ++#else + #define QTEST_ASSERT(cond) do { if (!(cond)) qt_assert(#cond,__FILE__,__LINE__); } while (false) +- + #define QTEST_ASSERT_X(cond, where, what) do { if (!(cond)) qt_assert_x(where, what,__FILE__,__LINE__); } while (false) ++#endif + + QT_END_NAMESPACE + +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch new file mode 100644 index 00000000000..98738656114 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0011-fix-header_module.patch @@ -0,0 +1,25 @@ +From 2bce8511877db1db532e1437e7140b1d55633f86 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +Date: Mon, 30 Sep 2019 20:15:40 -0500 +Subject: [PATCH 11/11] fix header_module + +--- + mkspecs/features/qt_module.prf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf +index b9e5d35026..9924271042 100644 +--- a/mkspecs/features/qt_module.prf ++++ b/mkspecs/features/qt_module.prf +@@ -84,7 +84,7 @@ header_module { + CONFIG += qt_no_install_library + + # Allow creation of .prl, .la and .pc files. +- target.path = $$[QT_INSTALL_LIBS] ++ target.path = $$NIX_OUTPUT_OUT/lib + target.CONFIG += dummy_install + INSTALLS += target + } else { +-- +2.25.4 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch new file mode 100644 index 00000000000..8a5939978a6 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0012-qtbase-tbd-frameworks.patch @@ -0,0 +1,15 @@ +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 84dbbfebd4..615bfed124 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -119,6 +119,10 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) + if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") + set(Qt5Gui_${_cmake_lib_name}_LIBRARY) + endif() ++ set(Qt5Gui_${_cmake_lib_name}_LIBRARY "${Qt5Gui_${_cmake_lib_name}_LIBRARY}/${_lib}.tbd") ++ if (NOT EXISTS "${Qt5Gui_${_cmake_lib_name}_LIBRARY}") ++ set(Qt5Gui_${_cmake_lib_name}_LIBRARY) ++ endif() + !!ENDIF + if (NOT Qt5Gui_${_cmake_lib_name}_LIBRARY) + # The above find_library call doesn\'t work for finding diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0013-define-kiosurfacesuccess.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0013-define-kiosurfacesuccess.patch new file mode 100644 index 00000000000..a43a46d8a69 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0013-define-kiosurfacesuccess.patch @@ -0,0 +1,16 @@ +diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm +index a367487e..c3aeca1d 100644 +--- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm ++++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm +@@ -49,6 +49,11 @@ + // but was only added in the 10.14 SDK, so declare it just in case. + extern "C" CFPropertyListRef CGColorSpaceCopyPropertyList(CGColorSpaceRef space); + ++// Introduced in 10.13: http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.13/IOSurface.html ++#if !defined(kIOSurfaceSuccess) ++#define kIOSurfaceSuccess KERN_SUCCESS ++#endif ++ + QT_BEGIN_NAMESPACE + + Q_LOGGING_CATEGORY(lcQpaIOSurface, "qt.qpa.backingstore.iosurface"); diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch new file mode 100644 index 00000000000..de75ecbd0c1 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0001-Revert-QCocoaDrag-set-image-only-on-the-first-drag-i.patch @@ -0,0 +1,47 @@ +From f156c35975e7844d2369ec5a6633ee40ec56f17a Mon Sep 17 00:00:00 2001 +From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> +Date: Mon, 7 Dec 2020 12:32:29 -0500 +Subject: [PATCH 1/6] Revert "QCocoaDrag - set image only on the first drag + item" + +This reverts commit 7ee9bfc158a290776f622f62d0202220c6d159bc. +--- + src/plugins/platforms/cocoa/qcocoadrag.mm | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm +index 4bd1b129bd..a506126c72 100644 +--- a/src/plugins/platforms/cocoa/qcocoadrag.mm ++++ b/src/plugins/platforms/cocoa/qcocoadrag.mm +@@ -217,18 +217,13 @@ bool QCocoaDrag::maybeDragMultipleItems() + // 0. We start from URLs, which can be actually in a list (thus technically + // only ONE item in the pasteboard. The fact it's only one does not help, we are + // still getting an exception because of the number of items/images mismatch ... +- // We only set the image for the first item and nil for the rest, the image already +- // contains a combined picture for all urls we drag. +- auto imageOrNil = dragImage; + for (const auto &qtUrl : qtUrls) { + NSURL *nsUrl = qtUrl.toNSURL(); + auto *newItem = [[[NSDraggingItem alloc] initWithPasteboardWriter:nsUrl] autorelease]; + const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y, + dragImage.size.width, + dragImage.size.height); +- +- [newItem setDraggingFrame:itemFrame contents:imageOrNil]; +- imageOrNil = nil; ++ [newItem setDraggingFrame:itemFrame contents:dragImage]; + [dragItems addObject:newItem]; + } + // 1. Repeat for non-url items, if any: +@@ -237,7 +232,7 @@ bool QCocoaDrag::maybeDragMultipleItems() + const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y, + dragImage.size.width, + dragImage.size.height); +- [newItem setDraggingFrame:itemFrame contents:imageOrNil]; ++ [newItem setDraggingFrame:itemFrame contents:dragImage]; + [dragItems addObject:newItem]; + } + +-- +2.21.0 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch new file mode 100644 index 00000000000..ee3a2d9f5a4 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0002-Revert-QCocoaDrag-drag-make-sure-clipboard-is-ours-a.patch @@ -0,0 +1,40 @@ +From 9aaac67e3c3bf40ef3efc3b07b1655f72c8c54aa Mon Sep 17 00:00:00 2001 +From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> +Date: Mon, 7 Dec 2020 12:32:31 -0500 +Subject: [PATCH 2/6] Revert "QCocoaDrag::drag - make sure clipboard is ours + and populated" + +This reverts commit 720e2e0c92ca6635c5f05f318770a70cf653c1c7. +--- + src/plugins/platforms/cocoa/qcocoadrag.mm | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm +index a506126c72..c6ee4323ce 100644 +--- a/src/plugins/platforms/cocoa/qcocoadrag.mm ++++ b/src/plugins/platforms/cocoa/qcocoadrag.mm +@@ -131,10 +131,6 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + m_drag = o; + m_executed_drop_action = Qt::IgnoreAction; + +- QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND); +- m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy")); +- dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest); +- + if (maybeDragMultipleItems()) + return m_executed_drop_action; + +@@ -143,6 +139,10 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + NSImage *dragImage = [NSImage imageFromQImage:pm.toImage()]; + Q_ASSERT(dragImage); + ++ QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND); ++ m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy")); ++ dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest); ++ + NSPoint event_location = [m_lastEvent locationInWindow]; + NSWindow *theWindow = [m_lastEvent window]; + Q_ASSERT(theWindow); +-- +2.21.0 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch new file mode 100644 index 00000000000..55211fca64c --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0003-Revert-QCocoaDrag-maybeDragMultipleItems-fix-erroneo.patch @@ -0,0 +1,27 @@ +From d1626c55d10537274c6f365855342a1c619a4c3a Mon Sep 17 00:00:00 2001 +From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> +Date: Mon, 7 Dec 2020 12:32:32 -0500 +Subject: [PATCH 3/6] Revert "QCocoaDrag::maybeDragMultipleItems - fix + erroneous size check" + +This reverts commit b8a03411784803c07ecc1f769860756d6fdc04cd. +--- + src/plugins/platforms/cocoa/qcocoadrag.mm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm +index c6ee4323ce..ab6863a432 100644 +--- a/src/plugins/platforms/cocoa/qcocoadrag.mm ++++ b/src/plugins/platforms/cocoa/qcocoadrag.mm +@@ -187,7 +187,7 @@ bool QCocoaDrag::maybeDragMultipleItems() + const auto &qtUrls = m_drag->mimeData()->urls(); + NSPasteboard *dragBoard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; + +- if (qtUrls.size() <= 1) { ++ if (int(dragBoard.pasteboardItems.count) == 1 && qtUrls.size() <= 1) { + // Good old -dragImage: works perfectly for this ... + return false; + } +-- +2.21.0 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch new file mode 100644 index 00000000000..7b568a91943 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0004-Revert-QCocoaDrag-avoid-using-the-deprecated-API-if-.patch @@ -0,0 +1,192 @@ +From d5c155a9f3ff38e28ac073f6df43175724ebc290 Mon Sep 17 00:00:00 2001 +From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> +Date: Mon, 7 Dec 2020 12:32:34 -0500 +Subject: [PATCH 4/6] Revert "QCocoaDrag - avoid using the deprecated API if + possible" + +This reverts commit 8481a9fc974a1f1dd44a9f82decb18fe2290689f. +--- + src/plugins/platforms/cocoa/qcocoadrag.h | 6 -- + src/plugins/platforms/cocoa/qcocoadrag.mm | 90 ------------------- + .../platforms/cocoa/qnsview_dragging.mm | 9 +- + 3 files changed, 1 insertion(+), 104 deletions(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.h b/src/plugins/platforms/cocoa/qcocoadrag.h +index 975741c270..5a5b985c6e 100644 +--- a/src/plugins/platforms/cocoa/qcocoadrag.h ++++ b/src/plugins/platforms/cocoa/qcocoadrag.h +@@ -48,8 +48,6 @@ + #include <QtGui/private/qdnd_p.h> + #include <QtGui/private/qinternalmimedata_p.h> + +-#include <QtCore/qeventloop.h> +- + QT_BEGIN_NAMESPACE + + class QCocoaDrag : public QPlatformDrag +@@ -71,15 +69,11 @@ public: + void setLastMouseEvent(NSEvent *event, NSView *view); + + void setAcceptedAction(Qt::DropAction act); +- void exitDragLoop(); + private: + QDrag *m_drag; + NSEvent *m_lastEvent; + NSView *m_lastView; + Qt::DropAction m_executed_drop_action; +- QEventLoop internalDragLoop; +- +- bool maybeDragMultipleItems(); + + QPixmap dragPixmap(QDrag *drag, QPoint &hotSpot) const; + }; +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm +index ab6863a432..b4a16ab912 100644 +--- a/src/plugins/platforms/cocoa/qcocoadrag.mm ++++ b/src/plugins/platforms/cocoa/qcocoadrag.mm +@@ -44,9 +44,6 @@ + #include <QtWidgets/qwidget.h> + #endif + #include <QtGui/private/qcoregraphics_p.h> +-#include <QtCore/qsysinfo.h> +- +-#include <vector> + + QT_BEGIN_NAMESPACE + +@@ -131,9 +128,6 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + m_drag = o; + m_executed_drop_action = Qt::IgnoreAction; + +- if (maybeDragMultipleItems()) +- return m_executed_drop_action; +- + QPoint hotSpot = m_drag->hotSpot(); + QPixmap pm = dragPixmap(m_drag, hotSpot); + NSImage *dragImage = [NSImage imageFromQImage:pm.toImage()]; +@@ -164,95 +158,11 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + return m_executed_drop_action; + } + +-bool QCocoaDrag::maybeDragMultipleItems() +-{ +- Q_ASSERT(m_drag && m_drag->mimeData()); +- Q_ASSERT(m_executed_drop_action == Qt::IgnoreAction); +- +- if (QOperatingSystemVersion::current() < QOperatingSystemVersion::MacOSMojave) { +- // -dragImage: stopped working in 10.14 first. +- return false; +- } +- +- const QMacAutoReleasePool pool; +- +- NSWindow *theWindow = [m_lastEvent window]; +- Q_ASSERT(theWindow); +- +- if (![theWindow.contentView respondsToSelector:@selector(draggingSession:sourceOperationMaskForDraggingContext:)]) +- return false; +- +- auto *sourceView = static_cast<NSView<NSDraggingSource>*>(theWindow.contentView); +- +- const auto &qtUrls = m_drag->mimeData()->urls(); +- NSPasteboard *dragBoard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; +- +- if (int(dragBoard.pasteboardItems.count) == 1 && qtUrls.size() <= 1) { +- // Good old -dragImage: works perfectly for this ... +- return false; +- } +- +- std::vector<NSPasteboardItem *> nonUrls; +- for (NSPasteboardItem *item in dragBoard.pasteboardItems) { +- bool isUrl = false; +- for (NSPasteboardType type in item.types) { +- using NSStringRef = NSString *; +- if ([type isEqualToString:NSStringRef(kUTTypeFileURL)]) { +- isUrl = true; +- break; +- } +- } +- +- if (!isUrl) +- nonUrls.push_back(item); +- } +- +- QPoint hotSpot = m_drag->hotSpot(); +- const auto pixmap = dragPixmap(m_drag, hotSpot); +- NSImage *dragImage = [NSImage imageFromQImage:pixmap.toImage()]; +- Q_ASSERT(dragImage); +- +- NSMutableArray<NSDraggingItem *> *dragItems = [[[NSMutableArray alloc] init] autorelease]; +- const NSPoint itemLocation = m_drag->hotSpot().toCGPoint(); +- // 0. We start from URLs, which can be actually in a list (thus technically +- // only ONE item in the pasteboard. The fact it's only one does not help, we are +- // still getting an exception because of the number of items/images mismatch ... +- for (const auto &qtUrl : qtUrls) { +- NSURL *nsUrl = qtUrl.toNSURL(); +- auto *newItem = [[[NSDraggingItem alloc] initWithPasteboardWriter:nsUrl] autorelease]; +- const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y, +- dragImage.size.width, +- dragImage.size.height); +- [newItem setDraggingFrame:itemFrame contents:dragImage]; +- [dragItems addObject:newItem]; +- } +- // 1. Repeat for non-url items, if any: +- for (auto *pbItem : nonUrls) { +- auto *newItem = [[[NSDraggingItem alloc] initWithPasteboardWriter:pbItem] autorelease]; +- const NSRect itemFrame = NSMakeRect(itemLocation.x, itemLocation.y, +- dragImage.size.width, +- dragImage.size.height); +- [newItem setDraggingFrame:itemFrame contents:dragImage]; +- [dragItems addObject:newItem]; +- } +- +- [sourceView beginDraggingSessionWithItems:dragItems event:m_lastEvent source:sourceView]; +- internalDragLoop.exec(); +- return true; +-} +- + void QCocoaDrag::setAcceptedAction(Qt::DropAction act) + { + m_executed_drop_action = act; + } + +-void QCocoaDrag::exitDragLoop() +-{ +- if (internalDragLoop.isRunning()) +- internalDragLoop.exit(); +-} +- +- + QPixmap QCocoaDrag::dragPixmap(QDrag *drag, QPoint &hotSpot) const + { + const QMimeData* data = drag->mimeData(); +diff --git a/src/plugins/platforms/cocoa/qnsview_dragging.mm b/src/plugins/platforms/cocoa/qnsview_dragging.mm +index 978d73f7d9..463e3c5579 100644 +--- a/src/plugins/platforms/cocoa/qnsview_dragging.mm ++++ b/src/plugins/platforms/cocoa/qnsview_dragging.mm +@@ -232,10 +232,6 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin + if (!target) + return; + +- auto *nativeDrag = QCocoaIntegration::instance()->drag(); +- Q_ASSERT(nativeDrag); +- nativeDrag->exitDragLoop(); +- + QPoint windowPoint = QPointF::fromCGPoint([self convertPoint:sender.draggingLocation fromView:nil]).toPoint(); + + qCDebug(lcQpaMouse) << QEvent::DragLeave << self << "at" << windowPoint; +@@ -294,10 +290,7 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin + if (!target) + return; + +- QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag(); +- Q_ASSERT(nativeDrag); +- nativeDrag->exitDragLoop(); +- nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation)); ++ QCocoaIntegration::instance()->drag(); + + // Qt starts drag-and-drop on a mouse button press event. Cococa in + // this case won't send the matching release event, so we have to +-- +2.21.0 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch new file mode 100644 index 00000000000..f93f8005598 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0005-Revert-macOS-Fix-use-of-deprecated-NSOffState.patch @@ -0,0 +1,26 @@ +From e55ca5d08b29e67b699dc217abcb65e4a7655f72 Mon Sep 17 00:00:00 2001 +From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> +Date: Mon, 7 Dec 2020 12:32:37 -0500 +Subject: [PATCH 5/6] Revert "macOS: Fix use of deprecated NSOffState" + +This reverts commit 6a0995525d306a1fa224adcbcb9f0ae1fc7d01bd. +--- + src/plugins/styles/mac/qmacstyle_mac.mm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm +index d1febd81d4..b5e6e60ec0 100644 +--- a/src/plugins/styles/mac/qmacstyle_mac.mm ++++ b/src/plugins/styles/mac/qmacstyle_mac.mm +@@ -3955,7 +3955,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter + pbCell = static_cast<NSPopUpButtonCell *>(pb.cell); + oldPosition = pbCell.arrowPosition; + pbCell.arrowPosition = NSPopUpNoArrow; +- if (pb.state == NSControlStateValueOff) { ++ if (pb.state == NSOffState) { + // NSPopUpButton in this state is smaller. + rAdjusted.origin.x -= 3; + rAdjusted.size.width += 6; +-- +2.21.0 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch new file mode 100644 index 00000000000..b5c634aff76 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/macos-sdk-10.12/0006-git-checkout-v5.15.0-src-plugins-platforms-cocoa-qco.patch @@ -0,0 +1,77 @@ +From 3ce5e752c66307f905fdf732b102a396d9248fbb Mon Sep 17 00:00:00 2001 +From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> +Date: Mon, 7 Dec 2020 13:22:02 -0500 +Subject: [PATCH 6/6] git checkout v5.15.0 -- + src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm + +--- + .../cocoa/qcocoacolordialoghelper.mm | 50 +++++++++---------- + 1 file changed, 25 insertions(+), 25 deletions(-) + +diff --git a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +index 5ad1f9d7bb..c9fa035d87 100644 +--- a/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm ++++ b/src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm +@@ -180,34 +180,34 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSColorPanelDelegate); + + - (void)updateQtColor + { +- // Discard the color space and pass the color components to QColor. This +- // is a good option as long as QColor is color-unmanaged: we preserve the +- // exact RGB value from the color picker, which is predictable. Further, +- // painting with the color will reproduce the same color on-screen, as +- // long as the the same screen is used for selecting the color. +- NSColor *componentColor = [[mColorPanel color] colorUsingType:NSColorTypeComponentBased]; +- switch (componentColor.colorSpace.colorSpaceModel) +- { +- case NSColorSpaceModelGray: { +- CGFloat white = 0, alpha = 0; +- [componentColor getWhite:&white alpha:&alpha]; +- mQtColor.setRgbF(white, white, white, alpha); +- } break; +- case NSColorSpaceModelRGB: { +- CGFloat red = 0, green = 0, blue = 0, alpha = 0; +- [componentColor getRed:&red green:&green blue:&blue alpha:&alpha]; +- mQtColor.setRgbF(red, green, blue, alpha); +- } break; +- case NSColorSpaceModelCMYK: { ++ NSColor *color = [mColorPanel color]; ++ NSString *colorSpaceName = [color colorSpaceName]; ++ if (colorSpaceName == NSDeviceCMYKColorSpace) { + CGFloat cyan = 0, magenta = 0, yellow = 0, black = 0, alpha = 0; +- [componentColor getCyan:&cyan magenta:&magenta yellow:&yellow black:&black alpha:&alpha]; ++ [color getCyan:&cyan magenta:&magenta yellow:&yellow black:&black alpha:&alpha]; + mQtColor.setCmykF(cyan, magenta, yellow, black, alpha); +- } break; +- default: +- qWarning("QNSColorPanelDelegate: Unsupported color space model"); +- break; ++ } else if (colorSpaceName == NSCalibratedRGBColorSpace || colorSpaceName == NSDeviceRGBColorSpace) { ++ CGFloat red = 0, green = 0, blue = 0, alpha = 0; ++ [color getRed:&red green:&green blue:&blue alpha:&alpha]; ++ mQtColor.setRgbF(red, green, blue, alpha); ++ } else if (colorSpaceName == NSNamedColorSpace) { ++ NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; ++ CGFloat red = 0, green = 0, blue = 0, alpha = 0; ++ [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha]; ++ mQtColor.setRgbF(red, green, blue, alpha); ++ } else { ++ NSColorSpace *colorSpace = [color colorSpace]; ++ if ([colorSpace colorSpaceModel] == NSCMYKColorSpaceModel && [color numberOfComponents] == 5){ ++ CGFloat components[5]; ++ [color getComponents:components]; ++ mQtColor.setCmykF(components[0], components[1], components[2], components[3], components[4]); ++ } else { ++ NSColor *tmpColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace]; ++ CGFloat red = 0, green = 0, blue = 0, alpha = 0; ++ [tmpColor getRed:&red green:&green blue:&blue alpha:&alpha]; ++ mQtColor.setRgbF(red, green, blue, alpha); ++ } + } +- + if (mHelper) + emit mHelper->currentColorChanged(mQtColor); + } +-- +2.21.0 + diff --git a/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/qtbase-sdk-10.12-mac.patch b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/qtbase-sdk-10.12-mac.patch new file mode 100644 index 00000000000..3638268de7a --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/qtbase-sdk-10.12-mac.patch @@ -0,0 +1,77 @@ +diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf +--- a/mkspecs/common/macx.conf ++++ b/mkspecs/common/macx.conf +@@ -10,7 +10,7 @@ QMAKE_APPLE_DEVICE_ARCHS = x86_64 + + # Should be 10.15, but as long as the CI builds with + # older SDKs we have to keep this. +-QT_MAC_SDK_VERSION_MIN = 10.14 ++QT_MAC_SDK_VERSION_MIN = 10.12 + + QT_MAC_SDK_VERSION_MAX = 10.15 + +diff --git a/src/corelib/kernel/qcore_mac.mm b/src/corelib/kernel/qcore_mac.mm +--- a/src/corelib/kernel/qcore_mac.mm ++++ b/src/corelib/kernel/qcore_mac.mm +@@ -261,16 +261,10 @@ QMacAutoReleasePool::QMacAutoReleasePool() + + #ifdef QT_DEBUG + void *poolFrame = nullptr; +- if (__builtin_available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 5.0, *)) { +- void *frame; +- if (backtrace_from_fp(__builtin_frame_address(0), &frame, 1)) +- poolFrame = frame; +- } else { + static const int maxFrames = 3; + void *callstack[maxFrames]; + if (backtrace(callstack, maxFrames) == maxFrames) + poolFrame = callstack[maxFrames - 1]; +- } + + if (poolFrame) { + Dl_info info; +diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp +--- a/src/gui/rhi/qrhi.cpp ++++ b/src/gui/rhi/qrhi.cpp +@@ -4251,7 +4251,7 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags, QRh + break; + #endif + case Metal: +-#if defined(Q_OS_MACOS) || defined(Q_OS_IOS) ++#if 0 + r->d = new QRhiMetal(static_cast<QRhiMetalInitParams *>(params), + static_cast<QRhiMetalNativeHandles *>(importDevice)); + break; +diff --git a/src/gui/rhi/rhi.pri b/src/gui/rhi/rhi.pri +--- a/src/gui/rhi/rhi.pri ++++ b/src/gui/rhi/rhi.pri +@@ -43,7 +43,7 @@ win32 { + LIBS += -ld3d11 -ldxgi -ldxguid + } + +-macos|ios { ++false { + HEADERS += \ + rhi/qrhimetal_p.h \ + rhi/qrhimetal_p_p.h +diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm +--- a/src/plugins/platforms/cocoa/qcocoadrag.mm ++++ b/src/plugins/platforms/cocoa/qcocoadrag.mm +@@ -133,7 +133,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + NSImage *dragImage = [NSImage imageFromQImage:pm.toImage()]; + Q_ASSERT(dragImage); + +- QMacPasteboard dragBoard(CFStringRef(NSPasteboardNameDrag), QMacInternalPasteboardMime::MIME_DND); ++ QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacInternalPasteboardMime::MIME_DND); + m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy")); + dragBoard.setMimeData(m_drag->mimeData(), QMacPasteboard::LazyRequest); + +@@ -144,7 +144,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) + CGFloat flippedY = dragImage.size.height - hotSpot.y(); + event_location.y -= flippedY; + NSSize mouseOffset_unused = NSMakeSize(0.0, 0.0); +- NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; ++ NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; + + [theWindow dragImage:dragImage + at:event_location diff --git a/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch b/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch new file mode 100644 index 00000000000..d9c721e6946 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtdeclarative.patch @@ -0,0 +1,114 @@ +diff --git a/src/particles/particles.pro b/src/particles/particles.pro +index aaaa83419a..58aee00036 100644 +--- a/src/particles/particles.pro ++++ b/src/particles/particles.pro +@@ -20,6 +20,6 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Particles.2 + QML_IMPORT_NAME = QtQuick.Particles + IMPORT_VERSION = 2.$$QT_MINOR_VERSION +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes + + load(qt_module) +diff --git a/src/qml/qml.pro b/src/qml/qml.pro +index e39a8319b6..90c0331278 100644 +--- a/src/qml/qml.pro ++++ b/src/qml/qml.pro +@@ -72,6 +72,6 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQml + QML_IMPORT_NAME = QtQml + IMPORT_VERSION = 2.$$QT_MINOR_VERSION +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes + + load(qt_module) +diff --git a/src/qmlmodels/qmlmodels.pro b/src/qmlmodels/qmlmodels.pro +index 4ac093556d..112e2c2be0 100644 +--- a/src/qmlmodels/qmlmodels.pro ++++ b/src/qmlmodels/qmlmodels.pro +@@ -68,6 +68,6 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQml/Models.2 + QML_IMPORT_NAME = QtQml.Models + IMPORT_VERSION = 2.$$QT_MINOR_VERSION +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes + + load(qt_module) +diff --git a/src/qmltest/qmltest.pro b/src/qmltest/qmltest.pro +index c2e8068fc6..79dba368f7 100644 +--- a/src/qmltest/qmltest.pro ++++ b/src/qmltest/qmltest.pro +@@ -34,7 +34,7 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/Qt/test/qtestroot + QML_IMPORT_NAME = Qt.test.qtestroot + QML_IMPORT_VERSION = 1.0 +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes + + # Install qmldir + qmldir.files = $$PWD/qmldir +diff --git a/src/qmlworkerscript/qmlworkerscript.pro b/src/qmlworkerscript/qmlworkerscript.pro +index 84466062e1..79885455cc 100644 +--- a/src/qmlworkerscript/qmlworkerscript.pro ++++ b/src/qmlworkerscript/qmlworkerscript.pro +@@ -23,6 +23,6 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQml/WorkerScript.2 + QML_IMPORT_NAME = QtQml.WorkerScript + IMPORT_VERSION = 2.$$QT_MINOR_VERSION +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes + + load(qt_module) +diff --git a/src/quick/quick.pro b/src/quick/quick.pro +index f2d49cf939..c401b04c4e 100644 +--- a/src/quick/quick.pro ++++ b/src/quick/quick.pro +@@ -52,4 +52,4 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick.2 + QML_IMPORT_NAME = QtQuick + IMPORT_VERSION = 2.$$QT_MINOR_VERSION +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes +diff --git a/src/quickshapes/quickshapes.pro b/src/quickshapes/quickshapes.pro +index 4dbd3e5e46..0c6b186fc8 100644 +--- a/src/quickshapes/quickshapes.pro ++++ b/src/quickshapes/quickshapes.pro +@@ -36,4 +36,4 @@ QMLTYPES_FILENAME = plugins.qmltypes + QMLTYPES_INSTALL_DIR = $$[QT_INSTALL_QML]/QtQuick/Shapes + QML_IMPORT_NAME = QtQuick.Shapes + IMPORT_VERSION = 1.$$QT_MINOR_VERSION +-CONFIG += qmltypes install_qmltypes install_metatypes ++CONFIG += qmltypes install_qmltypes +diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp +index 005db4248..685c5b1b2 100644 +--- a/src/qml/qml/qqmlimport.cpp ++++ b/src/qml/qml/qqmlimport.cpp +@@ -1760,6 +1760,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + addImportPath(installImportsPath); + ++ // Add import paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); ++ } ++ } ++ + // env import paths + if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { + const QString envImportPath = qEnvironmentVariable("QML2_IMPORT_PATH"); +diff --git a/tools/qmlcachegen/qmlcache.prf b/tools/qmlcachegen/qmlcache.prf +index 537eaf62ea..e21de58f64 100644 +--- a/tools/qmlcachegen/qmlcache.prf ++++ b/tools/qmlcachegen/qmlcache.prf +@@ -26,7 +26,7 @@ defineReplace(qmlCacheOutputFileName) { + } + + qmlcacheinst.base = $$QMLCACHE_DESTDIR +-qmlcacheinst.path = $$[QT_INSTALL_QML]/$$TARGETPATH ++qmlcacheinst.path = $$NIX_OUTPUT_QML/$$TARGETPATH + qmlcacheinst.CONFIG = no_check_exist + + qmlcachegen.input = CACHEGEN_FILES diff --git a/pkgs/development/libraries/qt-5/5.15/qtscript.patch b/pkgs/development/libraries/qt-5/5.15/qtscript.patch new file mode 100644 index 00000000000..5508dec1280 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtscript.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +index 1f6d25e..087c3fb 100644 +--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h ++++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h +@@ -81,7 +81,7 @@ + #include <pthread.h> + #elif PLATFORM(GTK) + #include <wtf/gtk/GOwnPtr.h> +-typedef struct _GMutex GMutex; ++typedef union _GMutex GMutex; + typedef struct _GCond GCond; + #endif + diff --git a/pkgs/development/libraries/qt-5/5.15/qtserialport.patch b/pkgs/development/libraries/qt-5/5.15/qtserialport.patch new file mode 100644 index 00000000000..f25524e80bc --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtserialport.patch @@ -0,0 +1,22 @@ +diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h +index af2dab2..8e17f64 100644 +--- a/src/serialport/qtudev_p.h ++++ b/src/serialport/qtudev_p.h +@@ -111,9 +111,17 @@ inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolN + inline bool resolveSymbols(QLibrary *udevLibrary) + { + if (!udevLibrary->isLoaded()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 1); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); ++#endif + if (!udevLibrary->load()) { ++#ifdef NIXPKGS_LIBUDEV ++ udevLibrary->setFileNameAndVersion(QLatin1String(NIXPKGS_LIBUDEV), 0); ++#else + udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); ++#endif + if (!udevLibrary->load()) { + qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); + return false; diff --git a/pkgs/development/libraries/qt-5/5.15/qttools.patch b/pkgs/development/libraries/qt-5/5.15/qttools.patch new file mode 100644 index 00000000000..8ae12198ca2 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qttools.patch @@ -0,0 +1,15 @@ +--- a/src/macdeployqt/shared/shared.cpp ++++ b/src/macdeployqt/shared/shared.cpp +@@ -1241,6 +1241,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf + if (!QFile(qmlImportScannerPath).exists()) + qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner"; + ++#ifdef NIXPKGS_QMLIMPORTSCANNER ++ // Fallback: Nixpkgs hardcoded path ++ if (!QFile(qmlImportScannerPath).exists()) ++ qmlImportScannerPath = NIXPKGS_QMLIMPORTSCANNER; ++#endif ++ + // Verify that we found a qmlimportscanner binary + if (!QFile(qmlImportScannerPath).exists()) { + LogError() << "qmlimportscanner not found at" << qmlImportScannerPath; diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch b/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch new file mode 100644 index 00000000000..44df0929925 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebengine-darwin-no-platform-check.patch @@ -0,0 +1,37 @@ +diff a/configure.pri b/configure.pri +--- a/configure.pri ++++ b/configure.pri +@@ -439,8 +439,6 @@ defineTest(qtwebengine_isWindowsPlatformSupported) { + + defineTest(qtwebengine_isMacOsPlatformSupported) { + !qtwebengine_isMinXcodeVersion(10, 0, 0) { +- qtwebengine_platformError("requires at least version 10.0.0, but using Xcode version $${QMAKE_XCODE_VERSION}.") +- return(false) + } + !clang|intel_icc { + qtwebengine_platformError("requires Clang.") +@@ -449,12 +447,6 @@ defineTest(qtwebengine_isMacOsPlatformSupported) { + # We require macOS 10.13 (darwin version 17.0.0) or newer. + darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0) + lessThan(darwin_major_version, 17) { +- qtwebengine_platformError("requires macOS version 10.13 or newer.") +- return(false) +- } +- !qtwebengine_isMinOSXSDKVersion(10, 13): { +- qtwebengine_platformError("requires a macOS SDK version of 10.13 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.") +- return(false) + } + return(true) + } +diff a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri +--- a/src/buildtools/config/mac_osx.pri ++++ b/src/buildtools/config/mac_osx.pri +@@ -5,8 +5,6 @@ load(functions) + # otherwise query for it. + QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion) + isEmpty(QMAKE_MAC_SDK_VERSION) { +- QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null") +- isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'") + } + + # chromium/build/mac/find_sdk.py expects the SDK version (mac_sdk_min) in Major.Minor format. diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch b/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch new file mode 100644 index 00000000000..dcdf5f57ffd --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebengine-mac-dont-set-dsymutil-path.patch @@ -0,0 +1,12 @@ +diff a/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn b/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn +--- a/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn ++++ b/src/3rdparty/chromium/build/toolchain/mac/BUILD.gn +@@ -184,8 +184,6 @@ template("mac_toolchain") { + # If dSYMs are enabled, this flag will be added to the link tools. + if (_enable_dsyms) { + dsym_switch = " -Wcrl,dsym,{{root_out_dir}} " +- dsym_switch += "-Wcrl,dsymutilpath," + +- "${prefix}dsymutil" + " " + + dsym_output_dir = + "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM" diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch b/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch new file mode 100644 index 00000000000..a7087f51762 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-qos-classes.patch @@ -0,0 +1,11 @@ +diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake +--- a/Source/cmake/OptionsQt.cmake ++++ b/Source/cmake/OptionsQt.cmake +@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG) + endif () + + if (APPLE) +- SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1) + endif () + + if (ENABLE_MATHML) diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch b/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch new file mode 100644 index 00000000000..26d189d8601 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebkit-darwin-no-readline.patch @@ -0,0 +1,45 @@ +diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt +--- a/Source/JavaScriptCore/shell/CMakeLists.txt ++++ b/Source/JavaScriptCore/shell/CMakeLists.txt +@@ -9,7 +9,6 @@ set(JSC_LIBRARIES + ) + + if (WTF_OS_MAC_OS_X) +- list(APPEND JSC_LIBRARIES edit) + endif () + + if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC") +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -563,7 +563,6 @@ + #if PLATFORM(IOS) + + #define HAVE_NETWORK_EXTENSION 1 +-#define HAVE_READLINE 1 + #if USE(APPLE_INTERNAL_SDK) + #define USE_CFNETWORK 1 + #endif +@@ -650,7 +649,6 @@ + #define HAVE_MADV_DONTNEED 1 + #define HAVE_MERGESORT 1 + #define HAVE_PTHREAD_SETNAME_NP 1 +-#define HAVE_READLINE 1 + #define HAVE_SYS_TIMEB_H 1 + + #if !PLATFORM(GTK) && !PLATFORM(QT) +diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake +--- a/Source/WTF/wtf/PlatformMac.cmake ++++ b/Source/WTF/wtf/PlatformMac.cmake +@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED) + + find_library(COCOA_LIBRARY Cocoa) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) +-find_library(READLINE_LIBRARY Readline) + list(APPEND WTF_LIBRARIES + ${COREFOUNDATION_LIBRARY} + ${COCOA_LIBRARY} +- ${READLINE_LIBRARY} + libicucore.dylib + ) + diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch b/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch new file mode 100644 index 00000000000..73463d7567a --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebkit-icu68.patch @@ -0,0 +1,170 @@ +Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844 + +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:31: +Source/WebCore/platform/text/TextCodecICU.cpp:311:42: error: use of undeclared identifier 'TRUE' + ucnv_setFallback(m_converterICU, TRUE); + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:40: +In file included from Source/WebCore/platform/text/icu/UTextProvider.cpp:27: +Source/WebCore/platform/text/icu/UTextProvider.h:83:28: error: use of undeclared identifier 'TRUE' + isAccessible = TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:88:28: error: use of undeclared identifier 'FALSE' + isAccessible = FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:97:28: error: use of undeclared identifier 'TRUE' + isAccessible = TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProvider.h:102:28: error: use of undeclared identifier 'FALSE' + isAccessible = FALSE; + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:41: +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:103:20: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:108:20: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:114:20: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:119:20: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:147:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:339:16: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp:359:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ +In file included from Source/WebCore/platform/text/TextAllInOne.cpp:42: +Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:128:16: error: use of undeclared identifier 'FALSE' + return FALSE; + ^ +Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp:148:12: error: use of undeclared identifier 'TRUE' + return TRUE; + ^ + +--- a/Source/WebCore/platform/text/TextCodecICU.cpp ++++ b/Source/WebCore/platform/text/TextCodecICU.cpp +@@ -308,7 +308,7 @@ void TextCodecICU::createICUConverter() const + m_converterICU = ucnv_open(m_canonicalConverterName, &err); + ASSERT(U_SUCCESS(err)); + if (m_converterICU) +- ucnv_setFallback(m_converterICU, TRUE); ++ ucnv_setFallback(m_converterICU, true); + } + + int TextCodecICU::decodeToBuffer(UChar* target, UChar* targetLimit, const char*& source, const char* sourceLimit, int32_t* offsets, bool flush, UErrorCode& err) +--- a/Source/WebCore/platform/text/icu/UTextProvider.h ++++ b/Source/WebCore/platform/text/icu/UTextProvider.h +@@ -80,12 +80,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex >= nativeLength && text->chunkNativeLimit == nativeLength) { + text->chunkOffset = text->chunkLength; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } else { +@@ -94,12 +94,12 @@ inline bool uTextAccessInChunkOrOutOfRange(UText* text + // Ensure chunk offset is well formed if computed offset exceeds int32_t range. + ASSERT(offset < std::numeric_limits<int32_t>::max()); + text->chunkOffset = offset < std::numeric_limits<int32_t>::max() ? static_cast<int32_t>(offset) : 0; +- isAccessible = TRUE; ++ isAccessible = true; + return true; + } + if (nativeIndex <= 0 && !text->chunkNativeStart) { + text->chunkOffset = 0; +- isAccessible = FALSE; ++ isAccessible = false; + return true; + } + } +--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp +@@ -100,23 +100,23 @@ static UBool uTextLatin1Access(UText* uText, int64_t i + if (index < uText->chunkNativeLimit && index >= uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (index >= length && uText->chunkNativeLimit == length) { + // Off the end of the buffer, but we can't get it. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return FALSE; ++ return false; + } + } else { + if (index <= uText->chunkNativeLimit && index > uText->chunkNativeStart) { + // Already inside the buffer. Set the new offset. + uText->chunkOffset = static_cast<int32_t>(index - uText->chunkNativeStart); +- return TRUE; ++ return true; + } + if (!index && !uText->chunkNativeStart) { + // Already at the beginning; can't go any farther. + uText->chunkOffset = 0; +- return FALSE; ++ return false; + } + } + +@@ -144,7 +144,7 @@ static UBool uTextLatin1Access(UText* uText, int64_t i + + uText->nativeIndexingLimit = uText->chunkLength; + +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1Extract(UText* uText, int64_t start, int64_t limit, UChar* dest, int32_t destCapacity, UErrorCode* status) +@@ -336,7 +336,7 @@ static int64_t uTextLatin1ContextAwareNativeLength(UTe + static UBool uTextLatin1ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextLatin1ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -356,7 +356,7 @@ static UBool uTextLatin1ContextAwareAccess(UText* text + ASSERT(newContext == UTextProviderContext::PriorContext); + textLatin1ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextLatin1ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) +--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp ++++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp +@@ -125,7 +125,7 @@ static inline int64_t uTextUTF16ContextAwareNativeLeng + static UBool uTextUTF16ContextAwareAccess(UText* text, int64_t nativeIndex, UBool forward) + { + if (!text->context) +- return FALSE; ++ return false; + int64_t nativeLength = uTextUTF16ContextAwareNativeLength(text); + UBool isAccessible; + if (uTextAccessInChunkOrOutOfRange(text, nativeIndex, nativeLength, forward, isAccessible)) +@@ -145,7 +145,7 @@ static UBool uTextUTF16ContextAwareAccess(UText* text, + ASSERT(newContext == UTextProviderContext::PriorContext); + textUTF16ContextAwareSwitchToPriorContext(text, nativeIndex, nativeLength, forward); + } +- return TRUE; ++ return true; + } + + static int32_t uTextUTF16ContextAwareExtract(UText*, int64_t, int64_t, UChar*, int32_t, UErrorCode* errorCode) diff --git a/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch b/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch new file mode 100644 index 00000000000..b94a4b76cba --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/qtwebkit.patch @@ -0,0 +1,12 @@ +diff --git a/Source/WebKit2/PlatformQt.cmake b/Source/WebKit2/PlatformQt.cmake +--- a/Source/WebKit2/PlatformQt.cmake ++++ b/Source/WebKit2/PlatformQt.cmake +@@ -261,6 +261,7 @@ + list(APPEND WebKit2_SYSTEM_INCLUDE_DIRECTORIES + ${GLIB_INCLUDE_DIRS} + ${GSTREAMER_INCLUDE_DIRS} ++ ${GSTREAMER_PBUTILS_INCLUDE_DIRS} + ${Qt5Quick_INCLUDE_DIRS} + ${Qt5Quick_PRIVATE_INCLUDE_DIRS} + ${SQLITE_INCLUDE_DIR} + diff --git a/pkgs/development/libraries/qt-5/5.15/srcs.nix b/pkgs/development/libraries/qt-5/5.15/srcs.nix new file mode 100644 index 00000000000..70e9c3a8022 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.15/srcs.nix @@ -0,0 +1,342 @@ +# DO NOT EDIT! This file is generated automatically. +# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/5.15 +{ fetchurl, mirror }: + +{ + qt3d = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qt3d-everywhere-src-5.15.2.tar.xz"; + sha256 = "03ed6a48c813c75296c19f5d721184ab168280b69d2656cf16f877d3d4c55c1d"; + name = "qt3d-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtactiveqt = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtactiveqt-everywhere-src-5.15.2.tar.xz"; + sha256 = "868161fee0876d17079cd5bed58d1667bf19ffd0018cbe515129f11510ad2a5c"; + name = "qtactiveqt-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtandroidextras = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtandroidextras-everywhere-src-5.15.2.tar.xz"; + sha256 = "5813278690d89a9c232eccf697fc280034de6f9f02a7c40d95ad5fcf8ac8dabd"; + name = "qtandroidextras-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtbase = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtbase-everywhere-src-5.15.2.tar.xz"; + sha256 = "909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8"; + name = "qtbase-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtcharts = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtcharts-everywhere-src-5.15.2.tar.xz"; + sha256 = "e0750e4195bd8a8b9758ab4d98d437edbe273cd3d289dd6a8f325df6d13f3d11"; + name = "qtcharts-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtconnectivity = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtconnectivity-everywhere-src-5.15.2.tar.xz"; + sha256 = "0380327871f76103e5b8c2a305988d76d352b6a982b3e7b3bc3cdc184c64bfa0"; + name = "qtconnectivity-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtdatavis3d = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtdatavis3d-everywhere-src-5.15.2.tar.xz"; + sha256 = "226a6575d573ad78aca459709722c496c23aee526aa0c38eb7c93b0bea1eb6fd"; + name = "qtdatavis3d-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtdeclarative = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtdeclarative-everywhere-src-5.15.2.tar.xz"; + sha256 = "c600d09716940f75d684f61c5bdaced797f623a86db1627da599027f6c635651"; + name = "qtdeclarative-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtdoc = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtdoc-everywhere-src-5.15.2.tar.xz"; + sha256 = "a47809f00f1bd690ca4e699cb32ffe7717d43da84e0167d1f562210da7714ce4"; + name = "qtdoc-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtgamepad = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtgamepad-everywhere-src-5.15.2.tar.xz"; + sha256 = "c77611f7898326d69176ad67a9b886f617cdedc368ec29f223d63537d25b075c"; + name = "qtgamepad-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtgraphicaleffects = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtgraphicaleffects-everywhere-src-5.15.2.tar.xz"; + sha256 = "ec8d67f64967d5046410490b549c576f9b9e8b47ec68594ae84aa8870173dfe4"; + name = "qtgraphicaleffects-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtimageformats = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtimageformats-everywhere-src-5.15.2.tar.xz"; + sha256 = "bf8285c7ce04284527ab823ddc7cf48a1bb79131db3a7127342167f4814253d7"; + name = "qtimageformats-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtlocation = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtlocation-everywhere-src-5.15.2.tar.xz"; + sha256 = "984fcb09e108df49a8dac35d5ce6dffc49caafd2acb1c2f8a5173a6a21f392a0"; + name = "qtlocation-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtlottie = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtlottie-everywhere-src-5.15.2.tar.xz"; + sha256 = "cec6095ab8f714e609d2ad3ea8c4fd819461ce8793adc42abe37d0f6dc432517"; + name = "qtlottie-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtmacextras = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtmacextras-everywhere-src-5.15.2.tar.xz"; + sha256 = "6959b0f2cec71cd66800f36cab797430860e55fa33c9c23698d6a08fc2b8776e"; + name = "qtmacextras-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtmultimedia = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtmultimedia-everywhere-src-5.15.2.tar.xz"; + sha256 = "0c3758810e5131aabcf76e4965e4c18b8911af54d9edd9305d2a8278d8346df5"; + name = "qtmultimedia-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtnetworkauth = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtnetworkauth-everywhere-src-5.15.2.tar.xz"; + sha256 = "fcc2ec42faa68561efa8f00cd72e662fbc06563ebc6de1dc42d96bb2997acd85"; + name = "qtnetworkauth-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtpurchasing = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtpurchasing-everywhere-src-5.15.2.tar.xz"; + sha256 = "87120d319ff2f8106e78971f7296d72a66dfe91e763d213199aea55046e93227"; + name = "qtpurchasing-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtquick3d = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtquick3d-everywhere-src-5.15.2.tar.xz"; + sha256 = "5b0546323365ce34e4716f22f305ebb4902e222c1a0910b65ee448443c2f94bb"; + name = "qtquick3d-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtquickcontrols = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtquickcontrols-everywhere-src-5.15.2.tar.xz"; + sha256 = "c393fb7384b1f047f10e91a6832cf3e6a4c2a41408b8cb2d05af2283e8549fb5"; + name = "qtquickcontrols-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtquickcontrols2 = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtquickcontrols2-everywhere-src-5.15.2.tar.xz"; + sha256 = "671b6ce5f4b8ecc94db622d5d5fb29ef4ff92819be08e5ea55bfcab579de8919"; + name = "qtquickcontrols2-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtquicktimeline = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtquicktimeline-everywhere-src-5.15.2.tar.xz"; + sha256 = "b9c247227607437acec7c7dd18ad46179d20369c9d22bdb1e9fc128dfb832a28"; + name = "qtquicktimeline-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtremoteobjects = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtremoteobjects-everywhere-src-5.15.2.tar.xz"; + sha256 = "6781b6bc90888254ea77ce812736dac00c67fa4eeb3095f5cd65e4b9c15dcfc2"; + name = "qtremoteobjects-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtscript = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtscript-everywhere-src-5.15.2.tar.xz"; + sha256 = "a299715369afbd1caa4d7fa2875d442eab91adcaacafce54a36922442624673e"; + name = "qtscript-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtscxml = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtscxml-everywhere-src-5.15.2.tar.xz"; + sha256 = "60b9590b9a41c60cee7b8a8c8410ee4625f0389c1ff8d79883ec5a985638a7dc"; + name = "qtscxml-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtsensors = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtsensors-everywhere-src-5.15.2.tar.xz"; + sha256 = "3f0011f9e9942cad119146b54d960438f4568a22a274cdad4fae06bb4e0e4839"; + name = "qtsensors-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtserialbus = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtserialbus-everywhere-src-5.15.2.tar.xz"; + sha256 = "aeeb7e5c0d3f8503215b22e1a84c0002ca67cf63862f6e3c6ef44a67ca31bd88"; + name = "qtserialbus-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtserialport = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtserialport-everywhere-src-5.15.2.tar.xz"; + sha256 = "59c559d748417306bc1b2cf2315c1e63eed011ace38ad92946af71f23e2ef79d"; + name = "qtserialport-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtspeech = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtspeech-everywhere-src-5.15.2.tar.xz"; + sha256 = "c810fb9eecb08026434422a32e79269627f3bc2941be199e86ec410bdfe883f5"; + name = "qtspeech-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtsvg = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtsvg-everywhere-src-5.15.2.tar.xz"; + sha256 = "8bc3c2c1bc2671e9c67d4205589a8309b57903721ad14c60ea21a5d06acb585e"; + name = "qtsvg-everywhere-src-5.15.2.tar.xz"; + }; + }; + qttools = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qttools-everywhere-src-5.15.2.tar.xz"; + sha256 = "c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc"; + name = "qttools-everywhere-src-5.15.2.tar.xz"; + }; + }; + qttranslations = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qttranslations-everywhere-src-5.15.2.tar.xz"; + sha256 = "d5788e86257b21d5323f1efd94376a213e091d1e5e03b45a95dd052b5f570db8"; + name = "qttranslations-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtvirtualkeyboard = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtvirtualkeyboard-everywhere-src-5.15.2.tar.xz"; + sha256 = "9a3193913be30f09a896e3b8c2f9696d2e9b3f88a63ae9ca8c97a2786b68cf55"; + name = "qtvirtualkeyboard-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwayland = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwayland-everywhere-src-5.15.2.tar.xz"; + sha256 = "193732229ff816f3aaab9a5e2f6bed71ddddbf1988ce003fe8dd84a92ce9aeb5"; + name = "qtwayland-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwebchannel = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwebchannel-everywhere-src-5.15.2.tar.xz"; + sha256 = "127fe79c43b386713f151ed7d411cd81e45e29f9c955584f29736f78c9303ec1"; + name = "qtwebchannel-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwebengine = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwebengine-everywhere-src-5.15.2.tar.xz"; + sha256 = "c8afca0e43d84f7bd595436fbe4d13a5bbdb81ec5104d605085d07545b6f91e0"; + name = "qtwebengine-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwebglplugin = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwebglplugin-everywhere-src-5.15.2.tar.xz"; + sha256 = "81e782b517ed29e10bea1aa90c9f59274c98a910f2c8b105fa78368a36b41446"; + name = "qtwebglplugin-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwebsockets = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwebsockets-everywhere-src-5.15.2.tar.xz"; + sha256 = "a0b42d85dd34ff6e2d23400e02f83d8b85bcd80e60efd1521d12d9625d4a233f"; + name = "qtwebsockets-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwebview = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwebview-everywhere-src-5.15.2.tar.xz"; + sha256 = "be9f46167e4977ead5ef5ecf883fdb812a4120f2436383583792f65557e481e7"; + name = "qtwebview-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtwinextras = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtwinextras-everywhere-src-5.15.2.tar.xz"; + sha256 = "65b8272005dec00791ab7d81ab266d1e3313a3bbd8e54e546d984cf4c4ab550e"; + name = "qtwinextras-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtx11extras = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtx11extras-everywhere-src-5.15.2.tar.xz"; + sha256 = "7014702ee9a644a5a93da70848ac47c18851d4f8ed622b29a72eed9282fc6e3e"; + name = "qtx11extras-everywhere-src-5.15.2.tar.xz"; + }; + }; + qtxmlpatterns = { + version = "5.15.2"; + src = fetchurl { + url = "${mirror}/official_releases/qt/5.15/5.15.2/submodules/qtxmlpatterns-everywhere-src-5.15.2.tar.xz"; + sha256 = "76ea2162a7c349188d7e7e4f6c77b78e8a205494c90fee3cea3487a1ae2cf2fa"; + name = "qtxmlpatterns-everywhere-src-5.15.2.tar.xz"; + }; + }; +} diff --git a/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh b/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh index 5acaeb82446..6aaeda052d7 100644 --- a/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh +++ b/pkgs/development/libraries/qt-5/hooks/fix-qmake-libtool.sh @@ -5,8 +5,19 @@ fixQmakeLibtool() { if [ -d "$1" ]; then find "$1" -name '*.la' | while read la; do + set +e + framework_libs=$(grep '^dependency_libs' "$la" | grep -Eo -- '-framework +\w+' | tr '\n' ' ') + set -e sed -i "$la" \ - -e '/^dependency_libs/ s,\(/[^ ]\+\)/lib\([^/ ]\+\)\.so,-L\1 -l\2,g' + -e '/^dependency_libs/ s,\(/[^ ]\+\)/lib\([^/ ]\+\)\.so,-L\1 -l\2,g' \ + -e '/^dependency_libs/ s,-framework \+\w\+,,g' + if [ ! -z "$framework_libs" ]; then + if grep '^inherited_linker_flags=' $la >/dev/null; then + sed -i "$la" -e "s/^\(inherited_linker_flags='[^']*\)/\1 $framework_libs/" + else + echo "inherited_linker_flags='$framework_libs'" >> "$la" + fi + fi done fi } diff --git a/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh b/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh index 7f6ddb76ad5..741225a5aa8 100644 --- a/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh +++ b/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh @@ -3,6 +3,9 @@ qmakeFlags=( ${qmakeFlags-} ) qmakePrePhase() { + qmakeFlags_orig=( "${qmakeFlags[@]}" ) + + # These flags must be added _before_ the flags specified in the derivation. qmakeFlags=( \ "PREFIX=$out" \ "NIX_OUTPUT_OUT=$out" \ @@ -11,8 +14,15 @@ qmakePrePhase() { "NIX_OUTPUT_DOC=${!outputDev}/${qtDocPrefix:?}" \ "NIX_OUTPUT_QML=${!outputBin}/${qtQmlPrefix:?}" \ "NIX_OUTPUT_PLUGIN=${!outputBin}/${qtPluginPrefix:?}" \ - "${qmakeFlags[@]}" \ ) + + if [ -n "@debug@" ]; then + qmakeFlags+=( "CONFIG+=debug" ) + else + qmakeFlags+=( "CONFIG+=release" ) + fi + + qmakeFlags+=( "${qmakeFlags_orig[@]}" ) } prePhases+=" qmakePrePhase" diff --git a/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh index 9f2a9f06f1a..1b57d676e1f 100644 --- a/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh @@ -1,3 +1,14 @@ +if [[ -n "${__nix_qtbase-}" ]]; then + # Throw an error if a different version of Qt was already set up. + if [[ "$__nix_qtbase" != "@dev@" ]]; then + echo >&2 "Error: detected mismatched Qt dependencies:" + echo >&2 " @dev@" + echo >&2 " $__nix_qtbase" + exit 1 + fi +else # Only set up Qt once. +__nix_qtbase="@dev@" + qtPluginPrefix=@qtPluginPrefix@ qtQmlPrefix=@qtQmlPrefix@ qtDocPrefix=@qtDocPrefix@ @@ -5,6 +16,20 @@ qtDocPrefix=@qtDocPrefix@ . @fix_qt_builtin_paths@ . @fix_qt_module_paths@ +# Disable debug symbols if qtbase was built without debugging. +# This stops -dev paths from leaking into other outputs. +if [ -z "@debug@" ]; then + NIX_CFLAGS_COMPILE="${NIX_CFLAGS_COMPILE-}${NIX_CFLAGS_COMPILE:+ }-DQT_NO_DEBUG" +fi + +# Integration with CMake: +# Set the CMake build type corresponding to how qtbase was built. +if [ -n "@debug@" ]; then + cmakeBuildType="Debug" +else + cmakeBuildType="Release" +fi + providesQtRuntime() { [ -d "$1/$qtPluginPrefix" ] || [ -d "$1/$qtQmlPrefix" ] } @@ -19,7 +44,12 @@ export QMAKEPATH QMAKEMODULES= export QMAKEMODULES +declare -Ag qmakePathSeen=() qmakePathHook() { + # Skip this path if we have seen it before. + # MUST use 'if' because 'qmakePathSeen[$]' may be unset. + if [ -n "${qmakePathSeen[$1]-}" ]; then return; fi + qmakePathSeen[$1]=1 if [ -d "$1/mkspecs" ] then QMAKEMODULES="${QMAKEMODULES}${QMAKEMODULES:+:}/mkspecs" @@ -34,7 +64,12 @@ envBuildHostHooks+=(qmakePathHook) # package depending on the building package. (This is necessary in case # the building package does not provide runtime dependencies itself and so # would not be propagated to the user environment.) +declare -Ag qtEnvHostTargetSeen=() qtEnvHostTargetHook() { + # Skip this path if we have seen it before. + # MUST use 'if' because 'qmakePathSeen[$]' may be unset. + if [ -n "${qtEnvHostTargetSeen[$1]-}" ]; then return; fi + qtEnvHostTargetSeen[$1]=1 if providesQtRuntime "$1" && [ "z${!outputBin}" != "z${!outputDev}" ] then propagatedBuildInputs+=" $1" @@ -64,3 +99,14 @@ postPatchMkspecs() { if [ -z "${dontPatchMkspecs-}" ]; then postPhases="${postPhases-}${postPhases:+ }postPatchMkspecs" fi + +qtPreHook() { + # Check that wrapQtAppsHook is used, or it is explicitly disabled. + if [[ -z "$__nix_wrapQtAppsHook" && -z "$dontWrapQtApps" ]]; then + echo >&2 "Error: wrapQtAppsHook is not used, and dontWrapQtApps is not set." + exit 1 + fi +} +prePhases+=" qtPreHook" + +fi diff --git a/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh b/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh index 7356c8ee356..ce4d78fbb50 100644 --- a/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh +++ b/pkgs/development/libraries/qt-5/hooks/wrap-qt-apps-hook.sh @@ -1,3 +1,6 @@ +if [[ -z "${__nix_wrapQtAppsHook-}" ]]; then +__nix_wrapQtAppsHook=1 # Don't run this hook more than once. + # Inherit arguments given in mkDerivation qtWrapperArgs=( ${qtWrapperArgs-} ) @@ -100,3 +103,5 @@ wrapQtAppsHook() { } fixupOutputHooks+=(wrapQtAppsHook) + +fi diff --git a/pkgs/development/libraries/qt-5/mkDerivation.nix b/pkgs/development/libraries/qt-5/mkDerivation.nix index 2c6333cb020..98f9a05fac7 100644 --- a/pkgs/development/libraries/qt-5/mkDerivation.nix +++ b/pkgs/development/libraries/qt-5/mkDerivation.nix @@ -9,21 +9,6 @@ args: let args_ = { - qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ] - ++ (args.qmakeFlags or []); - - NIX_CFLAGS_COMPILE = toString ( - optional (!debug) "-DQT_NO_DEBUG" - ++ lib.toList (args.NIX_CFLAGS_COMPILE or [])); - - cmakeFlags = - (args.cmakeFlags or []) - ++ [ - ("-DCMAKE_BUILD_TYPE=" + (if debug then "Debug" else "Release")) - ]; - - enableParallelBuilding = args.enableParallelBuilding or true; - nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ wrapQtAppsHook ]; }; diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index a4c12793abb..0d0bef342b0 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -2,13 +2,13 @@ stdenv, lib, src, patches, version, qtCompatVersion, - coreutils, bison, flex, gdb, gperf, lndir, perl, pkgconfig, python3, + coreutils, bison, flex, gdb, gperf, lndir, perl, pkg-config, python3, which, # darwin support darwin, libiconv, dbus, fontconfig, freetype, glib, harfbuzz, icu, libX11, libXcomposite, - libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libtiff, + libXcursor, libXext, libXi, libXrender, libinput, libjpeg, libpng, libxcb, libxkbcommon, libxml2, libxslt, openssl, pcre16, pcre2, sqlite, udev, xcbutil, xcbutilimage, xcbutilkeysyms, xcbutilrenderutil, xcbutilwm, zlib, @@ -22,6 +22,7 @@ libGL, buildExamples ? false, buildTests ? false, + debug ? false, developerBuild ? false, decryptSslTraffic ? false }: @@ -33,12 +34,14 @@ let compareVersion = v: builtins.compareVersions version v; qmakeCacheName = if compareVersion "5.12.4" < 0 then ".qmake.cache" else ".qmake.stash"; + debugSymbols = debug || developerBuild; in stdenv.mkDerivation { name = "qtbase-${version}"; inherit qtCompatVersion src version; + debug = debugSymbols; propagatedBuildInputs = [ @@ -48,7 +51,7 @@ stdenv.mkDerivation { harfbuzz icu # Image formats - libjpeg libpng libtiff + libjpeg libpng (if compareVersion "5.9.0" < 0 then pcre16 else pcre2) ] ++ ( @@ -87,7 +90,7 @@ stdenv.mkDerivation { ++ lib.optional (postgresql != null) postgresql; nativeBuildInputs = - [ bison flex gperf lndir perl pkgconfig which ]; + [ bison flex gperf lndir perl pkg-config which ]; propagatedNativeBuildInputs = [ lndir ]; @@ -241,6 +244,7 @@ stdenv.mkDerivation { "-I" "${icu.dev}/include" "-pch" ] + ++ lib.optional debugSymbols "-debug" ++ lib.optionals (compareVersion "5.11.0" < 0) [ "-qml-debug" @@ -255,18 +259,18 @@ stdenv.mkDerivation { "-no-warnings-are-errors" ] ++ ( - if (!stdenv.hostPlatform.isx86_64) - then [ "-no-sse2" ] - else lib.optionals (compareVersion "5.9.0" >= 0) { - default = [ "-sse2" "-no-sse3" "-no-ssse3" "-no-sse4.1" "-no-sse4.2" "-no-avx" "-no-avx2" ]; - westmere = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-no-avx" "-no-avx2" ]; - sandybridge = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-no-avx2" ]; - ivybridge = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-no-avx2" ]; - haswell = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ]; - broadwell = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ]; - skylake = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ]; - skylake-avx512 = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ]; - }.${stdenv.hostPlatform.platform.gcc.arch or "default"} + if (!stdenv.hostPlatform.isx86_64) then [ + "-no-sse2" + ] else if (compareVersion "5.9.0" >= 0) then [ + "-sse2" + "${if stdenv.hostPlatform.sse3Support then "" else "-no"}-sse3" + "${if stdenv.hostPlatform.ssse3Support then "" else "-no"}-ssse3" + "${if stdenv.hostPlatform.sse4_1Support then "" else "-no"}-sse4.1" + "${if stdenv.hostPlatform.sse4_2Support then "" else "-no"}-sse4.2" + "${if stdenv.hostPlatform.avxSupport then "" else "-no"}-avx" + "${if stdenv.hostPlatform.avx2Support then "" else "-no"}-avx2" + ] else [ + ] ) ++ [ "-no-mips_dsp" @@ -295,8 +299,8 @@ stdenv.mkDerivation { "-make tools" ''-${lib.optionalString (!buildExamples) "no"}make examples'' ''-${lib.optionalString (!buildTests) "no"}make tests'' - "-v" ] + ++ lib.optional (compareVersion "5.15.0" < 0) "-v" ++ ( if stdenv.isDarwin @@ -311,8 +315,9 @@ stdenv.mkDerivation { else [ "-${lib.optionalString (compareVersion "5.9.0" < 0) "no-"}rpath" - - "-system-xcb" + ] + ++ lib.optional (compareVersion "5.15.0" < 0) "-system-xcb" + ++ [ "-xcb" "-qpa xcb" "-L" "${libX11.out}/lib" @@ -327,7 +332,9 @@ stdenv.mkDerivation { ''-${lib.optionalString (cups == null) "no-"}cups'' "-dbus-linked" "-glib" - "-system-libjpeg" + ] + ++ lib.optional (compareVersion "5.15.0" < 0) "-system-libjpeg" + ++ [ "-system-libpng" ] ++ lib.optional withGtk3 "-gtk" @@ -353,8 +360,6 @@ stdenv.mkDerivation { ] ); - enableParallelBuilding = true; - postInstall = # Move selected outputs. '' @@ -396,6 +401,8 @@ stdenv.mkDerivation { -e "/^host_bins=/ c host_bins=$dev/bin" ''; + dontStrip = debugSymbols; + setupHook = ../hooks/qtbase-setup-hook.sh; meta = with lib; { diff --git a/pkgs/development/libraries/qt-5/modules/qtcharts.nix b/pkgs/development/libraries/qt-5/modules/qtcharts.nix index 84d3a17ea8c..f5d034bcc32 100644 --- a/pkgs/development/libraries/qt-5/modules/qtcharts.nix +++ b/pkgs/development/libraries/qt-5/modules/qtcharts.nix @@ -1,7 +1,7 @@ { qtModule, qtbase, qtdeclarative }: qtModule { - name = "qtcharts"; + pname = "qtcharts"; qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix index 36a736d03dc..ae3aa25427c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix +++ b/pkgs/development/libraries/qt-5/modules/qtconnectivity.nix @@ -1,8 +1,8 @@ -{ qtModule, stdenv, qtbase, qtdeclarative, bluez }: +{ qtModule, lib, stdenv, qtbase, qtdeclarative, bluez }: qtModule { - name = "qtconnectivity"; + pname = "qtconnectivity"; qtInputs = [ qtbase qtdeclarative ]; - buildInputs = stdenv.lib.optional stdenv.isLinux bluez; + buildInputs = lib.optional stdenv.isLinux bluez; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix index b611282294c..97248ca1807 100644 --- a/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix +++ b/pkgs/development/libraries/qt-5/modules/qtdeclarative.nix @@ -3,7 +3,7 @@ with lib; qtModule { - name = "qtdeclarative"; + pname = "qtdeclarative"; qtInputs = [ qtbase qtsvg ]; nativeBuildInputs = [ python3 ]; outputs = [ "out" "dev" "bin" ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtdoc.nix b/pkgs/development/libraries/qt-5/modules/qtdoc.nix index 10623962c43..4ef4915000e 100644 --- a/pkgs/development/libraries/qt-5/modules/qtdoc.nix +++ b/pkgs/development/libraries/qt-5/modules/qtdoc.nix @@ -1,7 +1,7 @@ { qtModule, qtdeclarative }: qtModule { - name = "qtdoc"; + pname = "qtdoc"; qtInputs = [ qtdeclarative ]; outputs = [ "out" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtgamepad.nix b/pkgs/development/libraries/qt-5/modules/qtgamepad.nix index 281f6e0b8ec..2e266060a34 100644 --- a/pkgs/development/libraries/qt-5/modules/qtgamepad.nix +++ b/pkgs/development/libraries/qt-5/modules/qtgamepad.nix @@ -1,9 +1,9 @@ -{ qtModule, qtbase, qtdeclarative, pkgconfig }: +{ qtModule, qtbase, qtdeclarative, pkg-config }: qtModule { - name = "qtgamepad"; + pname = "qtgamepad"; qtInputs = [ qtbase qtdeclarative ]; buildInputs = [ ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix b/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix index d0be6ae7769..c90280090b8 100644 --- a/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix +++ b/pkgs/development/libraries/qt-5/modules/qtgraphicaleffects.nix @@ -1,7 +1,7 @@ { qtModule, qtdeclarative }: qtModule { - name = "qtgraphicaleffects"; + pname = "qtgraphicaleffects"; qtInputs = [ qtdeclarative ]; outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtimageformats.nix b/pkgs/development/libraries/qt-5/modules/qtimageformats.nix index 1a7726070be..52fa4d4ba8f 100644 --- a/pkgs/development/libraries/qt-5/modules/qtimageformats.nix +++ b/pkgs/development/libraries/qt-5/modules/qtimageformats.nix @@ -1,6 +1,7 @@ -{ qtModule, qtbase }: +{ qtModule, qtbase, libtiff }: qtModule { - name = "qtimageformats"; + pname = "qtimageformats"; qtInputs = [ qtbase ]; + propagatedBuildInputs = [ libtiff ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtlocation.nix b/pkgs/development/libraries/qt-5/modules/qtlocation.nix index 0eee684a53f..687571f18d2 100644 --- a/pkgs/development/libraries/qt-5/modules/qtlocation.nix +++ b/pkgs/development/libraries/qt-5/modules/qtlocation.nix @@ -1,14 +1,13 @@ -{ stdenv, qtModule, qtbase, qtmultimedia }: +{ lib, stdenv, qtModule, qtbase, qtmultimedia }: qtModule { - name = "qtlocation"; + pname = "qtlocation"; qtInputs = [ qtbase qtmultimedia ]; outputs = [ "bin" "out" "dev" ]; - qmakeFlags = stdenv.lib.optional stdenv.isDarwin [ + qmakeFlags = lib.optional stdenv.isDarwin [ # boost uses std::auto_ptr which has been disabled in clang with libcxx # This flag re-enables this feature # https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros "QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" ]; - } diff --git a/pkgs/development/libraries/qt-5/modules/qtmacextras.nix b/pkgs/development/libraries/qt-5/modules/qtmacextras.nix index 11964caf17b..30e363cff59 100644 --- a/pkgs/development/libraries/qt-5/modules/qtmacextras.nix +++ b/pkgs/development/libraries/qt-5/modules/qtmacextras.nix @@ -1,9 +1,9 @@ -{ stdenv, qtModule, qtbase }: +{ lib, qtModule, qtbase }: qtModule { - name = "qtmacextras"; + pname = "qtmacextras"; qtInputs = [ qtbase ]; - meta = with stdenv.lib; { + meta = with lib; { maintainers = with maintainers; [ periklis ]; platforms = platforms.darwin; }; diff --git a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix index 42ed23bb6dc..0d2d565fe7a 100644 --- a/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix +++ b/pkgs/development/libraries/qt-5/modules/qtmultimedia.nix @@ -1,15 +1,15 @@ -{ qtModule, stdenv, qtbase, qtdeclarative, pkgconfig -, alsaLib, gstreamer, gst-plugins-base, libpulseaudio, wayland +{ qtModule, lib, stdenv, qtbase, qtdeclarative, pkg-config +, alsa-lib, gstreamer, gst-plugins-base, libpulseaudio, wayland }: -with stdenv.lib; +with lib; qtModule { - name = "qtmultimedia"; + pname = "qtmultimedia"; qtInputs = [ qtbase qtdeclarative ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ gstreamer gst-plugins-base libpulseaudio ] - ++ optional (stdenv.isLinux) alsaLib + ++ optional (stdenv.isLinux) alsa-lib ++ optional (versionAtLeast qtbase.version "5.14.0" && stdenv.isLinux) wayland; outputs = [ "bin" "dev" "out" ]; qmakeFlags = [ "GST_VERSION=1.0" ]; diff --git a/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix b/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix index e6ef428cc3c..148ed890fc9 100644 --- a/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix +++ b/pkgs/development/libraries/qt-5/modules/qtnetworkauth.nix @@ -1,6 +1,6 @@ { qtModule, qtbase }: qtModule { - name = "qtnetworkauth"; + pname = "qtnetworkauth"; qtInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix b/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix index ba0f20bc0d8..6c85a91fb78 100644 --- a/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix +++ b/pkgs/development/libraries/qt-5/modules/qtquickcontrols.nix @@ -1,6 +1,6 @@ { qtModule, qtdeclarative }: qtModule { - name = "qtquickcontrols"; + pname = "qtquickcontrols"; qtInputs = [ qtdeclarative ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix b/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix index a9522f4b1f0..a50ad9e2a30 100644 --- a/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix +++ b/pkgs/development/libraries/qt-5/modules/qtquickcontrols2.nix @@ -1,7 +1,7 @@ { qtModule, qtdeclarative }: qtModule { - name = "qtquickcontrols2"; + pname = "qtquickcontrols2"; qtInputs = [ qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtscript.nix b/pkgs/development/libraries/qt-5/modules/qtscript.nix index 5a1a462a964..e7ce86b74a6 100644 --- a/pkgs/development/libraries/qt-5/modules/qtscript.nix +++ b/pkgs/development/libraries/qt-5/modules/qtscript.nix @@ -1,6 +1,6 @@ { qtModule, qtbase, qttools }: qtModule { - name = "qtscript"; + pname = "qtscript"; qtInputs = [ qtbase qttools ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtscxml.nix b/pkgs/development/libraries/qt-5/modules/qtscxml.nix index 62b428b0893..cf9af0bc754 100644 --- a/pkgs/development/libraries/qt-5/modules/qtscxml.nix +++ b/pkgs/development/libraries/qt-5/modules/qtscxml.nix @@ -1,7 +1,7 @@ { qtModule, qtbase, qtdeclarative }: qtModule { - name = "qtscxml"; + pname = "qtscxml"; qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtsensors.nix b/pkgs/development/libraries/qt-5/modules/qtsensors.nix index 3b8732b6885..3fbd032b968 100644 --- a/pkgs/development/libraries/qt-5/modules/qtsensors.nix +++ b/pkgs/development/libraries/qt-5/modules/qtsensors.nix @@ -1,7 +1,7 @@ { qtModule, qtbase, qtdeclarative }: qtModule { - name = "qtsensors"; + pname = "qtsensors"; qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtserialbus.nix b/pkgs/development/libraries/qt-5/modules/qtserialbus.nix index 48968a254c6..4fd6d7cb83c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtserialbus.nix +++ b/pkgs/development/libraries/qt-5/modules/qtserialbus.nix @@ -1,6 +1,6 @@ { qtModule, qtbase, qtserialport }: qtModule { - name = "qtserialbus"; + pname = "qtserialbus"; qtInputs = [ qtbase qtserialport ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtserialport.nix b/pkgs/development/libraries/qt-5/modules/qtserialport.nix index 516d38340dc..caeaedbcf3d 100644 --- a/pkgs/development/libraries/qt-5/modules/qtserialport.nix +++ b/pkgs/development/libraries/qt-5/modules/qtserialport.nix @@ -3,7 +3,7 @@ let inherit (lib) getLib optional; in qtModule { - name = "qtserialport"; + pname = "qtserialport"; qtInputs = [ qtbase ]; NIX_CFLAGS_COMPILE = optional stdenv.isLinux diff --git a/pkgs/development/libraries/qt-5/modules/qtspeech.nix b/pkgs/development/libraries/qt-5/modules/qtspeech.nix index ddef01a9482..d2748ba8d4c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtspeech.nix +++ b/pkgs/development/libraries/qt-5/modules/qtspeech.nix @@ -1,7 +1,7 @@ { qtModule }: qtModule { - name = "qtspeech"; + pname = "qtspeech"; qtInputs = [ ]; outputs = [ "out" "dev" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtsvg.nix b/pkgs/development/libraries/qt-5/modules/qtsvg.nix index 3ce68e56e41..59c7cf67448 100644 --- a/pkgs/development/libraries/qt-5/modules/qtsvg.nix +++ b/pkgs/development/libraries/qt-5/modules/qtsvg.nix @@ -1,7 +1,7 @@ { qtModule, qtbase }: qtModule { - name = "qtsvg"; + pname = "qtsvg"; qtInputs = [ qtbase ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qttools.nix b/pkgs/development/libraries/qt-5/modules/qttools.nix index fae90972978..437ec6cef74 100644 --- a/pkgs/development/libraries/qt-5/modules/qttools.nix +++ b/pkgs/development/libraries/qt-5/modules/qttools.nix @@ -3,7 +3,7 @@ with lib; qtModule { - name = "qttools"; + pname = "qttools"; qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; diff --git a/pkgs/development/libraries/qt-5/modules/qttranslations.nix b/pkgs/development/libraries/qt-5/modules/qttranslations.nix index 11a6e3fedcb..f49a4eb9a85 100644 --- a/pkgs/development/libraries/qt-5/modules/qttranslations.nix +++ b/pkgs/development/libraries/qt-5/modules/qttranslations.nix @@ -1,6 +1,6 @@ { qtModule, qttools }: qtModule { - name = "qttranslations"; + pname = "qttranslations"; qtInputs = [ qttools ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix b/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix index 2ba720c8eed..77f1948dbf4 100644 --- a/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix +++ b/pkgs/development/libraries/qt-5/modules/qtvirtualkeyboard.nix @@ -1,6 +1,6 @@ { qtModule, qtbase, qtdeclarative, qtsvg, hunspell }: qtModule { - name = "qtvirtualkeyboard"; + pname = "qtvirtualkeyboard"; qtInputs = [ qtbase qtdeclarative qtsvg hunspell ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwayland.nix b/pkgs/development/libraries/qt-5/modules/qtwayland.nix index c7a7704f283..1bd1adedaf0 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwayland.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwayland.nix @@ -1,9 +1,9 @@ -{ qtModule, qtbase, qtquickcontrols, wayland, pkgconfig }: +{ qtModule, qtbase, qtquickcontrols, wayland, pkg-config }: qtModule { - name = "qtwayland"; + pname = "qtwayland"; qtInputs = [ qtbase qtquickcontrols ]; buildInputs = [ wayland ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix b/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix index 84fb88385a3..f49e9e23490 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebchannel.nix @@ -1,7 +1,7 @@ { qtModule, qtbase, qtdeclarative }: qtModule { - name = "qtwebchannel"; + pname = "qtwebchannel"; qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index c0db5915b94..729c5f388f9 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -1,30 +1,34 @@ -{ qtModule, qtCompatVersion, - qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel +{ qtModule +, qtdeclarative, qtquickcontrols, qtlocation, qtwebchannel -, bison, coreutils, flex, git, gperf, ninja, pkgconfig, python2, which +, bison, coreutils, flex, git, gperf, ninja, pkg-config, python2, which +, nodejs, qtbase, perl , xorg, libXcursor, libXScrnSaver, libXrandr, libXtst , fontconfig, freetype, harfbuzz, icu, dbus, libdrm , zlib, minizip, libjpeg, libpng, libtiff, libwebp, libopus , jsoncpp, protobuf, libvpx, srtp, snappy, nss, libevent -, alsaLib +, alsa-lib , libcap , pciutils , systemd +, pipewire_0_2 , enableProprietaryCodecs ? true , gn , cups, darwin, openbsm, runCommand, xcbuild, writeScriptBin -, ffmpeg_3 ? null -, lib, stdenv +, ffmpeg ? null +, lib, stdenv, fetchpatch +, version ? null +, qtCompatVersion }: -with stdenv.lib; +with lib; qtModule { - name = "qtwebengine"; + pname = "qtwebengine"; qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ]; nativeBuildInputs = [ - bison coreutils flex git gperf ninja pkgconfig python2 which gn + bison coreutils flex git gperf ninja pkg-config python2 which gn nodejs ] ++ optional stdenv.isDarwin xcbuild; doCheck = true; outputs = [ "bin" "dev" "out" ]; @@ -39,17 +43,17 @@ qtModule { hardeningDisable = [ "format" ]; postPatch = - # Patch Chromium build tools '' - ( cd src/3rdparty/chromium; patchShebangs . ) - '' - # Patch Chromium build files - + optionalString (lib.versionOlder qtCompatVersion "5.12") '' - substituteInPlace ./src/3rdparty/chromium/build/common.gypi --replace /bin/echo ${coreutils}/bin/echo - substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/toolchain.gypi \ - --replace /bin/echo ${coreutils}/bin/echo - substituteInPlace ./src/3rdparty/chromium/v8/gypfiles/standalone.gypi \ - --replace /bin/echo ${coreutils}/bin/echo + # Patch Chromium build tools + ( + cd src/3rdparty/chromium; + + # Manually fix unsupported shebangs + substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \ + --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" || true + + patchShebangs . + ) '' # Prevent Chromium build script from making the path to `clang` relative to # the build directory. `clang_base_path` is the value of `QMAKE_CLANG_DIR` @@ -68,35 +72,41 @@ qtModule { '' # Patch library paths in Chromium sources + optionalString (!stdenv.isDarwin) '' - sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${systemd.lib}/lib/\1!' \ + sed -i -e '/lib_loader.*Load/s!"\(libudev\.so\)!"${lib.getLib systemd}/lib/\1!' \ src/3rdparty/chromium/device/udev_linux/udev?_loader.cc sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \ src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc '' - + optionalString stdenv.isDarwin ('' + + optionalString stdenv.isDarwin ( + (if (lib.versionAtLeast qtCompatVersion "5.14") then '' + substituteInPlace src/buildtools/config/mac_osx.pri \ + --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' + '' else '' substituteInPlace src/core/config/mac_osx.pri \ --replace 'QMAKE_CLANG_DIR = "/usr"' 'QMAKE_CLANG_DIR = "${stdenv.cc}"' - '' + '') # Following is required to prevent a build error: # ninja: error: '/nix/store/z8z04p0ph48w22rqzx7ql67gy8cyvidi-SDKs/MacOSX10.12.sdk/usr/include/mach/exc.defs', needed by 'gen/third_party/crashpad/crashpad/util/mach/excUser.c', missing and no known rule to make it - + (optionalString (lib.versionAtLeast qtCompatVersion "5.11") '' + + '' substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/BUILD.gn \ --replace '$sysroot/usr' "${darwin.xnu}" - '') - + '' + '' # Apple has some secret stuff they don't share with OpenBSM + + (if (lib.versionAtLeast qtCompatVersion "5.14") then '' + substituteInPlace src/3rdparty/chromium/base/mac/mach_port_rendezvous.cc \ + --replace "audit_token_to_pid(request.trailer.msgh_audit)" "request.trailer.msgh_audit.val[5]" + substituteInPlace src/3rdparty/chromium/third_party/crashpad/crashpad/util/mach/mach_message.cc \ + --replace "audit_token_to_pid(audit_trailer->msgh_audit)" "audit_trailer->msgh_audit.val[5]" + '' else '' substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \ --replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]" - - substituteInPlace src/3rdparty/chromium/sandbox/mac/BUILD.gn \ - --replace 'libs = [ "sandbox" ]' 'libs = [ "/usr/lib/libsandbox.1.dylib" ]' - ''); + '')); NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit "-Wno-class-memaccess" - ] ++ lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ + ] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [ # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940 # TODO: investigate and fix properly "-march=westmere" @@ -121,11 +131,11 @@ qtModule { if [ -d "$PWD/tools/qmake" ]; then QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH" fi - ''; + ''; - qmakeFlags = if stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64 - then [ "--" "-system-ffmpeg" ] ++ optional enableProprietaryCodecs "-proprietary-codecs" - else optional enableProprietaryCodecs "-- -proprietary-codecs"; + qmakeFlags = [ "--" "-system-ffmpeg" ] + ++ optional (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) "-webengine-webrtc-pipewire" + ++ optional enableProprietaryCodecs "-proprietary-codecs"; propagatedBuildInputs = [ # Image formats @@ -141,13 +151,12 @@ qtModule { harfbuzz icu libevent - ] ++ optionals (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) [ - ffmpeg_3 + ffmpeg ] ++ optionals (!stdenv.isDarwin) [ dbus zlib minizip snappy nss protobuf jsoncpp # Audio formats - alsaLib + alsa-lib # Text rendering fontconfig freetype @@ -158,6 +167,10 @@ qtModule { # X11 libs xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst xorg.libXcomposite xorg.libXdamage libdrm + + ] ++ optionals (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) [ + # Pipewire + pipewire_0_2 ] # FIXME These dependencies shouldn't be needed but can't find a way @@ -187,6 +200,7 @@ qtModule { buildInputs = optionals stdenv.isDarwin (with darwin; [ cups + apple_sdk.libs.sandbox # `sw_vers` is used by `src/3rdparty/chromium/build/config/mac/sdk_info.py` # to get some information about the host platform. @@ -202,15 +216,8 @@ qtModule { shift done '') - - # For sandbox.h include - (runCommand "MacOS_SDK_sandbox.h" {} '' - install -Dm444 "${lib.getDev darwin.apple_sdk.sdk}"/include/sandbox.h "$out"/include/sandbox.h - '') ]); - __impureHostDeps = optional stdenv.isDarwin "/usr/lib/libsandbox.1.dylib"; - dontUseNinjaBuild = true; dontUseNinjaInstall = true; dontUseXcbuild = true; @@ -220,12 +227,19 @@ qtModule { [Paths] Prefix = .. EOF + '' + lib.optionalString (lib.versions.majorMinor qtCompatVersion == "5.15") '' + # Fix for out-of-sync QtWebEngine and Qt releases (since 5.15.3) + sed 's/${lib.head (lib.splitString "-" version)} /${qtCompatVersion} /' -i "$out"/lib/cmake/*/*Config.cmake ''; + requiredSystemFeatures = [ "big-parallel" ]; + meta = with lib; { description = "A web engine based on the Chromium web browser"; maintainers = with maintainers; [ matthewbauer ]; platforms = platforms.unix; + # This build takes a long time; particularly on slow architectures + timeout = 24 * 3600; }; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix b/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix index 444d0c1beae..d8fd7a69237 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebglplugin.nix @@ -1,6 +1,6 @@ { qtModule, qtbase, qtwebsockets }: qtModule { - name = "qtwebglplugin"; + pname = "qtwebglplugin"; qtInputs = [ qtbase qtwebsockets ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index 1133623483a..e2dd0d4b19c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -1,10 +1,9 @@ { qtModule, stdenv, lib, fetchurl , qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel -, fontconfig, gtk2, libwebp, libxml2, libxslt +, fontconfig, libwebp, libxml2, libxslt , sqlite, systemd, glib, gst_all_1, cmake -, bison, flex, gdb, gperf, perl, pkgconfig, python2, ruby +, bison, flex, gdb, gperf, perl, pkg-config, python2, ruby , darwin -, flashplayerFix ? false }: let @@ -23,7 +22,7 @@ let usingAnnulenWebkitFork = lib.versionAtLeast qtbase.version "5.11.0"; in qtModule { - name = "qtwebkit"; + pname = "qtwebkit"; qtInputs = [ qtbase qtdeclarative qtlocation qtsensors ] ++ optional (stdenv.isDarwin && lib.versionAtLeast qtbase.version "5.9.0") qtmultimedia ++ optional usingAnnulenWebkitFork qtwebchannel; @@ -31,7 +30,7 @@ qtModule { ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ]) ++ optional usingAnnulenWebkitFork hyphen; nativeBuildInputs = [ - bison flex gdb gperf perl pkgconfig python2 ruby + bison flex gdb gperf perl pkg-config python2 ruby ] ++ optional usingAnnulenWebkitFork cmake; cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ] @@ -43,7 +42,7 @@ qtModule { # QtWebKit overrides qmake's default_pre and default_post features, # so its custom qmake files must be found first at the front of QMAKEPATH. - preConfigure = stdenv.lib.optionalString (!usingAnnulenWebkitFork) '' + preConfigure = lib.optionalString (!usingAnnulenWebkitFork) '' QMAKEPATH="$PWD/Tools/qmake''${QMAKEPATH:+:}$QMAKEPATH" fixQtBuiltinPaths . '*.pr?' # Fix hydra's "Log limit exceeded" @@ -58,12 +57,6 @@ qtModule { ++ optional stdenv.cc.isGNU "-Wno-class-memaccess" # with clang this warning blows the log over Hydra's limit ++ optional stdenv.isDarwin "-Wno-inconsistent-missing-override" - ++ optionals flashplayerFix - [ - ''-DNIXPKGS_LIBGTK2="${getLib gtk2}/lib/libgtk-x11-2.0"'' - # this file used to exist in gdk_pixbuf? - ''-DNIXPKGS_LIBGDK2="${getLib gtk2}/lib/libgdk-x11-2.0"'' - ] ++ optional (!stdenv.isDarwin) ''-DNIXPKGS_LIBUDEV="${getLib systemd}/lib/libudev"''; doCheck = false; # fails 13 out of 13 tests (ctest) @@ -71,5 +64,7 @@ qtModule { # Hack to avoid TMPDIR in RPATHs. preFixup = ''rm -rf "$(pwd)" && mkdir "$(pwd)" ''; - meta.maintainers = with stdenv.lib.maintainers; [ abbradar periklis ]; + meta = { + maintainers = with lib.maintainers; [ abbradar periklis ]; + }; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix b/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix index ad5e7625f28..540fcade73c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebsockets.nix @@ -1,7 +1,7 @@ { qtModule, qtbase, qtdeclarative }: qtModule { - name = "qtwebsockets"; + pname = "qtwebsockets"; qtInputs = [ qtbase qtdeclarative ]; outputs = [ "out" "dev" "bin" ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtwebview.nix b/pkgs/development/libraries/qt-5/modules/qtwebview.nix index 906d750c5d3..1df8ef86638 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebview.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebview.nix @@ -1,9 +1,9 @@ -{ darwin, stdenv, qtModule, qtdeclarative, qtwebengine }: +{ darwin, lib, stdenv, qtModule, qtdeclarative, qtwebengine }: -with stdenv.lib; +with lib; qtModule { - name = "qtwebview"; + pname = "qtwebview"; qtInputs = [ qtdeclarative qtwebengine ]; buildInputs = optional (stdenv.isDarwin) [ darwin.apple_sdk.frameworks.CoreFoundation diff --git a/pkgs/development/libraries/qt-5/modules/qtx11extras.nix b/pkgs/development/libraries/qt-5/modules/qtx11extras.nix index 4d431fee278..ad743523bb0 100644 --- a/pkgs/development/libraries/qt-5/modules/qtx11extras.nix +++ b/pkgs/development/libraries/qt-5/modules/qtx11extras.nix @@ -1,6 +1,6 @@ { qtModule, qtbase }: qtModule { - name = "qtx11extras"; + pname = "qtx11extras"; qtInputs = [ qtbase ]; } diff --git a/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix b/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix index 7ac922421f0..c602b1e39d2 100644 --- a/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix +++ b/pkgs/development/libraries/qt-5/modules/qtxmlpatterns.nix @@ -1,7 +1,7 @@ { qtModule, qtbase, qtdeclarative }: qtModule { - name = "qtxmlpatterns"; + pname = "qtxmlpatterns"; qtInputs = [ qtbase qtdeclarative ]; devTools = [ "bin/xmlpatterns" "bin/xmlpatternsvalidator" ]; } diff --git a/pkgs/development/libraries/qt-5/qt-env.nix b/pkgs/development/libraries/qt-5/qt-env.nix index da56c07779b..b4a201c08cc 100644 --- a/pkgs/development/libraries/qt-5/qt-env.nix +++ b/pkgs/development/libraries/qt-5/qt-env.nix @@ -5,7 +5,7 @@ buildEnv { paths = [ qtbase ] ++ paths; pathsToLink = [ "/bin" "/mkspecs" "/include" "/lib" "/share" ]; - extraOutputsToInstall = [ "dev" ]; + extraOutputsToInstall = [ "out" "dev" ]; postBuild = '' rm "$out/bin/qmake" diff --git a/pkgs/development/libraries/qt-5/qtModule.nix b/pkgs/development/libraries/qt-5/qtModule.nix index 0481f000c6c..767cbc91142 100644 --- a/pkgs/development/libraries/qt-5/qtModule.nix +++ b/pkgs/development/libraries/qt-5/qtModule.nix @@ -7,15 +7,14 @@ let inherit (lib) licenses maintainers platforms; in args: let - inherit (args) name; - version = args.version or srcs.${name}.version; - src = args.src or srcs.${name}.src; + inherit (args) pname; + version = args.version or srcs.${pname}.version; + src = args.src or srcs.${pname}.src; in mkDerivation (args // { - name = "${name}-${version}"; - inherit src; - patches = args.patches or patches.${name} or []; + inherit pname version src; + patches = args.patches or patches.${pname} or []; nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ]; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []); @@ -34,6 +33,8 @@ mkDerivation (args // { fixQtBuiltinPaths . '*.pr?' ''; + dontWrapQtApps = args.dontWrapQtApps or true; + postFixup = '' if [ -d "''${!outputDev}/lib/pkgconfig" ]; then find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do |