diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2021-02-06 13:55:37 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2021-02-06 13:55:37 +0100 |
commit | e175988041502f41609360c0760499c5b16882d9 (patch) | |
tree | 33c6e714b1bcd2e821e5144449d9a5c167c2c30f | |
parent | dev-lang/spidermonkey: drop old (diff) | |
download | gentoo-e175988041502f41609360c0760499c5b16882d9.tar.gz gentoo-e175988041502f41609360c0760499c5b16882d9.tar.bz2 gentoo-e175988041502f41609360c0760499c5b16882d9.zip |
dev-lang/spidermonkey: add rust-1.49 llvm version workaround
Bug: https://bugs.gentoo.org/768543
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild | 18 | ||||
-rw-r--r-- | dev-lang/spidermonkey/spidermonkey-78.7.1.ebuild | 16 |
2 files changed, 27 insertions, 7 deletions
diff --git a/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild b/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild index f8748a9aa6f0..52a9c0590f08 100644 --- a/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-78.6.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" @@ -163,9 +163,19 @@ pkg_setup() { [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + # temp fix for https://bugs.gentoo.org/768543 + # we can assume that rust 1.49.0 always uses llvm 11 + local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }') + [[ -n ${version_rust} ]] && version_rust=$(ver_cut 1-2 "${version_rust}") + [[ -z ${version_rust} ]] && die "Failed to read version from rustc!" + + if ver_test "${version_rust}" -eq "1.49" ; then + local version_llvm_rust="11" + else + local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') + [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") + [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + fi if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." diff --git a/dev-lang/spidermonkey/spidermonkey-78.7.1.ebuild b/dev-lang/spidermonkey/spidermonkey-78.7.1.ebuild index 2619af530114..41ad6270ccf8 100644 --- a/dev-lang/spidermonkey/spidermonkey-78.7.1.ebuild +++ b/dev-lang/spidermonkey/spidermonkey-78.7.1.ebuild @@ -163,9 +163,19 @@ pkg_setup() { [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + # temp fix for https://bugs.gentoo.org/768543 + # we can assume that rust 1.49.0 always uses llvm 11 + local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }') + [[ -n ${version_rust} ]] && version_rust=$(ver_cut 1-2 "${version_rust}") + [[ -z ${version_rust} ]] && die "Failed to read version from rustc!" + + if ver_test "${version_rust}" -eq "1.49" ; then + local version_llvm_rust="11" + else + local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') + [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") + [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" + fi if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." |