commit:     473ed1e83f14a2c8c54913c3c00a60c67c3d349d
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 18 06:32:09 2026 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sun Jan 18 06:49:54 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=473ed1e8

www-client/chromium: fix Rust build.

This fixes two minor issues:

1. a new dependency on `rustfmt` (reverted)
2. a poor upstream assumption that `adler2` is a nightly Rust feature.

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

 www-client/chromium/Manifest                       |   2 +-
 www-client/chromium/chromium-144.0.7559.59.ebuild  |   9 +-
 .../chromium-144-bindgen-custom-toolchain.patch    | 117 ---------------------
 3 files changed, 4 insertions(+), 124 deletions(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 4b429cf097de..f38aafe5ea6c 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -9,7 +9,7 @@ DIST chromium-openpower-a85b64f07b.tar.bz2 2940 BLAKE2B 
671e22109410b84d026ee9e7
 DIST chromium-openpower-e1538a2234.tar.bz2 2940 BLAKE2B 
671e22109410b84d026ee9e73f6112e99023707b97b6af204da8adca7fd53c85d6f5b634ad400596bbc1314f21a011a38a25aa029580529306cc1ad958d4a913
 SHA512 
34b3e93c23f320e8ce8164527544e37c771d3663951b032e1213db83c0559a85588dbedaa1c92a493cb3e187d6afc8a9601c9e82c07d8cb402e2f1e2dc4b4312
 DIST chromium-patches-138-1.tar.bz2 11109 BLAKE2B 
a4b57c2f5cadae37f6284e458ec8941c09ae98658c099e638817919da9686ec412b619a21bd208ce79b471d27bbfcf589a94695f636f381a2de60f14fe8fe367
 SHA512 
b930ac8cb86aa5143cecf04c076a07a366328806b20ba4c6c09844b4411b74a0ad04dfbf182966e9401e3d1ee4a6f4b3e12e7f9b015c5f33311ebe0ffd76d5da
 DIST chromium-patches-143.tar.bz2 10540 BLAKE2B 
b23f13df5e246c67e4c3a036948c439606eec67262f617de4bde22927eab69a575ccae1e6d512fe435d6766617eee7ed1a518e3a8cbb29334d76c5b98f0a9702
 SHA512 
7d843923f5ea78288c6c02195fb94771c0014ef3826f070a79fbde03f04a0b035e62ab8b4850597a0abb572b3d7548e41978696d31cdfbfb5121a77f8c3c8dd9
-DIST chromium-patches-144.tar.bz2 10640 BLAKE2B 
545e0ee301a0ec9d089846c9b34641c1ea3a6b010cc494264e0c99459fd4d2200f2733d773599088ba906fc4e7022963ae1ac810af0a89d3c18197c8c2289221
 SHA512 
d7f0698f0e7ba29719deb09be4c998e42e1db1fed696f13725bfb14e0b04e2bd2e2e4a36a298cac9ee9a1802202b0f1fa0f57ddebad49656cc417e3726ab5768
+DIST chromium-patches-144-1.tar.bz2 12759 BLAKE2B 
e452233b78a4223bbb88a7b380c8e3605f9f59cfe3deaaecdf54a54ee41aa22fb55447fa291490aac124e2b72b91927bddf7955542a7eac742b4e7e6363dae2b
 SHA512 
f5d78920a73afbe2b262687a5521ff8031e88c168df8853bc54cf88d1f27b59053e9228bd7cf43e06c7198c396f085498d2eaf28cb01203038dae04d32129fe4
 DIST chromium-patches-copium-8025c57b5b.tar.gz 6040 BLAKE2B 
da25ce8c41703c4e8b3a158442fe459491dd4266a51867bd2fb327b37ed49b564ca51506f73ac015d57c0ddddcc2fe00e137958894a481e3426ffe752fa5381c
 SHA512 
9fdeb9cc743e44a78ed694408250f533a9079886a212d57621d1b60d0d6a218f6dddbe4987e464ea48ba28ae1400e6f4d1e9e0ce89c23c33219b8f1f4eddcab2
 DIST chromium-patches-copium-bd8cca0b09.tar.gz 6315 BLAKE2B 
a1e7aeb3e4d366ea674d04b3043424834b1f8e485304778a411e29df29221afd875c89d346503f1e0bdec7521748d7ccc013108762402da6eb75cf80e50b9e11
 SHA512 
c9009eb8dbed209fa6be5e3819091ffa915fe3b18c3dd26e43f5eae2cbc113f15148f59cbef0623e1e5d7f7cd88dc9c469a21661a6502dc0bc410682c29c61a5
 DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 
5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d
 SHA512 
9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c

diff --git a/www-client/chromium/chromium-144.0.7559.59.ebuild 
b/www-client/chromium/chromium-144.0.7559.59.ebuild
index c75a899b77e0..2c7dc0dbaa03 100644
--- a/www-client/chromium/chromium-144.0.7559.59.ebuild
+++ b/www-client/chromium/chromium-144.0.7559.59.ebuild
@@ -50,7 +50,7 @@ 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%%\.*}"
+PATCH_V="${PV%%\.*}-1"
 COPIUM_COMMIT="bd8cca0b09a9316960853a3150c26e18ed59afd9"
 
