commit:     02d53ccb0e3d4f1d09ece02f107e1a14b2af6788
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 17 08:41:52 2024 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sun Nov 17 10:45:16 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02d53ccb

www-client/chromium: update ppc64 handling in 133

- Use Solid Silicon patches
- Get patch order from sources
- Add missing debian rust patch to chromium-tarballs (from Raptor
  patchset)

Bug: https://bugs.gentoo.org/940304
Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 www-client/chromium/Manifest                     |  2 +-
 www-client/chromium/chromium-133.0.6835.3.ebuild | 43 +++++++++++++++++-------
 2 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index aa68ba2fe1e0..2b7b0928256f 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -16,7 +16,7 @@ DIST chromium-patches-129.tar.bz2 5071 BLAKE2B 
080e1af8b0560a3c5365674e7c8d59231
 DIST chromium-patches-130-2.tar.bz2 10151 BLAKE2B 
b46515a3e01153d8c4e5c3ee1f6e9f905265bf88b698d46c8ceed0f90d36a057b8bb30a860e8d934bf0b85f9c0a671bef2c9a00349228fa076b7aec37ff62ca0
 SHA512 
e1ecca666c3998ee285426751be3220a5b67a057f2c92b1f45c7b786efb8d0b0e1d49ba70471fa74155f79f22811d240af636f61007191756c9981b53d3b23de
 DIST chromium-patches-131-1.tar.bz2 4932 BLAKE2B 
72006a6d751ae1207352547cdeef87f8cc9f9639283238da201d879c6fcd0f8bc499669cb030d8b4c2216fcd2730de46b0a071007b3d69a2bbdd22ba38bcd279
 SHA512 
11d7f861c007e9e28e5192fb354940180aea0e01e6e8ae77547e2dffd7b541b11f1acfe0fd0c8b6b4cbfc6c39ddfa79c8c08db42c1292ad329d49027d1406fc3
 DIST chromium-patches-132.tar.bz2 5040 BLAKE2B 
d5bd84dd90b395c6a15135637f51f931c72a2f301b1c24e9b938c744f2767fa36857b8edfdf5c44cf085a1efcb40475401fec226ce43446442f32fb174b55355
 SHA512 
29833b306a34ab6562ee58eb03669818da7235cd36666b27d829bcbd3c4d0035a530fb6be1c33cf88c1c11d43e68e3781f9b9602c0c004e7a37ffa69f9ee17c7
-DIST chromium-patches-133.tar.bz2 5043 BLAKE2B 
93f2ff92adab21afcb229005c77b47083754adce5c8a0a1c73f711b77b8139e4e149562675f44dce7abc5df7f0c808c6a53fad437e0395f36385a16406ee7e53
 SHA512 
e52a374e6c8f89c2c9f4e30bb76e83af1e47e0e2c4f0c1f8d80bb4d4fe6b0e8906f3debbb8f41b4c4bb13aee262b7c12dc92836a318b161e35d5c60bb43c13cc
+DIST chromium-patches-133-1.tar.bz2 10661 BLAKE2B 
c8a141bd10e628533e373b08969f95443eb6ae7f4497359db02f370147ac6132fbc31db28915ebdd9f150c13be78f06af938bd7dffdf2c23d90e1b9e07bd92ab
 SHA512 
48a356872acc41c96c92366bd09de5a1c4af87fe4c480dccc7bd7a2aae5c3be8e6411151ed36303a127022001248bd25ef8305e83bd0d533660e3f11943af686
 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-testfonts-f26f29c9d3.tar.gz 32750602 BLAKE2B 
498f8b2e0811c98dc3d4aaa75559e69c782afb4bd12328cfdb7244ddba5cae7ee47becd27b2549d7b36bed417601f70f4c192934b0f08496cef1547d0502d93c
 SHA512 
96b090446862997c8134e2971f0e38793ecc1208d547e554c9b651ccfb4127c4de86754903fea57a7292a2823c45117bae0ec13ed87aed20c248fb779579fbde

diff --git a/www-client/chromium/chromium-133.0.6835.3.ebuild 
b/www-client/chromium/chromium-133.0.6835.3.ebuild
index 0ecedf89abe2..94f993471120 100644
--- a/www-client/chromium/chromium-133.0.6835.3.ebuild
+++ b/www-client/chromium/chromium-133.0.6835.3.ebuild
@@ -30,7 +30,7 @@ inherit python-any-r1 qmake-utils readme.gentoo-r1 rust 
systemd toolchain-funcs
 DESCRIPTION="Open-source version of Google Chrome web browser"
 HOMEPAGE="https://www.chromium.org/";
 PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}"
+PATCH_V="${PV%%\.*}-1"
 SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}.tar.xz -> 
${P}-gentoo.tar.xz
                
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
        test? (
@@ -356,8 +356,7 @@ src_unpack() {
        fi
 
        if use ppc64; then
-               unpack chromium_${PATCHSET_PPC64}.debian.tar.xz
-               unpack chromium-ppc64le-gentoo-patches-1.tar.xz
+               unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
        fi
 }
 
@@ -379,22 +378,42 @@ src_prepare() {
                "${FILESDIR}/chromium-132-bindgen-custom-toolchain.patch"
        )
 
-       PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" )
+       shopt -s globstar nullglob
+       # 130: moved the PPC64 patches into the chromium-patches repo
+       local patch
+       for patch in "${WORKDIR}/chromium-patches-${PATCH_V}"/**/*.patch; do
+               elog "Applying patch: ${patch}"
+               if [[ ${patch} == *"ppc64le"* ]]; then
+                       use ppc64 && PATCHES+=( "${patch}" )
+               else
+                       PATCHES+=( "${patch}" )
+               fi
+       done
+
+       shopt -u globstar nullglob
+
        # We can't use the bundled compiler builtins with the system toolchain
        # `grep` is a development convenience to ensure we fail early when 
google changes something.
        local builtins_match="if (is_clang && !is_nacl && !is_cronet_build) {"
        grep -q "${builtins_match}" build/config/compiler/BUILD.gn || die 
"Failed to disable bundled compiler builtins"
        sed -i -e "/${builtins_match}/,+2d" build/config/compiler/BUILD.gn
 
-       if use ppc64 ; then
-               local p
-               for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series | 
grep "^ppc64le" || die); do
-                       if [[ ! $p =~ "fix-breakpad-compile.patch" ]]; then
-                               eapply "${WORKDIR}/debian/patches/${p}"
-                       fi
+       if use ppc64; then
+               local 
patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
+               # patch causes build errors on 4K page systems 
(https://bugs.gentoo.org/show_bug.cgi?id=940304)
+               local 
page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
+               # Apply the OpenPOWER patches (check for page size)
+               openpower_patches=( $(grep -E "^ppc64le|^upstream" 
"${patchset_dir}/series" | grep -v "${page_size_patch}" || die) )
+               for patch in "${openpower_patches[@]}"; do
+                       PATCHES+=( "${patchset_dir}/${patch}" )
                done
-               PATCHES+=( "${WORKDIR}/ppc64le" )
-               PATCHES+=( 
"${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" )
+               if [[ $(getconf PAGESIZE) != 65536 ]]; then
+                               PATCHES+=( "${patchset_dir}/${page_size_patch}" 
)
+               fi
+               # We use vsx3 as a proxy for 'want isa3.0' (POWER9)
+               if use cpu_flags_ppc_vsx3 ; then
+                       PATCHES+=( 
"${patchset_dir}/ppc64le/core/baseline-isa-3-0.patch" )
+               fi
        fi
 
        # This is a nightly option that does not exist any current release

Reply via email to