forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-lang/rust-bin: version bump to 1.13.0
Package-Manager: portage-2.3.0
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
DIST rust-1.12.1-i686-unknown-linux-gnu.tar.gz 123818795 SHA256 ede9b9d14d1ddbc29975d1ead73fcf2758719b4b371363afe1c32eb8d6e96bb3 SHA512 8393bd91652ebe2a3a6decdd53bcb388d308a8867736ea68f75c2d073a0356583d90f74ce0af6105bd867ab03feed02af17422f25cf3bbf0601d59062aa1c70a WHIRLPOOL 20fab3b60d94e5e75c086ed86bde745c1a915347f4c0af16d3289c57d6cb4396656e1fd93a52d61ea2425c0e37d7c89c5d7a62ea424cd54f5ef2b4eaf5443e97 | ||
DIST rust-1.12.1-x86_64-unknown-linux-gnu.tar.gz 120844880 SHA256 9e546aec13e389429ba2d86c8f4e67eba5af146c979e4faa16ffb40ddaf9984c SHA512 888ad195b9d4b8d1d7ccaffd460e6fe0f6003461a6818937b4b6f80a92462eb96095888729188421f21e6bd0e21fa558a7ea81327b78eab5c3b70807c5069492 WHIRLPOOL 309c0dfbf25a20bf8a48609d83212e29d409b21f51fcc228b2f83242df1486cd65a9fb884e5b3737fbc90db0a59e6b155528b445412466a84988a77b3999bcdc | ||
DIST rust-1.13.0-i686-unknown-linux-gnu.tar.gz 94614521 SHA256 239734113f6750d31085c7a08c260d492991cc1ef10817b6d44154515f3f9439 SHA512 acea228b6c17cddfc6b1db1ab7d9e71ef852e7137bd992eaef69fa051f9d6f1b449d91b3f0984c3c64de274f246b5c37f9dc9cd5457d797be01beb3357d3c557 WHIRLPOOL 893c733313da95041d40d689a9f871ead8462b77c6062623c24e97f8ddd97ff8a7f58ed2c7595631752469018e850cd0db52949ad25365fb460489613e554a29 | ||
DIST rust-1.13.0-x86_64-unknown-linux-gnu.tar.gz 91007029 SHA256 95f4c372b1b81ac1038161e87e932dd7ab875d25c167a861c3949b0f6a65516d SHA512 b5d217aef6e20ed159506d2b46df2003de09c212794725693bc09fa4bcd7e527fed23969e62121591601749ec161de4d90b2c261807f83e2c0114727659b4f6e WHIRLPOOL 60d9cc1c365e44b554211b47fe89dd076d04a96f876574d2eecff9416aa43f3233470acb1607406d7298d40769900a6b9cda93645e2b1eeeca9fe8067442b607 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Copyright 1999-2016 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 | ||
} |