mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 15:36:58 +02:00
dev-lang/rust-common: Sync with Gentoo
It's from Gentoo commit f3d380c9201df3d0a2a867d238ff1635843a0e72.
This commit is contained in:
parent
a27a4cb345
commit
9997db94ba
@ -14,3 +14,5 @@ DIST rustc-1.87.0-src.tar.xz 283604208 BLAKE2B 7ede723121ff8df3908674631ceaec757
|
||||
DIST rustc-1.87.0-src.tar.xz.asc 801 BLAKE2B c9740c03baedcd70defba3fd37831692adaf0e984ef6b11d259244330d044fcacf935e6dd76caf126848da0c40f38e5368c60e8aabed5d3c2655a61fdbdc7564 SHA512 ebc13374381839a997c63455b733fd2a7960b4fd497f19c29be948cce8bb59a31ddda5da54ca154c16f7de43dd1bacd6c6bd76f3b6b36c5b43f4cfaf1746b952
|
||||
DIST rustc-1.88.0-src.tar.xz 283294344 BLAKE2B fc17efbc8b2e54f2da61384097dcb3b8f595f27f7853f56cef034913f6b46a718113af0fe66f0e3b0afd184ec506b35f3b74172926cf727ddc061f567d54fa4c SHA512 e6c62af2953f49462b2369e9551b12f2bec114577f90e3e76049636da4279b1e7f4d53bc6896f5d0d4715d90ef6d29dacff529a45690ffac6af62ad64600db40
|
||||
DIST rustc-1.88.0-src.tar.xz.asc 801 BLAKE2B 858e987ad1fc49c1e1cbc5ea709f835c60fce907e89205e431c843bfad97dc0ccbcf399fc7d87319b8455561cbc24020bd88cb572cbe932cb8b80a8adec39687 SHA512 64ab398dc602fed3ad7bf232249e80cc0a9831aa90c7eb37658f7dc5b2af04ee391f9633aae7a1d90f743d019cec531318384f71384ecbe4f6169e6e88b7ba0e
|
||||
DIST rustc-1.89.0_beta20250726-src.tar.xz 267425764 BLAKE2B 2a6802d5458eedb66fa2bd28d1a0d4c2104b1a734d9f7ec35fe989d210496d09a6db1a655a99970d68cbaab395741e3ddab24999c1150e9e64e8e72e1e3d9912 SHA512 f1a7524f46675f574b22ec00d4ce0c42ae272be7265e0665bc81cf3803ce1b286e4f7eb64e1850a7aa7b7e05c1cecae7011ac43964138d3679c19f0008b27fc4
|
||||
DIST rustc-1.89.0_beta20250726-src.tar.xz.asc 801 BLAKE2B 9cac60bbe248e5c63e703549efed39cd66978d926ffda52c9578492194df8d7a592d16f606547039222ffb0baa375ac7bce98bda7a5388e4d03cffe8a25c4356 SHA512 49e2e90ee69155d2b28fa2e88a809fb2642ecde72618ce20bb3bbd56afa921fc1e228cdb6ef8bd22346cb5e106945df26a9b5b8acef8f3f8c343fed8694b95e8
|
||||
|
@ -0,0 +1,73 @@
|
||||
# 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user