commit:     6fc20622e792ab8e87fa84736fb215dc40a181e1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 07:27:14 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 07:27:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fc20622

sys-devel/clang-common: Adjust for gcc-config being IDEPEND

Thanks to Arfrever for noticing.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-devel/clang-common/clang-common-15.0.2-r1.ebuild             | 7 ++++++-
 sys-devel/clang-common/clang-common-15.0.3.9999.ebuild           | 7 ++++++-
 sys-devel/clang-common/clang-common-16.0.0.9999.ebuild           | 7 ++++++-
 sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild | 7 ++++++-
 sys-devel/clang-common/clang-common-16.0.0_pre20221010-r1.ebuild | 7 ++++++-
 5 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild 
b/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild
index c921dc1cf0c6..515cb176e7bd 100644
--- a/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-15.0.2-r1.ebuild
@@ -26,6 +26,10 @@ PDEPEND="
        default-libcxx? ( >=sys-libs/libcxx-${PV} )
        default-lld? ( sys-devel/lld )
 "
+IDEPEND="
+       !default-compiler-rt? ( sys-devel/gcc-config )
+       !default-libcxx? ( sys-devel/gcc-config )
+"
 
 LLVM_COMPONENTS=( clang/utils )
 llvm.org_set_globals
@@ -115,7 +119,8 @@ src_install() {
 }
 
 pkg_preinst() {
-       if has_version sys-devel/gcc-config; then
+       if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+       then
                local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
                if [[ -n ${gcc_path} ]]; then
                        cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF

diff --git a/sys-devel/clang-common/clang-common-15.0.3.9999.ebuild 
b/sys-devel/clang-common/clang-common-15.0.3.9999.ebuild
index 9d8ad198445d..841ceedb1077 100644
--- a/sys-devel/clang-common/clang-common-15.0.3.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-15.0.3.9999.ebuild
@@ -29,6 +29,10 @@ PDEPEND="
        default-lld? ( sys-devel/lld )
        !default-lld? ( sys-devel/binutils )
 "
+IDEPEND="
+       !default-compiler-rt? ( sys-devel/gcc-config )
+       !default-libcxx? ( sys-devel/gcc-config )
+"
 
 LLVM_COMPONENTS=( clang/utils )
 llvm.org_set_globals
@@ -114,7 +118,8 @@ src_install() {
 }
 
 pkg_preinst() {
-       if has_version sys-devel/gcc-config; then
+       if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+       then
                local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
                if [[ -n ${gcc_path} ]]; then
                        cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF

diff --git a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
index 9d8ad198445d..841ceedb1077 100644
--- a/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0.9999.ebuild
@@ -29,6 +29,10 @@ PDEPEND="
        default-lld? ( sys-devel/lld )
        !default-lld? ( sys-devel/binutils )
 "
+IDEPEND="
+       !default-compiler-rt? ( sys-devel/gcc-config )
+       !default-libcxx? ( sys-devel/gcc-config )
+"
 
 LLVM_COMPONENTS=( clang/utils )
 llvm.org_set_globals
@@ -114,7 +118,8 @@ src_install() {
 }
 
 pkg_preinst() {
-       if has_version sys-devel/gcc-config; then
+       if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+       then
                local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
                if [[ -n ${gcc_path} ]]; then
                        cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF

diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
index 9d8ad198445d..841ceedb1077 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221006-r1.ebuild
@@ -29,6 +29,10 @@ PDEPEND="
        default-lld? ( sys-devel/lld )
        !default-lld? ( sys-devel/binutils )
 "
+IDEPEND="
+       !default-compiler-rt? ( sys-devel/gcc-config )
+       !default-libcxx? ( sys-devel/gcc-config )
+"
 
 LLVM_COMPONENTS=( clang/utils )
 llvm.org_set_globals
@@ -114,7 +118,8 @@ src_install() {
 }
 
 pkg_preinst() {
-       if has_version sys-devel/gcc-config; then
+       if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+       then
                local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
                if [[ -n ${gcc_path} ]]; then
                        cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF

diff --git a/sys-devel/clang-common/clang-common-16.0.0_pre20221010-r1.ebuild 
b/sys-devel/clang-common/clang-common-16.0.0_pre20221010-r1.ebuild
index 9d8ad198445d..841ceedb1077 100644
--- a/sys-devel/clang-common/clang-common-16.0.0_pre20221010-r1.ebuild
+++ b/sys-devel/clang-common/clang-common-16.0.0_pre20221010-r1.ebuild
@@ -29,6 +29,10 @@ PDEPEND="
        default-lld? ( sys-devel/lld )
        !default-lld? ( sys-devel/binutils )
 "
+IDEPEND="
+       !default-compiler-rt? ( sys-devel/gcc-config )
+       !default-libcxx? ( sys-devel/gcc-config )
+"
 
 LLVM_COMPONENTS=( clang/utils )
 llvm.org_set_globals
@@ -114,7 +118,8 @@ src_install() {
 }
 
 pkg_preinst() {
-       if has_version sys-devel/gcc-config; then
+       if has_version -b sys-devel/gcc-config && has_version sys-devel/gcc
+       then
                local gcc_path=$(gcc-config --get-lib-path 2>/dev/null)
                if [[ -n ${gcc_path} ]]; then
                        cat >> "${ED}/etc/clang/gentoo-gcc-install.cfg" <<-EOF

Reply via email to