commit:     318ff399443822e95b101f30dcf85b34856b78b9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  8 22:26:11 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 22:49:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=318ff399

www-client/firefox: ensure that LLVM deps are in sync with used LLVM slot

Bug: https://bugs.gentoo.org/678098
Bug: https://bugs.gentoo.org/679598
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 eclass/mozconfig-v6.60.eclass            | 44 +++++++++++++++++--
 www-client/firefox/firefox-60.5.2.ebuild | 16 +++++--
 www-client/firefox/firefox-65.0.2.ebuild | 73 +++++++++++++++++++++++++++++---
 3 files changed, 120 insertions(+), 13 deletions(-)

diff --git a/eclass/mozconfig-v6.60.eclass b/eclass/mozconfig-v6.60.eclass
index 059ec55f2ca..0cd728743e4 100644
--- a/eclass/mozconfig-v6.60.eclass
+++ b/eclass/mozconfig-v6.60.eclass
@@ -158,9 +158,47 @@ DEPEND="app-arch/zip
        app-arch/unzip
        >=sys-devel/binutils-2.30
        sys-apps/findutils
-       clang? (
-               >=sys-devel/llvm-4.0.1[gold]
-               >=sys-devel/lld-4.0.1
+       || (
+               (
+                       sys-devel/clang:4
+                       !clang? ( sys-devel/llvm:4 )
+                       clang? (
+                               =sys-devel/lld-4*
+                               sys-devel/llvm:4[gold]
+                       )
+               )
+               (
+                       sys-devel/clang:5
+                       !clang? ( sys-devel/llvm:5 )
+                       clang? (
+                               =sys-devel/lld-5*
+                               sys-devel/llvm:5[gold]
+                       )
+               )
+               (
+                       sys-devel/clang:6
+                       !clang? ( sys-devel/llvm:6 )
+                       clang? (
+                               =sys-devel/lld-6*
+                               sys-devel/llvm:6[gold]
+                       )
+               )
+               (
+                       sys-devel/clang:7
+                       !clang? ( sys-devel/llvm:7 )
+                       clang? (
+                               =sys-devel/lld-7*
+                               sys-devel/llvm:7[gold]
+                       )
+               )
+               (
+                       sys-devel/clang:8
+                       !clang? ( sys-devel/llvm:8 )
+                       clang? (
+                               =sys-devel/lld-8*
+                               sys-devel/llvm:8[gold]
+                       )
+               )
        )
        pulseaudio? ( media-sound/pulseaudio )
        elibc_glibc? (

diff --git a/www-client/firefox/firefox-60.5.2.ebuild 
b/www-client/firefox/firefox-60.5.2.ebuild
index ec418bbfeee..a96c670e53e 100644
--- a/www-client/firefox/firefox-60.5.2.ebuild
+++ b/www-client/firefox/firefox-60.5.2.ebuild
@@ -63,8 +63,6 @@ RDEPEND="
        selinux? ( sec-policy/selinux-mozilla )"
 
 DEPEND="${RDEPEND}
-       >=sys-devel/llvm-4.0.1
-       >=sys-devel/clang-4.0.1
        amd64? ( ${ASM_DEPEND} virtual/opengl )
        x86? ( ${ASM_DEPEND} virtual/opengl )"
 
@@ -81,7 +79,19 @@ if [[ -z $GMP_PLUGIN_LIST ]]; then
 fi
 
 llvm_check_deps() {
-       has_version "sys-devel/clang:${LLVM_SLOT}"
+       if ! has_version "sys-devel/clang:${LLVM_SLOT}" ; then
+               ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..."
+               return 1
+       fi
+
+       if use clang ; then
+               if ! has_version "=sys-devel/lld-${LLVM_SLOT}*" ; then
+                       ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..."
+                       return 1
+               fi
+       fi
+
+       einfo "Will use LLVM slot ${LLVM_SLOT}!"
 }
 
 pkg_setup() {

diff --git a/www-client/firefox/firefox-65.0.2.ebuild 
b/www-client/firefox/firefox-65.0.2.ebuild
index 5d08b2b8a5b..b869ca7f95a 100644
--- a/www-client/firefox/firefox-65.0.2.ebuild
+++ b/www-client/firefox/firefox-65.0.2.ebuild
@@ -114,12 +114,52 @@ DEPEND="${CDEPEND}
        >=net-libs/nodejs-8.11.0
        >=sys-devel/binutils-2.30
        sys-apps/findutils
-       >=sys-devel/llvm-4.0.1
-       >=sys-devel/clang-4.0.1
-       clang? (
-               >=sys-devel/llvm-4.0.1[gold]
-               >=sys-devel/lld-4.0.1
-               pgo? ( >=sys-libs/compiler-rt-sanitizers-4.0.1[profile] )
+       || (
+               (
+                       sys-devel/clang:4
+                       !clang? ( sys-devel/llvm:4 )
+                       clang? (
+                               =sys-devel/lld-4*
+                               sys-devel/llvm:4[gold]
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-4*[profile] )
+                       )
+               )
+               (
+                       sys-devel/clang:5
+                       !clang? ( sys-devel/llvm:5 )
+                       clang? (
+                               =sys-devel/lld-5*
+                               sys-devel/llvm:5[gold]
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-5*[profile] )
+                       )
+               )
+               (
+                       sys-devel/clang:6
+                       !clang? ( sys-devel/llvm:6 )
+                       clang? (
+                               =sys-devel/lld-6*
+                               sys-devel/llvm:6[gold]
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-6*[profile] )
+                       )
+               )
+               (
+                       sys-devel/clang:7
+                       !clang? ( sys-devel/llvm:7 )
+                       clang? (
+                               =sys-devel/lld-7*
+                               sys-devel/llvm:7[gold]
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-7*[profile] )
+                       )
+               )
+               (
+                       sys-devel/clang:8
+                       !clang? ( sys-devel/llvm:8 )
+                       clang? (
+                               =sys-devel/lld-8*
+                               sys-devel/llvm:8[gold]
+                               pgo? ( 
=sys-libs/compiler-rt-sanitizers-8*[profile] )
+                       )
+               )
        )
        pulseaudio? ( media-sound/pulseaudio )
        >=virtual/cargo-1.30.0
@@ -146,7 +186,26 @@ if [[ -z $GMP_PLUGIN_LIST ]] ; then
 fi
 
 llvm_check_deps() {
-       has_version "sys-devel/clang:${LLVM_SLOT}"
+       if ! has_version "sys-devel/clang:${LLVM_SLOT}" ; then
+               ewarn "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..."
+               return 1
+       fi
+
+       if use clang ; then
+               if ! has_version "=sys-devel/lld-${LLVM_SLOT}*" ; then
+                       ewarn "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot 
use LLVM slot ${LLVM_SLOT} ..."
+                       return 1
+               fi
+
+               if use pgo ; then
+                       if ! has_version 
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then
+                               ewarn 
"=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM 
slot ${LLVM_SLOT} ..."
+                               return 1
+                       fi
+               fi
+       fi
+
+       einfo "Will use LLVM slot ${LLVM_SLOT}!"
 }
 
 pkg_setup() {

Reply via email to