public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Yixun Lan" <dlan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/riscv:master commit in: www-client/chromium/, www-client/chromium/files/
Date: Sun, 28 Apr 2024 12:54:57 +0000 (UTC)	[thread overview]
Message-ID: <1714308857.32c8c053f44a354a120c90e102c2b0f1f561fbf8.dlan@gentoo> (raw)

commit:     32c8c053f44a354a120c90e102c2b0f1f561fbf8
Author:     Andrew Cameron <apcameron <AT> gmail <DOT> com>
AuthorDate: Mon Apr 15 10:31:52 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Apr 28 12:54:17 2024 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=32c8c053

www-client/chromium/: Update to 123.0.6312.122

Closes: https://github.com/gentoo/riscv/pull/14
Signed-off-by: Andrew Cameron <apcameron <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 www-client/chromium/Manifest                       |   4 +-
 ...12.58.ebuild => chromium-123.0.6312.122.ebuild} | 112 +++++++++++++++------
 .../chromium/files/chromium-123-qt-gui-check.patch |  31 ++++++
 3 files changed, 115 insertions(+), 32 deletions(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index fd20d18..3786d14 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -1,9 +1,9 @@
 DIST chromium-123-clang.tar.xz 50178332 BLAKE2B 4b5c4f81a83c7b0c809c93a713e869fde6fe559477665cb3b2f03c62d2175f821b81fb03b0ddd127c6eaf77c41011b4de06561f09a58384153d80fe2b3aa7427 SHA512 17108b9579f16d0da383bd5e41d012f94bcb8445a517ff823aa49b66d3861b0a124b6cce6183fbc64e8050f1ebcd65a9daa2acbda5fdaa42390bfbf4ecb16bd3
 DIST chromium-123-rust.tar.xz 145295100 BLAKE2B ae6603a0e0218e4e39d3e8b7aa48a2cd946c90779dac48be26582926963c8a10a48e3e58fd00a23cb8cd9a3584d9d4a142e843f93c761e862253817635f18c2c SHA512 b4f8dce6d74be4be495d9948d7593ec9664c0b93e87456fab33d3ae5ac0e486a4e8576b26a9ab9890285a7c0d566afb803b98225c0692b6cac9f623a10b954a2
 DIST chromium-123.0.6312.105.tar.xz 3481204616 BLAKE2B 8adbc4a0c96ea53b45b26a48c8eb94e29b31b981471a0d5fda4cdea1f7aa69714a9e5a5729a61a49a92b6322889ee794b4c7ac5e243bc495ff5bd04cdc59f616 SHA512 a1abbba78c96fd7bc44a23b21d8180ebff015d17abcb186dece595513fda9d4443ac67498a78181589884c384a48e6c3abfe72e6ee806fdfc764d05f13fb5cb6
-DIST chromium-123.0.6312.58.tar.xz 3465099244 BLAKE2B d0b85e740924a33350c5b6d3a6d1e94c8b946c52ac760237b2391127c99326c64b50de29751850dc368331b66402ab0c4fc65b9aeef09302857a1f5300a0d17b SHA512 4cb08767b8a6fe268c44bd7b621632c71f7d2f3f6c1b7bae9e0373dfc2eada397ab511a068582c2d17bbf3ee9ff16f05fccd454d610d63dd2fd14d6ca355a0c0
+DIST chromium-123.0.6312.122.tar.xz 3488275388 BLAKE2B 9f7e6c4984a41dbed6849eee08d4f6b8241c86ece0250d67786038980f3d7f208897f42b279c20ffbb965e8e49427ce74e896c34b40390321780b9cc2ba685ce SHA512 23e13d1d5758aa771f4c66e1a55068438e7c4890456dcb0b7a1fc1839b750e612e29d59e744c8b773935757aad01b78a5fecc3e03057a8acbb7e997dbb98f007
 DIST chromium-patches-123.tar.bz2 4697 BLAKE2B 8a7dd76edb23afb7b2f65084696bce5d6e54d63ca34c4590052db1086ed0a422b1efde863c4daad4e2526f329eb65276b9ad5406017cd97fb75b1a9556c1f933 SHA512 ea47255deac1893896f64496629d34c7092f266a175b8400fcf4f01b9d038ae240e911bff488558bb28e6f5795bbcf276adf20ed1e0ccb8ac99f9ddd260742f9
 DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c
 DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c
-DIST chromium_122.0.6261.57-1raptor0~deb12u1.debian.tar.xz 551860 BLAKE2B b3f9bef07a38061553816d6f0faf610cc19cc8565605bb520c163906a02e91795a6c6ae05c92ebbb6ccaf95e130438c8bf3c70d26a04951e8438074edb48b63d SHA512 6037a47e1011304ee33447ac11fa84a3355176b5452ad9f7132eebf2527eb3e4fc42635e148731b77b17db243b42172203feacb0443e6071dc9cc7c52d41f7d6
+DIST chromium_123.0.6312.105-1raptor0~deb12u1.debian.tar.xz 579484 BLAKE2B 587082358377f7bc0dca0dec83772abb7e040ad894ca4d456a294b7f5c19297acbc5b1dac725d3c1dbaaeefd480328c6c06c607438e560aa6359c1e98c4b1c9c SHA512 6b670a139e284cc96da65ff3c1b3e715cd9b436de2404792d619cfad23e2040fd931e7cc49f0b1ac17e11522804a4c9a621cb943e0dab33fb5bf422e954c5421
 DIST chromium_123.0.6312.86-1raptor0~deb12u1.debian.tar.xz 579124 BLAKE2B a27996211fbed198480e50934e39b0eda4c39e5e78a03f9b290cb90a6c8d7003b6aa828bf35e6744e9d7aa9a922f43baa77d6c9768140baf5749a797c2dad664 SHA512 cfb51fd910f3330100a2dc9ea993d537f126329ff2c590744954a3bfbb712d7bf1d7ad9066628aba5d28c98f2f9b069cf02f8c6048d2ad0a1a376468bdbd9196

diff --git a/www-client/chromium/chromium-123.0.6312.58.ebuild b/www-client/chromium/chromium-123.0.6312.122.ebuild
similarity index 91%
rename from www-client/chromium/chromium-123.0.6312.58.ebuild
rename to www-client/chromium/chromium-123.0.6312.122.ebuild
index 3ab7690..d9b1d00 100644
--- a/www-client/chromium/chromium-123.0.6312.58.ebuild
+++ b/www-client/chromium/chromium-123.0.6312.122.ebuild
@@ -6,15 +6,16 @@ EAPI=8
 PYTHON_COMPAT=( python3_{11..12} )
 PYTHON_REQ_USE="xml(+)"
 
-# PACKAGING NOTES:
+# PACKAGING NOTES
+
 # Google roll their bundled Clang every two weeks, and the bundled Rust
 # is rolled regularly and depends on that. While we do our best to build
 # with system Clang, we will eventually hit the point where we need to use
 # the bundled Clang due to the use of prerelease features. We've been lucky
 # enough so far that this hasn't been an issue.
 
-# We try and avoid forcing the use of libcxx, but sometimes it is unavoidable.
-# Remember to force the use of Clang when this is forced.
+# We try and avoid forcing the use of the custom/bundled libcxx, but sometimes
+# it is unavoidable. Remember to force the use of Clang when this is forced.
 
 # GCC is _not_ supported upstream, though patches are welcome. We do our
 # best to enable builds with GCC but reserve the right to force Clang
@@ -24,6 +25,15 @@ PYTHON_REQ_USE="xml(+)"
 # GN is bundled with Chromium, but we always use the system version. Remember to
 # check for upstream changes to GN and update ebuild (and version below) as required.
 
+# For binhost users, if USE=bindist is set, we configure Chromium in a way that it is able
+# to use proprietary codecs, and so that ffmpeg is an external component (libffmpeg.so),
+# then we remove ffmpeg from the image to ensure that the built package is distributable
+# (i.e. we don't owe royalties). A suitable libffmpeg.so is symlinked in its place;
+# as a result of this, ffmpeg[chromium] or ffmpeg-chromium must be installed on the system.
+
+# For non-binhost builds, we build the bundled ffmpeg and enable proprietary codecs because there's
+# no reason not to. Todo: Re-enable USE=system-ffmpeg.
+
 # These variables let us easily bound supported major dependency versions in one place.
 GCC_MIN_VER=12
 GN_MIN_VER=0.2154
@@ -37,6 +47,7 @@ GOOGLE_CLANG_VER=llvmorg-19-init-2319-g7c4c2746-1
 GOOGLE_RUST_VER=340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3
 
 # https://bugs.chromium.org/p/v8/issues/detail?id=14449 - V8 used in 120 can't build with GCC
+# Resolved upstream, requires testing and some backporting I'm sure
 : ${CHROMIUM_FORCE_CLANG=yes}
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101227 - Chromium 120:
 #    webrtc -  no matching member function for call to 'emplace'
@@ -57,7 +68,7 @@ inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-
 
 DESCRIPTION="Open-source version of Google Chrome web browser"
 HOMEPAGE="https://www.chromium.org/"
-PATCHSET_PPC64="122.0.6261.57-1raptor0~deb12u1"
+PATCHSET_PPC64="123.0.6312.105-1raptor0~deb12u1"
 PATCH_V="${PV%%\.*}"
 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
 	system-toolchain? (
@@ -77,16 +88,19 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
 
 LICENSE="BSD"
 SLOT="0/stable"
-KEYWORDS="~amd64 ~arm64 ~riscv"
+KEYWORDS="~amd64 arm64 ~ppc64 ~riscv"
 IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd"
-IUSE="+X ${IUSE_SYSTEM_LIBS} cups debug gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio"
-IUSE+=" qt5 qt6 screencast selinux +system-toolchain vaapi wayland widevine"
+IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio"
+IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine"
+RESTRICT="!bindist? ( bindist )"
+
 REQUIRED_USE="
 	!headless? ( || ( X wayland ) )
 	pgo? ( X !wayland )
 	qt6? ( qt5 )
 	screencast? ( wayland )
 	!system-toolchain? ( libcxx )
+	ffmpeg-chromium? ( bindist proprietary-codecs )
 "
 
 COMMON_X_DEPEND="
@@ -174,6 +188,10 @@ RDEPEND="${COMMON_DEPEND}
 	)
 	virtual/ttf-fonts
 	selinux? ( sec-policy/selinux-chromium )
+	bindist? (
+		!ffmpeg-chromium? ( >=media-video/ffmpeg-6.1-r1:0/58.60.60[chromium] )
+		ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
+	)
 "
 DEPEND="${COMMON_DEPEND}
 	!headless? (
@@ -346,9 +364,13 @@ pkg_pretend() {
 	if use headless; then
 		local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt5" "qt6" "vaapi" "wayland")
 		for myiuse in ${headless_unused_flags[@]}; do
-			use ${myiuse} && ewarn "Ignoring USE=${myiuse} since USE=headless is set."
+			use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
 		done
 	fi
+
+	if ! use bindist && use ffmpeg-chromium; then
+		ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
+	fi
 }
 
 pkg_setup() {
@@ -405,19 +427,21 @@ src_prepare() {
 		"${FILESDIR}/chromium-109-system-zlib.patch"
 		"${FILESDIR}/chromium-111-InkDropHost-crash.patch"
 		"${FILESDIR}/chromium-117-system-zstd.patch"
-        "${FILESDIR}/00swiftshader-MCDissassembler.patch"
-        "${FILESDIR}/00swiftshader-use-llvm16.patch"
-        "${FILESDIR}/01fix-rust-target.patch"
-        "${FILESDIR}/02Debian-fix-rust-linking.patch"
-        "${FILESDIR}/03riscv-dav1d.patch"
-        "${FILESDIR}/05riscv-sandbox.patch"
-        "${FILESDIR}/06riscv-ffmpeg.patch"
-        "${FILESDIR}/09riscv.patch"
-        "${FILESDIR}/10cpuinfo.patch"
+		"${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch"
+		"${FILESDIR}/chromium-123-qt-gui-check.patch"
+		"${FILESDIR}/00swiftshader-MCDissassembler.patch"
+		"${FILESDIR}/00swiftshader-use-llvm16.patch"
+		"${FILESDIR}/01fix-rust-target.patch"
+		"${FILESDIR}/02Debian-fix-rust-linking.patch"
+		"${FILESDIR}/03riscv-dav1d.patch"
+		"${FILESDIR}/05riscv-sandbox.patch"
+		"${FILESDIR}/06riscv-ffmpeg.patch"
+		"${FILESDIR}/09riscv.patch"
+		"${FILESDIR}/10cpuinfo.patch"
 	)
 
 	if use system-toolchain; then
-		# The patchset is really only required if we're not using the system-toolchain
+		# The patchset is really only required if we're using the system-toolchain
 		PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" )
 		# We can't use the bundled compiler builtins
 		sed -i -e \
@@ -443,6 +467,7 @@ src_prepare() {
 		done
 		PATCHES+=( "${WORKDIR}/ppc64le" )
 		PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" )
+		PATCHES+=( "${WORKDIR}/debian/patches/fixes/blink-fonts-shape-result.patch" )
 	fi
 
 	default
@@ -733,9 +758,9 @@ src_prepare() {
 	if use arm64 || use ppc64 ; then
 		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
 	fi
-	if use riscv ; then
-		keeplibs+=( third_party/swiftshader/third_party/llvm-16.0 )
-	fi
+    if use riscv  ; then
+        keeplibs+=( third_party/swiftshader/third_party/llvm-16.0 )
+    fi
 	# we need to generate ppc64 stuff because upstream does not ship it yet
 	# it has to be done before unbundling.
 	if use ppc64; then
@@ -849,13 +874,17 @@ chromium_configure() {
 		local rustc_ver
 		rustc_ver=$(chromium_rust_version_check)
 		if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then
-			eerror "Rust >=${RUST_MIN_VER} is required"
-			eerror "Please run 'eselect rust' and select the correct rust version"
-			die "Selected rust version is too old"
+				eerror "Rust >=${RUST_MIN_VER} is required"
+				eerror "Please run 'eselect rust' and select the correct rust version"
+				die "Selected rust version is too old"
 		else
-			einfo "Using rust ${rustc_ver} to build"
+				einfo "Using rust ${rustc_ver} to build"
+		fi
+		if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then
+				myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\""
+		else
+				myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\""
 		fi
-		myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\""
 		myconf_gn+=" rustc_version=\"${rustc_ver}\""
 	fi
 
@@ -961,9 +990,19 @@ chromium_configure() {
 	# Disable code formating of generated files
 	myconf_gn+=" blink_enable_generated_code_formatting=false"
 
-	ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
-	myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
-	myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
+	if use bindist ; then
+		# proprietary_codecs just forces Chromium to say that it can use h264/aac,
+		# the work is still done by ffmpeg. If this is set to no Chromium
+		# won't be able to load the codec even if the library can handle it
+		myconf_gn+=" proprietary_codecs=true"
+		myconf_gn+=" ffmpeg_branding=\"Chrome\""
+		# build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
+		myconf_gn+=" is_component_ffmpeg=true"
+	else
+		ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
+		myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
+		myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
+	fi
 
 	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
 	# Note: these are for Gentoo use ONLY. For your own distribution,
@@ -1012,7 +1051,7 @@ chromium_configure() {
     elif [[ $myarch = riscv ]] ; then
         myconf_gn+=" target_cpu=\"riscv64\""
         ffmpeg_target_arch=riscv64
-	else
+    else
 		die "Failed to determine target arch, got '$myarch'."
 	fi
 
@@ -1317,6 +1356,19 @@ src_install() {
 	insinto "${CHROMIUM_HOME}"
 	doins out/Release/*.bin
 	doins out/Release/*.pak
+
+	if use bindist; then
+		# We built libffmpeg as a component library, but we can't distribute it
+		# with proprietary codec support. Remove it and make a symlink to the requested
+		# system library.
+		rm -f out/Release/libffmpeg.so \
+			|| die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
+		# symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
+		einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
+		dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
+			/usr/$(get_libdir)/chromium-browser/libffmpeg.so
+	fi
+
 	(
 		shopt -s nullglob
 		local files=(out/Release/*.so out/Release/*.so.[0-9])

diff --git a/www-client/chromium/files/chromium-123-qt-gui-check.patch b/www-client/chromium/files/chromium-123-qt-gui-check.patch
new file mode 100644
index 0000000..53c1ca8
--- /dev/null
+++ b/www-client/chromium/files/chromium-123-qt-gui-check.patch
@@ -0,0 +1,31 @@
+From 3a812de6e7e0b285eda21ebbb670ca809c4db2b5 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <Matt.Jolly@footclan.ninja>
+Date: Thu, 11 Apr 2024 12:42:17 +1000
+Subject: [PATCH] Add QtGui to the list of Qt modules
+
+Re: https://bugreports.qt.io/browse/QTBUG-124135 - certain versions of QT
+(6.6.3, 6.7.0) produce pkg-config files that no longer emit dependencies.
+This causes Chromium builds to fail as due to not seeing QtGui as a dependency
+of QtWidgets:
+
+    `gen/qt6/../../../../ui/qt/qt_shim.h:11:10: fatal error: 'QImage' file not found`
+
+While this has been resolved upstream, there will certainly be some users
+that are still using these versions of QT. This patch adds QtGui to the list of
+Qt modules that are required to build the Chromium UI.
+
+Bug: https://bugs.gentoo.org/928299
+Suggested-by: Chris Pritchard <chris@christopherpritchard.co.uk>
+Signed-off-by: Matt Jolly <kangie@gentoo.org>
+--- a/ui/qt/BUILD.gn
++++ b/ui/qt/BUILD.gn
+@@ -60,6 +60,7 @@ template("qt_shim") {
+   pkg_config("qt" + invoker.qt_version + "_config") {
+     packages = [
+       "Qt" + invoker.qt_version + "Core",
++      "Qt" + invoker.qt_version + "Gui",
+       "Qt" + invoker.qt_version + "Widgets",
+     ]
+   }
+-- 
+2.44.0


             reply	other threads:[~2024-04-28 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28 12:54 Yixun Lan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-19 20:47 [gentoo-commits] proj/riscv:master commit in: www-client/chromium/, www-client/chromium/files/ Jakov Smolić
2025-02-10 13:17 Jakov Smolić
2024-09-01 20:38 Florian Schmaus
2024-04-08 14:34 Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1714308857.32c8c053f44a354a120c90e102c2b0f1f561fbf8.dlan@gentoo \
    --to=dlan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox