commit: b7174b58acae7f89833644d337240b61dd34d2ff Author: Violet Purcell <vimproved <AT> inventati <DOT> org> AuthorDate: Thu Apr 10 19:31:29 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Apr 10 22:25:48 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7174b58
sys-kernel/scx: only inject abi for cargo output when cross-compiling Closes: https://bugs.gentoo.org/953423 Signed-off-by: Violet Purcell <vimproved <AT> inventati.org> Closes: https://github.com/gentoo/gentoo/pull/41462 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-kernel/scx/scx-1.0.10.ebuild | 10 ++++++---- sys-kernel/scx/scx-1.0.11.ebuild | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys-kernel/scx/scx-1.0.10.ebuild b/sys-kernel/scx/scx-1.0.10.ebuild index 8e371a730f10..fb14fc6c3c40 100644 --- a/sys-kernel/scx/scx-1.0.10.ebuild +++ b/sys-kernel/scx/scx-1.0.10.ebuild @@ -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/;' \ diff --git a/sys-kernel/scx/scx-1.0.11.ebuild b/sys-kernel/scx/scx-1.0.11.ebuild index e8bc85229521..b92746810bd7 100644 --- a/sys-kernel/scx/scx-1.0.11.ebuild +++ b/sys-kernel/scx/scx-1.0.11.ebuild @@ -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/;' \