diff options
| author | 2025-05-31 16:23:15 +1000 | |
|---|---|---|
| committer | 2025-06-04 07:36:56 +1000 | |
| commit | 057daa00036e040231855c45bc2bba039c29cb53 (patch) | |
| tree | 8039c2610a50790596fd79ac460c42cdbe762f1b /dev-lang/rust/rust-1.77.1-r101.ebuild | |
| parent | {dev-lang,sys-devel}/rust*: add 1.88.0_beta20250526 (diff) | |
| download | gentoo-057daa00036e040231855c45bc2bba039c29cb53.tar.gz gentoo-057daa00036e040231855c45bc2bba039c29cb53.tar.bz2 gentoo-057daa00036e040231855c45bc2bba039c29cb53.zip | |
dev-lang/rust: stop using FILESDIR
files/ has been too big for a while now. Instead use the rust-patches
repository that was created to manage these patches.
No revbumps required - they were either done beforehand when we dropped
a bad patch _or_ are not required as the only additions are backported
build-time fixes (done in previous commits).
Signed-off-by: Matt Jolly <[email protected]>
Diffstat (limited to 'dev-lang/rust/rust-1.77.1-r101.ebuild')
| -rw-r--r-- | dev-lang/rust/rust-1.77.1-r101.ebuild | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/dev-lang/rust/rust-1.77.1-r101.ebuild b/dev-lang/rust/rust-1.77.1-r101.ebuild index d3a88f3f17e8..1c8c1002540f 100644 --- a/dev-lang/rust/rust-1.77.1-r101.ebuild +++ b/dev-lang/rust/rust-1.77.1-r101.ebuild @@ -6,32 +6,46 @@ EAPI=8 LLVM_COMPAT=( 17 ) PYTHON_COMPAT=( python3_{10..12} ) +RUST_PATCH_VER=${PVR} + RUST_MAX_VER=${PV} RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing multilib multilib-build \ optfeature python-any-r1 rust rust-toolchain toolchain-funcs verify-sig -if [[ ${PV} = *beta* ]]; then +if [[ ${PV} = *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/rust-lang/rust.git" + EGIT_SUBMODULES=( + "*" + "-src/gcc" + ) +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 betaver=${PV//*beta} BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" MY_P="rustc-beta" - SRC="${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-${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 ) + " + S="${WORKDIR}/${MY_P}-src" else MY_P="rustc-${PV}" - SRC="${MY_P}-src.tar.xz" + 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 ppc ppc64 ~riscv sparc x86" fi DESCRIPTION="Systems programming language from Mozilla" HOMEPAGE="https://www.rust-lang.org/" -SRC_URI=" - https://static.rust-lang.org/dist/${SRC} - verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) -" -S="${WORKDIR}/${MY_P}-src" - # 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 @@ -140,17 +154,6 @@ RESTRICT="test" VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc -PATCHES=( - "${FILESDIR}"/1.67.0-doc-wasm.patch - "${FILESDIR}"/1.70.0-ignore-broken-and-non-applicable-tests.patch - "${FILESDIR}"/1.74.1-cross-compile-libz.patch - "${FILESDIR}/1.81.0-backport-bug937164.patch" - "${FILESDIR}/1.81.0-backport-llvm-pr101761.patch" - "${FILESDIR}/1.81.0-backport-llvm-pr101766.patch" - "${FILESDIR}"/1.75.0-musl-dynamic-linking.patch - "${FILESDIR}"/1.76.0-loong-code-model.patch # remove for >=1.78.0 -) - clear_vendor_checksums() { sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die } @@ -229,6 +232,13 @@ pkg_setup() { fi } +src_prepare() { + PATCHES=( + "${WORKDIR}/rust-patches-${RUST_PATCH_VER}/" + ) + default +} + src_configure() { if tc-is-cross-compiler; then export PKG_CONFIG_ALLOW_CROSS=1 |
