commit:     b67430d2028ac285023796884012bd563bbf56cf
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  7 14:59:18 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Nov  7 15:03:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b67430d2

dev-lang/spidermonkey: fix ebuilds to reflect latest llvm.eclass changes

 - also match lld checks to a slot.

Bug: https://bugs.gentoo.org/879177
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild | 10 ++++++----
 dev-lang/spidermonkey/spidermonkey-78.15.0.ebuild | 10 ++++++----
 dev-lang/spidermonkey/spidermonkey-91.13.0.ebuild | 10 ++++++----
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild 
b/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild
index 40a248c7290f..d78ef4c2e97f 100644
--- a/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-102.4.0.ebuild
@@ -113,8 +113,8 @@ llvm_check_deps() {
                fi
 
                if use lto ; then
-                       if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; 
then
-                               einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! 
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+                               einfo "sys-devel/lld:${LLVM_SLOT} is missing! 
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
                                return 1
                        fi
                fi
@@ -228,10 +228,12 @@ src_configure() {
        einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
 
        local have_switched_compiler=
-       if use clang && ! tc-is-clang ; then
+       if use clang; then
                # Force clang
                einfo "Enforcing the use of clang due to USE=clang ..."
-               have_switched_compiler=yes
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
                AR=llvm-ar
                AS=llvm-as
                CC=${CHOST}-clang

diff --git a/dev-lang/spidermonkey/spidermonkey-78.15.0.ebuild 
b/dev-lang/spidermonkey/spidermonkey-78.15.0.ebuild
index 80ef8034aaa8..8af327dd9b6e 100644
--- a/dev-lang/spidermonkey/spidermonkey-78.15.0.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-78.15.0.ebuild
@@ -126,8 +126,8 @@ llvm_check_deps() {
                fi
 
                if use lto ; then
-                       if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; 
then
-                               einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! 
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+                               einfo "sys-devel/lld:${LLVM_SLOT} is missing! 
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
                                return 1
                        fi
                fi
@@ -252,10 +252,12 @@ src_configure() {
        einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
 
        local have_switched_compiler=
-       if use clang && ! tc-is-clang ; then
+       if use clang; then
                # Force clang
                einfo "Enforcing the use of clang due to USE=clang ..."
-               have_switched_compiler=yes
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
                AR=llvm-ar
                CC=${CHOST}-clang
                CXX=${CHOST}-clang++

diff --git a/dev-lang/spidermonkey/spidermonkey-91.13.0.ebuild 
b/dev-lang/spidermonkey/spidermonkey-91.13.0.ebuild
index 6dc4ab9f813f..11f4cc2fe5e8 100644
--- a/dev-lang/spidermonkey/spidermonkey-91.13.0.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-91.13.0.ebuild
@@ -120,8 +120,8 @@ llvm_check_deps() {
                fi
 
                if use lto ; then
-                       if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; 
then
-                               einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! 
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+                       if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
+                               einfo "sys-devel/lld:${LLVM_SLOT} is missing! 
Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
                                return 1
                        fi
                fi
@@ -235,10 +235,12 @@ src_configure() {
        einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
 
        local have_switched_compiler=
-       if use clang && ! tc-is-clang ; then
+       if use clang; then
                # Force clang
                einfo "Enforcing the use of clang due to USE=clang ..."
-               have_switched_compiler=yes
+               if tc-is-gcc; then
+                       have_switched_compiler=yes
+               fi
                AR=llvm-ar
                CC=${CHOST}-clang
                CXX=${CHOST}-clang++

Reply via email to