eclass/rust: Sync with Gentoo

It's from Gentoo commit d67e5f688cd82820edcbb5a712e2c8964d7d3be3.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-03-02 07:27:33 +00:00 committed by Krzesimir Nowak
parent d13d9d03c4
commit ca337131e1

View File

@ -1,4 +1,4 @@
# Copyright 2024-2025 Gentoo Authors
# Copyright 2024-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rust.eclass
@ -67,7 +67,10 @@ fi
# @DESCRIPTION:
# Definitive list of Rust slots and the associated LLVM slot, newest first.
declare -A -g -r _RUST_LLVM_MAP=(
["9999"]=21
["9999"]=22
["1.94.0"]=21
["1.93.1"]=21
["1.93.0"]=21
["1.92.0"]=21
["1.91.0"]=21
["1.90.0"]=20
@ -99,6 +102,9 @@ declare -A -g -r _RUST_LLVM_MAP=(
# this array is used to store the Rust slots in a more convenient order for iteration.
declare -a -g -r _RUST_SLOTS_ORDERED=(
"9999"
"1.94.0"
"1.93.1"
"1.93.0"
"1.92.0"
"1.91.0"
"1.90.0"
@ -325,6 +331,7 @@ unset -f _rust_set_globals
# @FUNCTION: _get_rust_slot
# @USAGE: [-b|-d]
# @INTERNAL
# @DESCRIPTION:
# Find the newest Rust install that is acceptable for the package,
# and export its version (i.e. SLOT) and type (source or bin[ary])