www-client/chromium: use versioned rustfmt binary

Closes: https://bugs.gentoo.org/970825
Signed-off-by: Matt Jolly <kangie@gentoo.org>
This commit is contained in:
Matt Jolly
2026-03-03 17:03:01 +10:00
parent 237a6dc164
commit a7be8d0fa2
5 changed files with 33 additions and 10 deletions
@@ -622,8 +622,6 @@ src_prepare() {
shopt -u nullglob
remove_compiler_builtins
# Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
if use ppc64; then
local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
@@ -645,6 +643,12 @@ src_prepare() {
fi
fi
remove_compiler_builtins
# We can't rely on the eselect'd Rust to actually include bindgen, so we'll point to the selected slot specifically.
sed -i "s|/bin/rustfmt|/bin/rustfmt-${RUST_SLOT}|g" build/rust/rust_bindgen_generator.gni ||
die "Failed to update rustfmt path"
fi
default
@@ -568,8 +568,6 @@ src_prepare() {
shopt -u nullglob
remove_compiler_builtins
# Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
if use ppc64; then
local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
@@ -590,6 +588,13 @@ src_prepare() {
PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
fi
fi
remove_compiler_builtins
# We can't rely on the eselect'd Rust to actually include bindgen, so we'll point to the selected slot specifically.
sed -i "s|/bin/rustfmt|/bin/rustfmt-${RUST_SLOT}|g" build/rust/rust_bindgen_generator.gni ||
die "Failed to update rustfmt path"
fi
default
@@ -623,8 +623,6 @@ src_prepare() {
shopt -u nullglob
remove_compiler_builtins
# Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
if use ppc64; then
local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
@@ -646,6 +644,12 @@ src_prepare() {
fi
fi
remove_compiler_builtins
# We can't rely on the eselect'd Rust to actually include bindgen, so we'll point to the selected slot specifically.
sed -i "s|/bin/rustfmt|/bin/rustfmt-${RUST_SLOT}|g" build/rust/rust_bindgen_generator.gni ||
die "Failed to update rustfmt path"
fi
default
@@ -565,8 +565,6 @@ src_prepare() {
shopt -u nullglob
remove_compiler_builtins
# Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
if use ppc64; then
local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
@@ -587,6 +585,13 @@ src_prepare() {
PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
fi
fi
remove_compiler_builtins
# We can't rely on the eselect'd Rust to actually include bindgen, so we'll point to the selected slot specifically.
sed -i "s|/bin/rustfmt|/bin/rustfmt-${RUST_SLOT}|g" build/rust/rust_bindgen_generator.gni ||
die "Failed to update rustfmt path"
fi
default
@@ -565,8 +565,6 @@ src_prepare() {
shopt -u nullglob
remove_compiler_builtins
# Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
if use ppc64; then
local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
@@ -587,6 +585,13 @@ src_prepare() {
PATCHES+=( "${patchset_dir}/${isa_3_patch}" )
fi
fi
remove_compiler_builtins
# We can't rely on the eselect'd Rust to actually include bindgen, so we'll point to the selected slot specifically.
sed -i "s|/bin/rustfmt|/bin/rustfmt-${RUST_SLOT}|g" build/rust/rust_bindgen_generator.gni ||
die "Failed to update rustfmt path"
fi
default