Skip to content

Commit

Permalink
dev-qt/qtwebengine: sync with ::gentoo
Browse files Browse the repository at this point in the history
  • Loading branch information
rnpnr committed Jan 23, 2023
1 parent 9a26ebd commit aa2ac58
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 54 deletions.
2 changes: 1 addition & 1 deletion dev-qt/qtwebengine/Manifest
Original file line number Diff line number Diff line change
@@ -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_p20230112.tar.xz 320881876 BLAKE2B 681fb4e2c6dfb80f1f2839092bbbd891a0a0d68f6b31dbdfe8693b8ea9a0ecd9611ba692b0565f32fc2ad199de715cf61e333d796df618572f79d9ed88545ffb SHA512 1806e7a3134579a5cfc0c932cc95ffb15edc515c2ff32b01eee9de8245938f95301610cd7b57451a07a9e38451111973b88c1d64a03f1371e58106bf202b143e

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From a5cea1bfc38ceafc74f4baddd6ab94ea13757ef8 Mon Sep 17 00:00:00 2001
From: Lei Zhang <[email protected]>
Date: Fri, 21 May 2021 10:55:53 -0700
Subject: [PATCH] Mark Node::opcode() and Operator::opcode() as constexpr.

Without the explicit constexpr keyword, Clang seems to be able to treat
these methods as constexpr, whereas MSVC will not.

Bug: v8:11760
Change-Id: I9f6492f38fb50dcaf7a4f09da0bd79c0da6a50eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2912916
Reviewed-by: Clemens Backes <[email protected]>
Reviewed-by: Maya Lekova <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#74791}
---

diff --git a/src/3rdparty/chromium/v8/src/compiler/node.h b/src/3rdparty/chromium/v8/src/compiler/node.h
index 37b45c4..57d49fe 100644
--- a/src/3rdparty/chromium/v8/src/compiler/node.h
+++ b/src/3rdparty/chromium/v8/src/compiler/node.h
@@ -50,7 +50,7 @@

const Operator* op() const { return op_; }

