diff options
| author | Arthur Zamarin <arthurzam@gentoo.org> | 2025-03-19 22:35:07 +0200 |
|---|---|---|
| committer | Arthur Zamarin <arthurzam@gentoo.org> | 2025-03-19 22:58:27 +0200 |
| commit | 14b9e0e830b67ee841e4ac80a9a9fd16c2045f1e (patch) | |
| tree | 605c7014fee0a3405b99d341fd30a9a5344b9207 /dev-lang/rust-common/rust-common-1.85.1.ebuild | |
| parent | 0f18b7d670a542d989ed2b9c1a48ea509067d2e1 (diff) | |
| download | gentoo-14b9e0e830b67ee841e4ac80a9a9fd16c2045f1e.tar.gz gentoo-14b9e0e830b67ee841e4ac80a9a9fd16c2045f1e.tar.bz2 gentoo-14b9e0e830b67ee841e4ac80a9a9fd16c2045f1e.zip | |
dev-lang/rust-common: add 1.85.1, drop 1.85.0
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-lang/rust-common/rust-common-1.85.1.ebuild')
| -rw-r--r-- | dev-lang/rust-common/rust-common-1.85.1.ebuild | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/dev-lang/rust-common/rust-common-1.85.1.ebuild b/dev-lang/rust-common/rust-common-1.85.1.ebuild new file mode 100644 index 000000000000..223c50f26f33 --- /dev/null +++ b/dev-lang/rust-common/rust-common-1.85.1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc +inherit shell-completion verify-sig + +DESCRIPTION="Common files shared between multiple slots of Rust" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + # In case cargo is not in sync we'll fetch it as a submodule + # Nightly users will probably already have the repo cloned and up-to-date anyway. + EGIT_REPO_URI="https://github.com/rust-lang/rust.git" + EGIT_SUBMODULES=( "-*" "src/tools/cargo" ) +elif [[ ${PV} == *beta* ]]; then + # Identify the snapshot date of the beta release: + # curl -Ls static.rust-lang.org/dist/channel-rust-beta.toml | grep beta-src.tar.xz + MY_PV=beta + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + SRC_URI="https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz + verify-sig? ( https://static.rust-lang.org/dist/${BETA_SNAPSHOT}/rustc-beta-src.tar.xz.asc + -> rustc-${PV}-src.tar.xz.asc ) + " + S="${WORKDIR}/rustc-${MY_PV}-src" +else + MY_PV=${PV} + SRC_URI="https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz + verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc ) + " + S="${WORKDIR}/rustc-${MY_PV}-src" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="0" + +# Legacy non-slotted versions bash completions will collide. +RDEPEND=" + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )" + +src_unpack() { + if [[ ${PV} == *9999* ]]; then + git-r3_src_unpack + else + if use verify-sig ; then + verify-sig_verify_detached "${DISTDIR}"/rustc-${PV}-src.tar.xz "${DISTDIR}"/rustc-${PV}-src.tar.xz.asc + fi + + # Avoid unpacking the whole tarball which would need check-reqs + tar -xf "${DISTDIR}"/rustc-${PV}-src.tar.xz "rustc-${MY_PV}-src/src/tools/cargo/src/etc/"{_cargo,cargo.bashcomp.sh} || die + fi +} + +src_configure() { + : +} + +src_compile() { + : +} + +src_install() { + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo + dozshcomp src/tools/cargo/src/etc/_cargo +} |
