summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2018-05-14 15:37:00 +0200
committerDirkjan Ochtman <djc@gentoo.org>2018-05-14 16:38:35 +0200
commit71eba02631d5129e1e4c2729f4234727d7bac498 (patch)
tree3ffb44fc46b6dd02593b6af3a0b0c6ab1b93b2ac /dev-lang
parentdev-util/cargo: remove old versions (diff)
downloadgentoo-71eba02631d5129e1e4c2729f4234727d7bac498.tar.gz
gentoo-71eba02631d5129e1e4c2729f4234727d7bac498.tar.bz2
gentoo-71eba02631d5129e1e4c2729f4234727d7bac498.zip
dev-lang/rust: version bump to 1.26.0
Use LLVM_TARGETS to decide which targets to build for bundled LLVM. Use xz-compressed tarballs where possible to limit bandwidth/storage. Fixes: https://bugs.gentoo.org/627288 Fixes: https://bugs.gentoo.org/655600 Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/rust/Manifest4
-rw-r--r--dev-lang/rust/rust-1.26.0.ebuild181
2 files changed, 185 insertions, 0 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index fb9df0a55712..ca40b37b993d 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -6,6 +6,9 @@ DIST rust-1.22.0-x86_64-unknown-linux-gnu.tar.gz 160427151 BLAKE2B f56a8205023ec
DIST rust-1.24.0-aarch64-unknown-linux-gnu.tar.gz 184157362 BLAKE2B 68b1b9471b6d26dbb2c3bf897d2bffc15d2fcd1fde774d4f23389e9ccb96fc60d8ec8c343b5f93651bced05bdf228d549c747f3f3d4de9c8232e99aa1b6bef6a SHA512 d15548a7b21ca4605ff24d098a59414548a315acd736ac4d8ac845399c9febdd810ba76fdf2dd9336325bd749866ee72f3d8c7c573b04a4d932d00cd7cac34c0
DIST rust-1.24.0-i686-unknown-linux-gnu.tar.gz 193631843 BLAKE2B f19e9f717f5626b2267da4e661b53f45f7948a83a25156239af3cadb1184bf39669171364754f1787cdb78c3b62bd145bff1e3f4c3c7890f0dd52839bd8ae923 SHA512 3806bee5dccc080fae437bbc7f2e2062803244eb57c25e5e591e46279810c661bf016a4043e0af991b49b9e09a5d81ec275a852c3647a474507b03846d76aac0
DIST rust-1.24.0-x86_64-unknown-linux-gnu.tar.gz 199663002 BLAKE2B 2373637eb4410c07328b3cbaecb56ca465956ec1a2f14786e00922d74c4e68760538383960080348be003bee656761f5bbd0aa871ea21e22d029b3f8ab5344a7 SHA512 63ecb84b31f586c85e25229fb673892567edc2f557ac2ca1958caf3e26aa4e6c9a55b410aeeeadf1a61a5ebd66a517106e942f923a2884ce69ee92aec622187b
+DIST rust-1.25.0-aarch64-unknown-linux-gnu.tar.xz 83752132 BLAKE2B a0d49238ccaa3547764c07a215a0e02c813ae18cd6aca3baae1d9a10dee87d73526552b7ff6e4936ec414794d1143041aa8f92d244e2e4fe5aaefcb12a6dcb0a SHA512 404ecd4dc1e49fba41d7ade947877f621aa762e43eb5a8f604823fe297e8023f095cd449610240ed235723baaac96064eb38445794e27708edcdbca998d939e3
+DIST rust-1.25.0-i686-unknown-linux-gnu.tar.xz 102453124 BLAKE2B 8986ebab6a7a9d00f716541484e0cfd4f33ca592880097217e718cb79cae77aad8ecaf6856f72386d2419b4dcc0d99425fb37f72b4830d6a20a74166f2c534d0 SHA512 75ad5cb5e00fabc24aaa46236cc6f2193a7543fd0944c0717c11a56d9c420d20463ad683558d86f5d42abacfb89d15f9cabf404c912a5e24a28e6716c8003e8f
+DIST rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz 111059260 BLAKE2B ae982976a735c2b5226722207a983bb638cb7c0cb0ceb6b438456d54fac86a5d1892b535f01ac463157205c0ae27ae876482f6ac1fa269a9ec3e1177be0cef2e SHA512 aea93ff64f620a1dd6b48d07ec3dcbc126b2f5c17b4697c096ec8cd02a3c7dfec7ae7d5df70a55eceb372897ad12f3d01c67d5aaea0167a80270931c61323f78
DIST rust-std-1.18.0-i686-unknown-linux-gnu.tar.gz 66316236 BLAKE2B 64712595bd979b7eadb626198df1c43951cf040dd94e9b18821d5cc9807d6b3135c62129d89b8cbebe2aabb28e7fcbe22454cc7c4a66ef1a16db899f30e91671 SHA512 0649743437f15d80f7fe08ae32177b36e2a89e87db8062433cfa6d0f62fe7e8fdbc109a025c02dc110d8abdf4b74ddfe80ba8fb895992b0f5ac6a880bbbdf051
DIST rust-std-1.18.0-x86_64-unknown-linux-gnu.tar.gz 75723132 BLAKE2B 1a0407be9f65db914dd5573daf4ca47804bd3254a3ef51b244c1952e91b5f1395f712dd2c82eb73623ad7da79bffcc8ac9b5e6e0404b3ffa300fe0292189caec SHA512 98f50016cf6f7c89f90830e1c9f41b5413adf2eaa5e2874ca117ffe84ee59fe77cb461ca3601ee65c5c5c884eb42e22509a94c00544527c727f2e3d6d0adb530
DIST rustc-1.15.1-i686-unknown-linux-gnu.tar.gz 39314075 BLAKE2B 59e79324807d92d57e71588f82983457cd6f3fbbf7eb2bd9b63a84c16d15e30679bc7625dbd20b20da62a80ccdeed58825bee1357b3b7af9b4a5aa83ba5f3a60 SHA512 138a4a893a70860650da1636f734977c215e32b1f9b15b957bfc31575d2662ea6c2c65a130bd13647ec1f2366fe0deb26a94ea09aaec7cbda8e466fa295a0c42
@@ -16,3 +19,4 @@ DIST rustc-1.18.0-x86_64-unknown-linux-gnu.tar.gz 45281645 BLAKE2B 3034a693aa808
DIST rustc-1.19.0-src.tar.gz 50108626 BLAKE2B ae6016f816f2c41b81668764e2892d7846226ff944be9f173d9d8818c22aeb21cc7457e346bd4c985f41d3d22df1dad009d1977a733bbf40ff6fb8a6f0854254 SHA512 080a8625fc15bc4fc17ab910bdcc0d9a88ce8922f1a3eb241d0f956b5799e4db6df45ebabb5497295c198be08686e5a94dff65569582fc6a5ecb9200cfee5c24
DIST rustc-1.23.0-src.tar.gz 60010149 BLAKE2B 64bba97fd1a16d3162b65b0d8dd2024ca07166a4fb3d541a96216a27a392baac5f5addd9b3b223ce935df9437a0789cd5c3d8328957f983cc3317a63f13a4dcd SHA512 a1dbb1a625c6d8dfe9708e1cf478a49154b1eb0aba5ba67ac85518a8c7d1c70d2d86ac4d441156e9bfd0fd77ca241fb5491a2bd68aefcf0b3c2e164c3cc29e4e
DIST rustc-1.25.0-src.tar.gz 98639156 BLAKE2B 1408d5dd0611d4830de3b6b3d00e3fad4198a47599b639d0ac0bd05aaba401f743056a942e9df04a4d192c6b12e8cfe9a9cdf8cd26e48b72104ce9b423df049e SHA512 7d8886f4d5a621eb794e814deb60be681fa38cf086f87ffa14e5a3500c640b237c549a632de1331a0f1b71963de41f6d31a4df3866b7e597424002316fed81ce
+DIST rustc-1.26.0-src.tar.xz 54613664 BLAKE2B 798985e4060c28828066118f39fc296e52b3796ae02f3917912680154047eb6f91806b3d45f3a0e9afcef55d95cea3079debae12d2ddf2d9c46f992e12519094 SHA512 563b910ecf4b2a0d798a1201177f733333e64efad49e5aceec5adc66a8c6903df391c9afc0fdd8284348c08082e0c4de1e5cb68efe6797594de43ca93e4ad7a2
diff --git a/dev-lang/rust/rust-1.26.0.ebuild b/dev-lang/rust/rust-1.26.0.ebuild
new file mode 100644
index 000000000000..db3e0046912e
--- /dev/null
+++ b/dev-lang/rust/rust-1.26.0.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_5 )
+
+inherit multiprocessing 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.xz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+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.xz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz )
+ arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz )
+"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc extended +jemalloc ${ALL_LLVM_TARGETS[*]}"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake
+"
+PDEPEND="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_target_name="CHOST_${ARCH}"
+ local rust_target="${!rust_target_name}"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = ["${rust_target}"]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ extended = $(toml_usex extended)
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+}
+
+src_compile() {
+ ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ env DESTDIR="${D}" ./x.py install || die
+
+ 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
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ 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
+ /usr/bin/rust-lldb
+ 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 and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${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
+}