commit:     7f9cc2b99a325c8a25d4b121be58df5f10d4d86c
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Jun  6 00:14:48 2025 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Fri Jun  6 00:14:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=7f9cc2b9

dev-lang/rust: add versions, drop versions

Signed-off-by: orbea <orbea <AT> riseup.net>

 dev-lang/rust/Manifest                             |   2 +
 ...rust-1.86.0-r1.ebuild => rust-1.86.0-r2.ebuild} | 123 ++++++++++-----------
 .../{rust-1.87.0.ebuild => rust-1.87.0-r1.ebuild}  | 119 ++++++++++----------
 3 files changed, 120 insertions(+), 124 deletions(-)

diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index 2d3563c..339c32d 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -1,3 +1,5 @@
+DIST rust-patches-1.86.0-r2.tar.bz2 5980 BLAKE2B 
179d6acc8c7006eac4d00e073ec1f5496756ef51d465bc098daf1cfe650f469f4341893c72a65e21d84ecb3ccaeb46f5204ef517ae942482d835f89c0a934391
 SHA512 
31e902661d5ee2da82858910551393890583d9702303fed5652122c852e9384fb88a42eddd0b968558865e16b5bd4ac2a13a35bd01ec3f8c3adbb673bc465596
+DIST rust-patches-1.87.0-r1.tar.bz2 4635 BLAKE2B 
d813ec4a602d3bb879927a44a0b9f752aac255e31dfd13c56ab71b3fae7ce46a742c1d2e7494a7e17728f1edb2327ddd6ad6ebabc0c47d66326b766bbd323fbd
 SHA512 
596ffe744a5849b443f077bbd4edbcbb240b9ac51c9d53e0e436e46d7c93a6734477d22eba4a066a0cf474503a6357a72dfa124e594f645be6f50d9bd25bdb10
 DIST rustc-1.74.1-src.tar.xz 155968724 BLAKE2B 
e05f2379ac94b286f85791a138e1928e5b5b5a7749f0981d82c40c2a12860f55bf96bb2f0e924e35a0f8b2447b13052d38adea909aaa3199105787bb5a4861b3
 SHA512 
14c7e7ed2f38ab60299d8c7d41d78f042b6b57ef822d577b5138e60bdde31cf141eccd4332a25bc5da3d58eb5313d63c1448b5dfe9e11b8055bb8ea133a9038d
 DIST rustc-1.74.1-src.tar.xz.asc 801 BLAKE2B 
ddf73175b164233babf31ca3a381b03e20c0f36d017c1d5f85d6ab11f0986d861ab23b11c061e6b2444ced70c3d6a494cc3de4ec86f0deb221a805491bd75420
 SHA512 
9a96ff9ba9a4e2af4e267b2ec126fc0675c78d0eb767703daa2f28491c3d85c2ab00fbd8584390bf658812ec6c4ab6c57e43b386db59fd505bd3134a8873a09e
 DIST rustc-1.75.0-src.tar.xz 159624388 BLAKE2B 
8937b80585eddaa3e1f1ef948899d14a170308518c6fef9fe569560cdd870053776956743f796055f2119399b9ca6c0df12fedd789ae46324d071e5126c4e495
 SHA512 
7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606

diff --git a/dev-lang/rust/rust-1.86.0-r1.ebuild 
b/dev-lang/rust/rust-1.86.0-r2.ebuild
similarity index 96%
rename from dev-lang/rust/rust-1.86.0-r1.ebuild
rename to dev-lang/rust/rust-1.86.0-r2.ebuild
index 9b5ad10..9afcd7e 100644
--- a/dev-lang/rust/rust-1.86.0-r1.ebuild
+++ b/dev-lang/rust/rust-1.86.0-r2.ebuild
@@ -4,7 +4,9 @@
 EAPI=8
 
 LLVM_COMPAT=( 19 )
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..13} )
+
+RUST_PATCH_VER=${PVR}
 
 RUST_MAX_VER=${PV%%_*}
 if [[ ${PV} == *9999* ]]; then
