summaryrefslogtreecommitdiff
path: root/dev-lang/rust-common/rust-common-1.82.0.ebuild
diff options
context:
space:
mode:
authorMatt Jolly <kangie@gentoo.org>2024-11-03 11:36:26 +1000
committerMatt Jolly <kangie@gentoo.org>2024-11-09 16:25:33 +1000
commita73b0b02a99e85e7aa87f9133b4f898b658c30a7 (patch)
tree8f16c77f58b12be6f4d2494aaf47b119ce36a2a0 /dev-lang/rust-common/rust-common-1.82.0.ebuild
parent583a1a9ac556d01e1b0df6fe64e67cb646fa4118 (diff)
downloadgentoo-a73b0b02a99e85e7aa87f9133b4f898b658c30a7.tar.gz
gentoo-a73b0b02a99e85e7aa87f9133b4f898b658c30a7.tar.bz2
gentoo-a73b0b02a99e85e7aa87f9133b4f898b658c30a7.zip
dev-lang/rust{,-bin}: port to llvm-r1 and slot (-r100)
Port to llvm-r1 to gain the fancy new `llvm_slot_{x}` USE flags which we use in the rust eclass to force a closer dependency on specific LLVM slots. Since Rust in Gentoo is only ever built against the one LLVM slot we are able to simplify the LLVM logic in the Rust ebuilds and use our knowledge of the LLVM -> Rust version mapping to enable slots for dev-lang/rust in a usable manner. Since Rust is now slotted and not managed entirely by eselect-rust each slot needs to be added to LDPATH. We also drop the `profiler` USE as it's inconsistent with what upstream ship by default and casues issues where other package's build systems assume that it exists. This commit also introduces dev-lang/rust-common which handles bash completions for slotted Rust. dev-lang/rust-bin: `LLVM_OPTIONAL` is used as we don't need to consume LLVM, we really just want the free IUSE. Closes: https://bugs.gentoo.org/941146 Signed-off-by: Matt Jolly <kangie@gentoo.org>
Diffstat (limited to 'dev-lang/rust-common/rust-common-1.82.0.ebuild')
-rw-r--r--dev-lang/rust-common/rust-common-1.82.0.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-lang/rust-common/rust-common-1.82.0.ebuild b/dev-lang/rust-common/rust-common-1.82.0.ebuild
new file mode 100644
index 000000000000..c1d6b791917f
--- /dev/null
+++ b/dev-lang/rust-common/rust-common-1.82.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1
+
+DESCRIPTION="Common files shared between multiple slots of Rust"
+HOMEPAGE="https://www.rust-lang.org/"
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
+else
+ ABI_VER="$(ver_cut 1-2)"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+fi
+
+SRC_URI="
+ https://static.rust-lang.org/dist/${SRC}
+ verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
+"
+S="${WORKDIR}/${MY_P}-src"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"
+SLOT=0
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="verify-sig"
+
+# Legacy non-slotted versions bash completions will collide.
+RDEPEND="
+ !dev-lang/rust:stable/1.71.1
+ !dev-lang/rust:stable/1.74.1
+ !dev-lang/rust:stable/1.75.0
+ !dev-lang/rust:stable/1.77.1
+ !dev-lang/rust:stable/1.79.0
+ !dev-lang/rust:stable/1.80.1
+ !dev-lang/rust:stable/1.81.0
+ !dev-lang/rust:stable/1.82.0
+"
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
+}