- IrOpcode::Value opcode() const {
+ constexpr IrOpcode::Value opcode() const {
DCHECK_GE(IrOpcode::kLast, op_->opcode());
return static_cast<IrOpcode::Value>(op_->opcode());
}
diff --git a/src/3rdparty/chromium/v8/src/compiler/operator.h b/src/3rdparty/chromium/v8/src/compiler/operator.h
index 4206e75..f641394 100644
--- a/src/3rdparty/chromium/v8/src/compiler/operator.h
+++ b/src/3rdparty/chromium/v8/src/compiler/operator.h
@@ -73,7 +73,7 @@
// A small integer unique to all instances of a particular kind of operator,
// useful for quick matching for specific kinds of operators. For fast access
// the opcode is stored directly in the operator object.
- Opcode opcode() const { return opcode_; }
+ constexpr Opcode opcode() const { return opcode_; }

// Returns a constant string representing the mnemonic of the operator,
// without the static parameters. Useful for debugging.
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
From b99042fb839021a0a3d2fe0cac7ac3899c4acbba Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <[email protected]>
Date: Tue, 14 Jun 2022 14:19:24 +0200
Subject: [PATCH] Find modern Chrome, Chromium and Firefox CDM modules

The default download location has moved again, but we can now
also use firefox CDMs.

Pick-to: 6.4 6.3
Task-number: QTBUG-104238
Change-Id: I7ee581fa63e50df970acb31ea6d3f67d332aef59
Reviewed-by: Peter Varga <[email protected]>
---
src/core/content_client_qt.cpp | 54 ++++++++++++++++++++++++++++++----
1 file changed, 49 insertions(+), 5 deletions(-)

diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 6c914b7729..7167332d9b 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -250,15 +251,56 @@ static bool IsWidevineAvailable(base::FilePath *cdm_path,
}
}
#elif defined(Q_OS_LINUX)
- pluginPaths << QStringLiteral("/opt/google/chrome/libwidevinecdm.so") // Old Google Chrome
+ QList<QDir> potentialWidevineVersionDirs;
+
+ // Google Chrome widevine modules
+ QDir chromeWidevineDir(QDir::homePath() + "/.config/google-chrome/WidevineCdm");
+ if (chromeWidevineDir.exists())
+ potentialWidevineVersionDirs << chromeWidevineDir;
+
+ // Firefox widevine modules
+ QDir firefoxPotentialProfilesDir(QDir::homePath() + "/.mozilla/firefox");
+ if (firefoxPotentialProfilesDir.exists()) {
+ QFileInfoList firefoxProfileDirs = firefoxPotentialProfilesDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed);
+ for (const QFileInfo &info : firefoxProfileDirs) {
+ QDir widevinePluginsDir(info.absoluteFilePath() + "/gmp-widevinecdm");
+ if (widevinePluginsDir.exists())
+ potentialWidevineVersionDirs << widevinePluginsDir;
+ }
+ }
+
+ // Chromium widevine modules (might not work with proprietary codecs)
+ QDir chromiumWidevineDir(QDir::homePath() + "/.config/chromium/WidevineCdm");
+ if (chromiumWidevineDir.exists())
+ potentialWidevineVersionDirs << chromiumWidevineDir;
+
+ // Search for widewine versions
+ for (const QDir &dir : potentialWidevineVersionDirs) {
+ QFileInfoList widevineVersionDirs = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed);
+ // ### alternatively look up in the manifest.json and take the path from there.
#if Q_PROCESSOR_WORDSIZE == 8
- << QStringLiteral("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")
+ const QString library = QLatin1String("/_platform_specific/linux_x64/libwidevinecdm.so");
#else
- << QStringLiteral("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x86/libwidevinecdm.so")
+ const QString library = QLatin1String("/_platform_specific/linux_x86/libwidevinecdm.so");
#endif
- << QStringLiteral("/usr/lib/chromium/libwidevinecdm.so") // Arch
+ for (const QFileInfo &info : widevineVersionDirs) {
+ pluginPaths << info.absoluteFilePath() + "/libwidevinecdm.so";
+ pluginPaths << info.absoluteFilePath() + library;
+ }
+ }
+
+ // Fixed paths:
+ pluginPaths << QStringLiteral("/usr/lib/chromium/libwidevinecdm.so") // Arch
<< QStringLiteral("/usr/lib/chromium-browser/libwidevinecdm.so") // Ubuntu/neon
- << QStringLiteral("/usr/lib64/chromium/libwidevinecdm.so"); // OpenSUSE style
+ << QStringLiteral("/usr/lib64/chromium/libwidevinecdm.so") // OpenSUSE style
+#if Q_PROCESSOR_WORDSIZE == 8
+ << QStringLiteral("/usr/lib64/chromium-browser/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so") // Gentoo
+ << QStringLiteral("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so") // Old Google Chrome
+#else
+ << QStringLiteral("/usr/lib/chromium-browser/WidevineCdm/_platform_specific/linux_x86/libwidevinecdm.so") // Gentoo
+ << QStringLiteral("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x86/libwidevinecdm.so") // Old Google Chrome
+#endif
+ << QStringLiteral("/opt/google/chrome/libwidevinecdm.so"); // Older Google Chrome
#endif
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand Down Expand Up @@ -80,7 +80,7 @@ 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:= )
Expand Down Expand Up @@ -113,7 +113,8 @@ PATCHES=(
"${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
"${FILESDIR}/${PN}-5.15.8_p20230106-v8-opcode-constexpr.patch" # bug 889042
"${FILESDIR}/${PN}-5.15.8_p20230106-widevine.patch" # bug 888783

# for musl libc
"${FILESDIR}"/${PN}-5.15.5_p20220618-qmake-remove-glibc-check.patch
Expand Down Expand Up @@ -218,8 +219,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"
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

if use system-ffmpeg && has_version '>=media-video/ffmpeg-5'; then
Expand Down

0 comments on commit aa2ac58

Please sign in to comment.