summaryrefslogtreecommitdiff
path: root/dev-lang/rust/rust-1.75.0-r100.ebuild
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-11-22 23:44:18 +0000
committerJames Le Cuirot <chewi@gentoo.org>2024-11-22 23:44:18 +0000
commit1a41016d9a8e9e1d056e57fd212a9a92cc6056b8 (patch)
tree075cf1d468bfa5c1e5bd4182fd1b54682705f900 /dev-lang/rust/rust-1.75.0-r100.ebuild
parent24b4de8fc3d5447cc6aa554695d1796984f9cd0d (diff)
downloadgentoo-1a41016d9a8e9e1d056e57fd212a9a92cc6056b8.tar.gz
gentoo-1a41016d9a8e9e1d056e57fd212a9a92cc6056b8.tar.bz2
gentoo-1a41016d9a8e9e1d056e57fd212a9a92cc6056b8.zip
dev-lang/rust: Set PKG_CONFIG and OPENSSL variables with ESYSROOT and not ROOT
This requires moving this code from pkg_setup to src_configure because ESYSROOT is not valid in the former. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'dev-lang/rust/rust-1.75.0-r100.ebuild')
-rw-r--r--dev-lang/rust/rust-1.75.0-r100.ebuild12
1 files changed, 7 insertions, 5 deletions
diff --git a/dev-lang/rust/rust-1.75.0-r100.ebuild b/dev-lang/rust/rust-1.75.0-r100.ebuild
index cb184ff3fe86..40ab20831e94 100644
--- a/dev-lang/rust/rust-1.75.0-r100.ebuild
+++ b/dev-lang/rust/rust-1.75.0-r100.ebuild
@@ -202,11 +202,6 @@ pkg_setup() {
export LIBGIT2_NO_PKG_CONFIG=1 #749381
if tc-is-cross-compiler; then
- export PKG_CONFIG_ALLOW_CROSS=1
- export PKG_CONFIG_PATH="${ROOT}/usr/$(get_libdir)/pkgconfig"
- export OPENSSL_INCLUDE_DIR="${ROOT}/usr/include"
- export OPENSSL_LIB_DIR="${ROOT}/usr/$(get_libdir)"
-
use system-llvm && die "USE=system-llvm not allowed when cross-compiling"
local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")"
use "llvm_targets_${cross_llvm_target}" || \
@@ -225,6 +220,13 @@ pkg_setup() {
}
src_configure() {
+ if tc-is-cross-compiler; then
+ export PKG_CONFIG_ALLOW_CROSS=1
+ export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig"
+ export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include"
+ export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)"
+ fi
+
filter-lto # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231
local rust_target="" rust_targets="" arch_cflags