diff options
-rw-r--r-- | dev-lang/rust-bin/Manifest | 13 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.31.0.ebuild | 144 |
2 files changed, 157 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 961c13546403..ed56b604e0b5 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -30,3 +30,16 @@ DIST rust-1.30.1-powerpc64-unknown-linux-gnu.tar.xz 118698168 BLAKE2B 58905ab6c6 DIST rust-1.30.1-powerpc64le-unknown-linux-gnu.tar.xz 121569444 BLAKE2B d4d390ea24298cd88d224efe3c1a1dc3a802b678d977bc0aa26197e291547a6ca823a0fe5e35491204a649cb6a5419343a825ef32408aa2638d057b209b1c15c SHA512 b4595f031a006335ac778ec6a07c398fd6cce78ed3c0ed5730a5c06fa3a390dbab1afda0468756330783baa86dafb2f0c7ca7c75b735eb532c268027e22975e6 DIST rust-1.30.1-s390x-unknown-linux-gnu.tar.xz 124025168 BLAKE2B b4a8df333b093ae111136a6b9005aca7f424f209d629041c4fce1efc7e19b176f6e6325bf3552e8de93faa311ebf065ad4b9f104de3ee412b2a3fda70156c2b0 SHA512 592764d3d5b4d8a2a7628f4969ba5204da4ea63ca92efc17d4f9339274fce00aecc4d1ebb1f4d0499da8559375ad205054b26e12775af622a7112b20b8c8d4fb DIST rust-1.30.1-x86_64-unknown-linux-gnu.tar.xz 145148116 BLAKE2B e70d667d880656209c036b72f619b1bd29679878ff4b8865f0453c064c4a8a53a96e73994509637312032e1260eeb0e53f7372ca1526760b1631846ed6a4c571 SHA512 05238b65b5184e3df81dbcf1cc1035a03054ef09a8563fe60877e4f078d0d2cad71aec73c1451196171f39f8e729059e91c7eed7b1402e03801c0b7e81815885 +DIST rust-1.31.0-aarch64-unknown-linux-gnu.tar.xz 117860740 BLAKE2B 1074e8cf1ea2ff6f51770593304a1c803ae826293bdab1600306ddde7f634d3be4837e7e7163a3ee076159699551cba61eef2fd4c415e1ff762e0e5227a70111 SHA512 ac8df9779295d6270dd383399fb575f51d3d67da547cdd428929d5e8bcd74e052d2364b5fa3105c7375dc9639fc6327dee5a3e2f6645ffe90be4831968968381 +DIST rust-1.31.0-arm-unknown-linux-gnueabi.tar.xz 124536044 BLAKE2B a437e3bb97a57f2048048f1300e16c785f43c243b8706236fe659c2a917e0739d8037ea68a15ab642ca4bc8a394c5248149d61bdeb42cf05301f5683a158f578 SHA512 05092981310c72edee0b9bf6ad643c673ffaa376c6bfd6bc15916a680e007b7aac846db92a02f86f8b3a6da135d8d96edba3cc2a6ef297512bee648e7486dd81 +DIST rust-1.31.0-arm-unknown-linux-gnueabihf.tar.xz 124835432 BLAKE2B a670e0bf6cd32fe96efc12b5f7abde34aaadba5277c198688a5a055eb74cdb9374da43ebbd54d3d0e7e1b75a950c65374f6abea19eabdcda68fa2505a192d2a0 SHA512 f3c8356fb85ab46e01250da3ec93c9e1f9e833762748754c3b86d811e184af574c1dbc81c6e826291ced5ce9d5ebc2a8fefa639071bfc95183820a60377cc63a +DIST rust-1.31.0-armv7-unknown-linux-gnueabihf.tar.xz 126254120 BLAKE2B db7ae95afce5791bca7c934356ade914cbe916c10c9f95c0f71e56cfc91d11f58524e7e10c97314b3cfcb7d4ab19fd1f329fab5a7efe70ccd0bcc7f3faa170e4 SHA512 8a49cf20b158b3ead117dc686aa3eb298cd75d13cf30320f644c8545d6d9d8b26aad55dc1d7de4050233210ae2c9adbf3669555a7ef5c77589de2675bab73913 +DIST rust-1.31.0-i686-unknown-linux-gnu.tar.xz 147089208 BLAKE2B 9fc6d56a9d733e86e0b480c963dc4ac6f0a8a3a31c8e3dbc00225ebec128359fb72e0b1008420c89ccc7ee149b7e74446194f0534afd4c17bd0b547b3e0dcd52 SHA512 d1f783823c5b8ecba180d7e0e7831c8d4402c5c0717f9b93eb5262c7648264816579b61db71ac56efd110b6d0e39f53a9f19ea87d905855a8251b127ae6bc14c +DIST rust-1.31.0-mips-unknown-linux-gnu.tar.xz 115600024 BLAKE2B 73fc083d359dbdd42d1add5b94cbdf81e699e87500dfe24c386c1145befa17b6428225ff87228496ae218c46cfdb57edd39b2b1130ceeca8bf87122e5786f585 SHA512 b3cdd7d14e9c710077649071aac4644b36997e8e673c3d3a93ebfcb60f0dc539c641d605e1f10370a8b98b6370c93c39fc7d897acf008b328b6790f803fc3961 +DIST rust-1.31.0-mips64-unknown-linux-gnuabi64.tar.xz 120683432 BLAKE2B bf907ae1b3191121f2c8d99cbaf73242b41d438223aacf48feeb0cb4810918f7536ef31b9c45694a0d33f101baf99b887a19305c67ecd33c585af8e74449044b SHA512 e5e19ce317c37de50533e21206a1646f6633f643444d37a456ecc8f151241f687a0cfd7c2b49d12fd0171be1ad7217c8274d8e5bd8d962ba2a5ac7a01c55a1bd +DIST rust-1.31.0-mipsel-unknown-linux-gnu.tar.xz 117572476 BLAKE2B 9fa1f95d47441c32f4c53d65fa44d0a2365dbe1739d16b076e551422df94c0e984872a4ff457a1dbfe1a3855cc3903758a7e9492e0036af28ed617763141addd SHA512 ab0fdced2f4c281b554c06a298bb248109418ecf19b5e6211d478a812f5b06a84f2d95bfc590d8d354aea17a7426d01f910c0ccc01db6b6115090fba838a24ed +DIST rust-1.31.0-powerpc-unknown-linux-gnu.tar.xz 113276512 BLAKE2B 7c559d306e7c8cfa78e1affb02561e5d6ac03fa6c1849fbf0391713bbd5eef327ddf613bad8d4931b3878db0f1c7c95fc7d8c6d0242d90ea3ffadc0ff26b598e SHA512 bfc5209baf2751ce8aaead6d4640c4276c4fd65d3973beb93800e9d3f205e8f33676d4bd27576199b1c87e79e2fde20cbbb0873efa06139604a6007307b05484 +DIST rust-1.31.0-powerpc64-unknown-linux-gnu.tar.xz 122343212 BLAKE2B 17d9a86203e0c53ce00d89685c06c452e01a0df13c9cb9de3144e8599f8d76e073cdbad5a3b98f8086c887011382c2b1a69cf7802e1a095a5f2442fafe65163d SHA512 22fec0b24dde0415c754fdee47ebafe5676affbb751cb5f37ac08facbd9dbcbd2842f399416f66122fb6bc29bda3ab40547c104f117f4cc3de27552e8075ee6f +DIST rust-1.31.0-powerpc64le-unknown-linux-gnu.tar.xz 125305868 BLAKE2B 94401c8ac7fa8aa13fd9cc4bf9e24a3861008c9e2c0f83fadec876ff4c362166bf1f5d161947f6f0151790fafccd859c9ada903890a3f2b5393215ecab45d047 SHA512 ed62f46f0536538a40875974d1a91c63cb4da0e0aa63aecb78618b766c0b1ad8bf4e37b073142cb7326d7fc981eb92e918817b1fb5288f0611905362517f74e1 +DIST rust-1.31.0-s390x-unknown-linux-gnu.tar.xz 127854140 BLAKE2B b224911ac828323b715cf07d27022219bf0afd14030b6ba33e8234fa9424ec647c9851e4f4d99e136a965b467a15bb208864c584fa0740a72cc955cfd43fbb4d SHA512 c4afaea5087e046dc3900c5578404365515743f6f798716d9f1e3428b1ccd1a10584fe34bb35ac897a78f2edc5a55e40737c387d27e89c2bd85e6e430fe87af0 +DIST rust-1.31.0-x86_64-unknown-linux-gnu.tar.xz 148148832 BLAKE2B bd9e2978ab8025e92421f1828d56e4f7d5a3b32cb2164a5383c6721c8f953b377d4a0c1955bea7f76b4ed2ef5101b25178bfe736f60c54f38d8e97f6c28a8563 SHA512 6f63d63fff92d9e02c3e5f1443dd90272bcf5efea7def3d7e1398d876960be2c924d19f4d3153374283f686839f9ff7324c758907dad5b7fba7f2b18dac6c66e diff --git a/dev-lang/rust-bin/rust-bin-1.31.0.ebuild b/dev-lang/rust-bin/rust-bin-1.31.0.ebuild new file mode 100644 index 000000000000..b2da012da528 --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.31.0.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2018 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 ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc libressl rustfmt" + +DEPEND="" +RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 + 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/*/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 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-lldb" "${D}/opt/${P}/bin/${rustlldb}" || die + + 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/${rustlldb}" "/usr/bin/${rustlldb}" + + local cargo=cargo-bin-${PV} + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die + 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 "../../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 "../../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-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 +} |