diff options
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/rust-bin/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.15.0.ebuild | 102 |
2 files changed, 104 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 46da440bd5f5..ad1a5a39e816 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -4,3 +4,5 @@ DIST rust-1.13.0-i686-unknown-linux-gnu.tar.gz 94614521 SHA256 239734113f6750d31 DIST rust-1.13.0-x86_64-unknown-linux-gnu.tar.gz 91007029 SHA256 95f4c372b1b81ac1038161e87e932dd7ab875d25c167a861c3949b0f6a65516d SHA512 b5d217aef6e20ed159506d2b46df2003de09c212794725693bc09fa4bcd7e527fed23969e62121591601749ec161de4d90b2c261807f83e2c0114727659b4f6e WHIRLPOOL 60d9cc1c365e44b554211b47fe89dd076d04a96f876574d2eecff9416aa43f3233470acb1607406d7298d40769900a6b9cda93645e2b1eeeca9fe8067442b607 DIST rust-1.14.0-i686-unknown-linux-gnu.tar.gz 126452488 SHA256 8d5c75728b44468216f99651dfae9d60ae0696a77105dd2b02942d75f3256840 SHA512 2e1cd7cb1c9a1c147fcfe16f5eac3876b88a5a04bc1a6d2386756181986046b8636c317fb76834ca75aec99f0bcf9e5ce760eacf74b4b9811210db4a59fdb66f WHIRLPOOL 9f2a6a0462b9494566c5be7475ca15280b35229756789e3dda01ba7eefe5ae3eab6c804fd7183641890efa16aa22ff0e9153ef6c8b8379f76d0c44b98027a483 DIST rust-1.14.0-x86_64-unknown-linux-gnu.tar.gz 122820395 SHA256 c71325cfea1b6f0bdc5189fa4c50ff96f828096ff3f7b5056367f9685d6a4d04 SHA512 6ec7155a2ac95718d1c28ffada0d365ca46cca7b1879b4533a662a4e63140fd2a70a9647a4b4d57e12d0d20dd46b7aba18365db0ed0cfd870b0a0394d4266b8c WHIRLPOOL f6c1c67806974cd39e68e2c111803a9ba7e858a93bfb8c8939747d253f119ae6667a21e3cba385015f27f9395fb2982d2a0c26f423b5d784fdc395e680da803b +DIST rust-1.15.0-i686-unknown-linux-gnu.tar.gz 103875063 SHA256 3cff0c621a9c58dfaf29d2d08655030ea90cfbd009e71a04e073d67e5177b372 SHA512 92886d873a1d5407839cf3ff6480fb6c68ab3ee16c8e30a5bc221551a9e588405bec6f1382841ce81d8895c6e9a77650f5da56ccc2c8dc0490019210083786e7 WHIRLPOOL 20ab15e7284aee26262c0a583e1f0224f007bfba749253007d8bda6f276a43353c9c9f2d3690ca7f4d110fa2f565341e217090f670b38c06cd5a56c3581a0904 +DIST rust-1.15.0-x86_64-unknown-linux-gnu.tar.gz 101145605 SHA256 576fcced49744af5ea438afc4411395530426b0a3d4839c5205f646f15850663 SHA512 0f582e540241ca9cc9e36face8c28061d1e2814acba7480ab818b15fc0db98519d28aa9649c6cbb5ccea95c28c2e0927268b76cbfe7178b136e56cbcc6b25aaf WHIRLPOOL e031a9556df365780baa5ed7bd51ebb22b0166be38bd17aa2d23c09f97095cf3d1aae647fbd90940ec959e09ba8bd696fb95c4aecc41cdf43a5dae8ca45c22c5 diff --git a/dev-lang/rust-bin/rust-bin-1.15.0.ebuild b/dev-lang/rust-bin/rust-bin-1.15.0.ebuild new file mode 100644 index 000000000000..b9cc85fd866f --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.15.0.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils bash-completion-r1 + +MY_P="rust-${PV}" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="http://www.rust-lang.org/" +SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz ) + x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="stable" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425 + !dev-lang/rust:0 +" +RDEPEND="${DEPEND}" + +QA_PREBUILT=" + opt/${P}/bin/rustc-bin-${PV} + opt/${P}/bin/rustdoc-bin-${PV} + opt/${P}/lib/*.so + opt/${P}/lib/rustlib/*/lib/*.so +" + +src_unpack() { + default + + local postfix + use amd64 && postfix=x86_64-unknown-linux-gnu + use x86 && postfix=i686-unknown-linux-gnu + mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die +} + +src_install() { + local std=$(grep 'std' ./components) + local components="rustc,${std}" + use doc && components="${components},rust-docs" + ./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} + + 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 + + dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}" + dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}" + dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}" + + 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 + EOF + 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 +} |