@@ -37,6 +39,7 @@ elif [[ ${PV} == *beta* ]]; then
        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
+               
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 )
        "
@@ -44,10 +47,11 @@ elif [[ ${PV} == *beta* ]]; then
 else
        MY_P="rustc-${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"
+       KEYWORDS="~amd64 arm ~arm64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86"
 fi
 
 DESCRIPTION="Systems programming language originally developed by Mozilla"
@@ -171,13 +175,6 @@ RESTRICT="test"
 
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
 
-PATCHES=(
-       "${FILESDIR}"/1.85.0-cross-compile-libz.patch
-       "${FILESDIR}"/1.85.0-musl-dynamic-linking.patch
-       "${FILESDIR}"/1.67.0-doc-wasm.patch
-       "${FILESDIR}"/1.86.0-znver.patch
-)
-
 clear_vendor_checksums() {
        sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || 
die
 }
@@ -193,48 +190,6 @@ toml_usex() {
        usex "${1}" true false
 }
 
-src_unpack() {
-       if [[ ${PV} = *9999* ]]; then
-               git-r3_src_unpack
-               mkdir "${S}/.cargo" || die # The vendor script has a check for 
.cargo/config{,.toml}
-               touch "${S}/.cargo/config.toml" || die
-               local rust_stage0_root="$(${RUSTC} --print sysroot || die 
"Can't determine rust's sysroot")"
-               local rust_build=""
-               local rust_host=""
-               # Configure vendor to use the portage-provided toolchain. This 
prevents it from
-               # attempting to fetch a `beta` toolchain from the internet.
-               cat <<- _EOF_ > "${T}/vendor-config.toml"
-                       [build]
-                       build = "$(rust_abi "${CBUILD}")"
-                       host = ["$(rust_abi "${CHOST}")"]
-                       target = ["$(rust_abi "${CHOST}")"]
-                       cargo = "${rust_stage0_root}/bin/cargo"
-                       rustc = "${rust_stage0_root}/bin/rustc"
-                       rustfmt = "${rust_stage0_root}/bin/rustfmt"
-               _EOF_
-               # We're using git sources so we need to run the Vendor script
-               # to ensure that all dependencies are present and up-to-date
-               mkdir "${S}/vendor" || die
-               # This also compiles the 'build helper', there's no way to 
avoid this.
-               ${EPYTHON} "${S}"/x.py vendor -vvv 
--config="${T}"/vendor-config.toml -j$(makeopts_jobs) ||
-                       die "Failed to vendor dependencies"
-               # TODO: This has to be generated somehow, this is from a 1.84.x 
tarball I had lying around.
-               cat <<- _EOF_ > "${S}/.cargo/config.toml"
-                       [source.crates-io]
-                       replace-with = "vendored-sources"
-
-                       [source."git+https://github.com/rust-lang/team";]
-                       git = "https://github.com/rust-lang/team";
-                       replace-with = "vendored-sources"
-
-                       [source.vendored-sources]
-                       directory = "vendor"
-               _EOF_
-       else
-               verify-sig_src_unpack
-       fi
-}
-
 pre_build_checks() {
        local M=9216
        # multiply requirements by 1.3 if we are doing x86-multilib
@@ -307,6 +262,52 @@ pkg_setup() {
        fi
 }
 
+src_unpack() {
+       if [[ ${PV} = *9999* ]]; then
+               git-r3_src_unpack
+               mkdir "${S}/.cargo" || die # The vendor script has a check for 
.cargo/config{,.toml}
+               touch "${S}/.cargo/config.toml" || die
+               local rust_stage0_root="$(${RUSTC} --print sysroot || die 
"Can't determine rust's sysroot")"
+               local rust_build=""
+               local rust_host=""
+               # Configure vendor to use the portage-provided toolchain. This 
prevents it from
+               # attempting to fetch a `beta` toolchain from the internet.
+               cat <<- _EOF_ > "${T}/vendor-config.toml"
+                       [build]
+                       build = "$(rust_abi "${CBUILD}")"
+                       host = ["$(rust_abi "${CHOST}")"]
+                       target = ["$(rust_abi "${CHOST}")"]
+                       cargo = "${rust_stage0_root}/bin/cargo"
+                       rustc = "${rust_stage0_root}/bin/rustc"
+                       rustfmt = "${rust_stage0_root}/bin/rustfmt"
+               _EOF_
+               # We're using git sources so we need to run the Vendor script
+               # to ensure that all dependencies are present and up-to-date
+               mkdir "${S}/vendor" || die
+               # This also compiles the 'build helper', there's no way to 
avoid this.
+               ${EPYTHON} "${S}"/x.py vendor -v 
--config="${T}"/vendor-config.toml -j$(makeopts_jobs) ||
+                       die "Failed to vendor dependencies"
+               # TODO: This has to be generated somehow, this is from a 1.84.x 
tarball I had lying around.
+               cat <<- _EOF_ > "${S}/.cargo/config.toml"
+                       [source.crates-io]
+                       replace-with = "vendored-sources"
+
+                       [source."git+https://github.com/rust-lang/team";]
+                       git = "https://github.com/rust-lang/team";
+                       replace-with = "vendored-sources"
+
+                       [source.vendored-sources]
+                       directory = "vendor"
+               _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}
+               default
+       else
+               default
+       fi
+}
+
 src_prepare() {
        eapply_crate openssl-sys-0.9.72 
"${FILESDIR}"/1.83.0-libressl-openssl-sys-0.9.72.patch
        eapply_crate openssl-sys-0.9.92 
"${FILESDIR}"/1.72.0-libressl-openssl-sys.patch
@@ -315,17 +316,13 @@ src_prepare() {
 
        if [[ ${PV} = *9999* ]]; then
                # We need to update / generate lockfiles for the workspace
-               ${CARGO} generate-lockfile --offline
-
-       fi
-       # Rust baselines to Pentium4 on x86, this patch lowers the baseline to 
i586 when sse2 is not set.
-       if use x86; then
-               if ! use cpu_flags_x86_sse2; then
-                       eapply "${FILESDIR}/1.82.0-i586-baseline.patch"
-                       #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed  
-i 's/march=i686/-march=i586/g' || die
-               fi
+               ${CARGO} generate-lockfile --offline || die "Failed to generate 
lockfiles"
        fi
 
+       PATCHES=(
+               "${WORKDIR}/rust-patches-${RUST_PATCH_VER}/"
+       )
+
        if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
                export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
        fi
@@ -652,7 +649,7 @@ src_configure() {
 }
 
 src_compile() {
-       RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
+       RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -v 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
 }
 
 src_test() {
@@ -708,7 +705,7 @@ src_test() {
 }
 
 src_install() {
-       DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
+       DESTDIR="${D}" "${EPYTHON}" ./x.py install -v 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
 
        docompress /usr/lib/${PN}/${SLOT}/share/man/
 
@@ -798,7 +795,7 @@ src_install() {
        doins "${T}/provider-${PN}-${SLOT}"
 
        if use dist; then
-               "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml 
-j$(makeopts_jobs) || die
+               "${EPYTHON}" ./x.py dist -v --config="${S}"/config.toml 
-j$(makeopts_jobs) || die
                insinto "/usr/lib/${PN}/${SLOT}/dist"
                doins -r "${S}/build/dist/."
        fi

diff --git a/dev-lang/rust/rust-1.87.0.ebuild 
b/dev-lang/rust/rust-1.87.0-r1.ebuild
similarity index 96%
rename from dev-lang/rust/rust-1.87.0.ebuild
rename to dev-lang/rust/rust-1.87.0-r1.ebuild
index d05b01b..7688c16 100644
--- a/dev-lang/rust/rust-1.87.0.ebuild
+++ b/dev-lang/rust/rust-1.87.0-r1.ebuild
@@ -6,6 +6,8 @@ EAPI=8
 LLVM_COMPAT=( 20 )
 PYTHON_COMPAT=( python3_{11..14} )
 
+RUST_PATCH_VER=${PVR}
+
 RUST_MAX_VER=${PV%%_*}
 if [[ ${PV} == *9999* ]]; then
        RUST_MIN_VER="1.85.0" # Update this as new `beta` releases come out.
@@ -37,6 +39,7 @@ elif [[ ${PV} == *beta* ]]; then
        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
+               
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 )
        "
@@ -44,6 +47,7 @@ elif [[ ${PV} == *beta* ]]; then
 else
        MY_P="rustc-${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"
@@ -172,13 +176,6 @@ RESTRICT="test"
 
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc
 
-PATCHES=(
-       "${FILESDIR}"/1.85.0-cross-compile-libz.patch
-       "${FILESDIR}"/1.85.0-musl-dynamic-linking.patch
-       "${FILESDIR}"/1.67.0-doc-wasm.patch
-       "${FILESDIR}"/1.87.0-znver.patch
-)
-
 clear_vendor_checksums() {
        sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || 
die
 }
@@ -194,48 +191,6 @@ toml_usex() {
        usex "${1}" true false
 }
 
-src_unpack() {
-       if [[ ${PV} = *9999* ]]; then
-               git-r3_src_unpack
-               mkdir "${S}/.cargo" || die # The vendor script has a check for 
.cargo/config{,.toml}
-               touch "${S}/.cargo/config.toml" || die
-               local rust_stage0_root="$(${RUSTC} --print sysroot || die 
"Can't determine rust's sysroot")"
-               local rust_build=""
-               local rust_host=""
-               # Configure vendor to use the portage-provided toolchain. This 
prevents it from
-               # attempting to fetch a `beta` toolchain from the internet.
-               cat <<- _EOF_ > "${T}/vendor-config.toml"
-                       [build]
-                       build = "$(rust_abi "${CBUILD}")"
-                       host = ["$(rust_abi "${CHOST}")"]
-                       target = ["$(rust_abi "${CHOST}")"]
-                       cargo = "${rust_stage0_root}/bin/cargo"
-                       rustc = "${rust_stage0_root}/bin/rustc"
-                       rustfmt = "${rust_stage0_root}/bin/rustfmt"
-               _EOF_
-               # We're using git sources so we need to run the Vendor script
-               # to ensure that all dependencies are present and up-to-date
-               mkdir "${S}/vendor" || die
-               # This also compiles the 'build helper', there's no way to 
avoid this.
-               ${EPYTHON} "${S}"/x.py vendor -vvv 
--config="${T}"/vendor-config.toml -j$(makeopts_jobs) ||
-                       die "Failed to vendor dependencies"
-               # TODO: This has to be generated somehow, this is from a 1.84.x 
tarball I had lying around.
-               cat <<- _EOF_ > "${S}/.cargo/config.toml"
-                       [source.crates-io]
-                       replace-with = "vendored-sources"
-
-                       [source."git+https://github.com/rust-lang/team";]
-                       git = "https://github.com/rust-lang/team";
-                       replace-with = "vendored-sources"
-
-                       [source.vendored-sources]
-                       directory = "vendor"
-               _EOF_
-       else
-               verify-sig_src_unpack
-       fi
-}
-
 pre_build_checks() {
        local M=9216
        # multiply requirements by 1.3 if we are doing x86-multilib
@@ -308,6 +263,52 @@ pkg_setup() {
        fi
 }
 
+src_unpack() {
+       if [[ ${PV} = *9999* ]]; then
+               git-r3_src_unpack
+               mkdir "${S}/.cargo" || die # The vendor script has a check for 
.cargo/config{,.toml}
+               touch "${S}/.cargo/config.toml" || die
+               local rust_stage0_root="$(${RUSTC} --print sysroot || die 
"Can't determine rust's sysroot")"
+               local rust_build=""
+               local rust_host=""
+               # Configure vendor to use the portage-provided toolchain. This 
prevents it from
+               # attempting to fetch a `beta` toolchain from the internet.
+               cat <<- _EOF_ > "${T}/vendor-config.toml"
+                       [build]
+                       build = "$(rust_abi "${CBUILD}")"
+                       host = ["$(rust_abi "${CHOST}")"]
+                       target = ["$(rust_abi "${CHOST}")"]
+                       cargo = "${rust_stage0_root}/bin/cargo"
+                       rustc = "${rust_stage0_root}/bin/rustc"
+                       rustfmt = "${rust_stage0_root}/bin/rustfmt"
+               _EOF_
+               # We're using git sources so we need to run the Vendor script
+               # to ensure that all dependencies are present and up-to-date
+               mkdir "${S}/vendor" || die
+               # This also compiles the 'build helper', there's no way to 
avoid this.
+               ${EPYTHON} "${S}"/x.py vendor -v 
--config="${T}"/vendor-config.toml -j$(makeopts_jobs) ||
+                       die "Failed to vendor dependencies"
+               # TODO: This has to be generated somehow, this is from a 1.84.x 
tarball I had lying around.
+               cat <<- _EOF_ > "${S}/.cargo/config.toml"
+                       [source.crates-io]
+                       replace-with = "vendored-sources"
+
+                       [source."git+https://github.com/rust-lang/team";]
+                       git = "https://github.com/rust-lang/team";
+                       replace-with = "vendored-sources"
+
+                       [source.vendored-sources]
+                       directory = "vendor"
+               _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}
+               default
+       else
+               default
+       fi
+}
+
 src_prepare() {
        eapply_crate openssl-sys-0.9.72 
"${FILESDIR}"/1.83.0-libressl-openssl-sys-0.9.72.patch
        eapply_crate openssl-sys-0.9.102 
"${FILESDIR}"/1.79.0-libressl-openssl-sys.patch
@@ -316,17 +317,13 @@ src_prepare() {
 
        if [[ ${PV} = *9999* ]]; then
                # We need to update / generate lockfiles for the workspace
-               ${CARGO} generate-lockfile --offline
-
-       fi
-       # Rust baselines to Pentium4 on x86, this patch lowers the baseline to 
i586 when sse2 is not set.
-       if use x86; then
-               if ! use cpu_flags_x86_sse2; then
-                       eapply "${FILESDIR}/1.82.0-i586-baseline.patch"
-                       #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed  
-i 's/march=i686/-march=i586/g' || die
-               fi
+               ${CARGO} generate-lockfile --offline || die "Failed to generate 
lockfiles"
        fi
 
+       PATCHES=(
+               "${WORKDIR}/rust-patches-${RUST_PATCH_VER}/"
+       )
+
        if use lto && tc-is-clang && ! tc-ld-is-lld && ! tc-ld-is-mold; then
                export RUSTFLAGS+=" -C link-arg=-fuse-ld=lld"
        fi
@@ -659,7 +656,7 @@ src_configure() {
 }
 
 src_compile() {
-       RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
+       RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -v 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
 }
 
 src_test() {
@@ -715,7 +712,7 @@ src_test() {
 }
 
 src_install() {
-       DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
+       DESTDIR="${D}" "${EPYTHON}" ./x.py install -v 
--config="${S}"/config.toml -j$(makeopts_jobs) || die
 
        docompress /usr/lib/${PN}/${SLOT}/share/man/
 
@@ -805,7 +802,7 @@ src_install() {
        doins "${T}/provider-${PN}-${SLOT}"
 
        if use dist; then
-               "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml 
-j$(makeopts_jobs) || die
+               "${EPYTHON}" ./x.py dist -v --config="${S}"/config.toml 
-j$(makeopts_jobs) || die
                insinto "/usr/lib/${PN}/${SLOT}/dist"
                doins -r "${S}/build/dist/."
        fi

Reply via email to