commit: 8d3572f4171ba4ad6b0ecd03711b0b52d975bd6c Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> AuthorDate: Thu Mar 21 22:49:31 2019 +0000 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> CommitDate: Fri Mar 22 04:27:48 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d3572f4
dev-lang/rust: 1.33.0 requires llvm:7 to build improve llvm handling for future use, taken from mesa ebuild make sure 1.33 pulls only llvm:7 Bug: https://bugs.gentoo.org/681108 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> dev-lang/rust/rust-1.33.0.ebuild | 41 ++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/dev-lang/rust/rust-1.33.0.ebuild b/dev-lang/rust/rust-1.33.0.ebuild index aff9229221d..0cc4462509e 100644 --- a/dev-lang/rust/rust-1.33.0.ebuild +++ b/dev-lang/rust/rust-1.33.0.ebuild @@ -5,8 +5,6 @@ EAPI=6 PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy ) -LLVM_MAX_SLOT=8 - inherit check-reqs eapi7-ver estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs if [[ ${PV} = *beta* ]]; then @@ -40,13 +38,34 @@ LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt system-llvm wasm ${ALL_LLVM_TARGETS[*]}" -COMMON_DEPEND="sys-libs/zlib - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= ) - net-libs/libssh2 - net-libs/http-parser:= - net-misc/curl[ssl] - system-llvm? ( >=sys-devel/llvm-7:= )" +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling one than more slot +# simultaneously. + +# How to use it: +# 1. List all the working slots (with min versions) in ||, newest first. +# 2. Update the := to specify *max* version, e.g. < 8. +# 3. Specify LLVM_MAX_SLOT, e.g. 7. +LLVM_DEPEND=" + || ( + sys-devel/llvm:7 + ) + <sys-devel/llvm-8:= +" +LLVM_MAX_SLOT=7 + +COMMON_DEPEND=" + sys-libs/zlib + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + net-libs/libssh2 + net-libs/http-parser:= + net-misc/curl[ssl] + system-llvm? ( + ${LLVM_DEPEND} + ) +" + DEPEND="${COMMON_DEPEND} ${PYTHON_DEPS} || ( @@ -91,9 +110,7 @@ pkg_pretend() { pkg_setup() { pre_build_checks python-any-r1_pkg_setup - if use system-llvm; then - llvm_pkg_setup - fi + use system-llvm && llvm_pkg_setup } src_prepare() {
