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@gentoo.org>
This commit is contained in:
Matt Jolly
2025-09-26 17:12:47 +10:00
parent f2a96fc528
commit 750dfb36e6
4 changed files with 21 additions and 1 deletions

View File

@@ -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

View File

@@ -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" )

View File

@@ -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

View File

@@ -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" )