SRC_URI="https://github.com/chromium-linux-tarballs/chromium-tarballs/releases/download/${PV}/chromium-${PV}-linux.tar.xz
        !bundled-toolchain? (
@@ -477,7 +477,6 @@ src_prepare() {
                "${FILESDIR}/${PN}-131-unbundle-icu-target.patch"
                "${FILESDIR}/${PN}-135-oauth2-client-switches.patch"
                "${FILESDIR}/${PN}-138-nodejs-version-check.patch"
-               "${FILESDIR}/${PN}-144-bindgen-custom-toolchain.patch"
                "${FILESDIR}/${PN}-cross-compile.patch"
        )
 
@@ -549,10 +548,8 @@ src_prepare() {
                fi
 
                # Oxidised hacks, let's keep 'em all in one place
-               # Fixes a nightly rust "feature"
-               if [[ ${RUST_SLOT} != 9999 ]]; then
-                       PATCHES+=( 
"${WORKDIR}/copium/cr144-rust-1.86-is-not-nightly--adler2.patch" )
-               fi
+               # "Adler2" is part of the stdlib since Rust 1.86, but it's 
behind a nightly-only feature flag in GN.
+               PATCHES+=( 
"${WORKDIR}/copium/cr144-rust-1.86-is-not-nightly--adler2.patch" )
        fi
 
        default

diff --git 
a/www-client/chromium/files/chromium-144-bindgen-custom-toolchain.patch 
b/www-client/chromium/files/chromium-144-bindgen-custom-toolchain.patch
deleted file mode 100644
index d4f6135beff7..000000000000
--- a/www-client/chromium/files/chromium-144-bindgen-custom-toolchain.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From cfccbc11a92103f5983c8742f797aad100449152 Mon Sep 17 00:00:00 2001
-From: Matt Jolly <[email protected]>
-Date: Fri, 16 Jan 2026 19:06:45 +1000
-Subject: [PATCH] update bindgen patch for 144
-
-Signed-off-by: Matt Jolly <[email protected]>
----
- build/config/rust.gni                 | 11 +++++++++++
- build/rust/rust_bindgen.gni           | 15 ++++++---------
- build/rust/rust_bindgen_generator.gni | 22 ++++++++++++++++++----
- 3 files changed, 35 insertions(+), 13 deletions(-)
-
-diff --git a/build/config/rust.gni b/build/config/rust.gni
-index ef45a4a9a6..31f7b2a753 100644
---- a/build/config/rust.gni
-+++ b/build/config/rust.gni
-@@ -63,6 +63,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 05a660ddfc..06b50a53ff 100644
---- a/build/rust/rust_bindgen.gni
-+++ b/build/rust/rust_bindgen.gni
-@@ -17,16 +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 (!use_chromium_rust_toolchain &&
--    (current_cpu == "ppc64" || current_cpu == "s390x")) {
--  _libclang_path = rust_sysroot_absolute + "/lib64"
--} else 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 0ddb769276..698cbdcf6a 100644
---- a/build/rust/rust_bindgen_generator.gni
-+++ b/build/rust/rust_bindgen_generator.gni
-@@ -169,7 +169,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) {
-@@ -190,7 +190,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),
-       ]
-     }
- 
-@@ -233,14 +233,28 @@ 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,
-     ]
- 
-+    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.52.0
-

Reply via email to