commit:     fd8aa7f0ae5bcdd8f26602548afcfe56fbd8a436
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  3 08:00:24 2026 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Tue Mar  3 11:07:29 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd8aa7f0

www-client/chromium: fix rustfmt hack for rust-bin

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

 www-client/chromium/chromium-145.0.7632.109.ebuild    | 10 ++++++++--
 www-client/chromium/chromium-145.0.7632.116-r1.ebuild | 10 ++++++++--
 www-client/chromium/chromium-145.0.7632.116.ebuild    | 10 ++++++++--
 www-client/chromium/chromium-146.0.7680.31-r1.ebuild  | 10 ++++++++--
 www-client/chromium/chromium-147.0.7703.0.ebuild      | 10 ++++++++--
 5 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/www-client/chromium/chromium-145.0.7632.109.ebuild 
b/www-client/chromium/chromium-145.0.7632.109.ebuild
index 1b5caba99501..017dd8e26f41 100644
--- a/www-client/chromium/chromium-145.0.7632.109.ebuild
+++ b/www-client/chromium/chromium-145.0.7632.109.ebuild
@@ -645,8 +645,14 @@ src_prepare() {
 
                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 ||
+               # We can't rely on the eselect'd Rust to actually include 
rustfmt, so we'll point to the selected slot specifically.
+               local suffix=""
+               if [[ "${RUST_TYPE}" == "binary" ]]; then
+                       suffix="-bin-${RUST_SLOT}"
+               else
+                       suffix="-${RUST_SLOT}"
+               fi
+               sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" 
build/rust/rust_bindgen_generator.gni ||
                        die "Failed to update rustfmt path"
 
        fi

diff --git a/www-client/chromium/chromium-145.0.7632.116-r1.ebuild 
b/www-client/chromium/chromium-145.0.7632.116-r1.ebuild
index 5fe6694c8e21..e02aabd6fcc2 100644
--- a/www-client/chromium/chromium-145.0.7632.116-r1.ebuild
+++ b/www-client/chromium/chromium-145.0.7632.116-r1.ebuild
@@ -591,8 +591,14 @@ src_prepare() {
 
                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 ||
+               # We can't rely on the eselect'd Rust to actually include 
rustfmt, so we'll point to the selected slot specifically.
+               local suffix=""
+               if [[ "${RUST_TYPE}" == "binary" ]]; then
+                       suffix="-bin-${RUST_SLOT}"
+               else
+                       suffix="-${RUST_SLOT}"
+               fi
+               sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" 
build/rust/rust_bindgen_generator.gni ||
                        die "Failed to update rustfmt path"
 
        fi

diff --git a/www-client/chromium/chromium-145.0.7632.116.ebuild 
b/www-client/chromium/chromium-145.0.7632.116.ebuild
index ea2b84121d53..258e82a5f730 100644
--- a/www-client/chromium/chromium-145.0.7632.116.ebuild
+++ b/www-client/chromium/chromium-145.0.7632.116.ebuild
@@ -646,8 +646,14 @@ src_prepare() {
 
                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 ||
+               # We can't rely on the eselect'd Rust to actually include 
rustfmt, so we'll point to the selected slot specifically.
+               local suffix=""
+               if [[ "${RUST_TYPE}" == "binary" ]]; then
+                       suffix="-bin-${RUST_SLOT}"
+               else
+                       suffix="-${RUST_SLOT}"
+               fi
+               sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" 
build/rust/rust_bindgen_generator.gni ||
                        die "Failed to update rustfmt path"
 
        fi

diff --git a/www-client/chromium/chromium-146.0.7680.31-r1.ebuild 
b/www-client/chromium/chromium-146.0.7680.31-r1.ebuild
index c79fda8c7b10..04280933f2a6 100644
--- a/www-client/chromium/chromium-146.0.7680.31-r1.ebuild
+++ b/www-client/chromium/chromium-146.0.7680.31-r1.ebuild
@@ -588,8 +588,14 @@ src_prepare() {
 
                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 ||
+               # We can't rely on the eselect'd Rust to actually include 
rustfmt, so we'll point to the selected slot specifically.
+               local suffix=""
+               if [[ "${RUST_TYPE}" == "binary" ]]; then
+                       suffix="-bin-${RUST_SLOT}"
+               else
+                       suffix="-${RUST_SLOT}"
+               fi
+               sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" 
build/rust/rust_bindgen_generator.gni ||
                        die "Failed to update rustfmt path"
 
        fi

diff --git a/www-client/chromium/chromium-147.0.7703.0.ebuild 
b/www-client/chromium/chromium-147.0.7703.0.ebuild
index b7a2fe2dd00f..17431a534555 100644
--- a/www-client/chromium/chromium-147.0.7703.0.ebuild
+++ b/www-client/chromium/chromium-147.0.7703.0.ebuild
@@ -588,8 +588,14 @@ src_prepare() {
 
                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 ||
+               # We can't rely on the eselect'd Rust to actually include 
rustfmt, so we'll point to the selected slot specifically.
+               local suffix=""
+               if [[ "${RUST_TYPE}" == "binary" ]]; then
+                       suffix="-bin-${RUST_SLOT}"
+               else
+                       suffix="-${RUST_SLOT}"
+               fi
+               sed -i "s|/bin/rustfmt|/bin/rustfmt${suffix}|g" 
build/rust/rust_bindgen_generator.gni ||
                        die "Failed to update rustfmt path"
 
        fi

Reply via email to