diff options
author | 2023-06-17 21:05:29 +0000 | |
---|---|---|
committer | 2023-07-08 06:29:26 +0100 | |
commit | 3c3b356a62beef9feb5aedfa67f93ef38509b139 (patch) | |
tree | f026755a9ab23a0202d37a9d8c42aad727866567 | |
parent | net-misc/connman: treeclean (diff) | |
download | musl-3c3b356a62beef9feb5aedfa67f93ef38509b139.tar.gz musl-3c3b356a62beef9feb5aedfa67f93ef38509b139.tar.bz2 musl-3c3b356a62beef9feb5aedfa67f93ef38509b139.zip |
dev-qt/qtwebengine: Add qt6, bump qt5 version
Signed-off-by: Violet Purcell <vimproved@inventati.org>
Closes: https://github.com/gentoo/musl/pull/481
Signed-off-by: Sam James <sam@gentoo.org>
35 files changed, 1481 insertions, 636 deletions
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest index 282326e1..6cbfc321 100644 --- a/dev-qt/qtwebengine/Manifest +++ b/dev-qt/qtwebengine/Manifest @@ -1,4 +1,4 @@ DIST qtwebengine-5.15.2-r1-chromium87-ppc64le.tar.xz 28784 BLAKE2B aa101d14446f3282fda8932cc75a249d88b79319f0886d95777292776d94ac5f4fc114c3893b2801fbba6abb14f381172bb14b15b5ffef12413db3a16e4d1ca6 SHA512 3324e0076eb18e2ae2248428d2730cfb3413761514b2bb57e25b8db79248aaaa8098d9f7cebfa08f1a3b39b1d0a382aafed75c5ae8273918909335957921305e -DIST qtwebengine-5.15.2_p20211019-jumbo-build.patch.bz2 2930 BLAKE2B fca1d1406874d04eafb64bb4d8730512a6307ba44fb99d76f428ca1bd4a303758e0c3bd8f92a59f7bcf62e5b767c5a8ed239028bdb74ad7a8b62abf88d38c101 SHA512 61cbfbe4ff340b75ea8d356e031e932ac03fe65dd009999ff897ca4b0185d1d989490daf75ffeaaabb3e92c870c11c7ff8ad2cd6372f5363b3d774b8ecca6d89 -DIST qtwebengine-5.15.3_p20220406-patchset.tar.xz 35480 BLAKE2B ce6aeebbb3255196611130d04ee7a3907ba45d6d2a283f2433e2176cf67e473e74137b180de0a9998762cc54439bb06825815e81e9f95f9413ce2956ac9308b7 SHA512 47e29a1429dce2db324929af91c8ef8421c75ae48f5a491db71b434f8017a5b1e7475e9938989e331e8e012220852848565242e09747892e1a8a8d3ab7386840 -DIST qtwebengine-5.15.5_p20220618.tar.xz 320131236 BLAKE2B 842322c94737cdf647277ccf226c0d015ac0b362af54c4298cbad6b4494aa4ef0e73830577fb391be31c91b4331b85f407ec58641897a7cc7237e7623043577d SHA512 b1bab7aa5edc7f7b9d4f8338a05dbbd55ae6e0312e1a7e6061895bd7a98c67780127c20db1dbbc81664bf483a5b8f7ed887cedd1baaa1a0259e28fd4b13d6944 +DIST qtwebengine-5.15.8_p20230313-patchset.tar.xz 45904 BLAKE2B 9f58b9808fd445a06e6a2cd6d5f7bc9782bd6de13138fdebc9e81bd9f69e7ae673a71bd3ed6b011a47e84cc64b5b703a7cfc8d5f740eaaa663da1db8ef9ef05b SHA512 21b0b853358260fa1bdc96c97c5b2af7007c744d10abeebf9f0e708a0cd7dece583d86c0554a4e327a0d615bb403b0d328acaa6622b50d7a8059bc0802edbcec +DIST qtwebengine-5.15.9_p20230505.tar.xz 298713240 BLAKE2B 835e93a0b33e7294d72571c9031524a0e3002100e36433501cc83bac91646b788c1030ee9ce90edce39c6ee2ee61a1d697e021b6346804d3be0f0b930e6084d0 SHA512 61d16399a7d8f5c135c5c097c2dcb7ebeccfe7e31769e950443ffa8178f55ad22d90307b7bd2b2ebdcb3ee0dd2064266159c27da4fc5b35ddac346ca9f336cc1 +DIST qtwebengine-everywhere-src-6.5.1.tar.xz 412377436 BLAKE2B 1ff179daf1433246b931558f52f1cf193eff4a1d646e6f6037a40fe85fa28cf944b7f361fd68cb01b1247680d376762c2c5317be125f5b24cc08e4bbfa6f0def SHA512 68aae60184af6189b70207a458458a3dab23d49891f12ac57ede01a0eb43c403378e7d85baa074d3b12120624eff78d674cbd9112f7d1be84c33ce9bf95ca428 diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230505-clang-16.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230505-clang-16.patch new file mode 100644 index 00000000..d6460de7 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230505-clang-16.patch @@ -0,0 +1,10 @@ +--- qtwebengine-5.15.8_p20230313-orig/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2022-05-13 03:17:44.000000000 +1000 ++++ qtwebengine-5.15.8_p20230313/src/3rdparty/chromium/build/config/compiler/BUILD.gn 2023-04-06 18:09:53.528885245 +1000 +@@ -318,6 +318,7 @@ + "-Wno-parentheses-equality", + "-Wno-tautological-compare", + "-Wno-thread-safety-attributes", ++ "-Wno-enum-constexpr-conversion" + ] + } + diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230505-musl-lfs64.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230505-musl-lfs64.patch new file mode 100644 index 00000000..ba796896 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.10_p20230505-musl-lfs64.patch @@ -0,0 +1,37 @@ +--- a/src/3rdparty/gn/base/files/file.h ++++ b/src/3rdparty/gn/base/files/file.h +@@ -26,7 +26,7 @@ namespace base { + defined(OS_ANDROID) && __ANDROID_API__ < 21 + typedef struct stat stat_wrapper_t; + #elif defined(OS_POSIX) || defined(OS_FUCHSIA) +-typedef struct stat64 stat_wrapper_t; ++typedef struct stat stat_wrapper_t; + #endif + + // Thin wrapper around an OS-level file. +--- a/src/3rdparty/gn/base/files/file_posix.cc ++++ b/src/3rdparty/gn/base/files/file_posix.cc +@@ -32,7 +32,7 @@ int CallFstat(int fd, stat_wrapper_t* sb + } + #else + int CallFstat(int fd, stat_wrapper_t* sb) { +- return fstat64(fd, sb); ++ return fstat(fd, sb); + } + #endif + +--- a/src/3rdparty/gn/base/files/file_util_posix.cc ++++ b/src/3rdparty/gn/base/files/file_util_posix.cc +@@ -70,10 +70,10 @@ int CallLstat(const char* path, stat_wra + } + #else + int CallStat(const char* path, stat_wrapper_t* sb) { +- return stat64(path, sb); ++ return stat(path, sb); + } + int CallLstat(const char* path, stat_wrapper_t* sb) { +- return lstat64(path, sb); ++ return lstat(path, sb); + } + #endif + diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2-disable-fatal-warnings.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2-disable-fatal-warnings.patch deleted file mode 100644 index b0f5f3d3..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2-disable-fatal-warnings.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri -index cf990c79..910a88ca 100644 ---- a/src/buildtools/config/common.pri -+++ b/src/buildtools/config/common.pri -@@ -26,6 +26,7 @@ gn_args += \ - skia_use_dawn=false \ - toolkit_views=false \ - treat_warnings_as_errors=false \ -+ fatal_linker_warnings=false \ - use_allocator_shim=false \ - use_allocator=\"none\" \ - use_custom_libcxx=false \ diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch deleted file mode 100644 index a6856975..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch +++ /dev/null @@ -1,192 +0,0 @@ -From b0a7f5691113534c2cf771f2dd3cece5e93bc7d4 Mon Sep 17 00:00:00 2001 -From: Frank Tang <ftang@chromium.org> -Date: Tue, 03 Nov 2020 23:20:37 -0800 -Subject: [PATCH] Update to ICU68-1 - -ICU68-1 change the output skeleton format. So we need to change -resolvedOptions code for 68 migration. - -Chromium roll -https://chromium-review.googlesource.com/c/chromium/src/+/2474093 - -Bug: v8:10945 -Change-Id: I3b2c7fbe8abb22df8fa51287c498ca3245b8c55b -Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477431 -Commit-Queue: Frank Tang <ftang@chromium.org> -Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> -Reviewed-by: Shu-yu Guo <syg@chromium.org> -Cr-Commit-Position: refs/heads/master@{#70972} - -(ported to work with <ICU-68.1 and rebased chromium) ---- - -diff --git a/src/3rdparty/chromium/v8/src/objects/js-number-format.cc b/src/3rdparty/chromium/v8/src/objects/js-number-format.cc -index 45b0eab..d18b133 100644 ---- a/src/3rdparty/chromium/v8/src/objects/js-number-format.cc -+++ b/src/3rdparty/chromium/v8/src/objects/js-number-format.cc -@@ -389,17 +389,20 @@ Handle<String> CurrencySignString(Isolate* isolate, - Handle<String> UnitDisplayString(Isolate* isolate, - const icu::UnicodeString& skeleton) { - // Ex: skeleton as -- // "measure-unit/length-meter .### rounding-mode-half-up unit-width-full-name" -+ // <ICU-68.1: "measure-unit/length-meter .### rounding-mode-half-up unit-width-full-name". -+ // >=ICU-68.1: "unit/length-meter .### rounding-mode-half-up unit-width-full-name" - if (skeleton.indexOf("unit-width-full-name") >= 0) { - return ReadOnlyRoots(isolate).long_string_handle(); - } - // Ex: skeleton as -- // "measure-unit/length-meter .### rounding-mode-half-up unit-width-narrow". -+ // <ICU-68.1: "measure-unit/length-meter .### rounding-mode-half-up unit-width-narrow". -+ // >=ICU-68.1: "unit/length-meter .### rounding-mode-half-up unit-width-narrow". - if (skeleton.indexOf("unit-width-narrow") >= 0) { - return ReadOnlyRoots(isolate).narrow_string_handle(); - } - // Ex: skeleton as -- // "measure-unit/length-foot .### rounding-mode-half-up" -+ // <ICU-68.1: "measure-unit/length-foot .### rounding-mode-half-up" -+ // >=ICU-68.1: "unit/length-foot .### rounding-mode-half-up" - return ReadOnlyRoots(isolate).short_string_handle(); - } - -@@ -422,7 +425,8 @@ Notation NotationFromSkeleton(const icu::UnicodeString& skeleton) { - return Notation::COMPACT; - } - // Ex: skeleton as -- // "measure-unit/length-foot .### rounding-mode-half-up" -+ // <ICU-68.1: "measure-unit/length-foot .### rounding-mode-half-up" -+ // >=ICU-68.1: "unit/length-foot .### rounding-mode-half-up" - return Notation::STANDARD; - } - -@@ -562,14 +566,23 @@ namespace { - - // Ex: percent .### rounding-mode-half-up - // Special case for "percent" --// Ex: "measure-unit/length-kilometer per-measure-unit/duration-hour .### --// rounding-mode-half-up" should return "kilometer-per-unit". --// Ex: "measure-unit/duration-year .### rounding-mode-half-up" should return --// "year". -+// <ICU-68.1: -+// Ex: "measure-unit/length-kilometer per-measure-unit/duration-hour .### -+// rounding-mode-half-up" should return "kilometer-per-unit". -+// Ex: "measure-unit/duration-year .### rounding-mode-half-up" should return -+// >=ICU-68.1: -+// Ex: "unit/milliliter-per-acre .### rounding-mode-half-up" -+// should return "milliliter-per-acre". -+// Ex: "unit/year .### rounding-mode-half-up" should return -+// "year". - std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { - std::string str; - str = skeleton.toUTF8String<std::string>(str); -+#if U_ICU_VERSION_MAJOR_NUM < 68 - std::string search("measure-unit/"); -+#else -+ std::string search("unit/"); -+#endif - size_t begin = str.find(search); - if (begin == str.npos) { - // Special case for "percent". -@@ -578,20 +591,41 @@ std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { - } - return ""; - } -+#if U_ICU_VERSION_MAJOR_NUM < 68 - // Skip the type (ex: "length"). - // "measure-unit/length-kilometer per-measure-unit/duration-hour" - // b - begin = str.find("-", begin + search.size()); -+#else -+ // Ex: -+ // "unit/acre .### rounding-mode-half-up" -+ // b -+ // Ex: -+ // "unit/milliliter-per-acre .### rounding-mode-half-up" -+ // b -+ begin += search.size(); -+#endif - if (begin == str.npos) { - return ""; - } -+#if U_ICU_VERSION_MAJOR_NUM < 68 - begin++; // Skip the '-'. -+#endif - // Find the end of the subtype. - size_t end = str.find(" ", begin); -- // "measure-unit/length-kilometer per-measure-unit/duration-hour" -- // b e -+ // <ICU-68.1: -+ // "measure-unit/length-kilometer per-measure-unit/duration-hour" -+ // b e -+ // >=ICU-68.1: -+ // Ex: -+ // "unit/acre .### rounding-mode-half-up" -+ // b e -+ // Ex: -+ // "unit/milliliter-per-acre .### rounding-mode-half-up" -+ // b e - if (end == str.npos) { - end = str.size(); -+#if U_ICU_VERSION_MAJOR_NUM < 68 - return str.substr(begin, end - begin); - } - // "measure-unit/length-kilometer per-measure-unit/duration-hour" -@@ -625,17 +659,36 @@ std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { - // "measure-unit/length-kilometer per-measure-unit/duration-hour" - // [result ] b e - return result + "-per-" + str.substr(begin, end - begin); -+#else -+ } -+ return str.substr(begin, end - begin); -+#endif - } - - Style StyleFromSkeleton(const icu::UnicodeString& skeleton) { - if (skeleton.indexOf("currency/") >= 0) { - return Style::CURRENCY; - } -+#if U_ICU_VERSION_MAJOR_NUM < 68 - if (skeleton.indexOf("measure-unit/") >= 0) { - if (skeleton.indexOf("scale/100") >= 0 && - skeleton.indexOf("measure-unit/concentr-percent") >= 0) { -+#else -+ if (skeleton.indexOf("percent") >= 0) { -+ // percent precision-integer rounding-mode-half-up scale/100 -+ if (skeleton.indexOf("scale/100") >= 0) { -+#endif - return Style::PERCENT; -+#if U_ICU_VERSION_MAJOR_NUM >= 68 -+ } else { -+ return Style::UNIT; -+#endif - } -+#if U_ICU_VERSION_MAJOR_NUM >= 68 -+ } -+ // Before ICU68: "measure-unit/", since ICU68 "unit/" -+ if (skeleton.indexOf("unit/") >= 0) { -+#endif - return Style::UNIT; - } - return Style::DECIMAL; -diff --git a/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc b/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc -index 267343aaae..64d56a1c12 100644 ---- a/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc -+++ b/src/3rdparty/chromium/v8/src/objects/js-relative-time-format.cc -@@ -195,9 +195,18 @@ MaybeHandle<JSRelativeTimeFormat> JSRelativeTimeFormat::New( - } - } - -+#if U_ICU_VERSION_MAJOR_NUM < 68 - icu::DecimalFormat* decimal_format = - static_cast<icu::DecimalFormat*>(number_format); - decimal_format->setMinimumGroupingDigits(-2); -+#else -+ if (number_format->getDynamicClassID() == -+ icu::DecimalFormat::getStaticClassID()) { -+ icu::DecimalFormat* decimal_format = -+ static_cast<icu::DecimalFormat*>(number_format); -+ decimal_format->setMinimumGroupingDigits(-2); -+ } -+#endif - - // Change UDISPCTX_CAPITALIZATION_NONE to other values if - // ECMA402 later include option to change capitalization. diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-disable-git.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-disable-git.patch deleted file mode 100644 index c31e8970..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-disable-git.patch +++ /dev/null @@ -1,15 +0,0 @@ -generate_gni.sh: update_readme() runs git at the end of process, prevent it. - -Thanks-to: Georgy Yakovlev <gyakovlev@gentoo.org> - ---- a/src/3rdparty/chromium/third_party/libvpx/generate_gni.sh 2021-02-07 12:51:49.438514897 +0100 -+++ b/src/3rdparty/chromium/third_party/libvpx/generate_gni.sh 2021-02-21 16:23:38.375724515 +0100 -@@ -519,8 +519,3 @@ - - gn format --in-place $BASE_DIR/BUILD.gn - gn format --in-place $BASE_DIR/libvpx_srcs.gni -- --cd $BASE_DIR/$LIBVPX_SRC_DIR --update_readme -- --cd $BASE_DIR diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch deleted file mode 100644 index b3c2ffb3..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch +++ /dev/null @@ -1,79 +0,0 @@ -Description: Use system lcms2 -Author: Sandro Knauß <hefee@debian.org> -Origin: Debian -Forwarded: https://bugreports.qt.io/browse/QTBUG-61746 -Reviewed-by: Sandro Knauß <hefee@debian.org> -Last-Update: 2021-03-08 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn -+++ b/src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn -@@ -239,58 +239,19 @@ if (!pdf_use_skia && !pdf_use_skia_paths - } - } - --config("fx_lcms2_warnings") { -- visibility = [ ":*" ] -- if (is_clang) { -- cflags = [ -- # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this -- # library doesn't appear to have this problem. -- "-Wno-missing-braces", -- ] -- } -+import("//build/shim_headers.gni") -+ -+shim_headers("lcms2_shim") { -+ root_path = "lcms/include" -+ headers = [ -+ "lcms2.h", -+ "lcms2_plugin.h", -+ ] - } - - source_set("fx_lcms2") { -- configs -= [ "//build/config/compiler:chromium_code" ] -- configs += [ -- "//build/config/compiler:no_chromium_code", -- "//build/config/sanitizers:cfi_icall_generalize_pointers", -- ":pdfium_third_party_config", -- -- # Must be after no_chromium_code for warning flags to be ordered correctly. -- ":fx_lcms2_warnings", -- ] -- sources = [ -- "lcms/include/lcms2.h", -- "lcms/include/lcms2_plugin.h", -- "lcms/src/cmsalpha.c", -- "lcms/src/cmscam02.c", -- "lcms/src/cmscgats.c", -- "lcms/src/cmscnvrt.c", -- "lcms/src/cmserr.c", -- "lcms/src/cmsgamma.c", -- "lcms/src/cmsgmt.c", -- "lcms/src/cmshalf.c", -- "lcms/src/cmsintrp.c", -- "lcms/src/cmsio0.c", -- "lcms/src/cmsio1.c", -- "lcms/src/cmslut.c", -- "lcms/src/cmsmd5.c", -- "lcms/src/cmsmtrx.c", -- "lcms/src/cmsnamed.c", -- "lcms/src/cmsopt.c", -- "lcms/src/cmspack.c", -- "lcms/src/cmspcs.c", -- "lcms/src/cmsplugin.c", -- "lcms/src/cmsps2.c", -- "lcms/src/cmssamp.c", -- "lcms/src/cmssm.c", -- "lcms/src/cmstypes.c", -- "lcms/src/cmsvirt.c", -- "lcms/src/cmswtpnt.c", -- "lcms/src/cmsxform.c", -- ] -- deps = [ "../core/fxcrt" ] -+ deps = [ ":lcms2_shim" ] -+ libs = ["lcms2"] - } - - if (!build_with_chromium) { diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220329-clang14.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220329-clang14.patch deleted file mode 100644 index c1a98d09..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220329-clang14.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0825e7bc64e47d87e1f1026cc80c933550f114f5 Mon Sep 17 00:00:00 2001 -From: Dimitry Andric <dim@FreeBSD.org> -Date: Mon, 14 Feb 2022 13:55:25 +0100 -Subject: www/qt5-webengine: fix build with clang 14 - -Fixes compile error: - -In file included from gen/third_party/blink/renderer/platform/platform_jumbo_63.cc:8: -src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc:122:15: error: anonymous non-C-compatible type given name for linkage purposes by typedef declaration after its linkage was computed; add a tag name here to establish linkage prior to definition -typedef struct { - ^ - UTextWithBuffer -src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc:123:3: note: type is not C-compatible due to this member declaration - DISALLOW_NEW(); - ^~~~~~~~~~~~~~ -src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/allocator/allocator.h:40:2: note: expanded from macro 'DISALLOW_NEW' - public: \ - ^~~~~~~ -src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc:126:3: note: type is given name 'UTextWithBuffer' for linkage purposes by this typedef declaration -} UTextWithBuffer; - ^ - -PR: 261949 -Approved by: adridg (maintainer) -MFH: 2022Q1 - ---- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc -+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc -@@ -119,11 +119,11 @@ enum TextContext { kNoContext, kPriorContext, kPrimary - - const int kTextBufferCapacity = 16; - --typedef struct { -+struct UTextWithBuffer { - DISALLOW_NEW(); - UText text; - UChar buffer[kTextBufferCapacity]; --} UTextWithBuffer; -+}; - - static inline int64_t TextPinIndex(int64_t& index, int64_t limit) { - if (index < 0) diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220406-ffmpeg5.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220406-ffmpeg5.patch deleted file mode 100644 index 15c19266..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220406-ffmpeg5.patch +++ /dev/null @@ -1,169 +0,0 @@ -From 05f6ffbbce0a2aad01dc05d682cbe4a1ec44fad5 Mon Sep 17 00:00:00 2001 -From: Antonio Rojas <arojas@archlinux.org> -Date: Tue, 25 Jan 2022 10:51:58 +0000 -Subject: [PATCH] Fix build with ffmpeg 5 - ---- - chromium/media/ffmpeg/ffmpeg_common.h | 1 + - chromium/media/filters/audio_file_reader.cc | 2 +- - chromium/media/filters/ffmpeg_audio_decoder.cc | 2 +- - chromium/media/filters/ffmpeg_demuxer.cc | 12 ++++++------ - chromium/media/filters/ffmpeg_glue.cc | 4 ---- - chromium/media/filters/ffmpeg_video_decoder.cc | 2 +- - chromium/media/filters/media_file_checker.cc | 2 +- - .../video_coding/codecs/h264/h264_decoder_impl.cc | 2 +- - 8 files changed, 12 insertions(+), 15 deletions(-) - -diff --git a/chromium/media/ffmpeg/ffmpeg_common.h b/chromium/media/ffmpeg/ffmpeg_common.h -index 2734a485cbd..70b1877a43c 100644 ---- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h -+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h -@@ -29,6 +29,7 @@ extern "C" { - #include <libavformat/avformat.h> - #include <libavformat/avio.h> - #include <libavutil/avutil.h> -+#include <libavutil/channel_layout.h> - #include <libavutil/imgutils.h> - #include <libavutil/log.h> - #include <libavutil/mastering_display_metadata.h> -diff --git a/chromium/media/filters/audio_file_reader.cc b/chromium/media/filters/audio_file_reader.cc -index cb81d920def..bd73908d0ca 100644 ---- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc -+++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc -@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() { - } - - bool AudioFileReader::OpenDecoder() { -- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); -+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); - if (codec) { - // MP3 decodes to S16P which we don't support, tell it to use S16 instead. - if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P) -diff --git a/chromium/media/filters/ffmpeg_audio_decoder.cc b/chromium/media/filters/ffmpeg_audio_decoder.cc -index 0d825ed791b..72fac6167ef 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc -@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) { - } - } - -- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); -+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); - if (!codec || - avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) { - DLOG(ERROR) << "Could not initialize audio decoder: " -diff --git a/chromium/media/filters/ffmpeg_demuxer.cc b/chromium/media/filters/ffmpeg_demuxer.cc -index d34db63f3ef..427565b00c1 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc -@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) { - - // Next try to use the first DTS value, for codecs where we know PTS == DTS - // (excludes all H26x codecs). The start time must be returned in PTS. -- if (stream->first_dts != kNoFFmpegTimestamp && -+ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && - stream->codecpar->codec_id != AV_CODEC_ID_HEVC && - stream->codecpar->codec_id != AV_CODEC_ID_H264 && - stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { - const base::TimeDelta first_pts = -- ConvertFromTimeBase(stream->time_base, stream->first_dts); -+ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); - if (first_pts < start_time) - start_time = first_pts; - } -@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { - scoped_refptr<DecoderBuffer> buffer; - - if (type() == DemuxerStream::TEXT) { -- int id_size = 0; -+ size_t id_size = 0; - uint8_t* id_data = av_packet_get_side_data( - packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size); - -- int settings_size = 0; -+ size_t settings_size = 0; - uint8_t* settings_data = av_packet_get_side_data( - packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size); - -@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { - buffer = DecoderBuffer::CopyFrom(packet->data, packet->size, - side_data.data(), side_data.size()); - } else { -- int side_data_size = 0; -+ size_t side_data_size = 0; - uint8_t* side_data = av_packet_get_side_data( - packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size); - -@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { - packet->size - data_offset); - } - -- int skip_samples_size = 0; -+ size_t skip_samples_size = 0; - const uint32_t* skip_samples_ptr = - reinterpret_cast<const uint32_t*>(av_packet_get_side_data( - packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size)); -diff --git a/chromium/media/filters/ffmpeg_glue.cc b/chromium/media/filters/ffmpeg_glue.cc -index 0ef3521473d..8483ecc348f 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc -@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* opaque, int64_t offset, int whence) { - } - - void FFmpegGlue::InitializeFFmpeg() { -- av_register_all(); - } - - static void LogContainer(bool is_local_file, -@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) { - // Enable fast, but inaccurate seeks for MP3. - format_context_->flags |= AVFMT_FLAG_FAST_SEEK; - -- // Ensures we can read out various metadata bits like vp8 alpha. -- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA; -- - // Ensures format parsing errors will bail out. From an audit on 11/2017, all - // instances were real failures. Solves bugs like http://crbug.com/710791. - format_context_->error_recognition |= AV_EF_EXPLODE; -diff --git a/chromium/media/filters/ffmpeg_video_decoder.cc b/chromium/media/filters/ffmpeg_video_decoder.cc -index ef12477ee89..7996606f5f9 100644 ---- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -+++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc -@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config, - if (decode_nalus_) - codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS; - -- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); -+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id); - if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) { - ReleaseFFmpegResources(); - return false; -diff --git a/chromium/media/filters/media_file_checker.cc b/chromium/media/filters/media_file_checker.cc -index 59c2a2fc618..1a9872c7acb 100644 ---- a/src/3rdparty/chromium/media/filters/media_file_checker.cc -+++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc -@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) { - auto context = AVStreamToAVCodecContext(format_context->streams[i]); - if (!context) - continue; -- AVCodec* codec = avcodec_find_decoder(cp->codec_id); -+ const AVCodec* codec = avcodec_find_decoder(cp->codec_id); - if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) { - auto loop = std::make_unique<FFmpegDecodingLoop>(context.get()); - stream_contexts[i] = {std::move(context), std::move(loop)}; -diff --git a/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc -index 9002b874611..d12fade8b63 100644 ---- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc -+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc -@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings, - // a pointer |this|. - av_context_->opaque = this; - -- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id); -+ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id); - if (!codec) { - // This is an indication that FFmpeg has not been initialized or it has not - // been compiled/initialized with the correct set of codecs. --- -2.35.1 - diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220406-gcc12-includes.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220406-gcc12-includes.patch deleted file mode 100644 index cd476564..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220406-gcc12-includes.patch +++ /dev/null @@ -1,32 +0,0 @@ -https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtwebengine/0001-skia-Some-includes-to-fix-build-with-GCC-12.patch?expand=1 -https://bugs.gentoo.org/840326 - -From 68799a1e0815b20ca59ce354a55280399257a201 Mon Sep 17 00:00:00 2001 -From: Fabian Vogt <fvogt@suse.de> -Date: Fri, 25 Mar 2022 15:29:28 +0100 -Subject: [PATCH] skia: Some includes to fix build with GCC 12 - -Those includes got introduced upstream for other reasons and fixed building -with GCC 12 as a side effect. ---- a/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h -+++ b/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h -@@ -12,6 +12,8 @@ - #include "include/core/SkScalar.h" - #include "include/core/SkTypes.h" - -+#include <array> -+ - /** \file SkColor.h - - Types, consts, functions, and macros for colors. ---- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp -+++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp -@@ -8,6 +8,8 @@ - - #include "include/utils/SkParse.h" - -+#include <algorithm> // std::lower_bound -+ - static constexpr const char* gColorNames[] = { - "aliceblue", - "antiquewhite", diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220505-extra-gn.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220505-extra-gn.patch deleted file mode 100644 index a319f521..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.3_p20220505-extra-gn.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/core/gn_run.pro -+++ b/src/core/gn_run.pro -@@ -64,6 +64,7 @@ - } - } else { - gn_args+= "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\"" -+ gn_args += $$(EXTRA_GN) - gn_args = $$system_quote($$gn_args) - gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir())) - gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-fixup-CVE-2022-0796.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-fixup-CVE-2022-0796.patch deleted file mode 100644 index c38bf1bd..00000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.15.5_p20220618-fixup-CVE-2022-0796.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 7e11d69b957595a172a3eb60db17141daed29d63 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20Br=C3=BCning?= <michael.bruning@qt.io> -Date: Mon, 20 Jun 2022 17:19:58 +0200 -Subject: Fixup: CVE-2022-0796: Use after free in Media - -Commit ecc2bb74f1f accidentally introduced a build break due to an -apparent typo. - -This fixes it. - -Change-Id: I746c6f10ecd2b212b847a291677e24e527d6b922 -Reviewed-by: Michal Klocek <michal.klocek@qt.io> ---- - chromium/content/renderer/media/batching_media_log.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/3rdparty/chromium/content/renderer/media/batching_media_log.h b/src/3rdparty/chromium/content/renderer/media/batching_media_log.h -index b68535aea42..a28d426878f 100644 ---- a/src/3rdparty/chromium/content/renderer/media/batching_media_log.h -+++ b/src/3rdparty/chromium/content/renderer/media/batching_media_log.h -@@ -72,18 +72,18 @@ class CONTENT_EXPORT BatchingMediaLog : public media::MediaLog { - // guarantees provided by MediaLog, since SendQueuedMediaEvents must also - // be synchronized with respect to AddEvent. - mutable base::Lock lock_; -- const base::TickClock* tick_clock_ GUARDED_BY(LOCK); -- base::TimeTicks last_ipc_send_time_ GUARDED_BY(LOCK); -- std::vector<media::MediaLogRecord> queued_media_events_ GUARDED_BY(LOCK); -+ const base::TickClock* tick_clock_ GUARDED_BY(lock_); -+ base::TimeTicks last_ipc_send_time_ GUARDED_BY(lock_); -+ std::vector<media::MediaLogRecord> queued_media_events_ GUARDED_BY(lock_); - - // impl for sending queued events. -- std::vector<std::unique_ptr<EventHandler>> event_handlers_ GUARDED_BY(LOCK); -+ std::vector<std::unique_ptr<EventHandler>> event_handlers_ GUARDED_BY(lock_); - - // For enforcing max 1 pending send. -- bool ipc_send_pending_ GUARDED_BY(LOCK); -+ bool ipc_send_pending_ GUARDED_BY(lock_); - - // Limits the number of events we send over IPC to one. -- std::unique_ptr<media::MediaLogRecord> last_duration_changed_event_ GUARDED_BY(LOCK); -+ std::unique_ptr<media::MediaLogRecord> last_duration_changed_event_ GUARDED_BY(lock_); - - // Holds the earliest MEDIA_ERROR_LOG_ENTRY event added to this log. This is - // most likely to contain the most specific information available describing --- -cgit v1.2.1 - diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-clang-libc++.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-clang-libc++.patch new file mode 100644 index 00000000..ac9c4db9 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-clang-libc++.patch @@ -0,0 +1,11 @@ +--- a/src/gn/CMakeLists.txt ++++ b/src/gn/CMakeLists.txt +@@ -46,6 +46,7 @@ add_custom_command( + --ld ${GN_LINKER} + --ar ${CMAKE_AR} + --qt-version "${QT_REPO_MODULE_VERSION}.qtwebengine.qt.io" ++ --no-static-libstdc++ + $<$<PLATFORM_ID:Darwin>:--isysroot> + $<$<PLATFORM_ID:Darwin>:${CMAKE_OSX_SYSROOT}> + COMMAND Ninja::ninja -C ${GN_BINARY_DIR}/$<CONFIG> ${GN_EXECUTABLE} + diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-canonicalize-file-name.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-canonicalize-file-name.patch new file mode 100644 index 00000000..c192269a --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-canonicalize-file-name.patch @@ -0,0 +1,16 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0010-canonicalize-file-name.patch + +no canonicalize_file_name on musl. funnily, the file using this says this is +not portable, but avoids the nonportability of realpath(path, NULL); + +--- a/src/3rdparty/chromium/third_party/nasm/config/config-linux.h ++++ b/src/3rdparty/chromium/third_party/nasm/config/config-linux.h +@@ -139,7 +139,7 @@ + #define HAVE_ACCESS 1 + + /* Define to 1 if you have the `canonicalize_file_name' function. */ +-#define HAVE_CANONICALIZE_FILE_NAME 1 ++/* #define HAVE_CANONICALIZE_FILE_NAME 1 */ + + /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */ + /* #undef HAVE_CPU_TO_LE16 */ diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch new file mode 100644 index 00000000..208ab64f --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch @@ -0,0 +1,33 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0009-close.patch + +--- a/src/3rdparty/chromium/base/files/scoped_file_linux.cc ++++ b/src/3rdparty/chromium/base/files/scoped_file_linux.cc +@@ -7,6 +7,7 @@ + #include <algorithm> + #include <array> + #include <atomic> ++#include <dlfcn.h> + + #include "base/compiler_specific.h" + #include "base/debug/stack_trace.h" +@@ -80,9 +81,18 @@ + + extern "C" { + +-int __close(int); +- + __attribute__((visibility("default"), noinline)) int close(int fd) { ++ static int (*__close)(int) = nullptr; ++ ++ if (__close == nullptr) { ++ __close = (int (*)(int))dlsym(RTLD_NEXT, "close"); ++ ++ if (__close == nullptr) { ++ RAW_LOG(ERROR, "musl close not found\n"); ++ IMMEDIATE_CRASH(); ++ } ++ } ++ + if (base::IsFDOwned(fd) && g_is_ownership_enforced) + CrashOnFdOwnershipViolation(); + return __close(fd); diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-crashpad.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-crashpad.patch new file mode 100644 index 00000000..ed3ca52c --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-crashpad.patch @@ -0,0 +1,13 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0005-qt-musl-crashpad.patch + +--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h ++++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h +@@ -273,7 +273,7 @@ union FloatContext { + "Size mismatch"); + #elif defined(ARCH_CPU_ARMEL) + static_assert(sizeof(f32_t::fpregs) == sizeof(user_fpregs), "Size mismatch"); +-#if !defined(__GLIBC__) ++#if defined(OS_ANDROID) + static_assert(sizeof(f32_t::vfp) == sizeof(user_vfp), "Size mismatch"); + #endif + #elif defined(ARCH_CPU_ARM64) diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-default-pthread-stacksize.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-default-pthread-stacksize.patch new file mode 100644 index 00000000..f9f63734 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-default-pthread-stacksize.patch @@ -0,0 +1,23 @@ +--- a/src/3rdparty/chromium/base/threading/platform_thread_linux.cc ++++ b/src/3rdparty/chromium/base/threading/platform_thread_linux.cc +@@ -186,7 +186,8 @@ + + size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { + #if !defined(THREAD_SANITIZER) +- return 0; ++ // use 2mb to avoid running out of space. This is what android uses ++ return 2 * (1 << 20); + #else + // ThreadSanitizer bloats the stack heavily. Evidence has been that the + // default stack size isn't enough for some browser tests. +--- a/src/3rdparty/chromium/base/threading/platform_thread_unittest.cc.orig ++++ b/src/3rdparty/chromium/base/threading/platform_thread_unittest.cc +@@ -411,7 +411,7 @@ + ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \ + !defined(THREAD_SANITIZER)) || \ + (BUILDFLAG(IS_ANDROID) && !defined(ADDRESS_SANITIZER)) +- EXPECT_EQ(0u, stack_size); ++ EXPECT_EQ(2u << 20, stack_size); + #else + EXPECT_GT(stack_size, 0u); + EXPECT_LT(stack_size, 20u * (1 << 20)); diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-disable-glibc-check.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-disable-glibc-check.patch new file mode 100644 index 00000000..ef690267 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-disable-glibc-check.patch @@ -0,0 +1,21 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/remove-glibc-check.patch + +Qt checks if glibc is available and if not disables large part of Qt6WebEngine and thus cripples functionality. +However these parts work fine with Musl so there is no need to disable them. - Alpine + +Just remove the check so it builds again. + +--- a/configure.cmake ++++ b/configure.cmake +@@ -403,11 +403,6 @@ add_check_for_support( + CONDITION NOT LINUX OR PkgConfig_FOUND + MESSAGE "A pkg-config support is required." + ) +-add_check_for_support( +- MODULES QtWebEngine QtPdf +- CONDITION NOT LINUX OR TEST_glibc +- MESSAGE "A suitable version >= 2.17 of glibc is required." +-) + add_check_for_support( + MODULES QtWebEngine QtPdf + CONDITION NOT LINUX OR TEST_khr diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-fix-narrowing-cast.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-fix-narrowing-cast.patch new file mode 100644 index 00000000..e76cc996 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-fix-narrowing-cast.patch @@ -0,0 +1,44 @@ +--- a/src/3rdparty/chromium/base/files/file_util_linux.cc ++++ b/src/3rdparty/chromium/base/files/file_util_linux.cc +@@ -30,7 +30,7 @@ + case EXT2_SUPER_MAGIC: // Also ext3 and ext4 + case MSDOS_SUPER_MAGIC: + case REISERFS_SUPER_MAGIC: +- case static_cast<int>(BTRFS_SUPER_MAGIC): ++ case BTRFS_SUPER_MAGIC: + case 0x5346544E: // NTFS + case 0x58465342: // XFS + case 0x3153464A: // JFS +@@ -40,14 +40,14 @@ + *type = FILE_SYSTEM_NFS; + break; + case SMB_SUPER_MAGIC: +- case static_cast<int>(0xFF534D42): // CIFS ++ case 0xFF534D42: // CIFS + *type = FILE_SYSTEM_SMB; + break; + case CODA_SUPER_MAGIC: + *type = FILE_SYSTEM_CODA; + break; +- case static_cast<int>(HUGETLBFS_MAGIC): +- case static_cast<int>(RAMFS_MAGIC): ++ case HUGETLBFS_MAGIC: ++ case RAMFS_MAGIC: + case TMPFS_MAGIC: + *type = FILE_SYSTEM_MEMORY; + break; +--- a/src/3rdparty/chromium/base/system/sys_info_posix.cc ++++ b/src/3rdparty/chromium/base/system/sys_info_posix.cc +@@ -100,10 +100,10 @@ + if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0) + return false; + + switch (stats.f_type) { + case TMPFS_MAGIC: +- case static_cast<int>(HUGETLBFS_MAGIC): +- case static_cast<int>(RAMFS_MAGIC): ++ case HUGETLBFS_MAGIC: ++ case RAMFS_MAGIC: + return true; + } + return false; diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-lfs64.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-lfs64.patch new file mode 100644 index 00000000..55a8785f --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-lfs64.patch @@ -0,0 +1,37 @@ +--- a/src/3rdparty/gn/src/base/files/file.h ++++ b/src/3rdparty/gn/src/base/files/file.h +@@ -26,7 +26,7 @@ namespace base { + defined(OS_ANDROID) && __ANDROID_API__ < 21 + typedef struct stat stat_wrapper_t; + #elif defined(OS_POSIX) || defined(OS_FUCHSIA) +-typedef struct stat64 stat_wrapper_t; ++typedef struct stat stat_wrapper_t; + #endif + + // Thin wrapper around an OS-level file. +--- a/src/3rdparty/gn/src/base/files/file_posix.cc ++++ b/src/3rdparty/gn/src/base/files/file_posix.cc +@@ -32,7 +32,7 @@ int CallFstat(int fd, stat_wrapper_t* sb + } + #else + int CallFstat(int fd, stat_wrapper_t* sb) { +- return fstat64(fd, sb); ++ return fstat(fd, sb); + } + #endif + +--- a/src/3rdparty/gn/src/base/files/file_util_posix.cc ++++ b/src/3rdparty/gn/src/base/files/file_util_posix.cc +@@ -70,10 +70,10 @@ int CallLstat(const char* path, stat_wra + } + #else + int CallStat(const char* path, stat_wrapper_t* sb) { +- return stat64(path, sb); ++ return stat(path, sb); + } + int CallLstat(const char* path, stat_wrapper_t* sb) { +- return lstat64(path, sb); ++ return lstat(path, sb); + } + #endif + diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-mallinfo.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-mallinfo.patch new file mode 100644 index 00000000..c45e1468 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-mallinfo.patch @@ -0,0 +1,75 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0003-qt-musl-mallinfo.patch + +musl does not implement mallinfo()/mallinfo2() +(or rather, malloc-ng, musl's allocator, doesn't) +-- +--- a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc ++++ b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc +@@ -185,7 +185,6 @@ + #define MALLINFO2_FOUND_IN_LIBC + struct mallinfo2 info = mallinfo2(); + #endif +-#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ) + #if !defined(MALLINFO2_FOUND_IN_LIBC) + struct mallinfo info = mallinfo(); + #endif +@@ -205,6 +204,7 @@ + sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize, + MemoryAllocatorDump::kUnitsBytes, info.uordblks); + } ++#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ) + } + #endif + +@@ -339,7 +340,7 @@ + &allocated_objects_count); + #elif BUILDFLAG(IS_FUCHSIA) + // TODO(fuchsia): Port, see https://crbug.com/706592. +-#else ++#elif defined(__GLIBC__) + ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size, + &allocated_objects_size, &allocated_objects_count); + #endif +--- a/src/3rdparty/chromium/base/process/process_metrics_posix.cc ++++ b/src/3rdparty/chromium/base/process/process_metrics_posix.cc +@@ -105,7 +105,7 @@ + + #endif // !BUILDFLAG(IS_FUCHSIA) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + namespace { + + size_t GetMallocUsageMallinfo() { +@@ -123,7 +123,7 @@ + } + + } // namespace +-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || ++#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + + size_t ProcessMetrics::GetMallocUsage() { +@@ -131,9 +131,9 @@ + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) ++#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) + return GetMallocUsageMallinfo(); +-#elif BUILDFLAG(IS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +@@ -717,7 +717,7 @@ + + #endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++#if 0 + SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW { + base::SimplePartitionStatsDumper allocator_dumper; + Allocator()->DumpStats("malloc", true, &allocator_dumper); diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-missing-includes.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-missing-includes.patch new file mode 100644 index 00000000..697867a5 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-missing-includes.patch @@ -0,0 +1,22 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0014-missing-includes.patch + +--- a/src/3rdparty/chromium/sandbox/linux/services/credentials.h ++++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.h +@@ -13,6 +13,7 @@ + + #include <string> + #include <vector> ++#include <sys/types.h> + + #include "sandbox/linux/system_headers/capability.h" + #include "sandbox/sandbox_export.h" +--- a/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h ++++ b/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h +@@ -2,6 +2,7 @@ + #define QUICHE_HTTP2_ADAPTER_WINDOW_MANAGER_H_ + + #include <stddef.h> ++#include <inttypes.h> + + #include <functional> + diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-no-execinfo.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-no-execinfo.patch new file mode 100644 index 00000000..2a16bf39 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-no-execinfo.patch @@ -0,0 +1,98 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0006-no-execinfo.patch + +--- a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc ++++ b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc +@@ -27,7 +27,7 @@ + #if !defined(USE_SYMBOLIZE) + #include <cxxabi.h> + #endif +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + #include <execinfo.h> + #endif + +@@ -89,7 +89,7 @@ + // Note: code in this function is NOT async-signal safe (std::string uses + // malloc internally). + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + std::string::size_type search_from = 0; + while (search_from < text->size()) { + // Look for the start of a mangled symbol, from search_from. +@@ -136,7 +136,7 @@ + virtual ~BacktraceOutputHandler() = default; + }; + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + void OutputPointer(void* pointer, BacktraceOutputHandler* handler) { + // This should be more than enough to store a 64-bit number in hex: + // 16 hex digits + 1 for null-terminator. +@@ -839,7 +839,7 @@ + // If we do not have unwind tables, then try tracing using frame pointers. + return base::debug::TraceStackFramePointers(const_cast<const void**>(trace), + count, 0); +-#elif !defined(__UCLIBC__) && !defined(_AIX) ++#elif defined(__GLIBC__) && !defined(_AIX) + // Though the backtrace API man page does not list any possible negative + // return values, we take no chance. + return base::saturated_cast<size_t>(backtrace(trace, count)); +@@ -852,13 +852,13 @@ + // NOTE: This code MUST be async-signal safe (it's used by in-process + // stack dumping signal handler). NO malloc or stdio is allowed here. + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + PrintBacktraceOutputHandler handler; + ProcessBacktrace(trace_, count_, prefix_string, &handler); + #endif + } + +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + void StackTrace::OutputToStreamWithPrefix(std::ostream* os, + const char* prefix_string) const { + StreamBacktraceOutputHandler handler(os); +--- a/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc ++++ b/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc +@@ -11,7 +11,9 @@ + + #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID) + #define SYMBOLIZE_FUNCTION ++#if defined(__GLIBC__) + #include <execinfo.h> ++#endif + + #include <vector> + +@@ -96,7 +98,7 @@ + } + + const char* ExternalReferenceTable::ResolveSymbol(void* address) { +-#ifdef SYMBOLIZE_FUNCTION ++#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__) + char** names = backtrace_symbols(&address, 1); + const char* name = names[0]; + // The array of names is malloc'ed. However, each name string is static +--- a/src/3rdparty/chromium/base/debug/stack_trace.cc ++++ b/src/3rdparty/chromium/base/debug/stack_trace.cc +@@ -251,7 +253,9 @@ + } + + void StackTrace::OutputToStream(std::ostream* os) const { ++#if defined(__GLIBC__) && !defined(_AIX) + OutputToStreamWithPrefix(os, nullptr); ++#endif + } + + std::string StackTrace::ToString() const { +@@ -281,7 +281,7 @@ + } + std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const { + std::stringstream stream; +-#if !defined(__UCLIBC__) && !defined(_AIX) ++#if defined(__GLIBC__) && !defined(_AIX) + OutputToStreamWithPrefix(&stream, prefix_string); + #endif + return stream.str(); diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-remove-decls-usage.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-remove-decls-usage.patch new file mode 100644 index 00000000..7145a066 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-remove-decls-usage.patch @@ -0,0 +1,122 @@ +diff -upr a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_internals.h b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_internals.h +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_internals.h 2023-06-17 02:09:34.375431959 +0000 ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_internals.h 2023-06-17 02:40:16.075431600 +0000 +@@ -9,10 +9,6 @@ + + #if defined(__GNUC__) + +-#if BUILDFLAG(IS_POSIX) +-#include <sys/cdefs.h> // for __THROW +-#endif +- + #ifndef __THROW // Not a glibc system + #ifdef _NOEXCEPT // LLVM libc++ uses noexcept instead + #define __THROW _NOEXCEPT +diff -upr a/src/3rdparty/chromium/base/mac/close_nocancel.cc b/src/3rdparty/chromium/base/mac/close_nocancel.cc +--- a/src/3rdparty/chromium/base/mac/close_nocancel.cc 2023-06-17 02:09:34.382098624 +0000 ++++ b/src/3rdparty/chromium/base/mac/close_nocancel.cc 2023-06-17 02:40:39.528764926 +0000 +@@ -34,7 +34,6 @@ + // is resolved from libsyscall. By linking with this version of close prior to + // the libsyscall version, close's implementation is overridden. + +-#include <sys/cdefs.h> + #include <unistd.h> + + // If the non-cancelable variants of all system calls have already been +diff -upr a/src/3rdparty/chromium/third_party/apple_apsl/dnsinfo.h b/src/3rdparty/chromium/third_party/apple_apsl/dnsinfo.h +--- a/src/3rdparty/chromium/third_party/apple_apsl/dnsinfo.h 2023-06-17 02:09:35.038765298 +0000 ++++ b/src/3rdparty/chromium/third_party/apple_apsl/dnsinfo.h 2023-06-17 02:36:09.195431519 +0000 +@@ -28,7 +28,6 @@ + * These routines provide access to the systems DNS configuration + */ + +-#include <sys/cdefs.h> + #include <stdint.h> + #include <sys/types.h> + #include <sys/socket.h> +@@ -91,7 +90,9 @@ typedef struct { + #pragma pack() + + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* + * DNS configuration access APIs +@@ -109,6 +110,8 @@ void + _dns_configuration_ack (dns_config_t *config, + const char *bundle_id); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __DNSINFO_H__ */ +diff -upr a/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h b/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h +--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h 2023-06-17 02:09:35.308765297 +0000 ++++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h 2023-06-17 02:40:53.098764952 +0000 +@@ -17,8 +17,6 @@ + + #include_next <sys/ptrace.h> + +-#include <sys/cdefs.h> +- + // https://sourceware.org/bugzilla/show_bug.cgi?id=22433 + #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \ + defined(__GLIBC__) +diff -upr a/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h b/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h +--- a/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h 2023-06-17 02:09:35.815431964 +0000 ++++ b/src/3rdparty/chromium/third_party/libsync/src/include/sync/sync.h 2023-06-17 02:35:08.408764861 +0000 +@@ -19,12 +19,13 @@ + #ifndef __SYS_CORE_SYNC_H + #define __SYS_CORE_SYNC_H + +-#include <sys/cdefs.h> + #include <stdint.h> + + #include <linux/types.h> + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + struct sync_legacy_merge_data { + int32_t fd2; +@@ -158,6 +159,8 @@ struct sync_pt_info *sync_pt_info(struct + struct sync_pt_info *itr); + void sync_fence_info_free(struct sync_fence_info_data *info); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __SYS_CORE_SYNC_H */ +diff -upr a/src/3rdparty/chromium/third_party/libsync/src/sw_sync.h b/src/3rdparty/chromium/third_party/libsync/src/sw_sync.h +--- a/src/3rdparty/chromium/third_party/libsync/src/sw_sync.h 2023-06-17 02:09:35.815431964 +0000 ++++ b/src/3rdparty/chromium/third_party/libsync/src/sw_sync.h 2023-06-17 02:36:58.752098226 +0000 +@@ -19,7 +19,9 @@ + #ifndef __SYS_CORE_SW_SYNC_H + #define __SYS_CORE_SW_SYNC_H + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* + * sw_sync is mainly intended for testing and should not be compiled into +@@ -30,6 +32,8 @@ int sw_sync_timeline_create(void); + int sw_sync_timeline_inc(int fd, unsigned count); + int sw_sync_fence_create(int fd, const char *name, unsigned value); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __SYS_CORE_SW_SYNC_H */ diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-resolve.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-resolve.patch new file mode 100644 index 00000000..0931a2d3 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-resolve.patch @@ -0,0 +1,66 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0004-qt-musl-resolve.patch + +--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc ++++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc +@@ -13,7 +13,7 @@ + namespace net { + + ScopedResState::ScopedResState() { +-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) ++#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || defined(_GNU_SOURCE) + // Note: res_ninit in glibc always returns 0 and sets RES_INIT. + // res_init behaves the same way. + memset(&_res, 0, sizeof(_res)); +@@ -25,16 +25,8 @@ + } + + ScopedResState::~ScopedResState() { +-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) +- +- // Prefer res_ndestroy where available. +-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) +- res_ndestroy(&res_); +-#else +- res_nclose(&res_); +-#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD) +- +-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) ++ // musl res_init() doesn't actually do anything ++ // no destruction is necessary as no memory has been allocated + } + + bool ScopedResState::IsValid() const { +--- a/src/3rdparty/chromium/net/dns/dns_reloader.cc ++++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc +@@ -6,8 +6,7 @@ + + #include "build/build_config.h" + +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ +- !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) ++#if defined(__GLIBC__) + + #include <resolv.h> + +--- a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc ++++ b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc +@@ -310,8 +310,7 @@ + } + + void EnsureSystemHostResolverCallReady() { +-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \ +- !BUILDFLAG(IS_ANDROID) ++#if defined(__GLIBC__) + EnsureDnsReloaderInit(); + #elif BUILDFLAG(IS_WIN) + EnsureWinsockInit(); +@@ -396,8 +396,7 @@ + base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, + base::BlockingType::WILL_BLOCK); + +-#if BUILDFLAG(IS_POSIX) && \ +- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID)) ++#if defined(__GLIBC__) + DnsReloaderMaybeReload(); + #endif + auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network); diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-sandbox.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-sandbox.patch new file mode 100644 index 00000000..b1a5647b --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-sandbox.patch @@ -0,0 +1,97 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0007-musl-sandbox.patch + +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +@@ -139,21 +139,11 @@ namespace sandbox { + // present (as in newer versions of posix_spawn). + ResultExpr RestrictCloneToThreadsAndEPERMFork() { + const Arg<unsigned long> flags(0); +- +- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2. +- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES | +- CLONE_SIGHAND | CLONE_THREAD | +- CLONE_SYSVSEM; +- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED; +- +- const uint64_t kGlibcPthreadFlags = +- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD | +- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID; +- const BoolExpr glibc_test = flags == kGlibcPthreadFlags; +- +- const BoolExpr android_test = +- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask, +- flags == kGlibcPthreadFlags); ++ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | ++ CLONE_THREAD | CLONE_SYSVSEM; ++ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | ++ CLONE_DETACHED; ++ const BoolExpr thread_clone_ok = (flags&~safe)==required; + + // The following two flags are the two important flags in any vfork-emulating + // clone call. EPERM any clone call that contains both of them. +@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() { + AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0, + (flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags); + +- return If(IsAndroid() ? android_test : glibc_test, Allow()) ++ return If(thread_clone_ok, Allow()) + .ElseIf(is_fork_or_clone_vfork, Error(EPERM)) + .Else(CrashSIGSYSClone()); + } +--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { + #if defined(__i386__) + case __NR_waitpid: + #endif ++ case __NR_set_tid_address: + return true; + case __NR_clone: // Should be parameter-restricted. + case __NR_setns: // Privileged. +@@ -404,7 +405,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) + case __NR_set_thread_area: + #endif +- case __NR_set_tid_address: + case __NR_unshare: + #if !defined(__mips__) && !defined(__aarch64__) + case __NR_vfork: +@@ -514,6 +514,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { + case __NR_mlock: + case __NR_munlock: + case __NR_munmap: ++ case __NR_mremap: ++ case __NR_membarrier: + return true; + case __NR_madvise: + case __NR_mincore: +@@ -531,7 +533,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { + case __NR_modify_ldt: + #endif + case __NR_mprotect: +- case __NR_mremap: + case __NR_msync: + case __NR_munlockall: + case __NR_readahead: +--- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h ++++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h +@@ -10,6 +10,7 @@ + #define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ + + #include "build/build_config.h" ++#include <sys/syscall.h> + + #if defined(__x86_64__) + #include "sandbox/linux/system_headers/x86_64_linux_syscalls.h" +--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc +@@ -94,6 +94,9 @@ + case __NR_pwrite64: + case __NR_sched_get_priority_max: + case __NR_sched_get_priority_min: ++ case __NR_sched_getparam: ++ case __NR_sched_getscheduler: ++ case __NR_sched_setscheduler: + case __NR_sysinfo: + case __NR_times: + case __NR_uname: diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-stat.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-stat.patch new file mode 100644 index 00000000..5d80a8c7 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-stat.patch @@ -0,0 +1,14 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0008-musl-stat.patch + +--- a/src/3rdparty/chromium/base/files/file.h ++++ b/src/3rdparty/chromium/base/files/file.h +@@ -19,7 +19,8 @@ + #include "build/build_config.h" + + #if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NACL) || \ +- BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) ++ BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) || \ ++ (defined(OS_LINUX) && !defined(__GLIBC__)) + struct stat; + namespace base { + typedef struct stat stat_wrapper_t; diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-systypes.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-systypes.patch new file mode 100644 index 00000000..f4e71e93 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-systypes.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h ++++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h +@@ -58,6 +58,8 @@ + #include "config.h" + #include "glog/logging.h" + ++#include <sys/types.h> ++ + #ifdef HAVE_SYMBOLIZE + + #if defined(__ELF__) // defined by gcc diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-temp-retry-failure.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-temp-retry-failure.patch new file mode 100644 index 00000000..23940dd8 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-temp-retry-failure.patch @@ -0,0 +1,21 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0002-temp-failure-retry.patch + +random glibc macro + +--- a/src/3rdparty/chromium/sandbox/linux/suid/process_util.h ++++ b/src/3rdparty/chromium/sandbox/linux/suid/process_util.h +@@ -11,6 +11,14 @@ + #include <stdbool.h> + #include <sys/types.h> + ++// Some additional functions ++# define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++ + // This adjusts /proc/process/oom_score_adj so the Linux OOM killer + // will prefer certain process types over others. The range for the + // adjustment is [-1000, 1000], with [0, 1000] being user accessible. diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-wtf-stacksize.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-wtf-stacksize.patch new file mode 100644 index 00000000..fd7b4fa2 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-wtf-stacksize.patch @@ -0,0 +1,22 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0011-wtf-stacksize.patch + +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc +@@ -29,7 +29,7 @@ + // FIXME: On Mac OSX and Linux, this method cannot estimate stack size + // correctly for the main thread. + +-#elif defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ ++#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ + BUILDFLAG(IS_FUCHSIA) + // pthread_getattr_np() can fail if the thread is not invoked by + // pthread_create() (e.g., the main thread of blink_unittests). +@@ -97,7 +97,7 @@ + } + + void* GetStackStart() { +-#if defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ ++#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \ + BUILDFLAG(IS_FUCHSIA) + pthread_attr_t attr; + int error; diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-normalise-clipboard-permissions.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-normalise-clipboard-permissions.patch new file mode 100644 index 00000000..7caf2020 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-normalise-clipboard-permissions.patch @@ -0,0 +1,99 @@ +Qt Upstream: https://code.qt.io/cgit/qt/qtwebengine.git/commit/?h=6.5&id=281174f5e010d819a49562b48b2c2067255a41c6 + +From 281174f5e010d819a49562b48b2c2067255a41c6 Mon Sep 17 00:00:00 2001 +From: Szabolcs David <davidsz@inf.u-szeged.hu> +Date: Fri, 19 May 2023 01:00:41 +0200 +Subject: Normalize clipboard permissions + +Handle clipboard read and write permissions the same way everywhere. + +Fixes: QTBUG-113579 +Change-Id: If1f271e8591c54f4ee2f935486502df19d5f6b3e +Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> +(cherry picked from commit 79e4a37668a9176373e81fe4fc8dfe29f6c8c37b) +Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> +--- + src/core/permission_manager_qt.cpp | 46 +++++++++++++++++++------------------- + 1 file changed, 23 insertions(+), 23 deletions(-) + +diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp +index 9d98c0592..28e1c981d 100644 +--- a/src/core/permission_manager_qt.cpp ++++ b/src/core/permission_manager_qt.cpp +@@ -84,6 +84,22 @@ static blink::mojom::PermissionStatus toBlink(ProfileAdapter::PermissionState re + } + } + ++static blink::mojom::PermissionStatus getStatusFromSettings(blink::PermissionType type, WebEngineSettings *settings) ++{ ++ switch (type) { ++ case blink::PermissionType::CLIPBOARD_READ_WRITE: ++ if (!settings->testAttribute(QWebEngineSettings::JavascriptCanPaste)) ++ return blink::mojom::PermissionStatus::DENIED; ++ Q_FALLTHROUGH(); ++ case blink::PermissionType::CLIPBOARD_SANITIZED_WRITE: ++ if (!settings->testAttribute(QWebEngineSettings::JavascriptCanAccessClipboard)) ++ return blink::mojom::PermissionStatus::DENIED; ++ return blink::mojom::PermissionStatus::GRANTED; ++ default: ++ return blink::mojom::PermissionStatus::ASK; ++ } ++} ++ + PermissionManagerQt::PermissionManagerQt() + : m_requestIdCount(0) + { +@@ -179,13 +195,8 @@ void PermissionManagerQt::RequestPermission(blink::PermissionType permission, + Q_ASSERT(contentsDelegate); + + ProfileAdapter::PermissionType permissionType = toQt(permission); +- if (permissionType == ProfileAdapter::ClipboardRead) { +- WebEngineSettings *settings = contentsDelegate->webEngineSettings(); +- if (settings->testAttribute(QWebEngineSettings::JavascriptCanAccessClipboard) +- && settings->testAttribute(QWebEngineSettings::JavascriptCanPaste)) +- std::move(callback).Run(blink::mojom::PermissionStatus::GRANTED); +- else +- std::move(callback).Run(blink::mojom::PermissionStatus::DENIED); ++ if (permissionType == ProfileAdapter::ClipboardRead || permissionType == ProfileAdapter::ClipboardWrite) { ++ std::move(callback).Run(getStatusFromSettings(permission, contentsDelegate->webEngineSettings())); + return; + } else if (!canRequestPermissionFor(permissionType)) { + std::move(callback).Run(blink::mojom::PermissionStatus::DENIED); +@@ -220,14 +231,9 @@ void PermissionManagerQt::RequestPermissions(const std::vector<blink::Permission + const ProfileAdapter::PermissionType permissionType = toQt(permission); + if (permissionType == ProfileAdapter::UnsupportedPermission) + result.push_back(blink::mojom::PermissionStatus::DENIED); +- else if (permissionType == ProfileAdapter::ClipboardRead) { +- WebEngineSettings *settings = contentsDelegate->webEngineSettings(); +- if (settings->testAttribute(QWebEngineSettings::JavascriptCanAccessClipboard) +- && settings->testAttribute(QWebEngineSettings::JavascriptCanPaste)) +- result.push_back(blink::mojom::PermissionStatus::GRANTED); +- else +- result.push_back(blink::mojom::PermissionStatus::DENIED); +- } else { ++ else if (permissionType == ProfileAdapter::ClipboardRead || permissionType == ProfileAdapter::ClipboardWrite) ++ result.push_back(getStatusFromSettings(permission, contentsDelegate->webEngineSettings())); ++ else { + answerable = false; + break; + } +@@ -280,14 +286,8 @@ blink::mojom::PermissionStatus PermissionManagerQt::GetPermissionStatusForCurren + permission == blink::PermissionType::CLIPBOARD_SANITIZED_WRITE) { + WebContentsDelegateQt *delegate = static_cast<WebContentsDelegateQt *>( + content::WebContents::FromRenderFrameHost(render_frame_host)->GetDelegate()); +- if (!delegate->webEngineSettings()->testAttribute( +- QWebEngineSettings::JavascriptCanAccessClipboard)) +- return blink::mojom::PermissionStatus::DENIED; +- if (permission == blink::PermissionType::CLIPBOARD_READ_WRITE +- && !delegate->webEngineSettings()->testAttribute( +- QWebEngineSettings::JavascriptCanPaste)) +- return blink::mojom::PermissionStatus::DENIED; +- return blink::mojom::PermissionStatus::GRANTED; ++ Q_ASSERT(delegate); ++ return getStatusFromSettings(permission, delegate->webEngineSettings()); + } + + return GetPermissionStatus( +-- +cgit v1.2.3 + diff --git a/dev-qt/qtwebengine/metadata.xml b/dev-qt/qtwebengine/metadata.xml index cbcf0f7a..f447332f 100644 --- a/dev-qt/qtwebengine/metadata.xml +++ b/dev-qt/qtwebengine/metadata.xml @@ -14,8 +14,6 @@ <flag name="designer">Install the QWebEngineView plugin used to add widgets in <pkg>dev-qt/designer</pkg> forms that display web pages.</flag> <flag name="geolocation">Enable physical position determination via <pkg>dev-qt/qtpositioning</pkg></flag> <flag name="jumbo-build">Combine source files to speed up build process.</flag> - <flag name="screencast">Enable support for remote desktop and screen cast using <pkg>media-video/pipewire</pkg></flag> - <flag name="system-ffmpeg">Use the system-wide <pkg>media-video/ffmpeg</pkg> instead of bundled.</flag> <flag name="system-icu">Use the system-wide <pkg>dev-libs/icu</pkg> instead of bundled.</flag> <flag name="widgets">Enable QtWidgets support</flag> </use> diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230505.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230505.ebuild new file mode 100644 index 00000000..8447fc5e --- /dev/null +++ b/dev-qt/qtwebengine/qtwebengine-5.15.10_p20230505.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..11} ) +PYTHON_REQ_USE="xml(+)" +inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt5-build toolchain-funcs + +DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applications" +HOMEPAGE="https://www.qt.io/" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + if [[ ${PV} == ${QT5_PV}_p* ]]; then + SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P/10_p/9_p}.tar.xz" + S="${WORKDIR}/${P/10_p/9_p}" + QT5_BUILD_DIR="${S}_build" + fi +else + EGIT_BRANCH="5.15" + EGIT_REPO_URI=( + "https://code.qt.io/qt/${QT5_MODULE}.git" + "https://github.com/qt/${QT5_MODULE}.git" + ) + inherit git-r3 +fi + +# ppc64 patchset based on https://github.com/chromium-ppc64le releases +SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.8_p20230313-patchset.tar.xz + ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-r1-chromium87-ppc64le.tar.xz )" + +IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast +system-icu widgets" +REQUIRED_USE="designer? ( widgets )" + +RDEPEND=" + app-arch/snappy:= + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + dev-libs/expat + dev-libs/libevent:= + dev-libs/libxml2[icu] + dev-libs/libxslt + dev-libs/re2:= + =dev-qt/qtcore-${QT5_PV}* + =dev-qt/qtdeclarative-${QT5_PV}* + =dev-qt/qtgui-${QT5_PV}* + =dev-qt/qtnetwork-${QT5_PV}* + =dev-qt/qtprintsupport-${QT5_PV}* + =dev-qt/qtwebchannel-${QT5_PV}*[qml] + media-libs/fontconfig + media-libs/freetype + media-libs/harfbuzz:= + media-libs/lcms:2 + media-libs/libjpeg-turbo:= + media-libs/libpng:0= + >=media-libs/libvpx-1.5:=[svc(+)] + media-libs/libwebp:= + media-libs/opus + sys-apps/dbus + sys-apps/pciutils + sys-libs/zlib[minizip] + virtual/libudev + x11-libs/libdrm + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libxkbfile + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXScrnSaver + x11-libs/libXtst + alsa? ( media-libs/alsa-lib ) + designer? ( =dev-qt/designer-${QT5_PV}* ) + geolocation? ( =dev-qt/qtpositioning-${QT5_PV}* ) + kerberos? ( virtual/krb5 ) + pulseaudio? ( media-libs/libpulse ) + screencast? ( media-video/pipewire:= ) + system-icu? ( >=dev-libs/icu-69.1:= ) + widgets? ( + =dev-qt/qtdeclarative-${QT5_PV}*[widgets] + =dev-qt/qtwidgets-${QT5_PV}* + ) +" +DEPEND="${RDEPEND} + media-libs/libglvnd +" +BDEPEND="${PYTHON_DEPS} + dev-util/gperf + dev-util/ninja + dev-util/re2c + net-libs/nodejs[ssl] + sys-devel/bison + sys-devel/flex + ppc64? ( >=dev-util/gn-0.1807 ) +" + +PATCHES=( + "${WORKDIR}/${PN}-5.15.8_p20230313-patchset" + + # Patches for musl support + "${FILESDIR}"/${PN}-5.15.5_p20220618-qmake-remove-glibc-check.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-mallinfo.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-mojo-strncpy.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-resolv-compat.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-backtrace-execinfo.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-pvalloc-patch.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-linux-stack_util-stackstart.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-remove-decls-usage.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-msghdr-padding-initlist.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-canonicalize-filename.patch + "${FILESDIR}"/${PN}-5.15.10_p20230505-musl-lfs64.patch + ## runtime + "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-sandbox.patch + + # Patch for clang 16 fix + "${FILESDIR}"/${PN}-5.15.10_p20230505-clang-16.patch +) + +qtwebengine_check-reqs() { + # bug #307861 + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." + ewarn "You may experience really long compilation times and/or increased memory usage." + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." + fi + eshopts_pop + + [[ ${MERGE_TYPE} == binary ]] && return + + # (check-reqs added for bug #570534) + # + # Estimate the amount of RAM required + # Multiplier is *10 because Bash doesn't do floating point maths. + # Let's crudely assume ~2GB per compiler job for GCC. + local multiplier=20 + + # And call it ~1.5GB for Clang. + if tc-is-clang ; then + multiplier=15 + fi + + local CHECKREQS_DISK_BUILD="7G" + local CHECKREQS_DISK_USR="150M" + if ! has "distcc" ${FEATURES} ; then + # bug #830661 + # Not super realistic to come up with good estimates for distcc right now + local CHECKREQS_MEMORY=$(($(makeopts_jobs)*multiplier/10))G + fi + + check-reqs_${EBUILD_PHASE_FUNC} +} + +pkg_pretend() { + qtwebengine_check-reqs +} + +pkg_setup() { + qtwebengine_check-reqs + python-any-r1_pkg_setup +} + +src_unpack() { + case ${QT5_BUILD_TYPE} in + live) git-r3_src_unpack ;& + release) default ;; + esac +} + +src_prepare() { + # upstreamed, but not spinning new patchset just yet + rm "${WORKDIR}"/qtwebengine-5.15.8_p20230313-patchset/015-gcc13.patch || die + + if [[ ${PV} == ${QT5_PV}_p* ]]; then + # This is made from git, and for some reason will fail w/o .git directories. + mkdir -p .git src/3rdparty/chromium/.git || die + fi + # We need to make sure this integrates well into Qt 5.15.3 installation. + # Otherwise revdeps fail w/o heavy changes. This is the simplest way to do it. + # See also: https://www.qt.io/blog/building-qt-webengine-against-other-qt-versions + sed -E "/^MODULE_VERSION/s/5\.15\.[0-9]+/${QT5_PV}/" -i .qmake.conf || die + + # QTBUG-88657 - jumbo-build could still make trouble + if ! use jumbo-build; then + sed -i -e 's|use_jumbo_build=true|use_jumbo_build=false|' \ + src/buildtools/config/common.pri || die + fi + + # bug 620444 - ensure local headers are used + find "${S}" -type f -name "*.pr[fio]" | \ + xargs sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' || die + + if use system-icu; then + # Sanity check to ensure that bundled copy of ICU is not used. + # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because + # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system. + # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in + # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in + # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated. + local file + while read file; do + echo "#error This file should not be used!" > "${file}" || die + done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null) + fi + + # src/3rdparty/gn fails with libc++ due to passing of `-static-libstdc++` + if tc-is-clang ; then + if has_version 'sys-devel/clang[default-libcxx(-)]' || has_version 'sys-devel/clang-common[default-libcxx(-)]' ; then + eapply "${FILESDIR}/${PN}-5.15.2_p20210521-clang-libc++.patch" + fi + fi + + qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri + qt_use_disable_config pulseaudio webengine-pulseaudio src/buildtools/config/linux.pri + + qt_use_disable_mod designer webenginewidgets src/plugins/plugins.pro + + qt_use_disable_mod widgets widgets src/src.pro + + qt5-build_src_prepare + + # we need to generate ppc64 stuff because upstream does not ship it yet + if use ppc64; then + einfo "Patching for ppc64le and generating build files" + eapply "${FILESDIR}/qtwebengine-5.15.2-enable-ppc64.patch" + pushd src/3rdparty/chromium > /dev/null || die + eapply -p0 "${WORKDIR}/${PN}-ppc64le" + popd > /dev/null || die + pushd src/3rdparty/chromium/third_party/libvpx > /dev/null || die + mkdir -vp source/config/linux/ppc64 || die + mkdir -p source/libvpx/test || die + touch source/libvpx/test/test.mk || die + # clang-format is used to re-format sources + # but we'd rather make it a no-op than introduce a clang dependency + # https://bugs.gentoo.org/849458 + clang-format() { : ; } + export -f clang-format || die + ./generate_gni.sh || die + popd >/dev/null || die + fi +} + +src_configure() { + export NINJA_PATH=/usr/bin/ninja + export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs "${MAKEOPTS}" 999) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}" + + local myqmakeargs=( + -- + -no-build-qtpdf + -printing-and-pdf + -system-opus + -system-webp + $(qt_use alsa) + $(qt_use !bindist proprietary-codecs) + $(qt_use geolocation webengine-geolocation) + $(qt_use kerberos webengine-kerberos) + $(qt_use pulseaudio) + $(usex screencast -webengine-webrtc-pipewire '') + -qt-ffmpeg # bug 831487 + $(qt_use system-icu webengine-icu) + ) + qt5-build_src_configure +} + +src_install() { + qt5-build_src_install + + # bug 601472 + if [[ ! -f ${D}${QT5_LIBDIR}/libQt5WebEngine.so ]]; then + die "${CATEGORY}/${PF} failed to build anything. Please report to https://bugs.gentoo.org/" + fi +} + +pkg_preinst() { + elog "This version of Qt WebEngine is based on Chromium version 87.0.4280.144," + elog "with additional security fixes from newer versions. Extensive as it is, the" + elog "list of backports is impossible to evaluate, but always bound to be behind" + elog "Chromium's release schedule." + elog "In addition, various online services may deny service based on an outdated" + elog "user agent version (and/or other checks). Google is already known to do so." + elog + elog "tldr: Your web browsing experience will be compromised." +} diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.5_p20220618.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.9_p20230505.ebuild index 83bf6999..c46842d7 100644 --- a/dev-qt/qtwebengine/qtwebengine-5.15.5_p20220618.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-5.15.9_p20230505.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_{9,10} ) +PYTHON_COMPAT=( python3_{10..11} ) PYTHON_REQ_USE="xml(+)" inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt5-build toolchain-funcs @@ -11,7 +11,7 @@ DESCRIPTION="Library for rendering dynamic web content in Qt5 C++ and QML applic HOMEPAGE="https://www.qt.io/" if [[ ${QT5_BUILD_TYPE} == release ]]; then - KEYWORDS="amd64 ~arm arm64 ~ppc64 x86" + KEYWORDS="amd64 ~arm arm64 ~ppc64 ~x86" if [[ ${PV} == ${QT5_PV}_p* ]]; then SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${P}.tar.xz" S="${WORKDIR}/${P}" @@ -27,11 +27,10 @@ else fi # ppc64 patchset based on https://github.com/chromium-ppc64le releases -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-5.15.2_p20211019-jumbo-build.patch.bz2 - https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.3_p20220406-patchset.tar.xz +SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.8_p20230313-patchset.tar.xz ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-5.15.2-r1-chromium87-ppc64le.tar.xz )" -IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast +system-ffmpeg +system-icu widgets" +IUSE="alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast +system-icu widgets" REQUIRED_USE="designer? ( widgets )" RDEPEND=" @@ -80,9 +79,8 @@ RDEPEND=" designer? ( =dev-qt/designer-${QT5_PV}* ) geolocation? ( =dev-qt/qtpositioning-${QT5_PV}* ) kerberos? ( virtual/krb5 ) - pulseaudio? ( media-sound/pulseaudio:= ) + pulseaudio? ( media-libs/libpulse ) screencast? ( media-video/pipewire:= ) - system-ffmpeg? ( media-video/ffmpeg:0= ) system-icu? ( >=dev-libs/icu-69.1:= ) widgets? ( =dev-qt/qtdeclarative-${QT5_PV}*[widgets] @@ -99,23 +97,13 @@ BDEPEND="${PYTHON_DEPS} net-libs/nodejs[ssl] sys-devel/bison sys-devel/flex - elibc_musl? ( sys-libs/queue-standalone ) ppc64? ( >=dev-util/gn-0.1807 ) " PATCHES=( - "${FILESDIR}/${PN}-5.15.2-disable-fatal-warnings.patch" # downstream, bug 695446 - "${FILESDIR}/${PN}-5.15.3_p20220505-extra-gn.patch" # downstream, bug 774186 - "${FILESDIR}/${PN}-5.15.2_p20210224-chromium-87-v8-icu68.patch" # downstream, bug 757606 - "${FILESDIR}/${PN}-5.15.2_p20210224-disable-git.patch" # downstream snapshot fix - "${FILESDIR}/${PN}-5.15.2_p20211015-pdfium-system-lcms2.patch" # by Debian, QTBUG-61746 - "${FILESDIR}/${PN}-5.15.3_p20220329-clang14.patch" # by FreeBSD, bug 836604 - "${FILESDIR}/${PN}-5.15.3_p20220406-gcc12-includes.patch" # by openSUSE, bug 840326 - "${WORKDIR}/${PN}-5.15.2_p20211019-jumbo-build.patch" # bug 813957 - "${WORKDIR}/${PN}-5.15.3_p20220406-patchset" # bug 698988 (py2--), pipewire-3 - "${FILESDIR}/${P}-fixup-CVE-2022-0796.patch" # bug 853097 - - # for musl libc + "${WORKDIR}/${PN}-5.15.8_p20230313-patchset" + + # Patches for musl support "${FILESDIR}"/${PN}-5.15.5_p20220618-qmake-remove-glibc-check.patch "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-mallinfo.patch "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-mojo-strncpy.patch @@ -125,8 +113,13 @@ PATCHES=( "${FILESDIR}"/${PN}-5.15.5_p20220618-linux-stack_util-stackstart.patch "${FILESDIR}"/${PN}-5.15.5_p20220618-remove-decls-usage.patch "${FILESDIR}"/${PN}-5.15.5_p20220618-msghdr-padding-initlist.patch + "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-canonicalize-filename.patch + "${FILESDIR}"/${PN}-5.15.10_p20230505-musl-lfs64.patch ## runtime "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-sandbox.patch + + # Patch for clang 16 fix + "${FILESDIR}"/${PN}-5.15.10_p20230505-clang-16.patch ) qtwebengine_check-reqs() { @@ -181,10 +174,9 @@ src_unpack() { } src_prepare() { - # Using a conditional patch here since QMake is deprecated - # by CMake in Qt6. A build system change would be prettier but - # this works just as well right now. - use elibc_musl && PATCHES+=( "${FILESDIR}"/${PN}-5.15.5_p20220618-musl-canonicalize-filename.patch ) + # upstreamed, but not spinning new patchset just yet + rm "${WORKDIR}"/qtwebengine-5.15.8_p20230313-patchset/015-gcc13.patch || die + if [[ ${PV} == ${QT5_PV}_p* ]]; then # This is made from git, and for some reason will fail w/o .git directories. mkdir -p .git src/3rdparty/chromium/.git || die @@ -218,12 +210,10 @@ src_prepare() { fi # src/3rdparty/gn fails with libc++ due to passing of `-static-libstdc++` - if tc-is-clang && has_version 'sys-devel/clang[default-libcxx]'; then - eapply "${FILESDIR}/${PN}-5.15.2_p20210521-clang-libc++.patch" - fi - - if use system-ffmpeg && has_version '>=media-video/ffmpeg-5'; then - eapply "${FILESDIR}/${PN}-5.15.3_p20220406-ffmpeg5.patch" # by Archlinux, bug 831437 + if tc-is-clang ; then + if has_version 'sys-devel/clang[default-libcxx(-)]' || has_version 'sys-devel/clang-common[default-libcxx(-)]' ; then + eapply "${FILESDIR}/${PN}-5.15.2_p20210521-clang-libc++.patch" + fi fi qt_use_disable_config alsa webengine-alsa src/buildtools/config/linux.pri @@ -272,7 +262,7 @@ src_configure() { $(qt_use kerberos webengine-kerberos) $(qt_use pulseaudio) $(usex screencast -webengine-webrtc-pipewire '') - $(usex system-ffmpeg -system-ffmpeg -qt-ffmpeg) + -qt-ffmpeg # bug 831487 $(qt_use system-icu webengine-icu) ) qt5-build_src_configure diff --git a/dev-qt/qtwebengine/qtwebengine-6.5.1.ebuild b/dev-qt/qtwebengine/qtwebengine-6.5.1.ebuild new file mode 100644 index 00000000..59c53e8d --- /dev/null +++ b/dev-qt/qtwebengine/qtwebengine-6.5.1.ebuild @@ -0,0 +1,275 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="xml(+)" +CHROMIUM_VER="108.0.5359.181" +CHROMIUM_PATCHES_VER="112.0.5615.138" + +inherit check-reqs estack flag-o-matic multiprocessing python-any-r1 qt6-build toolchain-funcs + +DESCRIPTION="Library for rendering dynamic web content in Qt6 C++ and QML applications" + +if [[ ${QT6_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64" +fi + +IUSE=" + alsa bindist designer geolocation +jumbo-build kerberos pulseaudio screencast + +system-icu widgets +" +REQUIRED_USE="designer? ( widgets )" + +BDEPEND=" + $(python_gen_any_dep 'dev-python/html5lib[${PYTHON_USEDEP}]') + dev-util/gperf + dev-util/ninja + dev-util/re2c + net-libs/nodejs[ssl] + sys-devel/bison + sys-devel/flex +" +RDEPEND=" + app-arch/snappy:= + dev-libs/glib:2 + dev-libs/nspr + dev-libs/nss + dev-libs/expat + dev-libs/libevent:= + dev-libs/libxml2[icu] + dev-libs/libxslt + dev-libs/re2:= + =dev-qt/qtdeclarative-${PV}* + =dev-qt/qtwebchannel-${PV}* + media-libs/fontconfig + media-libs/freetype + media-libs/harfbuzz:= + media-libs/lcms:2 + media-libs/libjpeg-turbo:= + media-libs/libpng:= + >=media-libs/libvpx-1.5:=[svc(+)] + media-libs/libwebp:= + media-libs/openjpeg:2= + media-libs/opus + sys-apps/dbus + sys-apps/pciutils + sys-libs/zlib[minizip] + virtual/libudev + x11-libs/libdrm + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXcursor + x11-libs/libxcb:= + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libxkbcommon + x11-libs/libxkbfile + x11-libs/libXrandr + x11-libs/libXrender + x11-libs/libXScrnSaver + x11-libs/libxshmfence:= + x11-libs/libXtst + alsa? ( media-libs/alsa-lib ) + geolocation? ( =dev-qt/qtpositioning-${PV}* ) + kerberos? ( virtual/krb5 ) + pulseaudio? ( media-libs/libpulse:= ) + screencast? ( media-video/pipewire:= ) + system-icu? ( >=dev-libs/icu-69.1:= ) + widgets? ( + =dev-qt/qtbase-${PV}*[widgets] + ) +" +DEPEND="${RDEPEND} + media-libs/libglvnd +" + +PATCHES=( + "${FILESDIR}/${PN}-6.5.1-normalise-clipboard-permissions.patch" + + # Patches for musl support + "${FILESDIR}/${PN}-6.5.1-musl-disable-glibc-check.patch" + "${FILESDIR}/${PN}-6.5.1-musl-temp-retry-failure.patch" + "${FILESDIR}/${PN}-6.5.1-musl-mallinfo.patch" + "${FILESDIR}/${PN}-6.5.1-musl-crashpad.patch" + "${FILESDIR}/${PN}-6.5.1-musl-no-execinfo.patch" + "${FILESDIR}/${PN}-6.5.1-musl-resolve.patch" + "${FILESDIR}/${PN}-6.5.1-musl-stat.patch" + "${FILESDIR}/${PN}-6.5.1-musl-close.patch" + "${FILESDIR}/${PN}-6.5.1-musl-canonicalize-file-name.patch" + "${FILESDIR}/${PN}-6.5.1-musl-wtf-stacksize.patch" + "${FILESDIR}/${PN}-6.5.1-musl-missing-includes.patch" + "${FILESDIR}/${PN}-6.5.1-musl-default-pthread-stacksize.patch" + "${FILESDIR}/${PN}-6.5.1-musl-fix-narrowing-cast.patch" + "${FILESDIR}/${PN}-6.5.1-musl-systypes.patch" + "${FILESDIR}/${PN}-6.5.1-musl-lfs64.patch" + "${FILESDIR}/${PN}-6.5.1-musl-remove-decls-usage.patch" + ## runtime + "${FILESDIR}/${PN}-6.5.1-musl-sandbox.patch" +) + +python_check_deps() { + python_has_version "dev-python/html5lib[${PYTHON_USEDEP}]" +} + +qtwebengine_check-reqs() { + # bug #307861 + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." + ewarn "You may experience really long compilation times and/or increased memory usage." + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." + fi + eshopts_pop + + [[ ${MERGE_TYPE} == binary ]] && return + + # (check-reqs added for bug #570534) + # + # Estimate the amount of RAM required + # Multiplier is *10 because Bash doesn't do floating point maths. + # Let's crudely assume ~2GB per compiler job for GCC. + local multiplier=20 + + # And call it ~1.5GB for Clang. + if tc-is-clang ; then + multiplier=15 + fi + + local CHECKREQS_DISK_BUILD="7G" + local CHECKREQS_DISK_USR="150M" + if ! has "distcc" ${FEATURES} ; then + # bug #830661 + # Not super realistic to come up with good estimates for distcc right now + local CHECKREQS_MEMORY=$(($(makeopts_jobs)*multiplier/10))G + fi + + check-reqs_${EBUILD_PHASE_FUNC} +} + +pkg_pretend() { + qtwebengine_check-reqs +} + +pkg_setup() { + qtwebengine_check-reqs + python-any-r1_pkg_setup +} + +pkg_preinst() { + elog "This version of Qt WebEngine is based on Chromium version ${CHROMIUM_VER}, with" + elog "additional security fixes up to ${CHROMIUM_PATCHES_VER}. Extensive as it is, the" + elog "list of backports is impossible to evaluate, but always bound to be behind" + elog "Chromium's release schedule." + elog "In addition, various online services may deny service based on an outdated" + elog "user agent version (and/or other checks). Google is already known to do so." + elog + elog "tldr: Your web browsing experience will be compromised." +} + +src_unpack() { + # bug 307861 + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + ewarn + ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." + ewarn "You may experience really long compilation times and/or increased memory usage." + ewarn "If compilation fails, please try removing -g/-ggdb before reporting a bug." + ewarn + fi + eshopts_pop + + case ${QT6_BUILD_TYPE} in + live) git-r3_src_unpack ;& + release) default ;; + esac +} + +src_prepare() { + # src/3rdparty/gn fails with libc++ due to passing of `-static-libstdc++` + if tc-is-clang ; then + if has_version 'sys-devel/clang[default-libcxx(-)]' || has_version 'sys-devel/clang-common[default-libcxx(-)]' ; then + eapply "${FILESDIR}/${PN}-6.5.1-clang-libc++.patch" + fi + fi + + # bug 620444 - ensure local headers are used + find . -type f -name "*.pr[fio]" -exec \ + sed -i -e 's|INCLUDEPATH += |&$${QTWEBENGINE_ROOT}_build/include $${QTWEBENGINE_ROOT}/include |' {} + || die + + if use system-icu; then + # Sanity check to ensure that bundled copy of ICU is not used. + # Whole src/3rdparty/chromium/third_party/icu directory cannot be deleted because + # src/3rdparty/chromium/third_party/icu/BUILD.gn is used by build system. + # If usage of headers of bundled copy of ICU occurs, then lists of shim headers in + # shim_headers("icui18n_shim") and shim_headers("icuuc_shim") in + # src/3rdparty/chromium/third_party/icu/BUILD.gn should be updated. + local file + while read file; do + echo "#error This file should not be used!" > "${file}" || die + done < <(find src/3rdparty/chromium/third_party/icu -type f "(" -name "*.c" -o -name "*.cpp" -o -name "*.h" ")" 2>/dev/null) + fi + + qt6-build_src_prepare +} + +src_configure() { + export NINJA_PATH="${BROOT}"/usr/bin/ninja + export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -l$(makeopts_loadavg "${MAKEOPTS}" 0) -v}" + + local mycmakeargs=( + #-DQT_FEATURE_accessibility=off + #-DQT_FEATURE_force_asserts=off + #-DQT_FEATURE_opengl=off + #-DQT_FEATURE_printer=off + -DQT_FEATURE_qtpdf_build=off + -DQT_FEATURE_qtpdf_quick_build=off + -DQT_FEATURE_qtpdf_widgets_build=off + -DQT_FEATURE_qtwebengine_build=on + -DQT_FEATURE_qtwebengine_quick_build=on + -DQT_FEATURE_qtwebengine_widgets_build=on + #-DQT_FEATURE_ssl=off + #-DQT_FEATURE_static=off + #-DQT_FEATURE_system_zlib=off + #-DQT_FEATURE_system_png=off + #-DQT_FEATURE_system_jpeg=off + #-DQT_FEATURE_system_freetype=off + #-DQT_FEATURE_system_harfbuzz=off + #-DQT_FEATURE_use_gold_linker=off + #-DQT_FEATURE_use_lld_linker=off + -DQT_FEATURE_webengine_embedded_build=off + -DQT_FEATURE_webengine_extensions=on + #-DQT_FEATURE_webengine_full_debug_info=$(usex debug) + -DQT_FEATURE_webengine_geolocation=$(usex geolocation on off) + -DQT_FEATURE_webengine_jumbo_build=$(usex jumbo-build) + #-DQT_FEATURE_webengine_jumbo_file_merge_limit + -DQT_FEATURE_webengine_kerberos=$(usex kerberos on off) + -DQT_FEATURE_webengine_native_spellchecker=off + -DQT_FEATURE_webengine_ozone_x11=on + -DQT_FEATURE_webengine_pepper_plugins=on + -DQT_FEATURE_webengine_proprietary_codecs=$(usex bindist off on) + -DQT_FEATURE_webengine_printing_and_pdf=on + -DQT_FEATURE_webengine_sanitizer=on + -DQT_FEATURE_webengine_spellchecker=on + -DQT_FEATURE_webengine_system_opus=on + -DQT_FEATURE_webengine_system_libwebp=on + -DQT_FEATURE_webengine_system_alsa=$(usex alsa on off) + -DQT_FEATURE_webengine_system_ffmpeg=off # https://bugs.gentoo.org/831487 + -DQT_FEATURE_webengine_system_icu=$(usex system-icu) + -DQT_FEATURE_webengine_system_libevent=on + -DQT_FEATURE_webengine_system_libopenjpeg2=on + -DQT_FEATURE_webengine_system_libpci=on + -DQT_FEATURE_webengine_system_libpng=on + -DQT_FEATURE_webengine_system_pulseaudio=$(usex pulseaudio on off) + -DQT_FEATURE_webengine_system_zlib=on + -DQT_FEATURE_webengine_webchannel=on + -DQT_FEATURE_webengine_webrtc=on + -DQT_FEATURE_webengine_webrtc_pipewire=$(usex screencast on off) + #-DQT_FEATURE_xcb=off + ) + + qt6-build_src_configure +} |