aboutsummaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2022-03-25 12:46:04 +0800
committerYixun Lan <dlan@gentoo.org>2022-03-25 12:46:04 +0800
commit20714d617ef73390f25f6fec89f148ba5c336081 (patch)
tree64058105215797600323b23e58163c0009e5a898 /dev-qt
parentsys-kernel/sifive-sources: drop old (diff)
downloadriscv-20714d617ef73390f25f6fec89f148ba5c336081.tar.gz
riscv-20714d617ef73390f25f6fec89f148ba5c336081.tar.bz2
riscv-20714d617ef73390f25f6fec89f148ba5c336081.zip
dev-qt/qtwebengine: import from gentoo's official tree
original version without modification here Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwebengine/Manifest3
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2-disable-fatal-warnings.patch12
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2-enable-ppc64.patch37
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2-extra_gn.patch12
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch192
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-disable-git.patch15
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210521-clang-libc++.patch10
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch79
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211210-sandbox-glibc-2.34.patch27
-rw-r--r--dev-qt/qtwebengine/metadata.xml34
-rw-r--r--dev-qt/qtwebengine/qtwebengine-5.15.3_p20220310.ebuild265
11 files changed, 686 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/Manifest b/dev-qt/qtwebengine/Manifest
new file mode 100644
index 0000000..24d4c40
--- /dev/null
+++ b/dev-qt/qtwebengine/Manifest
@@ -0,0 +1,3 @@
+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_p20220310.tar.xz 319290976 BLAKE2B 0a0e74e7d94e59d81687ceb4d791034d43daaeef887894acedc2d2568a8c74e4b7303440518d377c16de21a546e2609fdd89ab64c0664c230df4657cec9d399c SHA512 e57c7c51d0f27d116d2dc80043cb563a1dbce2357221ba87ae3c3b0e8c781e3ef09f69b8f6f20fcb7d85d596ae312b2f85ebc35ba7ee283ab30caa8f796fe2d6
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
new file mode 100644
index 0000000..b0f5f3d
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2-disable-fatal-warnings.patch
@@ -0,0 +1,12 @@
+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-enable-ppc64.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2-enable-ppc64.patch
new file mode 100644
index 0000000..4fb19cc
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2-enable-ppc64.patch
@@ -0,0 +1,37 @@
+From 463f1234c57a36e78ff666bd55094a9d4e68f296 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Sat, 18 Jan 2020 23:52:55 +0100
+Subject: [PATCH 1/3] Enable ppc64 builds
+
+---
+ configure.pri | 1 +
+ mkspecs/features/functions.prf | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/configure.pri b/configure.pri
+index 3a144e3f8..cabe8b24a 100644
+--- a/configure.pri 2021-02-24 10:45:58.000000000 +0100
++++ - 2021-03-07 21:18:43.124754796 +0100
+@@ -144,6 +144,7 @@
+ contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
+ contains(QT_ARCH, "mips"): return(true)
+ contains(QT_ARCH, "mips64"): return(true)
++ contains(QT_ARCH, "power64"): return(true)
+ qtLog("Architecture not supported.")
+ return(false)
+ }
+diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
+index 512e2523b..e31123654 100644
+--- a/mkspecs/features/functions.prf 2021-02-24 10:45:58.000000000 +0100
++++ - 2021-03-07 21:19:21.345036293 +0100
+@@ -107,6 +107,7 @@
+ contains(qtArch, "mips"): return(mipsel)
+ contains(qtArch, "mips64"): return(mips64el)
+ contains(qtArch, "mips64el"): return(mips64el)
++ contains(qtArch, "power64"): return(ppc64)
+ return(unknown)
+ }
+
+--
+2.26.0
+
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.15.2-extra_gn.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2-extra_gn.patch
new file mode 100644
index 0000000..0488122
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2-extra_gn.patch
@@ -0,0 +1,12 @@
+diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro
+index 3d6fda80e..3d0bc86fe 100644
+--- a/src/core/gn_run.pro
++++ b/src/core/gn_run.pro
+@@ -38,5 +38,6 @@ build_pass|!debug_and_release {
+ }
+
++ gn_args += $$(EXTRA_GN)
+ gn_args = $$system_quote($$gn_args)
+ gn_src_root = $$system_quote($$system_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir()))
+ gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir()))
+ gn_python = "--script-executable=$$pythonPathForSystem()"
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
new file mode 100644
index 0000000..a685697
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-chromium-87-v8-icu68.patch
@@ -0,0 +1,192 @@
+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
new file mode 100644
index 0000000..c31e897
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210224-disable-git.patch
@@ -0,0 +1,15 @@
+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_p20210521-clang-libc++.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210521-clang-libc++.patch
new file mode 100644
index 0000000..fdcc787
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20210521-clang-libc++.patch
@@ -0,0 +1,10 @@
+--- a/src/buildtools/gn.pro
++++ b/src/buildtools/gn.pro
+@@ -25,6 +25,7 @@
+ msvc:!clang_cl: gn_gen_args += --use-lto
+
+ gn_configure = $$system_quote($$gn_bootstrap) $$gn_gen_args
++ gn_configure += --no-static-libstdc++
+ macos {
+ gn_configure += --isysroot \"$$QMAKE_MAC_SDK_PATH\"
+ }
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
new file mode 100644
index 0000000..b3c2ffb
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211015-pdfium-system-lcms2.patch
@@ -0,0 +1,79 @@
+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.2_p20211210-sandbox-glibc-2.34.patch b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211210-sandbox-glibc-2.34.patch
new file mode 100644
index 0000000..aac512a
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.15.2_p20211210-sandbox-glibc-2.34.patch
@@ -0,0 +1,27 @@
+Patch taken from www-client/chromium:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-glibc-2.34.patch
+
+Dropped parts already upstream.
+
+diff --git a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
+index ca6b595..1c1ee42 100644
+--- a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
++++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
+@@ -11,6 +11,7 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -100,7 +101,8 @@ bool ChrootToSafeEmptyDir() {
+ // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
+ clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
+
+- char tls_buf[PTHREAD_STACK_MIN] = {0};
++ char tls_buf[PTHREAD_STACK_MIN];
++ memset(tls_buf, 0, PTHREAD_STACK_MIN);
+ tls = tls_buf;
+ #endif
+
diff --git a/dev-qt/qtwebengine/metadata.xml b/dev-qt/qtwebengine/metadata.xml
new file mode 100644
index 0000000..fe0b26e
--- /dev/null
+++ b/dev-qt/qtwebengine/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <description>ppc64 patchset maintainer</description>
+ <email>gyakovlev@gentoo.org</email>
+ <name>Georgy Yakovlev</name>
+ </maintainer>
+ <use>
+ <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="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>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>https://doc.qt.io/</doc>
+ </upstream>
+ <slots>
+ <subslots>
+ Must only be used by packages that are known to use private parts of the Qt API.
+ </subslots>
+ </slots>
+</pkgmetadata>
diff --git a/dev-qt/qtwebengine/qtwebengine-5.15.3_p20220310.ebuild b/dev-qt/qtwebengine/qtwebengine-5.15.3_p20220310.ebuild
new file mode 100644
index 0000000..8c44a49
--- /dev/null
+++ b/dev-qt/qtwebengine/qtwebengine-5.15.3_p20220310.ebuild
@@ -0,0 +1,265 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python2_7 )
+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}.tar.xz"
+ S="${WORKDIR}/${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/~sam/distfiles/${CATEGORY}/${PN}/${PN}-5.15.2_p20211019-jumbo-build.patch.bz2
+ 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 +system-ffmpeg +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-sound/pulseaudio:= )
+ system-ffmpeg? ( media-video/ffmpeg:0= )
+ 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=(
+ "${FILESDIR}/${PN}-5.15.2-disable-fatal-warnings.patch" # downstream, bug 695446
+ "${FILESDIR}/${PN}-5.15.2-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
+ "${WORKDIR}/${PN}-5.15.2_p20211019-jumbo-build.patch" # bug 813957
+)
+
+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() {
+ 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.2 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\.[3456789]/${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 && has_version 'sys-devel/clang[default-libcxx]'; then
+ eapply "${FILESDIR}/${PN}-5.15.2_p20210521-clang-libc++.patch"
+ 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
+ ./generate_gni.sh || die
+ popd >/dev/null || die
+ fi
+}
+
+src_configure() {
+ export NINJA_PATH=/usr/bin/ninja
+ export NINJAFLAGS="${NINJAFLAGS:--j$(makeopts_jobs) -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 system-ffmpeg -system-ffmpeg -qt-ffmpeg)
+ $(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, with"
+ elog "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."
+}