summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-04-03 13:39:50 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-04-03 15:10:10 -0700
commitc55fbace6ebd40752763e2485a4d4cdbda99b60f (patch)
tree895856dd03e70b9874c25e1810382a53329dcc61 /dev-lang/rust-bin
parentapp-misc/figlet: EAPI 7 (diff)
downloadgentoo-c55fbace6ebd40752763e2485a4d4cdbda99b60f.tar.gz
gentoo-c55fbace6ebd40752763e2485a4d4cdbda99b60f.tar.bz2
gentoo-c55fbace6ebd40752763e2485a4d4cdbda99b60f.zip
dev-lang/rust-bin: bump to 1.51.0
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'dev-lang/rust-bin')
-rw-r--r--dev-lang/rust-bin/Manifest14
-rw-r--r--dev-lang/rust-bin/rust-bin-1.51.0.ebuild161
2 files changed, 175 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index 6b7376500acc..1bab6c47883a 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -68,3 +68,17 @@ DIST rust-1.50.0-powerpc64le-unknown-linux-gnu.tar.xz 189754060 BLAKE2B 8579349a
DIST rust-1.50.0-s390x-unknown-linux-gnu.tar.xz 190157972 BLAKE2B 4fe8ec73293815ade006e2c383d1a6d541d87d4ebba76b3ace65793f7debfd54d3dc07cac89c43e41947f8d0b69bd0f213dbdca8173f610ca2da03bccdd55ddd SHA512 733513af2a7ef7a782a5ebfbd080071194ac47084022b54b4830de84facef9986d65525f8666a4c226e9878e43b00ebced26d6077e5fb1b7f775ac8f290fba97
DIST rust-1.50.0-x86_64-unknown-linux-gnu.tar.xz 152873328 BLAKE2B b0bb91487186f13a7a1a49edeac28bc347c300911f574aba0e70c37e05b688176f5941c97cc4ad0ceddf32f2fbc0bdda6f8a1fdfa482aeb9682ea1fade28206e SHA512 ab49e3ecb14e4af8e48548845184e9ab3d564ab2341c1e5462b7847347c79d13324211b860988d219ccb646143bf142fb14c3ab03663b06cfe9ca275128d9fa0
DIST rust-1.50.0-x86_64-unknown-linux-musl.tar.xz 242743828 BLAKE2B f20feb709cc07ad43f69e30a7fcefa81b5de94ee4c90cbce2616fcda8af2591a27cfa0770b71138762e21f6e07263bf3c2548bcce1b707831ab544de12ab746a SHA512 68403236e213a4f2c156b36a03ca4dd7866fdb69e87170efc76426d937dcf5cf2c5578aaf73483131b1ce7750302f9d02de1bcbc52e1283b08220d5b22be82ca
+DIST rust-1.51.0-aarch64-unknown-linux-gnu.tar.xz 208849064 BLAKE2B 1570536f63237ce04222f78c8c1d0592b3d0bacb62e2a1e2b87f9cd74c8d304837f9259c154e6ddfc5d0fc36c1d69aba34cb27d41346d4e7400ad1950ff19f8f SHA512 2af31290e1065a4611f34e6cc8c62ee494c222becfb21ec6707059c119069b0adf0eec23e56bad4a3cc8690b2556309ec58cbd9003a959983689cc46c7c63361
+DIST rust-1.51.0-arm-unknown-linux-gnueabi.tar.xz 194362256 BLAKE2B 20c1559d3b1f32c9ca6f5e9740dff0d9fd859be33ca58d59733fff1566ed0b75dd398facbcd15c8d7c862bee945198b0235973d5f683fd78f82cca52429b269c SHA512 fadb5084152b6fa148c1d584c8ba766201012c0a70bdf273f5d4b89b249d7f520997b12809a0db68c9d1d76283fee892f83b6ef687cbb025c08960ffff7e5eea
+DIST rust-1.51.0-arm-unknown-linux-gnueabihf.tar.xz 193918308 BLAKE2B 6799652205422d96c95949a4afa8a321a8a4e0cd42543f321898fdba5b27bb645f9eeb50edb63a43902cc74026a786c12a22af67313bc6ac0843b1e638077d64 SHA512 cd0dba1ebdff9692aef0026d94da38ba7856b64004404b75d0d385b8f9f53eed1ddd0e900e49cda60fc5190fe305d96f6f00d0053f4409479ab991fafa90338c
+DIST rust-1.51.0-armv7-unknown-linux-gnueabihf.tar.xz 197028040 BLAKE2B 801526d0fc9cdfc25a63227afdfc1bf9e0e6fa0b80f6306d86b68ca16adf4996b755b6ade1a4e898bfaf25565b5b49a358a9ed364bfe5d67c308744814a843de SHA512 c602dcc7fd1343b310f5e3074bf63f2428ca7c15cdce8999fa4655de5a4bda5a13255fc12bee3d0632f6cb93220a883fb36d24061dca6795d23afa9f8fdae57f
+DIST rust-1.51.0-i686-unknown-linux-gnu.tar.xz 213348860 BLAKE2B bd6c1d5ce9f20b961e3db8c69b022402acbdf06029e0802863292bcac89b0f88e6e6d02f625be52e8753d772aad8ac01125ff6832072b5d3d41a9ec7bf5c6a6f SHA512 05d08e44827dcba8197667deb9a7f3584465085ce1b79a38deb138849a07c716646a70f1cc2cee02b41c45ec7c3a3b7800a3fae62ebe04d6f72f017a5d722bab
+DIST rust-1.51.0-mips-unknown-linux-gnu.tar.xz 155944968 BLAKE2B ab9ad78f147b439beec9e92e643cc48814666c5e8fa244981d0919237844006aa2879a4058145d0bdafe89793402e65982d9fd3f0c6253f6a1805bf3381b4caf SHA512 378cfacfc66f1e8a4aeeb3715db9d3cefb4582db8a3b8fc62f05ac50a16db302b250c1696605c17cebe75923010b361b3a9883f7567a26cdcd60fc8379d2d7b3
+DIST rust-1.51.0-mips64-unknown-linux-gnuabi64.tar.xz 161859704 BLAKE2B a60484b7d009633763f10be8affc33715992f6eee5643d147078840675c900be0ff7f9bd985680836dc7d8467d7d118863cb5bed0f85bb135f0e352318946f32 SHA512 e99437a1b79e8821f6c1eaea92a8c5348e6fb4aa1a4fecbfecc950bf71fd7cd58712d336a67e00f95554bb01565f1daa1221699e142e9e673d8ce2cbb8910008
+DIST rust-1.51.0-mipsel-unknown-linux-gnu.tar.xz 159164156 BLAKE2B ccccc1e8abf529f9f023cd793dd78c9bfece359a770e03cfae808ac017ae0171ca0dbabb870c5ad57670a9ec562c393d2ffef3490e46423420be6a9a20cc8937 SHA512 31aecea3016e30dd610b610b86ec23f9832061abfbc55c7e43d942d4b0e8e521aecb37306bdb4a810ddcfc4e9d9a6cf057d6802d053ce9abf1cad401b6440d67
+DIST rust-1.51.0-powerpc-unknown-linux-gnu.tar.xz 167534676 BLAKE2B 5c74ebaf5d5e736bbfb8d963faff6d0fa5725017c738c4a5adf4b4e8c812ff8234b9e03e1a6ba2b6ab718469541e8c398e095ae22f155ccf9290e50ae0595a52 SHA512 9984e464a4e7d18042a8a2d99d26c4436a0ae2b2d281d5c8a42aedb0b78ab5e72f2392ea96e84b2f5892d772d28ee2feb89636f8d1a060a30098faa4e7f259eb
+DIST rust-1.51.0-powerpc64-unknown-linux-gnu.tar.xz 182726600 BLAKE2B d9051eea2d9486b6b4d858a3f6730210de5aac958853de82b3f822b3e0decd1b8a9a9b371b250ffde9ac19be4ccbe09e58c51a78b7e1fb2dd48e61c8a902e5b5 SHA512 4c1864a81d4c32bd95e0381454beae2a1d5b4cb47196821e64fc261133acfa2fa1e514dd6cdb68551559c4da2a2483edf5c6c14246adbea85c3027f88d401e06
+DIST rust-1.51.0-powerpc64le-unknown-linux-gnu.tar.xz 192084372 BLAKE2B d127c1827956c7594da5b69346168504b22726e176f03172b599e0a0fae2400e273684090f1d0fd05c33f193b3918c98ccd64c3647b0577b51431c3409083b2f SHA512 b53a741d1d75637fb31ddb0364e1f91427c3818ca145f819b906d13c32c638ae77fbaa567a6220b6bf69f38cc00d2b95615778a86f4acadd63efe2e62b1b01ef
+DIST rust-1.51.0-s390x-unknown-linux-gnu.tar.xz 191632144 BLAKE2B d1690825f59e8ed1ed4855556ff36c05efbc941097744e31fd9207309087d53880d418f737aa0cb9371b973c9c3d56f05ed03533df04402242194ef13b8d608d SHA512 a72ad31c6306f939c4f963133ddc0b3fabc9e506bdff5e318f5275658b7271a675a51d208d306d94fb01739cbcf0f62f018fc7490ca6db54b301852202749d16
+DIST rust-1.51.0-x86_64-unknown-linux-gnu.tar.xz 147543532 BLAKE2B 44ac97f6b650e65de257b362121091176e02fac60aa534ec83ddbc4e16eb32f7a4a7999cc28eac446f5790572552fee5c2589350cb6d159a946d90007d85c7db SHA512 9f95045119bcd5ef7be54f5b5bdc9ebc6bd6c48437d90762a1cfbc03281882f81087e1877eecae9573ba5e7cd7c11ef5fed979034c57f45b6547cbfeb11eef6d
+DIST rust-1.51.0-x86_64-unknown-linux-musl.tar.xz 233773068 BLAKE2B cc9de90b967cc81005ce5c897d3fd6dc4e3880be96ac82c41382d19a8aca0244845830db7a33eaef85b6bdef0c00ae02c0390db932fa49f76e362af2c68edb56 SHA512 d8df3c4c3de435629986e21bc6b31edfb73cba394e76cf87ee98d2936f73aef60c988d020da7ec1188f6448eacad9d5aefed073f4f88ffa2eaac54ac7e3cb3f7
diff --git a/dev-lang/rust-bin/rust-bin-1.51.0.ebuild b/dev-lang/rust-bin/rust-bin-1.51.0.ebuild
new file mode 100644
index 000000000000..403dbcaf3fc6
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.51.0.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit bash-completion-r1 rust-toolchain toolchain-funcs multilib-minimal
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="$(rust_all_arch_uris ${MY_P})"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="clippy cpu_flags_x86_sse2 doc rls rustfmt"
+
+DEPEND=""
+RDEPEND=">=app-eselect/eselect-rust-20190311"
+
+REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )"
+
+QA_PREBUILT="
+ opt/${P}/bin/.*
+ opt/${P}/lib/.*.so
+ opt/${P}/libexec/.*
+ opt/${P}/lib/rustlib/.*/bin/.*
+ opt/${P}/lib/rustlib/.*/lib/.*
+"
+
+pkg_pretend() {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+ mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+
+ # start native abi install
+ pushd "${S}" >/dev/null || die
+ local analysis std
+ analysis="$(grep 'analysis' ./components)"
+ std="$(grep 'std' ./components)"
+ local components="rustc,cargo,${std}"
+ use doc && components="${components},rust-docs"
+ use clippy && components="${components},clippy-preview"
+ use rls && components="${components},rls-preview,${analysis}"
+ use rustfmt && components="${components},rustfmt-preview"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${ED}/opt/${P}" \
+ --mandir="${ED}/opt/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local symlinks=(
+ cargo
+ rustc
+ rustdoc
+ rust-gdb
+ rust-gdbgui
+ rust-lldb
+ )
+
+ use clippy && symlinks+=( clippy-driver cargo-clippy )
+ use rls && symlinks+=( rls )
+ use rustfmt && symlinks+=( rustfmt cargo-fmt )
+
+ einfo "installing eselect-rust symlinks and paths"
+ local i
+ for i in "${symlinks[@]}"; do
+ # we need realpath on /usr/bin/* symlink return version-appended binary path.
+ # so /usr/bin/rustc should point to /opt/rust-bin-<ver>/bin/rustc-<ver>
+ local ver_i="${i}-bin-${PV}"
+ ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}"
+ dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}"
+ done
+
+ # symlinks to switch components to active rust in eselect
+ dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}"
+ dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}"
+ dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}"
+ dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}"
+
+ # musl logic can be improved a bit, but fine as is for now
+ cat <<-_EOF_ > "${T}/50${P}"
+ LDPATH="${EPREFIX}/usr/lib/rust/lib"
+ MANPATH="${EPREFIX}/usr/lib/rust/man"
+ $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '')
+ _EOF_
+ doenvd "${T}/50${P}"
+
+ # note: eselect-rust adds EROOT to all paths below
+ cat <<-_EOF_ > "${T}/provider-${P}"
+ /usr/bin/cargo
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ /usr/bin/rust-gdbgui
+ /usr/bin/rust-lldb
+ /usr/lib/rustlib
+ /usr/lib/rust/lib
+ /usr/lib/rust/man
+ /usr/share/doc/rust
+ _EOF_
+
+ if use clippy; then
+ echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+ popd >/dev/null || die
+ #end native abi install
+
+ else
+ local rust_target
+ rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))"
+ dodir "/opt/${P}/lib/rustlib"
+ cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\
+ "${ED}/opt/${P}/lib/rustlib" || die
+ fi
+
+ # BUG: installs x86_64 binary on other arches
+ rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die
+}
+
+pkg_postinst() {
+ eselect rust update
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}."
+
+ if has_version app-editors/emacs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust cleanup
+}