commit:     b5837be9c0a42e0cbc212f9ede4beb7d1a9a76aa
Author:     Andrew Cameron <apcameron <AT> gmail <DOT> com>
AuthorDate: Wed Feb 19 10:39:15 2025 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Wed Feb 19 20:47:12 2025 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=b5837be9

Update Chromium to 133.0.6943.98

Signed-off-by: Andrew Cameron <apcameron <AT> gmail.com>
Closes: https://github.com/gentoo/riscv/pull/25
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 www-client/chromium/Manifest                       |   8 +-
 ...943.53.ebuild => chromium-133.0.6943.98.ebuild} |  15 ++-
 .../chromium-134-bindgen-custom-toolchain.patch    | 123 +++++++++++++++++++++
 .../files/chromium-134-map_droppable-glibc.patch   |  35 ++++++
 .../files/chromium-135-fix-non-wayland-build.patch |  45 ++++++++
 5 files changed, 218 insertions(+), 8 deletions(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 9bf6d39..52f832f 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -1,6 +1,6 @@
-DIST chromium-133.0.6943.53-linux-testdata.tar.xz 299288504 BLAKE2B 
4ad9c3115b9e1b37ee49aef22d91af3df26b28f771b1aa217a1d7bdb3023608b3483bd98c0e77f9f2a22f7edd12fb6e63515225957555b93fabf0d0739439ec8
 SHA512 
517a1635baf033a00df5fff8aea22c1150b4ca97b6f9aebecfb0681c81f2708700a536a837c13bbd5ffa9938c7f32a0cc65ac648474df2613f15bedbffafaa11
-DIST chromium-133.0.6943.53-linux.tar.xz 2300503052 BLAKE2B 
567e1e7f1722bc4ff118ac292ecfd59cf8d9380612ec8a36a65b8df84802d75042128f4b9b0366e4682e5d5c98981470df204fba8fc26a4d53d2d379d73421d1
 SHA512 
d7d0a7433190f15516950fbd4ccb5f13ab3f543388748d6c48f3d4b24a745c263b12ec56225259d93a697774ebc75b18cb4bc17cfd9e98e4c0f66df7a2eff4f8
-DIST chromium-openpower-a85b64f07b.tar.bz2 387899 BLAKE2B 
b01fda2d64ce73068d1536a10cc0896f07a4b714cdb25698b1df8b3252baa0c21c4209b307cf1cb554854f6d0bfe3cd35e06aaa8d02ac5d409a119335084c324
 SHA512 
05eee81677e8766808441c939bee68e2e6c58ec91f471d88a40181d2eda78614a0a6d27d92ff8f9dda564d12f3451bace4ff2727594748c5c238a3533038019b
-DIST chromium-patches-133-1.tar.bz2 10661 BLAKE2B 
c8a141bd10e628533e373b08969f95443eb6ae7f4497359db02f370147ac6132fbc31db28915ebdd9f150c13be78f06af938bd7dffdf2c23d90e1b9e07bd92ab
 SHA512 
48a356872acc41c96c92366bd09de5a1c4af87fe4c480dccc7bd7a2aae5c3be8e6411151ed36303a127022001248bd25ef8305e83bd0d533660e3f11943af686
+DIST chromium-133.0.6943.98-linux-testdata.tar.xz 650569060 BLAKE2B 
9552d4814638713a3a7811446752a803c56b0a19945f55c4b145ce01b0e91a186e27abcefcc11a57eb0936d10e78157f22feb444da56ee5c754e10e334e5d9cc
 SHA512 
52e571b57d9c1723e0d96f59563a3b9a01be261dba9ff1fc2141a1e9287c9b30ee9ee834dec8f75900e4eb0926367e93747761cb8ebfce82050491459d5739b0
+DIST chromium-133.0.6943.98-linux.tar.xz 1455079544 BLAKE2B 
fc1a6fbc3a0b220c32a1cdca1f47d51ebf2d53aff871f40ba0f58e2834e01ebf9c96fb16c56d602c62beeb7559ddaab848cac611562ade971535a730abadb758
 SHA512 
5792b1de53045a95edc3c7877f5b27b7f12ffae411c31807b632280cb43f73af5400f260094387e1903e41322160f4e8c8113c69e60c1e33e7070bf53589a241
+DIST chromium-openpower-deefc994ce.tar.bz2 394232 BLAKE2B 
421b956493d964543c153ad6fb01798a8fa7331638ce9a2f414be1b77c029634e84a72c069a41b88f176f66611df0deb30a3af4061882d9ebf4ae8dc997a4cb9
 SHA512 
1f0a9c98dfe7441af14e14d8c2ddc0c7d393a56f392eef0782bec6c80d0742c1761fff3d3f6e3248cd8a3f3da0c10e675a7552ce240399088721f86b275b1d16
+DIST chromium-patches-133-2.tar.bz2 10895 BLAKE2B 
dafd0e4edd2869edaf86407365b97bab699602b5e70a53f88e4e5bec5c2d2b37b64c96559c7e955d0bf3faadb26beb486ac6f0a91b90ff19e52d68deab22f447
 SHA512 
9de1269527196f8c5d8e40bd20a5566d76a8311f12a33e3a6a67854993d4db5915d5b8d1e1fefa179ad1c8aff8b5454379b338a6e6a54d541c38c737e57b589b
 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.6943.53.ebuild 
b/www-client/chromium/chromium-133.0.6943.98.ebuild
similarity index 99%
rename from www-client/chromium/chromium-133.0.6943.53.ebuild
rename to www-client/chromium/chromium-133.0.6943.98.ebuild
index 976f414..074020a 100644
--- a/www-client/chromium/chromium-133.0.6943.53.ebuild
+++ b/www-client/chromium/chromium-133.0.6943.98.ebuild
@@ -29,8 +29,8 @@ inherit python-any-r1 readme.gentoo-r1 rust systemd 
toolchain-funcs virtualx xdg
 
 DESCRIPTION="Open-source version of Google Chrome web browser"
 HOMEPAGE="https://www.chromium.org/";
-PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
-PATCH_V="${PV%%\.*}-1"
+PPC64_HASH="deefc994ce2d31faf6d27f5e81782e039c663aed"
+PATCH_V="${PV%%\.*}-2"
 SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}-linux.tar.xz
                
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
        test? (
@@ -47,7 +47,7 @@ SLOT="0/stable"
 # Dev exists mostly to give devs some breathing room for beta/stable releases;
 # it shouldn't be keyworded but adventurous users can select it.
 if [[ ${SLOT} != "0/dev" ]]; then
-       KEYWORDS="~amd64 ~arm64 ~riscv"
+       KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
 fi
 
 IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd"
@@ -369,6 +369,8 @@ src_prepare() {
                "${FILESDIR}/chromium-131-oauth2-client-switches.patch"
                "${FILESDIR}/chromium-132-bindgen-custom-toolchain.patch"
                "${FILESDIR}/chromium-134-qt5-optional.patch"
+               "${FILESDIR}/chromium-134-map_droppable-glibc.patch"
+               "${FILESDIR}/chromium-135-fix-non-wayland-build.patch"
         "${FILESDIR}/swiftshader-MCDissassembler.patch"
         "${FILESDIR}/swiftshader-use-llvm16.patch"
         "${FILESDIR}/Debian-fix-rust-linking.patch"
@@ -430,7 +432,12 @@ src_prepare() {
 
        default
 
-       rm third_party/node/linux/node-linux-x64/bin/node || die
+       # Not included in -lite tarballs, but we should check for it anyway.
+       if [[ -f third_party/node/linux/node-linux-x64/bin/node ]]; then
+               rm third_party/node/linux/node-linux-x64/bin/node || die
+       else
+               mkdir -p third_party/node/linux/node-linux-x64/bin || die
+       fi
        ln -s "${EPREFIX}"/usr/bin/node 
third_party/node/linux/node-linux-x64/bin/node || die
 
     # if this is riscv apply wasm-node fix to get it to compile clean

diff --git 
a/www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch 
b/www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch
new file mode 100644
index 0000000..f5b0df8
--- /dev/null
+++ b/www-client/chromium/files/chromium-134-bindgen-custom-toolchain.patch
@@ -0,0 +1,123 @@
+From 04fe2f9010c2cc58eced407e6eb2124c67a60109 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kan...@gentoo.org>
+Date: Thu, 6 Feb 2025 11:40:08 +1000
+Subject: [PATCH] Make bindgen wrapper work with unbundled toolchain
+
+The `run_bindgen.py` wrapper takes a --libclang-path option
+and uses it to set the appropriate environment variable.
+
+This is currently hardcoded to use libclang shipped alongside
+bindgen (in our rust toolchain), but distributions may want to
+override this and use a system path.
+
+Additionally enable distros to feed in appropriate library paths.
+---
+ build/config/rust.gni                 | 11 +++++++++++
+ build/rust/rust_bindgen.gni           | 12 ++++++------
+ build/rust/rust_bindgen_generator.gni | 22 ++++++++++++++++++----
+ 3 files changed, 35 insertions(+), 10 deletions(-)
+
+diff --git a/build/config/rust.gni b/build/config/rust.gni
+index 5b9e3e1e65..1e93be41ff 100644
+--- a/build/config/rust.gni
++++ b/build/config/rust.gni
+@@ -64,6 +64,17 @@ declare_args() {
+   # the bindgen exectuable).
+   rust_bindgen_root = "//third_party/rust-toolchain"
+ 
++  # Directory under which to find one of `libclang.{dll,so}` (a `lib[64]` or
++  # `bin` directory containing the libclang shared library).
++  # We don't need to worry about multlib, but specify the full path here
++  # in case a distribution does.
++  if (host_os == "win") {
++    bindgen_libclang_path = "//third_party/rust-toolchain/bin"
++  } else {
++    bindgen_libclang_path = "//third_party/rust-toolchain/lib"
++  }
++
++
+   # If you're using a Rust toolchain as specified by rust_sysroot_absolute,
+   # set this to the output of `rustc -V`. Changing this string will cause all
+   # Rust targets to be rebuilt, which allows you to update your toolchain and
+diff --git a/build/rust/rust_bindgen.gni b/build/rust/rust_bindgen.gni
+index 5c809c6932..a493daa909 100644
+--- a/build/rust/rust_bindgen.gni
++++ b/build/rust/rust_bindgen.gni
+@@ -17,13 +17,13 @@ if (host_os == "win") {
+   _bindgen_path = "${_bindgen_path}.exe"
+ }
+ 
+-# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
+-# ../lib.
+-_libclang_path = rust_bindgen_root
+-if (host_os == "win") {
+-  _libclang_path += "/bin"
++if (clang_base_path != default_clang_base_path && custom_toolchain == 
"//build/toolchain/linux/unbundle:default") {
++  # Assume that the user has set this up properly, including handling multilib
++  _clang_libpath = clang_base_path + "/include"
++  _clang_ld_libpath  = bindgen_libclang_path
+ } else {
+-  _libclang_path += "/lib"
++  _clang_libpath = clang_base_path + "/lib/clang/" + clang_version
++  _clang_ld_libpath = clang_base_path + "/lib"
+ }
+ 
+ # Template to build Rust/C bindings with bindgen.
+diff --git a/build/rust/rust_bindgen_generator.gni 
b/build/rust/rust_bindgen_generator.gni
+index c91916be93..6afbef2f31 100644
+--- a/build/rust/rust_bindgen_generator.gni
++++ b/build/rust/rust_bindgen_generator.gni
+@@ -151,7 +151,7 @@ template("rust_bindgen_generator") {
+       "--output",
+       rebase_path(output_file, root_build_dir),
+       "--libclang-path",
+-      rebase_path(_libclang_path, root_build_dir),
++      rebase_path(bindgen_libclang_path, root_build_dir),
+     ]
+ 
+     if (_wrap_static_fns) {
+@@ -172,7 +172,7 @@ template("rust_bindgen_generator") {
+       # point to.
+       args += [
+         "--ld-library-path",
+-        rebase_path(clang_base_path + "/lib", root_build_dir),
++        rebase_path(bindgen_libclang_path, root_build_dir),
+       ]
+     }
+ 
+@@ -215,9 +215,14 @@ template("rust_bindgen_generator") {
+     # says the wrong thing. We point it to our clang's resource dir which will
+     # make it behave consistently with our other command line flags and allows
+     # system headers to be found.
+-    clang_resource_dir =
+-        rebase_path(clang_base_path + "/lib/clang/" + clang_version,
++    if (clang_base_path != default_clang_base_path && custom_toolchain == 
"//build/toolchain/linux/unbundle:default") {
++      clang_resource_dir =
++            rebase_path(clang_base_path + "/include", root_build_dir)
++    } else {
++       clang_resource_dir =
++            rebase_path(clang_base_path + "/lib/clang/" + clang_version,
+                     root_build_dir)
++    }
+     args += [
+       "-resource-dir",
+       clang_resource_dir,
+@@ -238,6 +243,15 @@ template("rust_bindgen_generator") {
+       }
+     }
+ 
++    if (custom_toolchain == "//build/toolchain/linux/unbundle:default") {
++      # We need to pass the path to the libstdc++ headers to bindgen so that 
it
++      # can find them when parsing C++ headers.
++      args += [
++        "-I",
++        rebase_path(clang_base_path + "/include/", root_build_dir),
++      ]
++    }
++
+     if (is_win) {
+       # On Windows we fall back to using system headers from a sysroot from
+       # depot_tools. This is negotiated by python scripts and the result is
+-- 
+2.48.0
+

diff --git a/www-client/chromium/files/chromium-134-map_droppable-glibc.patch 
b/www-client/chromium/files/chromium-134-map_droppable-glibc.patch
new file mode 100644
index 0000000..8220529
--- /dev/null
+++ b/www-client/chromium/files/chromium-134-map_droppable-glibc.patch
@@ -0,0 +1,35 @@
+From d1e4332f1a2361014175646fae4f4549b8c1abbf Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kan...@gentoo.org>
+Date: Thu, 13 Feb 2025 16:56:53 +1000
+Subject: [PATCH] seccomp: Define MAP_DROPPABLE for glibc 2.41
+
+Bug: https://bugs.gentoo.org/949654
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+@@ -1,3 +1,4 @@
++
+ // Copyright 2013 The Chromium Authors
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+@@ -35,6 +36,10 @@
+ #include "sandbox/linux/system_headers/linux_syscalls.h"
+ #include "sandbox/linux/system_headers/linux_time.h"
+ 
++#if !defined(MAP_DROPPABLE)
++#define MAP_DROPPABLE 0x08    // Zero memory under memory pressure.
++#endif
++
+ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
+     !defined(__arm__) && !defined(__aarch64__) &&             \
+     !defined(PTRACE_GET_THREAD_AREA)
+@@ -238,7 +243,7 @@ ResultExpr RestrictMmapFlags() {
+   // TODO(davidung), remove MAP_DENYWRITE with updated Tegra libraries.
+   const uint64_t kAllowedMask = MAP_SHARED | MAP_PRIVATE | MAP_ANONYMOUS |
+                                 MAP_STACK | MAP_NORESERVE | MAP_FIXED |
+-                                MAP_DENYWRITE | MAP_LOCKED |
++                                MAP_DENYWRITE | MAP_LOCKED | MAP_DROPPABLE |
+                                 kArchSpecificAllowedMask;
+   const Arg<int> flags(3);
+   return If((flags & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS());
+-- 
+2.48.0

diff --git a/www-client/chromium/files/chromium-135-fix-non-wayland-build.patch 
b/www-client/chromium/files/chromium-135-fix-non-wayland-build.patch
new file mode 100644
index 0000000..a31462a
--- /dev/null
+++ b/www-client/chromium/files/chromium-135-fix-non-wayland-build.patch
@@ -0,0 +1,45 @@
+From 919cda539b142b51fc2ef2342dbf1803b65f5434 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kan...@gentoo.org>
+Date: Wed, 12 Feb 2025 20:13:09 +1000
+Subject: [PATCH] remoting: Linux: guard wayland includes
+
+During the refactor in 53f3429926deb4cb92d9cddcda5fc096a0332db3
+wayland support became required to build this component.
+
+Only include wayland components in the `platform_impls` target
+if `ozone_platform_wayland` is true.
+
+Bug: 391722217
+See also: https://bugs.gentoo.org/948384
+Signed-off-by: Matt Jolly <kan...@gentoo.org>
+--- a/remoting/host/linux/BUILD.gn
++++ b/remoting/host/linux/BUILD.gn
+@@ -192,7 +192,6 @@ source_set("platform_impls") {
+     "wayland_seat.h",
+   ]
+   deps = [
+-    ":wayland",
+     ":x11",
+     ":x11_display_utils",
+     "//base",
+@@ -214,9 +213,16 @@ source_set("platform_impls") {
+     "//ui/base",
+     "//ui/base/x",
+     "//ui/events:dom_keycode_converter",
+-    "//ui/events/platform/wayland:wayland_event_watcher",
+     "//ui/gfx/x",
+   ]
++  # ui/events/platform/wayland:wayland_event_watcher asserts that the wayland
++  # platform is enabled.
++  if (ozone_platform_wayland) {
++    deps += [
++      ":wayland",
++      "//ui/events/platform/wayland:wayland_event_watcher",
++    ]
++  }
+ }
+ 
+ source_set("x11_display_utils") {
+-- 
+2.48.0
+

Reply via email to