diff options
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/rust-bin/Manifest | 13 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.34.2.ebuild | 171 |
2 files changed, 184 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index c93fd614ccac..fc164016e78f 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -95,3 +95,16 @@ DIST rust-1.34.1-powerpc64-unknown-linux-gnu.tar.xz 125707228 BLAKE2B 5126198277 DIST rust-1.34.1-powerpc64le-unknown-linux-gnu.tar.xz 129553036 BLAKE2B 5a069bdb4ee78ee9791c4d38d5fa999b5503f7969fdf1c97ec71fca00c659dfc83a27749549f14c3cf37288c9ad5e809eb3ece7b7cd436b9dd6086f837c31bfe SHA512 539d76729b96fc7047f785f167926e6673f3ff02e06fdd78c23b4b29228b60f8151b3b1455a83e3b7f81ec3d428e3980f3607e07c505e62e84cf1afe5b0c03b4 DIST rust-1.34.1-s390x-unknown-linux-gnu.tar.xz 134397572 BLAKE2B e51487209fca4dd894abca3b6a1c595ca00ef6c6248dd9ebfc3899ab1d40b2c24d1841579acf251350b28ae57db9648dba7bb19b2d523771e63c91447d2373c5 SHA512 20ef3fe57537d09d7f230e57db59fa2030fd6378e911dc2cfec47849c6a551d48e7d54824770aa00751f953f895a7718832a687b3be5f632d8c95c2e5fed0861 DIST rust-1.34.1-x86_64-unknown-linux-gnu.tar.xz 157366684 BLAKE2B c55f03046d7aa98372b8642152391536f8bce4f7e39a1d1292e44b0f434e8278fe7353362f35c966dad7a985849b5ab94977b7320e8b15f54a0b360d9ae8ff54 SHA512 88226cc1c4492fec35ed32433d9f1a2a2b284d5803d37111ff3d1ee63b2f0500722ea1b9a771cd80853dbc5b9a0ad382baeb362d7edf82ef49a093ae780470ee +DIST rust-1.34.2-aarch64-unknown-linux-gnu.tar.xz 120868188 BLAKE2B d843cce81338b2b3765c973f06dca83161fefed129efefe94efad663b5ddef54aa092bf5977ba7bca74519b008796e60486cf8b193ec2a2dead3add66295d41f SHA512 7103362b8840d094661a16053d8f07eba413c369bf3a2b686313875aa97c30b35697fceefbfc90dffd5cfd4de946e7f848f2b791736443639b30bb75709b7122 +DIST rust-1.34.2-arm-unknown-linux-gnueabi.tar.xz 122563056 BLAKE2B 05e73de7d58723affef3f272e646245a97b17373cc960d5e1be0365919ad3879e08bd9012126e41235b97a758bb57fa4e67fcd11e2f29322af9ab039fc3e2dfd SHA512 d6c055e8ba0fd494797a55d2a6df1eec2a6361c0b081e4b7cb06e42a03a644e4de49c7b17dc8cb6484f3271517f2bd50935bc72ead486531b5b370a1c576b12a +DIST rust-1.34.2-arm-unknown-linux-gnueabihf.tar.xz 122858592 BLAKE2B aebe65fb64044c342f525749eb5d67217f459712aa72d49497062af461901a6e92d21b00e05439bd0753228b876f521198a8b005b116b5121ec3dd812df4bec8 SHA512 5cc2612988182b68d9b220d6d7620fc0b064a9d347825d4677959b7e43820647ff25651427db3a5c72401ab8d0c14e2976921d71ddbe0a5b540cf045241cd727 +DIST rust-1.34.2-armv7-unknown-linux-gnueabihf.tar.xz 124601212 BLAKE2B 7ab258783070d3ba1e27431faf36a8c75d0afae935bc4ba08bf1e6b7f080d56cb3a9ac3de8b91ff9885e2df2ccebdf29de80b99548c610ea30c157103b920434 SHA512 fe5be9a345d10ee2b3a47986977be91cd2dd94f2076571f810ac21cea36f79f073eb16915c090861cf46c6835f86db64c2ed1ef036f911b3be829d7927ecb747 +DIST rust-1.34.2-i686-unknown-linux-gnu.tar.xz 169581332 BLAKE2B 75f1fc4c52e81cb9c7f95d18d9aff2439bfc698444321d92f09d5a47e493d693f2cae3d8ee56ccff59ca967a0a2a53828559eefce1398a2450fe39c95397e3e2 SHA512 056243d226cd9a36dfcd266f2aba88adde58dbcfa87f20613183c5dcc514bb413e25f6d6963494dc141f4e91649b17b1db91e6a9d313af7ef7b1893b64337c33 +DIST rust-1.34.2-mips-unknown-linux-gnu.tar.xz 113493608 BLAKE2B 10df3e2eb9fd9200bab1ca94eafd80f680c94bd21589f72fd660e9d819a6615cc83e47ac70df87712e252946f58df30824be992f16ca707b72451898e1884e99 SHA512 ec100071fbd8373baf41f0f517497b9923a77ebea8257d2fdcc9a4488d7ec6d59c0b517f4d922a0f7f699d701510d32d49c1e699c69a94f571f73ba46fe795f3 +DIST rust-1.34.2-mips64-unknown-linux-gnuabi64.tar.xz 119118112 BLAKE2B 8ba04a90e82bf7d830c750350570dde8cfa0646f1ea10c583927cc6c7ceeb935fb4035248d8a3ac4a477a858a32d3753811e2893220b8b3919e882213dd63373 SHA512 bb3c5e8ce24895a07984059fca53f4737777a78d350312292877b8e1c21a7a84320f1fee4d64c9d684d14be5fe500494d38ef3f5ab4e4f0e84cbd3f3d30a8586 +DIST rust-1.34.2-mipsel-unknown-linux-gnu.tar.xz 115776696 BLAKE2B dfe09e60be47c6cbe183e4f4bb358cd6d1fe0872114d6a663ee95cd063155f99688bdf23b5c7230b626351654da8f38c7b763099b8d6c2707e185449267c137c SHA512 91348409dfdb63b82e6b6a3097d181485f05f0dfb6cd3bd80785da2eea23f493a90a4e07e660dbc14e9c887ff7e27bc0d13203c78feece5aca219e439a9c18cf +DIST rust-1.34.2-powerpc-unknown-linux-gnu.tar.xz 116817940 BLAKE2B bd7fcc7e0e8844d23e73bb8bc07f7454d234d4fc96d6549399c399845af147debbfbcdea2c53d1ad5a28126d6c9cc20178634290fb837f0537947f64d688df75 SHA512 b8009e9ab2e9167cce8e1911ec0bebc9959a89bafcb645637f2a55af15a2f4f5d4fa20d6b38b7ae572480f3d3817392b8c6386b6ed589b34dd0a02529da2a459 +DIST rust-1.34.2-powerpc64-unknown-linux-gnu.tar.xz 125735384 BLAKE2B c25d43fa630e9b95692bcb493064f592a12ecee700538671192f04cfdf443a5d046493662c88d91f62cc1eba94e80ec9b6bed9949af9a8bc83788521832336d4 SHA512 d1ab37d68c0b52e3780ea133f8ba4d5b823c7f874bbf15f97f304c21405b1fdbde3d28e83381f08095fca8e2ea615f46accad725ee854ad9db168ab4629e30a3 +DIST rust-1.34.2-powerpc64le-unknown-linux-gnu.tar.xz 129619832 BLAKE2B df76b7c08941ae2cb512ba656b09a7b87e1e656badbadf58d64ab5f9133e7248a63873675ac44f16207107a0f68da6089706b46af94154c0bd51aed655f8b578 SHA512 3c881e7bcf622237f279855ebaeb544f4df9bfe5bc1f74578093d67befed8f027692ea56dc773c653bef8a124e9ebac2544d0c197a0e3a1ec8da63ef9d434412 +DIST rust-1.34.2-s390x-unknown-linux-gnu.tar.xz 134376720 BLAKE2B 3eb1452bc0f5d6cbe5547f18ad039c54d4fee44e8c24e35f3399272755cd293df008db2c7dded32c7853944e43de7a4d337b7408835445a4916dbf55d14a7b3e SHA512 181f58b00cdccb205be853f5d00fc0a0c939b7e4dc801717b21ece0f714a8f3b501f1196eb2e3f3081932a0417a6218763c3d095cdd036e9f202cc41291876a1 +DIST rust-1.34.2-x86_64-unknown-linux-gnu.tar.xz 157279864 BLAKE2B c25fcb6168e16a4deb19a8ca9b3d91966194f4c8d2e60933226fab015b64a819f6e56a6b51b6e9457ce80efaf5bf71f2eed2f3e6e39bef5856524e33d0a5637b SHA512 64d6b7da08ffd877c10d819605a37b0bc178c4ab80e2f7449f3d5ac9254a438e148da3729408b4c9429ed499d7f142c9d2926f5c916e0a32bebaaefe4b0a09a6 diff --git a/dev-lang/rust-bin/rust-bin-1.34.2.ebuild b/dev-lang/rust-bin/rust-bin-1.34.2.ebuild new file mode 100644 index 000000000000..ab89e254ae0b --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.34.2.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils bash-completion-r1 rust-toolchain toolchain-funcs + +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 ~arm64 ~ppc64 ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt" + +DEPEND="" +RDEPEND=">=app-eselect/eselect-rust-20190311 + sys-libs/zlib + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + net-libs/libssh2 + net-misc/curl[ssl] + !dev-lang/rust:0 + !dev-util/cargo + rustfmt? ( !dev-util/rustfmt )" +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +QA_PREBUILT=" + opt/${P}/bin/*-${PV} + opt/${P}/lib/*.so + opt/${P}/lib/rustlib/*/bin/* + opt/${P}/lib/rustlib/*/lib/*.so + opt/${P}/lib/rustlib/*/lib/*.rlib* +" + +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 +} + +src_install() { + local std=$(grep 'std' ./components) + local components="rustc,cargo,${std}" + use doc && components="${components},rust-docs" + use clippy && components="${components},clippy-preview" + use rustfmt && components="${components},rustfmt-preview" + ./install.sh \ + --components="${components}" \ + --disable-verify \ + --prefix="${D}/opt/${P}" \ + --mandir="${D}/usr/share/${P}/man" \ + --disable-ldconfig \ + || die + + local rustc=rustc-bin-${PV} + local rustdoc=rustdoc-bin-${PV} + local rustgdb=rust-gdb-bin-${PV} + local rustgdbgui=rust-gdbgui-bin-${PV} + local rustlldb=rust-lldb-bin-${PV} + + mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die + mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die + mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die + mv "${D}/opt/${P}/bin/rust-gdbgui" "${D}/opt/${P}/bin/${rustgdbgui}" || die + mv "${D}/opt/${P}/bin/rust-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die + + dosym "${rustc}" "/opt/${P}/bin/rustc" + dosym "${rustdoc}" "/opt/${P}/bin/rustdoc" + dosym "${rustgdb}" "/opt/${P}/bin/rust-gdb" + dosym "${rustgdbgui}" "/opt/${P}/bin/rust-gdbgui" + dosym "${rustlldb}" "/opt/${P}/bin/rust-lldb" + + dosym "../../opt/${P}/bin/${rustc}" "/usr/bin/${rustc}" + dosym "../../opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}" + dosym "../../opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}" + dosym "../../opt/${P}/bin/${rustgdbgui}" "/usr/bin/${rustgdbgui}" + dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}" + + local cargo=cargo-bin-${PV} + # ugly hack for https://bugs.gentoo.org/679806 + if use ppc64; then + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die + sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die + cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}" + #!/bin/sh + OPENSSL_ppccap=0 $(realpath $0).bin "${@}" + EOF + fperms +x "/opt/${P}/bin/${cargo}" + else + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die + fi + dosym "${cargo}" "/opt/${P}/bin/cargo" + dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}" + if use clippy; then + local clippy_driver=clippy-driver-bin-${PV} + local cargo_clippy=cargo-clippy-bin-${PV} + mv "${D}/opt/${P}/bin/clippy-driver" "${D}/opt/${P}/bin/${clippy_driver}" || die + mv "${D}/opt/${P}/bin/cargo-clippy" "${D}/opt/${P}/bin/${cargo_clippy}" || die + dosym "${clippy_driver}" "/opt/${P}/bin/clippy-driver" + dosym "${cargo_clippy}" "/opt/${P}/bin/cargo-clippy" + dosym "../../opt/${P}/bin/${clippy_driver}" "/usr/bin/${clippy_driver}" + dosym "../../opt/${P}/bin/${cargo_clippy}" "/usr/bin/${cargo_clippy}" + fi + if use rustfmt; then + local rustfmt=rustfmt-bin-${PV} + local cargo_fmt=cargo-fmt-bin-${PV} + mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die + mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die + dosym "${rustfmt}" "/opt/${P}/bin/rustfmt" + dosym "${cargo_fmt}" "/opt/${P}/bin/cargo-fmt" + dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}" + dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}" + fi + + cat <<-EOF > "${T}"/50${P} + LDPATH="/opt/${P}/lib" + MANPATH="/usr/share/${P}/man" + EOF + doenvd "${T}"/50${P} + + cat <<-EOF > "${T}/provider-${P}" + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + EOF + echo /usr/bin/cargo >> "${T}/provider-${P}" + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + dodir /etc/env.d/rust + insinto /etc/env.d/rust + doins "${T}/provider-${P}" +} + +pkg_postinst() { + eselect rust update --if-unset + + 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 || has_version app-editors/emacs-vcs; 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 + + if has_version 'app-shells/zsh'; then + elog "install app-shells/rust-zshcomp to get zsh completion for rust." + fi +} + +pkg_postrm() { + eselect rust unset --if-invalid +} |