diff options
Diffstat (limited to 'pkgs/development/libraries/qt-6/patches')
11 files changed, 231 insertions, 143 deletions
diff --git a/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch b/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch new file mode 100644 index 0000000000000..6724e0d28adba --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/0001-qtbase-qmake-always-use-libname-instead-of-absolute-.patch @@ -0,0 +1,50 @@ +From 69d9faa9e4420d3cb0d1466c1b95ceadb2cd75f3 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 + path in qmake files + +In generated qmake files, absolute paths to qt libraries are embedded +and then used in linker flags. However as the libraries can be provided +by qt modules other than the one currently being built, the ebedded +paths can be incorrect. +--- + cmake/QtFinishPrlFile.cmake | 7 ++++--- + cmake/QtGenerateLibHelpers.cmake | 3 --- + 2 files changed, 4 insertions(+), 6 deletions(-) + +diff --git a/cmake/QtFinishPrlFile.cmake b/cmake/QtFinishPrlFile.cmake +index 1cf9377e6ce..ac4428bd7a1 100644 +--- a/cmake/QtFinishPrlFile.cmake ++++ b/cmake/QtFinishPrlFile.cmake +@@ -64,9 +64,10 @@ foreach(line ${lines}) + endif() + list(APPEND adjusted_libs "-framework" "${CMAKE_MATCH_1}") + else() +- # Not a framework, transform the Qt module into relocatable relative path. +- qt_strip_library_version_suffix(relative_lib "${relative_lib}") +- list(APPEND adjusted_libs "$$[QT_INSTALL_LIBS]/${relative_lib}") ++ # Not a framework, extract the library name and prepend an -l to make ++ # it relocatable. ++ qt_transform_absolute_library_paths_to_link_flags(lib_with_link_flag "${lib}") ++ list(APPEND adjusted_libs "${lib_with_link_flag}") + endif() + endif() + else() +diff --git a/cmake/QtGenerateLibHelpers.cmake b/cmake/QtGenerateLibHelpers.cmake +index 3ffe354fd8d..441332d4582 100644 +--- a/cmake/QtGenerateLibHelpers.cmake ++++ b/cmake/QtGenerateLibHelpers.cmake +@@ -73,9 +73,6 @@ function(qt_transform_absolute_library_paths_to_link_flags out_var library_path_ + string(TOLOWER "${dir}" dir_lower) + # If library_path isn't in default link directories, we should add it to link flags. + list(FIND IMPLICIT_LINK_DIRECTORIES_LOWER "${dir_lower}" index) +- if(${index} EQUAL -1) +- list(APPEND out_list "-L\"${dir}\"") +- endif() + list(APPEND out_list "${lib_name_with_link_flag}") + else() + list(APPEND out_list "${library_path}") +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-mkspecs-mac.patch b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch index 0830a4432bf2b..ee4af1730eb88 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-mkspecs-mac.patch +++ b/pkgs/development/libraries/qt-6/patches/0002-qtbase-qmake-fix-mkspecs-for-darwin.patch @@ -1,5 +1,19 @@ +From 41e32c41f781261726722628122c924abb532575 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 + +--- + mkspecs/common/mac.conf | 2 +- + mkspecs/features/mac/default_post.prf | 263 -------------------------- + mkspecs/features/mac/default_pre.prf | 58 ------ + mkspecs/features/mac/sdk.mk | 27 --- + mkspecs/features/mac/sdk.prf | 61 ------ + mkspecs/features/mac/toolchain.prf | 5 - + 6 files changed, 1 insertion(+), 415 deletions(-) + diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf -index 61bea952..9909dae7 100644 +index 61bea952b22..9909dae7260 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -23,7 +23,7 @@ QMAKE_INCDIR_OPENGL = \ @@ -12,7 +26,7 @@ index 61bea952..9909dae7 100644 QMAKE_LFLAGS_REL_RPATH = diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf -index 09db1764..aadfce87 100644 +index 4acf3b19d5c..aadfce875e2 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -1,9 +1,5 @@ @@ -141,7 +155,7 @@ index 09db1764..aadfce87 100644 - QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS - QMAKE_MAC_XCODE_SETTINGS += arch_device - -- simulator { +- ios:simulator { - arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]" - arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS - QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS @@ -154,7 +168,7 @@ index 09db1764..aadfce87 100644 - QMAKE_MAC_XCODE_SETTINGS += only_active_arch -} else { - device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS -- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS +- ios:simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS - VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS - - single_arch: VALID_ARCHS = $$first(VALID_ARCHS) @@ -193,7 +207,7 @@ index 09db1764..aadfce87 100644 - # and makes it easier for people to override EXPORT_VALID_ARCHS to limit - # individual rules to a different set of architecture(s) from the overall - # build (such as machtest in QtCore). -- simulator:device { +- ios:simulator:device { - QMAKE_XARCH_CFLAGS = - QMAKE_XARCH_LFLAGS = - QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS @@ -231,7 +245,7 @@ index 09db1764..aadfce87 100644 - QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS) - QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS) - } else { -- simulator { +- ios:simulator { - version_identifier = $$simulator.deployment_identifier - platform_identifier = $$simulator.sdk - sysroot_path = $$xcodeSDKInfo(Path, $$simulator.sdk) @@ -299,7 +313,7 @@ index 09db1764..aadfce87 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 e3534561..3b01424e 100644 +index e3534561a56..3b01424e67b 100644 --- a/mkspecs/features/mac/default_pre.prf +++ b/mkspecs/features/mac/default_pre.prf @@ -1,60 +1,2 @@ @@ -364,7 +378,7 @@ index e3534561..3b01424e 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 a32ceacb..e69de29b 100644 +index a32ceacb6ce..e69de29bb2d 100644 --- a/mkspecs/features/mac/sdk.mk +++ b/mkspecs/features/mac/sdk.mk @@ -1,27 +0,0 @@ @@ -396,7 +410,7 @@ index a32ceacb..e69de29b 100644 - endif -endif diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf -index 3a9c2778..e69de29b 100644 +index 3a9c2778bbe..e69de29bb2d 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -1,61 +0,0 @@ @@ -462,7 +476,7 @@ index 3a9c2778..e69de29b 100644 - cache($$tool_variable, set stash, $$tool) -} diff --git a/mkspecs/features/mac/toolchain.prf b/mkspecs/features/mac/toolchain.prf -index df191eb1..e69de29b 100644 +index df191eb13c4..e69de29bb2d 100644 --- a/mkspecs/features/mac/toolchain.prf +++ b/mkspecs/features/mac/toolchain.prf @@ -1,5 +0,0 @@ @@ -471,3 +485,6 @@ index df191eb1..e69de29b 100644 -sdk: load(sdk) - -load(toolchain) +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-pkg-config.patch b/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch index 90caaea1cf4d4..759c71365d7e9 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-qmake-pkg-config.patch +++ b/pkgs/development/libraries/qt-6/patches/0003-qtbase-qmake-fix-includedir-in-generated-pkg-config.patch @@ -1,7 +1,17 @@ +From f52f3c2cb1703592eaeb43e80f585a24ce8402d7 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 + +--- + 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 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp -@@ -3390,8 +3390,7 @@ MakefileGenerator::writePkgConfigFile() +@@ -3403,8 +3403,7 @@ MakefileGenerator::writePkgConfigFile() << varGlue("QMAKE_PKGCONFIG_CFLAGS", "", " ", " ") // << varGlue("DEFINES","-D"," -D"," ") ; @@ -11,4 +21,6 @@ diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle") && libDir != QLatin1String("/Library/Frameworks")) { t << " -F${libdir}"; +-- +2.39.2 diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-tzdir.patch b/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch index fc36130c7aad5..0b4da29afd7cf 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-tzdir.patch +++ b/pkgs/development/libraries/qt-6/patches/0004-qtbase-fix-locating-tzdir-on-NixOS.patch @@ -1,5 +1,14 @@ +From dd0dfc9cf87966f5d7493a943ec04c665be83cb6 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 + +--- + 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 627a4a81..a5f50acc 100644 +index 960a0944185..a5186acbd91 100644 --- a/src/corelib/time/qtimezoneprivate_tz.cpp +++ b/src/corelib/time/qtimezoneprivate_tz.cpp @@ -51,7 +51,11 @@ typedef QHash<QByteArray, QTzTimeZone> QTzTimeZoneHash; @@ -15,7 +24,7 @@ index 627a4a81..a5f50acc 100644 if (!QFile::exists(path)) path = QStringLiteral("/usr/lib/zoneinfo/zone.tab"); -@@ -727,18 +731,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) +@@ -730,18 +734,21 @@ QTzTimeZoneCacheEntry QTzTimeZoneCache::findEntry(const QByteArray &ianaId) if (!tzif.open(QIODevice::ReadOnly)) return ret; } else { @@ -46,3 +55,6 @@ index 627a4a81..a5f50acc 100644 } } } +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/qtbase-variable-fonts.patch b/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch index 96952d1ad1604..606be2d5ac192 100644 --- a/pkgs/development/libraries/qt-6/patches/qtbase-variable-fonts.patch +++ b/pkgs/development/libraries/qt-6/patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch @@ -1,8 +1,8 @@ -From 9ba9c690fb16188ff524b53def104e68e45cf5c3 Mon Sep 17 00:00:00 2001 +From 4e8c14f1af9c332826e0454f4fd63e541edbaf5c Mon Sep 17 00:00:00 2001 From: Nick Cao <nickcao@nichi.co> Date: Tue, 21 Mar 2023 15:48:49 +0800 -Subject: [PATCH] Deal with a font face at index 0 as Regular for Variable - fonts +Subject: [PATCH 5/6] qtbase: deal with a font face at index 0 as Regular for + Variable fonts Reference: https://bugreports.qt.io/browse/QTBUG-111994 --- @@ -10,10 +10,10 @@ Reference: https://bugreports.qt.io/browse/QTBUG-111994 1 file changed, 1 insertion(+) diff --git a/src/gui/text/unix/qfontconfigdatabase.cpp b/src/gui/text/unix/qfontconfigdatabase.cpp -index 9b60cf2963..5a42ef6a68 100644 +index 474644b871f..c7a117fd134 100644 --- a/src/gui/text/unix/qfontconfigdatabase.cpp +++ b/src/gui/text/unix/qfontconfigdatabase.cpp -@@ -554,6 +554,7 @@ void QFontconfigDatabase::populateFontDatabase() +@@ -556,6 +556,7 @@ void QFontconfigDatabase::populateFontDatabase() FcObjectSetAdd(os, *p); ++p; } diff --git a/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch b/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch new file mode 100644 index 0000000000000..4933534caffbc --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch @@ -0,0 +1,32 @@ +From 61ae6e04388dd40e11c214d56f22f8f2007bf35f 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 + +The generated qt-cmake scripts embeds the absolute path of cmake used +during the build of qtbase, bloating the runtime closure of qtbase. +--- + bin/qt-cmake.in | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/bin/qt-cmake.in b/bin/qt-cmake.in +index f719257f602..571ffe788fa 100755 +--- a/bin/qt-cmake.in ++++ b/bin/qt-cmake.in +@@ -4,12 +4,7 @@ + script_dir_path=`dirname $0` + script_dir_path=`(cd "$script_dir_path"; /bin/pwd)` + +-# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH. +-original_cmake_path="@CMAKE_COMMAND@" +-cmake_path=$original_cmake_path +-if ! test -f "$cmake_path"; then +- cmake_path="cmake" +-fi ++cmake_path="cmake" + + toolchain_path="$script_dir_path/@__GlobalConfig_relative_path_from_bin_dir_to_cmake_config_dir@/qt.toolchain.cmake" + +-- +2.39.2 + diff --git a/pkgs/development/libraries/qt-6/patches/cmake.patch b/pkgs/development/libraries/qt-6/patches/cmake.patch deleted file mode 100644 index 84192f669696d..0000000000000 --- a/pkgs/development/libraries/qt-6/patches/cmake.patch +++ /dev/null @@ -1,123 +0,0 @@ -commit bd8f6ecea0663bdd150aa48941cbd47d25874396 -Author: Nick Cao <nickcao@nichi.co> -Date: Tue Apr 19 13:49:59 2022 +0800 - - patch cmake file generation for nixpkgs packaging - - As of qt 6.3.0, installing components into different prefixes is not - supported. To workaround that, we move files to their designated in the - postInstall hook. However the generated cmake files still have - references to the original prefix, and would cause issues when using - said components as the dependency of other packages. The purpose of this - patch is to closely match the output layout of qt, and rewrite the - generated cmake files to point to the corrected pathes. - -diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx -index 5a33349b19..677a6084d6 100644 ---- a/Source/cmExportFileGenerator.cxx -+++ b/Source/cmExportFileGenerator.cxx -@@ -7,6 +7,7 @@ - #include <cstring> - #include <sstream> - #include <utility> -+#include <cstdlib> - - #include <cm/memory> - -@@ -330,9 +331,21 @@ static void prefixItems(std::string& exportDirs) - for (std::string const& e : entries) { - exportDirs += sep; - sep = ";"; -- if (!cmSystemTools::FileIsFullPath(e) && -- e.find("${_IMPORT_PREFIX}") == std::string::npos) { -- exportDirs += "${_IMPORT_PREFIX}/"; -+ if (!cmSystemTools::FileIsFullPath(e)) { -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) { -+ exportDirs += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) { -+ exportDirs += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) { -+ exportDirs += std::getenv("dev"); -+ } else { -+ exportDirs += std::getenv("out"); -+ } -+ } else { -+ exportDirs += std::getenv("out"); -+ } -+ exportDirs += "/"; - } - exportDirs += e; - } -diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx -index adccdfeece..ba248305bd 100644 ---- a/Source/cmExportInstallFileGenerator.cxx -+++ b/Source/cmExportInstallFileGenerator.cxx -@@ -6,6 +6,7 @@ - #include <memory> - #include <sstream> - #include <utility> -+#include <cstdlib> - - #include "cmExportSet.h" - #include "cmFileSet.h" -@@ -266,7 +267,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os) - - void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input) - { -- cmGeneratorExpression::ReplaceInstallPrefix(input, "${_IMPORT_PREFIX}"); -+ cmGeneratorExpression::ReplaceInstallPrefix(input, std::getenv("out")); - } - - bool cmExportInstallFileGenerator::GenerateImportFileConfig( -@@ -382,9 +383,22 @@ void cmExportInstallFileGenerator::SetImportLocationProperty( - // Construct the installed location of the target. - std::string dest = itgen->GetDestination(config); - std::string value; -+ - if (!cmSystemTools::FileIsFullPath(dest)) { -- // The target is installed relative to the installation prefix. -- value = "${_IMPORT_PREFIX}/"; -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(dest, "include") || cmHasLiteralPrefix(dest, "./include")) { -+ value = std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(dest, "mkspecs") || cmHasLiteralPrefix(dest, "./mkspecs")) { -+ value = std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(dest, "libexec") || cmHasLiteralPrefix(dest, "./libexec")) { -+ value = std::getenv("dev"); -+ } else { -+ value = std::getenv("out"); -+ } -+ } else { -+ value = std::getenv("out"); -+ } -+ value += "/"; - } - value += dest; - value += "/"; -diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx -index f988e54a19..cc5c7ac9fd 100644 ---- a/Source/cmGeneratorExpression.cxx -+++ b/Source/cmGeneratorExpression.cxx -@@ -192,7 +192,20 @@ static void prefixItems(const std::string& content, std::string& result, - sep = ";"; - if (!cmSystemTools::FileIsFullPath(e) && - cmGeneratorExpression::Find(e) != 0) { -- result += prefix; -+ if (std::getenv("dev")) { -+ if (cmHasLiteralPrefix(e, "include") || cmHasLiteralPrefix(e, "./include")) { -+ result += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "mkspecs") || cmHasLiteralPrefix(e, "./mkspecs")) { -+ result += std::getenv("dev"); -+ } else if (cmHasLiteralPrefix(e, "libexec") || cmHasLiteralPrefix(e, "./libexec")) { -+ result += std::getenv("dev"); -+ } else { -+ result += std::getenv("out"); -+ } -+ } else { -+ result += std::getenv("out"); -+ } -+ result += "/"; - } - result += e; - } diff --git a/pkgs/development/libraries/qt-6/patches/qttools-paths.patch b/pkgs/development/libraries/qt-6/patches/qttools-paths.patch index 9a0acb70b0f4a..6e7b8488fa543 100644 --- a/pkgs/development/libraries/qt-6/patches/qttools-paths.patch +++ b/pkgs/development/libraries/qt-6/patches/qttools-paths.patch @@ -10,9 +10,9 @@ index d355b9dc..94fef33f 100644 +{ + switch (location) { + case QLibraryInfo::BinariesPath: -+ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/bin"); ++ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/bin"); + case QLibraryInfo::LibraryExecutablesPath: -+ return QLatin1String(NIX_OUTPUT_DEV) + QLatin1String("/libexec"); ++ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/libexec"); + default: + return QLibraryInfo::path(location); + } diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch new file mode 100644 index 0000000000000..c7e461945c045 --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch @@ -0,0 +1,16 @@ +diff --git a/src/3rdparty/chromium/net/cert/x509_util_apple.cc b/src/3rdparty/chromium/net/cert/x509_util_apple.cc +index ae69948dfca..7062a9a9b97 100644 +--- a/src/3rdparty/chromium/net/cert/x509_util_apple.cc ++++ b/src/3rdparty/chromium/net/cert/x509_util_apple.cc +@@ -139,11 +139,6 @@ SHA256HashValue CalculateFingerprint256(SecCertificateRef cert) { + + base::ScopedCFTypeRef<CFArrayRef> CertificateChainFromSecTrust( + SecTrustRef trust) { +- if (__builtin_available(macOS 12.0, iOS 15.0, *)) { +- return base::ScopedCFTypeRef<CFArrayRef>( +- SecTrustCopyCertificateChain(trust)); +- } +- + base::ScopedCFTypeRef<CFMutableArrayRef> chain( + CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); + const CFIndex chain_length = SecTrustGetCertificateCount(trust); diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch new file mode 100644 index 0000000000000..86507165bd9c6 --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch @@ -0,0 +1,60 @@ +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 +--- 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" + +-// 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, +-// but there we see frame drops even with ample bitrate budget. Excessive frame +-// drops were fixed in 12.0.1. +-#define LOW_LATENCY_FLAG_AVAILABLE_VER 12.0.1 +- + 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); +- 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 (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { +- if (require_low_delay_) { +- encoder_keys.push_back( +- kVTVideoEncoderSpecification_EnableLowLatencyRateControl); +- encoder_values.push_back(kCFBooleanTrue); +- } +- } + base::ScopedCFTypeRef<CFDictionaryRef> encoder_spec = + video_toolbox::DictionaryWithKeysAndValues( + encoder_keys.data(), encoder_values.data(), encoder_keys.size()); +@@ -669,19 +654,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession() { + } + + if (num_temporal_layers_ == 2) { +- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { +- if (!session_property_setter.IsSupported( +- kVTCompressionPropertyKey_BaseLayerFrameRateFraction)) { +- DLOG(ERROR) << "BaseLayerFrameRateFraction is not supported"; +- return false; +- } +- rv &= session_property_setter.Set( +- kVTCompressionPropertyKey_BaseLayerFrameRateFraction, 0.5); +- DLOG_IF(ERROR, !rv) << " Setting BaseLayerFrameRate property failed."; +- } else { + DLOG(ERROR) << "SVC encoding is not supported on this OS version."; + rv = false; +- } + } + + return rv; diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch new file mode 100644 index 0000000000000..5056550ccecd8 --- /dev/null +++ b/pkgs/development/libraries/qt-6/patches/qtwebengine-xkb-includes.patch @@ -0,0 +1,12 @@ +--- a/src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2023-04-19 21:58:29.127258300 +0900 ++++ b/src/3rdparty/chromium/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 2023-04-19 22:01:35.860196284 +0900 +@@ -637,8 +637,7 @@ + .variant = layout_variant.c_str(), + .options = ""}; + std::unique_ptr<xkb_context, XkbContextDeleter> context; +- context.reset(xkb_context_new(XKB_CONTEXT_NO_DEFAULT_INCLUDES)); +- xkb_context_include_path_append(context.get(), "/usr/share/X11/xkb"); ++ context.reset(xkb_context_new(XKB_CONTEXT_NO_FLAGS)); + std::unique_ptr<xkb_keymap, XkbKeymapDeleter> keymap; + keymap.reset(xkb_keymap_new_from_names(context.get(), &names, + XKB_KEYMAP_COMPILE_NO_FLAGS)); |