summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2018-07-11 16:44:08 +0200
committerDirkjan Ochtman <djc@gentoo.org>2018-07-11 16:44:24 +0200
commit36a2bdef9a0c6529adb8ea728fad1b8cced4b3aa (patch)
tree55bc176de872e3b62472cb434db920dc6075cdd1 /dev-lang/rust-bin
parentdev-scheme/c-wrapper: fix for >=sys-libs/glibc-2.25 (diff)
downloadgentoo-36a2bdef9a0c6529adb8ea728fad1b8cced4b3aa.tar.gz
gentoo-36a2bdef9a0c6529adb8ea728fad1b8cced4b3aa.tar.bz2
gentoo-36a2bdef9a0c6529adb8ea728fad1b8cced4b3aa.zip
dev-lang/rust-bin: version bump to 1.27.1
Add USE flag to install cargo component. Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-lang/rust-bin')
-rw-r--r--dev-lang/rust-bin/Manifest5
-rw-r--r--dev-lang/rust-bin/metadata.xml3
-rw-r--r--dev-lang/rust-bin/rust-bin-1.27.1.ebuild130
3 files changed, 138 insertions, 0 deletions
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
index c79bc9666e33..0fd595aeabd1 100644
--- a/dev-lang/rust-bin/Manifest
+++ b/dev-lang/rust-bin/Manifest
@@ -18,3 +18,8 @@ DIST rust-1.27.0-arm-unknown-linux-gnueabihf.tar.xz 101316444 BLAKE2B f3c2e5f0cd
DIST rust-1.27.0-armv7-unknown-linux-gnueabihf.tar.xz 98186744 BLAKE2B add9b9ce125e8e0216579fc4eb9a615396bc6798bd8fe52fc5e02b4eddbca991e227fa1022d5ea86473e4a2f4738fe8e30ad01899bac78b6c2072eead9b9e69d SHA512 034288fd8767f1773b4a5232b26e68a812d0f8084e39dff776d3c8d235f2b3f51c12620a0346851fccbb0ab3cd194938682fa8e9d8641f8ee3c3d9259c96a86f
DIST rust-1.27.0-i686-unknown-linux-gnu.tar.xz 144744880 BLAKE2B ef48cd1b2601868840c59274a776be40e0ac8ce674d0a00712176e28f5e381b95b790d898fdfdae153768b754f87662c581cd5b11752d5d4401aadd9b446fc7b SHA512 66508f09e7a48d72d4a18da209dadd5e11fc1e9811726fdfa8de609359eee6bc1d8d3b578b50ab0b4dcff879e96edd6d60449508eed7d2d44f72b2c8c29e2546
DIST rust-1.27.0-x86_64-unknown-linux-gnu.tar.xz 144343920 BLAKE2B 214530a0724f0fa6e1c4e769787a1c0d56e9a6c13a0cacdb9f639d523915fbd413fe42ccd9073308b14b551804d269061ed9bc03cc6761b817bc556e1837d005 SHA512 e57b60cafec48a396cde1ff62bd01148e0e3c803b9b97d70a7cf477a7d3a4295ca98fa99a1252004751e8529b214c2859cd2134ce722b3336b9640c2aef6f625
+DIST rust-1.27.1-arm-unknown-linux-gnueabi.tar.xz 101083416 BLAKE2B 2fd3a4b0c8a6cc1e7f7bc11300081183144639c4d02b8bb989154fbad92ad1e30ac8171993d8296ce8f0486dd018df46360693d912b50ca0c299c4c059f79d17 SHA512 7fa376f077abad6e24b81aa98ab7d953b8257388212a509c7a061ebe022cefd5bd042f24fc4444287bc4fb4cb9a6cbb651ae0d8146b5d4fe73d395ebb7192367
+DIST rust-1.27.1-arm-unknown-linux-gnueabihf.tar.xz 101382108 BLAKE2B 8743930b86b8ac1032afc5ced83f57b0606e9143a9d8e30a8b2ede70abb415fc2f1a904cb4b92adde7f71d54e83384509f02220cea9a9ab189a79815a58bd434 SHA512 be49a245163bef0345cd138fdc8d13a8403bf6b523505666650119eba87921f6a1abb04267bc698da30e5e688d8592fc20d8d3d63aff7ac1fa7397950531d329
+DIST rust-1.27.1-armv7-unknown-linux-gnueabihf.tar.xz 98288932 BLAKE2B 4794e8c54c8f733de6129829bab9e02644651fd6350db76bdb8c69f32fcff0a61e4992241431fea2b871e04a6f28607810918c5161a5a8a0b3fe756a37b619e3 SHA512 405bd579e69ec73de384487c4cd77eefcbc6c537ca3421f38ce2d35b8cd911def82fb9006b788a8aa6cdef69f620a5b1f2a2f7364bf7ddd0452d80b33315fa43
+DIST rust-1.27.1-i686-unknown-linux-gnu.tar.xz 144852524 BLAKE2B f087ad3ee7f942482c6aa02f9dcdc4adf6ede64e698024f7dcca6dccedcc5f9e9805050015d8328c5b672c94cb7f1008551a95a69b1ce8e754e048c5604dd11e SHA512 e0c7d5f64db768321bbdf229529b12f93e36507db03329b0b26094fd81cdf013804f929105ac4545903eb4494770120407c40616086b431ea66413be7e1163d3
+DIST rust-1.27.1-x86_64-unknown-linux-gnu.tar.xz 144328984 BLAKE2B 45551c2f4258c821e9b56ac09d673c46032b5f480da5fc51c0e0e33f66be7f0619aa4ad878336dbffae32e6eb43f2adfbba927ad5cfbb919b9e4395169d5c3bd SHA512 b419c19f75082a63a669ebeeefbce907ca7e7ac50a1c1355d1b10b3a4c1f8e28a76c4fd677efd8cb966a6e70a76059813e39b8dfe93de1401c7419d57ddca52a
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml
index 85cf4eb92057..7f14692ab9aa 100644
--- a/dev-lang/rust-bin/metadata.xml
+++ b/dev-lang/rust-bin/metadata.xml
@@ -5,4 +5,7 @@
<email>rust@gentoo.org</email>
<name>Rust Project</name>
</maintainer>
+ <use>
+ <flag name="cargo">Install cargo component</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-lang/rust-bin/rust-bin-1.27.1.ebuild b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
new file mode 100644
index 000000000000..c1554f3d217c
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils bash-completion-r1 versionator toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="cargo doc"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+ cargo? ( !dev-util/cargo )
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+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*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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"
+ use cargo && components="${components},cargo"
+ ./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}
+ local cargo=cargo-${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
+ use cargo && mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || 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}"
+ use cargo && dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
+
+ 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
+}