summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-11-12 06:50:47 +1000
committerMatt Jolly <kangie@gentoo.org>2024-11-12 09:39:58 +1000
commit7c7e11e46ad664457ccf4954e5bc346c148cff2d (patch)
treec74852198f8e4d6f9cf4e1d04ddb8cbc8b1f049f /eclass/rust.eclass
parentnet-libs/webkit-gtk: fix build against icu-76.1 (diff)
downloadgentoo-7c7e11e46ad664457ccf4954e5bc346c148cff2d.tar.gz
gentoo-7c7e11e46ad664457ccf4954e5bc346c148cff2d.tar.bz2
gentoo-7c7e11e46ad664457ccf4954e5bc346c148cff2d.zip
rust.eclass: define `usedep` before its first usage
The open-ended dependency (no `RUST_MAX_VER`) was generated before `usedep` was set to anything. Define `usedep` when the variable is initialised and let the `RUST_NEEDS_LLVM` path set it per llvm slot as required. Closes: https://bugs.gentoo.org/943289 Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'eclass/rust.eclass')
-rw-r--r--eclass/rust.eclass3
1 files changed, 1 insertions, 2 deletions
diff --git a/eclass/rust.eclass b/eclass/rust.eclass
index f7c2d6e9a80e..791af971eb3d 100644
--- a/eclass/rust.eclass
+++ b/eclass/rust.eclass
@@ -193,7 +193,7 @@ _rust_set_globals() {
local rust_dep=()
local llvm_slot
local rust_slot
- local usedep
+ local usedep="${RUST_REQ_USE+[${RUST_REQ_USE}]}"
# If we're not using LLVM, we can just generate a simple Rust dependency
if [[ -z "${RUST_NEEDS_LLVM}" ]]; then
@@ -209,7 +209,6 @@ _rust_set_globals() {
# depend on each slot between RUST_MIN_VER and RUST_MAX_VER; it's a bit specific but
# won't hurt as we only ever add newer Rust slots.
for slot in "${_RUST_SLOTS[@]}"; do
- usedep="${RUST_REQ_USE+[${RUST_REQ_USE}]}"
rust_dep+=(
"dev-lang/rust-bin:${slot}${usedep}"
"dev-lang/rust:${slot}${usedep}"