diff options
Diffstat (limited to 'dev-lang/rust/rust-9999.ebuild')
| -rw-r--r-- | dev-lang/rust/rust-9999.ebuild | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/dev-lang/rust/rust-9999.ebuild b/dev-lang/rust/rust-9999.ebuild index f098b0b6ab6f..c0e13b75ef38 100644 --- a/dev-lang/rust/rust-9999.ebuild +++ b/dev-lang/rust/rust-9999.ebuild @@ -8,11 +8,22 @@ EAPI=8 LLVM_COMPAT=( 21 ) PYTHON_COMPAT=( python3_{11..14} ) -RUST_PATCH_VER=${PV#*_p} +# Patches are kept in rust-patches.git, see its README.rst for the versioning +# scheme. +# +# We use _pN from the ebuild version for the patchset but it can be overridden +# in the ebuild for changes that don't require a revbump. +# +# Uncomment this line when the ebuild needs a patchset update but no revbump. +#RUST_PATCH_VER=${PV}-1 + RUST_MAX_VER=${PV%%_*} +RUST_PV=${PV%%_p*} +[[ -z ${RUST_PATCH_VER} ]] && RUST_PATCH_VER=${PV} if [[ ${PV} == *9999* ]]; then - RUST_MIN_VER="1.91.0" # Update this as new `beta` releases come out. + # Update this as new `beta` releases come out. + RUST_MIN_VER="1.91.0" elif [[ ${PV} == *beta* ]]; then RUST_MAX_VER="$(ver_cut 1).$(ver_cut 2).0" RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" @@ -20,8 +31,9 @@ else RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" fi -inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \ - multilib multilib-build python-any-r1 rust rust-toolchain toolchain-funcs verify-sig +inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature +inherit multilib multilib-build python-any-r1 rust rust-toolchain toolchain-funcs +inherit verify-sig if [[ ${PV} = *9999* ]]; then inherit git-r3 @@ -31,19 +43,24 @@ elif [[ ${PV} == *beta* ]]; then betaver=${PV//*beta} BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" MY_P="rustc-beta" - SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz + SRC_URI=" + https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${RUST_PV}-src.tar.xz https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2 - verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc - -> rustc-${PV}-src.tar.xz.asc ) + verify-sig? ( + https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc + -> rustc-${RUST_PV}-src.tar.xz.asc + ) " S="${WORKDIR}/${MY_P}-src" else - MY_P="rustc-${PV}" - SRC_URI="https://static.rust-lang.org/dist/${MY_P}-src.tar.xz + MY_P="rustc-${RUST_PV}" + SRC_URI=" + https://static.rust-lang.org/dist/${MY_P}-src.tar.xz https://gitweb.gentoo.org/proj/rust-patches.git/snapshot/rust-patches-${RUST_PATCH_VER}.tar.bz2 verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc ) " S="${WORKDIR}/${MY_P}-src" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" fi @@ -51,9 +68,9 @@ DESCRIPTION="Systems programming language originally developed by Mozilla" HOMEPAGE="https://www.rust-lang.org/" # keep in sync with llvm ebuild of the same version as bundled one. -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai - LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE - WebAssembly X86 XCore Xtensa ) +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai ) +ALL_LLVM_TARGETS+=( LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV ) +ALL_LLVM_TARGETS+=( SystemZ VE WebAssembly X86 XCore Xtensa ) ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} @@ -72,7 +89,9 @@ ALL_RUST_SYSROOTS=( "${ALL_RUST_SYSROOTS[@]/#/rust_sysroots_}" ) LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" SLOT="${PV%%_*}" # Beta releases get to share the same SLOT as the eventual stable -IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto rustfmt rust-analyzer rust-src system-llvm test ${ALL_LLVM_TARGETS[*]} ${ALL_RUST_SYSROOTS[*]}" +IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto" +IUSE+=" rustfmt rust-analyzer rust-src +system-llvm test" +IUSE+=" ${ALL_LLVM_TARGETS[*]} ${ALL_RUST_SYSROOTS[*]}" if [[ ${PV} = *9999* ]]; then # These USE flags require nightly rust @@ -91,7 +110,8 @@ LLVM_DEPEND+=( " rust_sysroots_wasm? ( $(llvm_gen_dep 'llvm-core/lld:${LLVM_SLOT LLVM_DEPEND+=( " $(llvm_gen_dep 'llvm-core/llvm:${LLVM_SLOT}')" ) # dev-libs/oniguruma is used for documentation -BDEPEND="${PYTHON_DEPS} +BDEPEND=" + ${PYTHON_DEPS} app-eselect/eselect-rust dev-libs/oniguruma || ( @@ -128,7 +148,8 @@ DEPEND=" ) " -RDEPEND="${DEPEND} +RDEPEND=" + ${DEPEND} app-eselect/eselect-rust dev-lang/rust-common sys-apps/lsb-release @@ -136,7 +157,8 @@ RDEPEND="${DEPEND} !dev-lang/rust-bin:stable " -REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) +REQUIRED_USE=" + || ( ${ALL_LLVM_TARGETS[*]} ) rust-analyzer? ( rust-src ) test? ( ${ALL_LLVM_TARGETS[*]} ) rust_sysroots_bpf? ( llvm_targets_BPF ) @@ -316,7 +338,7 @@ src_unpack() { _EOF_ elif use verify-sig ; then # Patch tarballs are not signed (but we trust Gentoo infra) - verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz{,.asc} + verify-sig_verify_detached "${DISTDIR}"/rustc-${RUST_PV}-src.tar.xz{,.asc} default else default @@ -831,7 +853,7 @@ pkg_postinst() { if has_version dev-debug/gdb || has_version llvm-core/lldb; then elog "Rust installs helper scripts for calling GDB and LLDB," - elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${RUST_PV}." fi if has_version app-editors/emacs; then |
