commit:     c15d4c1b47e8f5e4fba06be10d785bf012c55502
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  6 06:56:59 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  6 07:03:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c15d4c1b

dev-util/rustup: add 1.28.2

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-util/rustup/Manifest             |  2 +
 dev-util/rustup/rustup-1.28.2.ebuild | 99 ++++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/dev-util/rustup/Manifest b/dev-util/rustup/Manifest
index 9f134765ef62..7bb52211c273 100644
--- a/dev-util/rustup/Manifest
+++ b/dev-util/rustup/Manifest
@@ -2,3 +2,5 @@ DIST rustup-1.27.1-crates.tar.xz 33405036 BLAKE2B 
a12eecb6af1c0fd4b9bca8a39f22a7
 DIST rustup-1.27.1.tar.gz 951421 BLAKE2B 
f8a0784c828f14f4be87b915d47d1bbd67e1f3802928646a42405380e7b0fce2925e60e975cc3fc72ba094e5c10178de783e20f7d3928ca8cce3b57ff60f9981
 SHA512 
e0494678b7117464665c2aa88165e13baf2dcfb2a33c57dc78f669533111f773724d227ee05967de427845f8633e56fdf8159c7a5b96638413710beacb115075
 DIST rustup-1.28.1-crates.tar.xz 37037080 BLAKE2B 
4ce72dcec7d718671db9482b63045aa0ee700a79e7ae7e03c04c520bbd4834cd20c5375d62bffaa4da4647b9b4514d7299d6d15b27d29d33ecd2541645409525
 SHA512 
e2285f2193678ed8f3e3f5defebb5fcf65d88171ba82f284d9e12361ce43e528313aeea41875df134bbf8784bb10d9227131726f7997421c715d3d6172455ff2
 DIST rustup-1.28.1.tar.gz 1011410 BLAKE2B 
2a260ccfd10fc5f1fb19d5fe55670b02a3a9572c4342bd876f727e28f64446bd5891675f03deec7310b177f1b93b0c238123e8feb6ee4161494479c6ed7a38dc
 SHA512 
00d79f574c62c1668f41f0e82ca63ce4698d171ccf1b29b4e2d0af4455e2faac1f28ad9da6060c5a7ef97ef4ad20690c6b57e2a18cd36dcbf9930144f44ddbb4
+DIST rustup-1.28.2-crates.tar.xz 38997836 BLAKE2B 
29848bbb571f99b763bccfa444461f8cc8cea8fa625c0846b7fb69d7fbd9c2f0f077ed61459cb502d03360d273c2733de7e9aff6372a56699cd6fc1482880351
 SHA512 
741766a08d6a78af79d7701efa1c1c2142932d796b3b29cf379dcc90427bdf97a61b1aa1d542f4b58f405aaf65ad4bcc9fed5f9f47453042088bbf8bc2921e04
+DIST rustup-1.28.2.tar.gz 1015225 BLAKE2B 
ed7808b46bb58f3d1c15bef003a8046666429e68868b0b63686758213fa0569ae91aba1a518d70cffca59e95068722b5753e0e4ef55e51e42a934450539e92ad
 SHA512 
dc85f4551e9d3d9d105e4a5c8a7544b6944c82ca4db167a6993e1e0cea498221471b891cefc15e7f634a8528678bb8438dbddadb80a8afe19fbc69bb74817049

diff --git a/dev-util/rustup/rustup-1.28.2.ebuild 
b/dev-util/rustup/rustup-1.28.2.ebuild
new file mode 100644
index 000000000000..c1e6862ba7b0
--- /dev/null
+++ b/dev-util/rustup/rustup-1.28.2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES=""
+RUST_MIN_VER="1.85.0"
+inherit cargo prefix shell-completion toolchain-funcs
+
+DESCRIPTION="Rust toolchain installer"
+HOMEPAGE="https://rust-lang.github.io/rustup/";
+
+if [[ ${PV} == "9999" ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/rust-lang/${PN}.git";
+else
+       SRC_URI="https://github.com/rust-lang/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz
+               ${CARGO_CRATE_URIS}"
+       SRC_URI+=" 
https://github.com/gentoo-crate-dist/${PN}/releases/download/${PV}/${P}-crates.tar.xz";
+       KEYWORDS="~amd64 ~arm64 ~ppc64"
+fi
+
+LICENSE="|| ( Apache-2.0 MIT )"
+# Dependent crate licenses
+LICENSE+="
+       Apache-2.0 BSD CDLA-Permissive-2.0 ISC MIT openssl Unicode-3.0 ZLIB
+"
+SLOT="0"
+# uses network
+RESTRICT="test"
+
+DEPEND="
+       app-arch/xz-utils
+       net-misc/curl:=[http2,ssl]
+       dev-libs/openssl:0=
+"
+RDEPEND="${DEPEND}"
+
+# rust does not use *FLAGS from make.conf, silence portage warning
+QA_FLAGS_IGNORED="usr/bin/rustup-init"
+
+src_unpack() {
+       if [[ "${PV}" == 9999 ]]; then
+               git-r3_src_unpack
+               cargo_live_src_unpack
+       else
+               cargo_src_unpack
+       fi
+}
+
+src_configure() {
+       # modeled after ci/run.bash upstream
+       # reqwest-rustls-tls requires ring crate, which is not very portable.
+       local myfeatures=(
+               no-self-update
+               curl-backend
+               reqwest-native-tls
+       )
+       case ${ARCH} in
+               ppc* | mips* | riscv* | s390*)
+                       ;;
+               *) myfeatures+=( reqwest-rustls-tls )
+                       ;;
+       esac
+       cargo_src_configure --no-default-features
+}
+
+src_compile() {
+       export OPENSSL_NO_VENDOR=true
+       cargo_src_compile
+}
+
+src_install() {
+       cargo_src_install
+       einstalldocs
+       newbin "$(prefixify_ro "${FILESDIR}"/symlink_rustup.sh)" 
rustup-init-gentoo
+
+       if ! tc-is-cross-compiler; then
+               einfo "generating shell completion files"
+               ln -sf "${ED}/usr/bin/rustup-init" rustup || die
+
+               ./rustup completions bash > "${T}/${PN}" || die
+               dobashcomp "${T}/${PN}"
+               ./rustup completions zsh > "${T}/_${PN}" || die
+               dozshcomp "${T}/_${PN}"
+       else
+               ewarn "Shell completion files not installed! Install them 
manually with '${PN} completions --help'"
+       fi
+}
+
+pkg_postinst() {
+       elog "No rustup toolchains installed by default"
+       elog "eselect activated system rust toolchain can be added to rustup by 
running"
+       elog "helper script installed as ${EPREFIX}/usr/bin/rustup-init-gentoo"
+       elog "it will create symlinks to system-installed rustup in home 
directory"
+       elog "and rustup updates will be managed by portage"
+       elog "please delete current rustup binaries from ~/.cargo/bin/ (if any)"
+       elog "before running rustup-init-gentoo"
+}

Reply via email to