1 |
commit: 0433bdce4b55fe0d3fb0071bcb826af0acef7d4d |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 23 04:43:12 2022 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 23 04:49:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0433bdce |
7 |
|
8 |
dev-lang/rust-bin: improve musl envd file in 1.64.0 |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
|
12 |
dev-lang/rust-bin/rust-bin-1.64.0.ebuild | 8 +++++--- |
13 |
1 file changed, 5 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/dev-lang/rust-bin/rust-bin-1.64.0.ebuild b/dev-lang/rust-bin/rust-bin-1.64.0.ebuild |
16 |
index 9e2846e0a8ac..9e7e4048e675 100644 |
17 |
--- a/dev-lang/rust-bin/rust-bin-1.64.0.ebuild |
18 |
+++ b/dev-lang/rust-bin/rust-bin-1.64.0.ebuild |
19 |
@@ -152,12 +152,14 @@ multilib_src_install() { |
20 |
dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" |
21 |
dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" |
22 |
|
23 |
- # musl logic can be improved a bit, but fine as is for now |
24 |
+ # make all capital underscored variable |
25 |
+ local CARGO_TRIPLET="$(rust_abi)" |
26 |
+ CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" |
27 |
+ CARGO_TRIPLET="${CARGO_TRIPLET^^}" |
28 |
cat <<-_EOF_ > "${T}/50${P}" |
29 |
LDPATH="${EPREFIX}/usr/lib/rust/lib" |
30 |
MANPATH="${EPREFIX}/usr/lib/rust/man" |
31 |
- $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') |
32 |
- $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') |
33 |
+ $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"") |
34 |
_EOF_ |
35 |
doenvd "${T}/50${P}" |