Skip to content

Commit

Permalink
dev-lang/rust-bin: Version bump to 1.23.0
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.20, Repoman-2.3.6
  • Loading branch information
chutz committed Jan 24, 2018
1 parent 411ed8c commit 43d37e7
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dev-lang/rust-bin/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ DIST rust-1.16.0-i686-unknown-linux-gnu.tar.gz 106129219 BLAKE2B ea549c33e4a4be9
DIST rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz 103142459 BLAKE2B 6fadb77e75c11ede8eb4dd7eced4d19c3405f81fe072cb9170d798a114da71f3cdb538ba69d4d20c2d42074dacb54dbf9a9c5dfd44dd3b8b441843ebc88c22b9 SHA512 f3d381c0e47e0af02eb116376422c3e48295c2854c6ad8c03d4c13e662f3cc1fdddf25923f7b3ef358c5cf670ed67d75e2197162434a81d5f9499e6e0e2d1054
DIST rust-1.19.0-i686-unknown-linux-gnu.tar.gz 143010900 BLAKE2B fd47fc710f151d76d5421377c1bd571c635e42ed812af34bbde368cdbc1c4927efa2c63dce0c7e2a8e160d463b6e3812aa1e5e4ca87f1ef632d7be0e0ff2c8bb SHA512 a41bc6b576e04e4ced66c69524eedca6528b8a559c4877408be590d48ce4c77f6157f9adbc9e87e209f3e2d21ae105305195dbbfbf519f8df88a1615b49b3b0e
DIST rust-1.19.0-x86_64-unknown-linux-gnu.tar.gz 151087058 BLAKE2B 796bd295393669cd55cf0a0b25f28a85b2d86394cb637b4de468c1095c5757212dda52f7d5d5ca30cfb69c0b5719d6bdce71c0ad7ed8f9ed7a40f7705f8ba550 SHA512 fc98ad7728a72c9bc93505458f7558405cc6a608eb19aa6c609e0155e7c081123f116cf023d19af2f0cd9cb81b8e1bbe69efd88f7bb61cca2d258d5fa2ed6bba
DIST rust-1.23.0-i686-unknown-linux-gnu.tar.gz 180646185 BLAKE2B 1f4653141722baffdfc9114979ac7b3abd01a8d3bf879c1e57e26daef28af39d2d64f2eea1bfadfee37f7ec9d91be06251a0dccdac1bf817f850b60bb6a1eec4 SHA512 b4b5a26b6416ceb81cbb7202c42481bfa10ef2afabfa46c2eefc89d58f87b1b4785c1f65e2f58ea863ae3d3e794aa06e101f9097d5aa757e6749d891006a7542
DIST rust-1.23.0-x86_64-unknown-linux-gnu.tar.gz 187313088 BLAKE2B eaef537506106b4cdb4c26652cc322ca7cc5f47fe15bd8551c07334bdaccdd98b14c1f91153e96ca79c22c88dfb69d2a7823fc3ac90e27b0a2c36c6559cda04b SHA512 71c0a893b25f6498bfd73104f006b79b5d6a31e4a4bcc6dcbe1b48183120afca28c12404b436417e010e3c449845c98e27e76d2b0f33498bcb35d2434b1fa821
102 changes: 102 additions & 0 deletions dev-lang/rust-bin/rust-bin-1.23.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

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
opt/${P}/lib/rustlib/*/lib/*.rlib*
"

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
}

0 comments on commit 43d37e7

Please sign in to comment.