commit:     750dfb36e60022b75e81c83400d93ee9e2abe1cc
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 26 07:12:47 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Fri Sep 26 07:51:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=750dfb36

www-client/chromium: fix build with bleeding-edge Rust

There's a dependency on `unicode_width` from the rust stdlib
that has been removed from modenrn Rust versions (1.91/1.92)
and as it turns out is not required for Chromium anyway.

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 www-client/chromium/chromium-138.0.7204.157.ebuild | 7 +++++++
 www-client/chromium/chromium-140.0.7339.185.ebuild | 6 ++++++
 www-client/chromium/chromium-140.0.7339.207.ebuild | 3 ++-
 www-client/chromium/chromium-141.0.7390.30.ebuild  | 6 ++++++
 4 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/www-client/chromium/chromium-138.0.7204.157.ebuild 
b/www-client/chromium/chromium-138.0.7204.157.ebuild
index f514d0a9a2bd..3e4167d6f8d5 100644
--- a/www-client/chromium/chromium-138.0.7204.157.ebuild
+++ b/www-client/chromium/chromium-138.0.7204.157.ebuild
@@ -500,6 +500,13 @@ src_prepare() {
                        sed -i 's/adler2/adler/' build/rust/std/BUILD.gn ||
                                die "Failed to tell GN that we have adler and 
not adler2"
                fi
+
+               # chromium@0420449584e2afb7473393f536379efe194ba23c
+               # this crate is not included in the latest versions of Rust,
+               # and apparently has been unnecessary in Chromium for a long 
time.
+                               sed -i '/unicode_width/d' 
build/rust/std/BUILD.gn ||
+                       die "Failed to remove unicode_width from 
build/rust/std/BUILD.gn"
+
        fi
 
        default

diff --git a/www-client/chromium/chromium-140.0.7339.185.ebuild 
b/www-client/chromium/chromium-140.0.7339.185.ebuild
index a65823c874aa..ab23d17eb372 100644
--- a/www-client/chromium/chromium-140.0.7339.185.ebuild
+++ b/www-client/chromium/chromium-140.0.7339.185.ebuild
@@ -554,6 +554,12 @@ src_prepare() {
                                die "Failed to tell GN that we have adler and 
not adler2"
                fi
 
+               # chromium@0420449584e2afb7473393f536379efe194ba23c
+               # this crate is not included in the latest versions of Rust,
+               # and apparently has been unnecessary in Chromium for a long 
time.
+                               sed -i '/unicode_width/d' 
build/rust/std/BUILD.gn ||
+                       die "Failed to remove unicode_width from 
build/rust/std/BUILD.gn"
+
                if ver_test ${RUST_SLOT} -lt "1.89.0"; then
                        # The rust allocator was changed in 1.89.0, so we need 
to patch sources for older versions
                        PATCHES+=( 
"${FILESDIR}/chromium-140-__rust_no_alloc_shim_is_unstable.patch" )

diff --git a/www-client/chromium/chromium-140.0.7339.207.ebuild 
b/www-client/chromium/chromium-140.0.7339.207.ebuild
index bb378103f187..6c9e60d05518 100644
--- a/www-client/chromium/chromium-140.0.7339.207.ebuild
+++ b/www-client/chromium/chromium-140.0.7339.207.ebuild
@@ -561,7 +561,8 @@ src_prepare() {
                # chromium@0420449584e2afb7473393f536379efe194ba23c
                # this crate is not included in the latest versions of Rust,
                # and apparently has been unnecessary in Chromium for a long 
time.
-               sed -i '/unicode_width/d' build/rust/std/BUILD.gn || die 
"Failed to remove unicode_width from build/rust/std/BUILD.gn"
+                               sed -i '/unicode_width/d' 
build/rust/std/BUILD.gn ||
+                       die "Failed to remove unicode_width from 
build/rust/std/BUILD.gn"
 
                if ver_test ${RUST_SLOT} -lt "1.89.0"; then
                        # The rust allocator was changed in 1.89.0, so we need 
to patch sources for older versions

diff --git a/www-client/chromium/chromium-141.0.7390.30.ebuild 
b/www-client/chromium/chromium-141.0.7390.30.ebuild
index 24cab3eff426..b375fcfe6a48 100644
--- a/www-client/chromium/chromium-141.0.7390.30.ebuild
+++ b/www-client/chromium/chromium-141.0.7390.30.ebuild
@@ -554,6 +554,12 @@ src_prepare() {
                                die "Failed to tell GN that we have adler and 
not adler2"
                fi
 
+               # chromium@0420449584e2afb7473393f536379efe194ba23c
+               # this crate is not included in the latest versions of Rust,
+               # and apparently has been unnecessary in Chromium for a long 
time.
+               sed -i '/unicode_width/d' build/rust/std/BUILD.gn ||
+                       die "Failed to remove unicode_width from 
build/rust/std/BUILD.gn"
+
                if ver_test ${RUST_SLOT} -lt "1.89.0"; then
                        # The rust allocator was changed in 1.89.0, so we need 
to patch sources for older versions
                        PATCHES+=( 
"${FILESDIR}/chromium-140-__rust_no_alloc_shim_is_unstable.patch" )

Reply via email to