diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-6/patches')
15 files changed, 142 insertions, 89 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch index 6724e0d28adb..a0ee1e11b068 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch @@ -1,7 +1,7 @@ -From 69d9faa9e4420d3cb0d1466c1b95ceadb2cd75f3 Mon Sep 17 00:00:00 2001 +From afbe4002948e60ee3b27cb9be9e549ae416373f8 Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Thu, 13 Apr 2023 23:42:29 +0800 -Subject: [PATCH 1/6] qtbase: qmake: always use libname instead of absolute +Subject: [PATCH 01/11] qtbase: qmake: always use libname instead of absolute path in qmake files In generated qmake files, absolute paths to qt libraries are embedded @@ -46,5 +46,5 @@ index 3ffe354fd8d..441332d4582 100644 else() list(APPEND out_list "${library_path}") -- -2.39.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch index ee4af1730eb8..8ffe0c936b72 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch @@ -1,7 +1,7 @@ -From 41e32c41f781261726722628122c924abb532575 Mon Sep 17 00:00:00 2001 +From 8d3f5ee63ed29fe41927b904aa1e2b40f90c8ef4 Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Fri, 14 Apr 2023 21:43:04 +0800 -Subject: [PATCH 2/6] qtbase: qmake: fix mkspecs for darwin +Subject: [PATCH 02/11] qtbase: qmake: fix mkspecs for darwin --- mkspecs/common/mac.conf | 2 +- @@ -26,7 +26,7 @@ index 61bea952b22..9909dae7260 100644 QMAKE_LFLAGS_REL_RPATH = diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index 4acf3b19d5c..aadfce875e2 100644 +index f364716717c..3b40328304d 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,9 +1,5 @@ @@ -39,7 +39,7 @@ index 4acf3b19d5c..aadfce875e2 100644 contains(TEMPLATE, .*app) { !macx-xcode:if(isEmpty(BUILDS)|build_pass) { # Detect changes to the platform SDK -@@ -15,37 +11,6 @@ contains(TEMPLATE, .*app) { +@@ -15,269 +11,10 @@ contains(TEMPLATE, .*app) { QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk) } @@ -77,9 +77,6 @@ index 4acf3b19d5c..aadfce875e2 100644 } !no_objective_c:CONFIG += objective_c -@@ -73,234 +38,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. @@ -486,5 +483,5 @@ index df191eb13c4..e69de29bb2d 100644 - -load(toolchain) -- -2.39.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch index 759c71365d7e..041960352b1f 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch @@ -1,17 +1,17 @@ -From f52f3c2cb1703592eaeb43e80f585a24ce8402d7 Mon Sep 17 00:00:00 2001 +From 8ce66fca339d9daf6bd132771c2ea582a461f31c Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Fri, 14 Apr 2023 09:34:46 +0800 -Subject: [PATCH 3/6] qtbase: qmake: fix includedir in generated pkg-config +Subject: [PATCH 03/11] qtbase: qmake: fix includedir in generated pkg-config --- qmake/generators/makefile.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp -index cc985a878b4..4e3b383d812 100644 +index 11d2f0ff7df..c78ed0d3485 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3403,8 +3403,7 @@ MakefileGenerator::writePkgConfigFile() +@@ -3412,8 +3412,7 @@ MakefileGenerator::writePkgConfigFile() << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") ; @@ -22,5 +22,5 @@ index cc985a878b4..4e3b383d812 100644 && libDir != QLatin1String("/Library/Frameworks")) { t << " -F${libdir}"; -- -2.39.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch index 0b4da29afd7c..5ccc9346d6d9 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch @@ -1,18 +1,18 @@ -From dd0dfc9cf87966f5d7493a943ec04c665be83cb6 Mon Sep 17 00:00:00 2001 +From b1533ac42718835499ec633ffb3b1bed0d040719 Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Fri, 14 Apr 2023 09:35:25 +0800 -Subject: [PATCH 4/6] qtbase: fix locating tzdir on NixOS +Subject: [PATCH 04/11] qtbase: fix locating tzdir on NixOS --- src/corelib/time/qtimezoneprivate_tz.cpp | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/corelib/time/qtimezoneprivate_tz.cpp b/src/corelib/time/qtimezoneprivate_tz.cpp -index 960a0944185..a5186acbd91 100644 +index e702a5d6b43..2ac88c1cd10 100644 --- a/src/corelib/time/qtimezoneprivate_tz.cpp +++ b/src/corelib/time/qtimezoneprivate_tz.cpp -@@ -51,7 +51,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash; - // Parse zone.tab table, assume lists all installed zones, if not will need to read directories +@@ -56,7 +56,11 @@ static bool isTzFile(const QString &name); + // zone1970.tab). static QTzTimeZoneHash loadTzTimeZones() { - QString path = QStringLiteral("/usr/share/zoneinfo/zone.tab"); @@ -24,7 +24,7 @@ index 960a0944185..a5186acbd91 100644 if (!QFile::exists(path)) path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); -@@ -730,18 +734,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) +@@ -773,18 +777,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) if (!tzif.open(QIODevice::ReadOnly)) return ret; } else { @@ -56,5 +56,5 @@ index 960a0944185..a5186acbd91 100644 } } -- -2.39.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch index 606be2d5ac19..8e04bda13645 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch @@ -1,7 +1,7 @@ -From 4e8c14f1af9c332826e0454f4fd63e541edbaf5c Mon Sep 17 00:00:00 2001 +From 880fe5653a86d8091f3f577977f8af93552c48fd Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Tue, 21 Mar 2023 15:48:49 +0800 -Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for +Subject: [PATCH 05/11] qtbase: deal with a font face at index 0 as Regular for Variable fonts Reference: https://bugreports.qt.io/browse/QTBUG-111994 @@ -22,5 +22,5 @@ index 474644b871f..c7a117fd134 100644 FcObjectSetDestroy(os); FcPatternDestroy(pattern); -- -2.39.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch index 4933534caffb..bab52a38c00c 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch @@ -1,7 +1,7 @@ -From 61ae6e04388dd40e11c214d56f22f8f2007bf35f Mon Sep 17 00:00:00 2001 +From 7f573f00fb850a08017d9f1e3c73b4d7efeb84f2 Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Wed, 12 Apr 2023 10:13:50 +0800 -Subject: [PATCH 6/6] qtbase: qt-cmake: always use cmake from path +Subject: [PATCH 06/11] qtbase: qt-cmake: always use cmake from path The generated qt-cmake scripts embeds the absolute path of cmake used during the build of qtbase, bloating the runtime closure of qtbase. @@ -28,5 +28,5 @@ index f719257f602..571ffe788fa 100755 toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake" -- -2.39.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-tools-in-PATH.patch index 146cba58b8e7..fc2f55c9b4ae 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0007-qtbase-find-tools-in-PATH.patch @@ -1,7 +1,7 @@ -From 31d808a7b0d52a01c3f2875202cd29410a94b39a Mon Sep 17 00:00:00 2001 +From 95b6bc2a414d381fdeab0899a3b02499c43695e7 Mon Sep 17 00:00:00 2001 From: rewine <luhongxu@deepin.org> Date: Wed, 29 Mar 2023 11:51:33 +0800 -Subject: [PATCH] qtbase-find-tools-in-PATH +Subject: [PATCH 07/11] qtbase-find-tools-in-PATH 1. find qt's tools in `QTTOOLSPATH` env qt assumes that all components use the same install prefix @@ -14,13 +14,12 @@ Subject: [PATCH] qtbase-find-tools-in-PATH We can guarantee the build order of qt components in nixpkgs tools in qttools always build before qtdoc qdoc_bin is not a build target now, since we find it in `QTTOOLSPATH` - --- cmake/QtDocsHelpers.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake -index 48ed5a32..9409d22d 100644 +index 48ed5a324bf..91d8d41fb1f 100644 --- a/cmake/QtDocsHelpers.cmake +++ b/cmake/QtDocsHelpers.cmake @@ -47,9 +47,14 @@ function(qt_internal_add_docs) @@ -42,5 +41,5 @@ index 48ed5a32..9409d22d 100644 get_target_property(target_type ${target} TYPE) if (NOT target_type STREQUAL "INTERFACE_LIBRARY") -- -2.38.1 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch index 81f0f76636d9..d1139e0aecd1 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch @@ -1,19 +1,19 @@ -From 39eb99dcd66f8ffb632fed6308a49896fe5ad2d3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org> -Date: Thu, 10 Aug 2023 14:17:03 +0200 -Subject: [PATCH 3/3] Pass to qmlimportscanner the QML2_IMPORT_PATH +From a5cbfb30fc53b3290578af4a87fe4c0463df4247 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 10 Oct 2023 10:12:56 -0400 +Subject: [PATCH 08/11] qtbase: pass to qmlimportscanner the QML2_IMPORT_PATH --- src/tools/macdeployqt/shared/shared.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp -index 676d34d545..7908b07b3c 100644 +index f637416cf22..77749506ccb 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp -@@ -1297,6 +1297,13 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf - argumentList.append(qmlImportsPath); - } +@@ -1293,6 +1293,13 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf + argumentList.append( "-importPath"); + argumentList.append(qmlImportsPath); + // In a modularized installation of qt as we have in Nix, instead, we will + // read the paths from the environment, as they are spread in multiple @@ -26,5 +26,5 @@ index 676d34d545..7908b07b3c 100644 QProcess qmlImportScanner; qmlImportScanner.start(qmlImportScannerPath, argumentList); -- -2.26.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-allow-translations-outside-prefix.patch index e96cbdbef11d..ee2e35f813fa 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-allow-translations-outside-prefix.patch @@ -1,5 +1,14 @@ +From 28220453d157c0825669145c94ab86e9603265fa Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 10 Oct 2023 10:14:40 -0400 +Subject: [PATCH 09/11] qtbase: allow translations outside prefix + +--- + cmake/QtBuild.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake -index b45ec1d208..05f69c131b 100644 +index 1dc576d27af..4348eb97c37 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -30,7 +30,7 @@ function(qt_configure_process_path name default docstring) @@ -11,3 +20,6 @@ index b45ec1d208..05f69c131b 100644 message(FATAL_ERROR "Path component '${name}' is outside computed install prefix: ${rel_path} ") return() +-- +2.42.0 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch index 32e30679ec59..fbb74a055d4a 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-find-qmlimportscanner-in-macdeployqt-via-envi.patch @@ -1,7 +1,8 @@ -From 505391a31aa353b8f1cc5d3feb9861582554d9f1 Mon Sep 17 00:00:00 2001 +From bbd9cf61b686f68d5e5eb78fb0b96a74a8921cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org> Date: Wed, 9 Aug 2023 16:16:21 +0200 -Subject: [PATCH 1/3] Find qmlimportscanner in macdeployqt via environment +Subject: [PATCH 10/11] qtbase: find qmlimportscanner in macdeployqt via + environment The qmlimportscanner tool is provided by qtdeclarative. Because of the modularized installation in Nix, it can not be found via the usual @@ -16,10 +17,10 @@ a workaround for users. 1 file changed, 4 insertions(+) diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp -index 643fe5390a..b8fcc9c9bd 100644 +index 77749506ccb..48979195f40 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp -@@ -1270,6 +1270,10 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf +@@ -1273,6 +1273,10 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf if (!QFile::exists(qmlImportScannerPath)) qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner"; @@ -31,5 +32,5 @@ index 643fe5390a..b8fcc9c9bd 100644 if (!QFile::exists(qmlImportScannerPath)) { LogError() << "qmlimportscanner not found at" << qmlImportScannerPath; -- -2.26.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0011-qtbase-check-in-the-QML-folder-of-this-library-does-.patch index 4436d512d9d8..ab3354d62b8c 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0011-qtbase-check-in-the-QML-folder-of-this-library-does-.patch @@ -1,8 +1,8 @@ -From 32df59bea18bebc18d6d308750e88be325522d2e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org> -Date: Thu, 10 Aug 2023 14:15:34 +0200 -Subject: [PATCH 2/3] Check in the QML folder of this library does actually - exist +From 617d27ee91aaa59c59c4f3a2cca7bab8167d9f5f Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 10 Oct 2023 10:17:00 -0400 +Subject: [PATCH 11/11] qtbase: check in the QML folder of this library does + actually exist In a modularized installation, this folder will be the location where `qtbase` itself is installed, but `qtbase` does not have any QML @@ -12,10 +12,10 @@ code, and `qmlimportscanner` will complain that it does not exist. 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp -index b8fcc9c9bd..676d34d545 100644 +index 48979195f40..8415680ecda 100644 --- a/src/tools/macdeployqt/shared/shared.cpp +++ b/src/tools/macdeployqt/shared/shared.cpp -@@ -1290,9 +1290,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf +@@ -1293,9 +1293,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf } for (const QString &importPath : qmlImportPaths) argumentList << "-importPath" << importPath; @@ -28,8 +28,8 @@ index b8fcc9c9bd..676d34d545 100644 + argumentList.append(qmlImportsPath); + } - // run qmlimportscanner - QProcess qmlImportScanner; + // In a modularized installation of qt as we have in Nix, instead, we will + // read the paths from the environment, as they are spread in multiple -- -2.26.2 +2.42.0 diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch index 02e578f2d523..a204d52c9f0c 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtdeclarative-default-disable-qmlcache.patch @@ -1,13 +1,29 @@ +From 2d561e0a80f2d123a7348187975ee845f9dcd9e0 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 10 Oct 2023 11:12:27 -0400 +Subject: [PATCH] qtdeclarative: disable qml disk cache + +--- + src/qml/jsruntime/qv4engine.cpp | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp -index 852cde9e..165f1b57 100644 +index d1b4c4fff6..50f8a07420 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp -@@ -2093,7 +2093,7 @@ void ExecutionEngine::registerModule(const QString &_name, const QJSValue &modul - - bool ExecutionEngine::diskCacheEnabled() const +@@ -2232,11 +2232,7 @@ ExecutionEngine::DiskCacheOptions ExecutionEngine::diskCacheOptions() const { -- return (!disableDiskCache() && !debugger()) || forceDiskCache(); -+ return forceDiskCache(); + if (forceDiskCache()) + return DiskCache::Enabled; +- if (disableDiskCache() || debugger()) +- return DiskCache::Disabled; +- static const DiskCacheOptions options = qmlGetConfigOption< +- DiskCacheOptions, transFormDiskCache>("QML_DISK_CACHE"); +- return options; ++ return DiskCache::Disabled; } void ExecutionEngine::callInContext(QV4::Function *function, QObject *self, +-- +2.42.0 + diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch index 86507165bd9c..3df917edf5cc 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch @@ -1,10 +1,10 @@ diff --git a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -index 6a3a777..249d4cc 100644 +index d4b0161b2e..e5a0eb1967 100644 --- a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc +++ b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -@@ -20,12 +20,6 @@ - #include "media/base/media_log.h" - #include "media/base/video_frame.h" +@@ -29,12 +29,6 @@ + #include "media/base/video_types.h" + #include "media/video/video_encode_accelerator.h" -// This is a min version of macOS where we want to support SVC encoding via -// EnableLowLatencyRateControl flag. The flag is actually supported since 11.3, @@ -15,21 +15,22 @@ index 6a3a777..249d4cc 100644 namespace media { namespace { -@@ -150,8 +144,6 @@ VTVideoEncodeAccelerator::GetSupportedProfiles() { - profile.max_framerate_numerator = kMaxFrameRateNumerator; - profile.max_framerate_denominator = kMaxFrameRateDenominator; - profile.max_resolution = gfx::Size(kMaxResolutionWidth, kMaxResolutionHeight); +@@ -277,8 +271,6 @@ VTVideoEncodeAccelerator::GetSupportedH264Profiles() { + profile.rate_control_modes = VideoEncodeAccelerator::kConstantMode | + VideoEncodeAccelerator::kVariableMode; + profile.scalability_modes.push_back(SVCScalabilityMode::kL1T1); - if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) - profile.scalability_modes.push_back(SVCScalabilityMode::kL1T2); + for (const auto& supported_profile : kSupportedProfiles) { - profile.profile = supported_profile; - profiles.push_back(profile); -@@ -595,13 +587,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession( - kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder}; - std::vector<CFTypeRef> encoder_values{kCFBooleanTrue}; + if (VideoCodecProfileToVideoCodec(supported_profile) == VideoCodec::kH264) { +@@ -814,14 +806,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession( + encoder_values.push_back(kCFBooleanFalse); + } - if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { -- if (require_low_delay_) { +- // Remove the validation once HEVC SVC mode is supported on macOS. +- if (require_low_delay_ && codec == VideoCodec::kH264) { - encoder_keys.push_back( - kVTVideoEncoderSpecification_EnableLowLatencyRateControl); - encoder_values.push_back(kCFBooleanTrue); @@ -38,10 +39,10 @@ index 6a3a777..249d4cc 100644 base::ScopedCFTypeRef<CFDictionaryRef> encoder_spec = video_toolbox::DictionaryWithKeysAndValues( encoder_keys.data(), encoder_values.data(), encoder_keys.size()); -@@ -669,19 +654,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession() { - } +@@ -891,19 +875,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession(VideoCodec codec) { - if (num_temporal_layers_ == 2) { + // Remove the validation once HEVC SVC mode is supported on macOS. + if (num_temporal_layers_ == 2 && codec_ == VideoCodec::kH264) { - if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { - if (!session_property_setter.IsSupported( - kVTCompressionPropertyKey_BaseLayerFrameRateFraction)) { diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch index 31516c41beb0..c4302113786e 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch @@ -1,10 +1,24 @@ +From da66a74e8b8e57b4a60b2cd0d18ef3bebb15509c Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 10 Oct 2023 11:45:24 -0400 +Subject: [PATCH 1/2] qtwebengine: link pulseaudio + +--- + src/core/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 4153ce180..e89f41798 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt -@@ -341,6 +341,7 @@ - devtools_fast_bundle=false - devtools_skip_typecheck=false - enable_jxl_decoder=false # temporarily because libjxl causes internal compiler error on armv7 +@@ -340,6 +340,7 @@ foreach(arch ${archs}) + use_static_angle=true + chrome_root_store_supported=false + trial_comparison_cert_verifier_supported=false + link_pulseaudio=true ) + extend_gn_list(gnArgArg + ARGS use_v8_context_snapshot v8_use_external_startup_data +-- +2.42.0 - extend_gn_list(gnArgArg \ No newline at end of file diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch index 58f2d96f8097..fecdb93cd547 100644 --- a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-locales-path.patch @@ -1,8 +1,18 @@ +From 6f0068359f32d1e7ebaa32650c3b608c008a1127 Mon Sep 17 00:00:00 2001 +From: Nick Cao <nickcao@nichi.co> +Date: Tue, 10 Oct 2023 11:46:28 -0400 +Subject: [PATCH 2/2] qtwebengine: fix path to locales + +--- + src/core/api/CMakeLists.txt | 3 ++- + src/core/web_engine_library_info.cpp | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt -index f860e0ba7..30e1a767a 100644 +index a3cb53e17..fcb6d70c5 100644 --- a/src/core/api/CMakeLists.txt +++ b/src/core/api/CMakeLists.txt -@@ -193,7 +193,8 @@ if(QT_FEATURE_framework) +@@ -190,7 +190,8 @@ if(QT_FEATURE_framework) else() install(FILES ${localeFiles} @@ -26,3 +36,6 @@ index c03c9a3b2..430fdfab2 100644 % QLatin1String("qtwebengine_locales"); candidatePaths << fallbackDir(); } +-- +2.42.0 + |