sys-kernel/scx: only inject abi for cargo output when cross-compiling

Closes: https://bugs.gentoo.org/953423
Signed-off-by: Violet Purcell <vimproved@inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/41462
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Violet Purcell
2025-04-10 15:31:29 -04:00
committed by Sam James
parent e1d8a27e94
commit b7174b58ac
2 changed files with 12 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ CRATES="
RUST_MIN_VER="1.74.1"
inherit llvm-r1 linux-info cargo rust-toolchain meson
inherit llvm-r1 linux-info cargo rust-toolchain toolchain-funcs meson
DESCRIPTION="sched_ext schedulers and tools"
HOMEPAGE="https://github.com/sched-ext/scx"
@@ -70,9 +70,11 @@ pkg_setup() {
src_prepare() {
default
# Inject the rust_abi value into install_rust_user_scheds
sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \
meson-scripts/install_rust_user_scheds || die
if tc-is-cross-compiler; then
# Inject the rust_abi value into install_rust_user_scheds
sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \
meson-scripts/install_rust_user_scheds || die
fi
# bug #944832
sed -i 's;^#!/usr/bin/;#!/sbin/;' \

View File

@@ -10,7 +10,7 @@ CRATES="
RUST_MIN_VER="1.74.1"
inherit llvm-r1 linux-info cargo rust-toolchain meson
inherit llvm-r1 linux-info cargo rust-toolchain toolchain-funcs meson
DESCRIPTION="sched_ext schedulers and tools"
HOMEPAGE="https://github.com/sched-ext/scx"
@@ -70,9 +70,11 @@ pkg_setup() {
src_prepare() {
default
# Inject the rust_abi value into install_rust_user_scheds
sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \
meson-scripts/install_rust_user_scheds || die
if tc-is-cross-compiler; then
# Inject the rust_abi value into install_rust_user_scheds
sed -i "s;\${MESON_BUILD_ROOT};\${MESON_BUILD_ROOT}/$(rust_abi);" \
meson-scripts/install_rust_user_scheds || die
fi
# bug #944832
sed -i 's;^#!/usr/bin/;#!/sbin/;' \