diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2016-10-21 14:00:08 +0200 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2016-10-21 14:00:23 +0200 |
commit | ccf67c36fee7bbf3f5b1c72709e94d1bf806e9d1 (patch) | |
tree | fe070db454ad8ea3c67dc3d259142e4085114e84 /dev-lang | |
parent | sys-devel/automake: Don't re-generate info pages (bug #589138). (diff) | |
download | gentoo-ccf67c36fee7bbf3f5b1c72709e94d1bf806e9d1.tar.gz gentoo-ccf67c36fee7bbf3f5b1c72709e94d1bf806e9d1.tar.bz2 gentoo-ccf67c36fee7bbf3f5b1c72709e94d1bf806e9d1.zip |
dev-lang/rust: version bump to 1.12.1
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/rust/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.12.1.ebuild | 154 |
2 files changed, 155 insertions, 0 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 0c6defef23c9..970390832316 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -4,3 +4,4 @@ DIST rustc-1.11.0-i686-unknown-linux-gnu.tar.gz 45977053 SHA256 16273afc0540b435 DIST rustc-1.11.0-src.tar.gz 26126471 SHA256 3685034a78e70637bdfa3117619f759f2481002fd9abbc78cc0f737c9974de6a SHA512 6ad050a02e3a3b48f205f5d5ed9393fd2a1a2237e5c78b3e51af8162f410b93a831ebe5980ce78c4d38c5a692395c7fec8442956497a5d21e9f7157404c6b5aa WHIRLPOOL f57ea2f42c97256427964f3a553207a2b587b1e4f1c2636c66d9c47f92a9de508a64ba8288ab3a80444d9dba1c59d545be876448a1f80f283c69a4cc3356da25 DIST rustc-1.11.0-x86_64-unknown-linux-gnu.tar.gz 45436770 SHA256 e9d27a72900da33c1bbd0e59dd42fd6414c6bcdfa33593fb7c7360068406394a SHA512 a7565f00761cd4b2bd1e873bc9a75f52f3ba12379b4e1055e8aaf7c1818fb6357a4270630365fc8d7fb73816aa6f5520e6ac6e667105a4e0459d3755852d8d51 WHIRLPOOL fc708585b5ab6e1c62052b77ab08ebd560f8f1861a004653fb3636feb0f4fd33d01e1c793dc428d7172d2005050809f24321820c4d48503eea59a686e172f2d6 DIST rustc-1.12.0-src.tar.gz 27501444 SHA256 ac5907d6fa96c19bd5901d8d99383fb8755127571ead3d4070cce9c1fb5f337a SHA512 0bd98c3a8c37420877e8e71b80e376d3b34c35a7bea9a986b7f332ab1885d76d456dbcbae6bf52e1155231bbf93284699ddc0d5297cc19b74d97bdfd8b804adc WHIRLPOOL 17cb131bd60bc8bb8abf882006367b992fb563c2a7df9bc19821dfa93cb5d01c83c7c057fabb13534492a686e331ad913c5dc08d186ef1c68c9161f81f2680a4 +DIST rustc-1.12.1-src.tar.gz 27511443 SHA256 97913ae4cb255618aaacd1a534b11f343634b040b32656250d09d8d9ec02d3dc SHA512 1923e9efb9f7ca4d691a8d368fd327c80892a019a85716876e21b794584422a2050362388511c7e0763975c6ffad20cc06ce6f86b3ea5fe36f64dbd59aabc821 WHIRLPOOL 74a9d2b9f4e3be96ef30a037cb1eec6fa70f7bf266f6aff8324bf8314457177edf1a8bef839843c72a1a06910e024f7a80f9c84f6151edcbc5f2548ffbd7dcaa diff --git a/dev-lang/rust/rust-1.12.1.ebuild b/dev-lang/rust/rust-1.12.1.ebuild new file mode 100644 index 000000000000..ff5dd2d47456 --- /dev/null +++ b/dev-lang/rust/rust-1.12.1.ebuild @@ -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-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 +} |