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: version bump to 1.11.0
Package-Manager: portage-2.2.28
- Loading branch information
Showing
2 changed files
with
157 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,6 +1,9 @@ | ||
DIST rust-stage0-2016-03-18-235d774-linux-i386-0e0e4448b80d0a12b75485795244bb3857a0a7ef.tar.bz2 18489693 SHA256 36958fcd55387d7b1b86618111fa8660c1d488fe191e85ad9659c6470874322b SHA512 3e729e7c9340060c5eaa13b0420cc3b10eb968312bfceb4d072e5e16673a393c1b51b34b2c43f91953a2b44f0b0fe549215e5c284695d5a3626a3dc703693fd6 WHIRLPOOL 9a7064933b4387de6c6158c5a9645be1b3cd05d1cbd66c8e30a5efb63d08fd8aed8c5695e850fb3e3f92577b59fd2243b467d9ed509b913f652abddd206f68db | ||
DIST rust-stage0-2016-03-18-235d774-linux-x86_64-1273b6b6aed421c9e40c59f366d0df6092ec0397.tar.bz2 17950752 SHA256 a8ca657d78162a9f0a69a1ec8b0460e97259cdf2e6353ee256ae206876c9637e SHA512 77694229b9aca58eab866acf6d52f381d9b4faa8c7698c17b2de90fa396eba17f3e12411b2cc4639607f7418d1382365e15039fb4ed247158a7d5542ce3b8b59 WHIRLPOOL a58f3d9e8e319b4852513e4c172dc733f5080032eb6f2c33ddd9b336891586318761db0e6dcc3ff54113cc32ee256fd356a672cb50ae316ca4d1a7be3d5591d6 | ||
DIST rustc-1.10.0-i686-unknown-linux-gnu.tar.gz 47134530 SHA256 019ee36468b92846691f96b56d980a4099f12cf1c5f74534a9d37e13122eb869 SHA512 0af9edc08d34189d99247169787133c78935cfae46489d4c42732d96a67878c221c9f2ad44a8ccf82781aecc4988e019fbb2825950eb08295d9c68a1d3c4a368 WHIRLPOOL aa8f36a3eeea4dbf24a6cbdc6ae402417b609279a445ffcaffc554c8c58559cd7390063d89accbab0acc874598c865ced420397e5002c9a5b4c15b462317f3f1 | ||
DIST rustc-1.10.0-src.tar.gz 25967780 SHA256 a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869 SHA512 fdef0a4c458ce687ab2921fb879cf6f68ae7ec4d780e407fea80cb751d70d80e621fc37756358d8336383c24646d9e2869215b3591b2240904206df2e58a7e45 WHIRLPOOL daa9775e515f6466c7344518e2afff96d01f62bb15cb01e6d4889ec338189b9584f7f9b5d6d340e00aa995490a09eecad1c4db0d98e068e4256081724c668644 | ||
DIST rustc-1.10.0-x86_64-unknown-linux-gnu.tar.gz 46533773 SHA256 4301f9a09f2b88ac1238d886dfa14d864be7401f4d8a31277303eebe0c7a56c3 SHA512 3b6c61c8c970c5244984df0c7d646d84984c8c1aaf804eda18820154cf09c5fea7fa77ac4cf779656ef4472029fe221b788a277a764de985bf5a0dc95a72f8c9 WHIRLPOOL f6f7ccc2ff9dd707d29f33a7252a41ec103914e016cfc383f1c7f37e6823fb32354ba599c7dd5f24f09ecd1436b40b16b6a23be44950fb2738b5cfa20d3dfcb9 | ||
DIST rustc-1.11.0-src.tar.gz 26126471 SHA256 3685034a78e70637bdfa3117619f759f2481002fd9abbc78cc0f737c9974de6a SHA512 6ad050a02e3a3b48f205f5d5ed9393fd2a1a2237e5c78b3e51af8162f410b93a831ebe5980ce78c4d38c5a692395c7fec8442956497a5d21e9f7157404c6b5aa WHIRLPOOL f57ea2f42c97256427964f3a553207a2b587b1e4f1c2636c66d9c47f92a9de508a64ba8288ab3a80444d9dba1c59d545be876448a1f80f283c69a4cc3356da25 | ||
DIST rustc-1.9.0-i686-unknown-linux-gnu.tar.gz 45887218 SHA256 2951dec835827974d03c7aafbf2c969f39bb530e1c200fd46f90bc01772fae39 SHA512 6d799a464f93aecb24ded4e9af634d7852f9930968814700e90353888657f9f556dda156455cb8cabca0e5f42c8d0f7864d43294687c8ce57518e21bebad99f7 WHIRLPOOL da145280c6558cd36d40450203fc61081282a64a2145b75998806964be731e91378e571a9c9b6b7fe1b488c6dd303105a9f47c0b1c6c77a6426ed1aaa0756df4 | ||
DIST rustc-1.9.0-src.tar.gz 25859714 SHA256 b19b21193d7d36039debeaaa1f61cbf98787e0ce94bd85c5cbe2a59462d7cfcd SHA512 bb23d529daaea17cd6358057ad7c219b1bf2206331a9813520f9e3a519698f6d274a6c25f579dab9e8e48fe0c6e51e7eb473885cb1fb65128e715e06778b62f7 WHIRLPOOL 23393e5842d2af5bffaca34909be5293198a2ceedb3d6db55920e375e3860411cf51f5148264d9e172ec088f26706529f24ed05d97ca09387f0d25f90c23ed85 | ||
DIST rustc-1.9.0-x86_64-unknown-linux-gnu.tar.gz 45246956 SHA256 d0704d10237c66c3efafa6f7e5570c59a1d3fe5c6d99487540f90ebb37cd84c4 SHA512 37a4c62f09e2b49cf7a898eeefd3843ef17f3dc433a4f55cb5c3d5c315effb9e0750c275bb0fc91e5ada6c42924af5c7f890874c5917d41a4723c60b209d1c0d WHIRLPOOL f3aeaaf9c93a177c2a944eaae994b5d3c6d2c31923d468bda16cce845e3ae87ac3747c2f025ec1e78054cc001d3c3abf629534f7b6b454e394192ead8e614d3d |
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,154 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
PYTHON_COMPAT=( python2_7 ) | ||
|
||
inherit python-any-r1 versionator toolchain-funcs | ||
|
||
if [[ ${PV} = *beta* ]]; then | ||
betaver=${PV//*beta} | ||
BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" | ||
MY_P="rustc-beta" | ||
SLOT="beta/${PV}" | ||
SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz" | ||
KEYWORDS="" | ||
else | ||
ABI_VER="$(get_version_component_range 1-2)" | ||
SLOT="stable/${ABI_VER}" | ||
MY_P="rustc-${PV}" | ||
SRC="${MY_P}-src.tar.gz" | ||
KEYWORDS="~amd64 ~x86" | ||
fi | ||
|
||
STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0" | ||
RUST_STAGE0_amd64="rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu" | ||
RUST_STAGE0_x86="rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu" | ||
|
||
DESCRIPTION="Systems programming language from Mozilla" | ||
HOMEPAGE="http://www.rust-lang.org/" | ||
|
||
SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz | ||
amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz ) | ||
x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz ) | ||
" | ||
|
||
LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" | ||
|
||
IUSE="clang debug doc libcxx +system-llvm" | ||
REQUIRED_USE="libcxx? ( clang )" | ||
|
||
RDEPEND="libcxx? ( sys-libs/libcxx ) | ||
system-llvm? ( >=sys-devel/llvm-3.8.1-r2:=[multitarget] | ||
<sys-devel/llvm-3.9.0:=[multitarget] ) | ||
" | ||
|
||
DEPEND="${RDEPEND} | ||
${PYTHON_DEPS} | ||
>=dev-lang/perl-5.0 | ||
clang? ( sys-devel/clang ) | ||
" | ||
|
||
PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425" | ||
|
||
S="${WORKDIR}/${MY_P}" | ||
|
||
src_unpack() { | ||
unpack "rustc-${PV}-src.tar.gz" || die | ||
mkdir "${MY_P}/dl" || die | ||
local stagename="RUST_STAGE0_${ARCH}" | ||
local stage0="${!stagename}" | ||
cp "${DISTDIR}/${stage0}.tar.gz" "${MY_P}/dl/" || die "cp stage0" | ||
} | ||
|
||
src_prepare() { | ||
find mk -name '*.mk' -exec \ | ||
sed -i -e "s/-Werror / /g" {} \; || die | ||
|
||
eapply_user | ||
} | ||
|
||
src_configure() { | ||
export CFG_DISABLE_LDCONFIG="notempty" | ||
|
||
"${ECONF_SOURCE:-.}"/configure \ | ||
--prefix="${EPREFIX}/usr" \ | ||
--libdir="${EPREFIX}/usr/$(get_libdir)/${P}" \ | ||
--mandir="${EPREFIX}/usr/share/${P}/man" \ | ||
--release-channel=${SLOT%%/*} \ | ||
--disable-manage-submodules \ | ||
--default-linker=$(tc-getBUILD_CC) \ | ||
--default-ar=$(tc-getBUILD_AR) \ | ||
--python=${EPYTHON} \ | ||
--disable-rpath \ | ||
$(use_enable clang) \ | ||
$(use_enable debug) \ | ||
$(use_enable debug llvm-assertions) \ | ||
$(use_enable !debug optimize) \ | ||
$(use_enable !debug optimize-cxx) \ | ||
$(use_enable !debug optimize-llvm) \ | ||
$(use_enable !debug optimize-tests) \ | ||
$(use_enable doc docs) \ | ||
$(use_enable libcxx libcpp) \ | ||
$(usex system-llvm "--llvm-root=${EPREFIX}/usr" " ") \ | ||
|| die | ||
} | ||
|
||
src_compile() { | ||
emake VERBOSE=1 | ||
} | ||
|
||
src_install() { | ||
unset SUDO_USER | ||
|
||
default | ||
|
||
mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die | ||
mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die | ||
mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die | ||
|
||
dodoc COPYRIGHT | ||
|
||
dodir "/usr/share/doc/rust-${PV}/" | ||
mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die | ||
rmdir "${D}/usr/share/doc/rust/" || die | ||
|
||
cat <<-EOF > "${T}"/50${P} | ||
LDPATH="/usr/$(get_libdir)/${P}" | ||
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-${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-mode 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 | ||
} |