diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-10-10 16:38:19 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-10-10 16:38:43 +0200 |
commit | 03e708a309cc6ec49ed64636c351f84f6984ae07 (patch) | |
tree | 535fe2bab6b46019f123db22f85e50786c4edcc9 /sys-devel/clang-common | |
parent | sys-devel/clang-common: Add missing quotes to --gcc-install-dir= (diff) | |
download | gentoo-03e708a309cc6ec49ed64636c351f84f6984ae07.tar.gz gentoo-03e708a309cc6ec49ed64636c351f84f6984ae07.tar.bz2 gentoo-03e708a309cc6ec49ed64636c351f84f6984ae07.zip |
sys-devel/clang-common: Handle missing gcc-config gracefully
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/clang-common')
4 files changed, 28 insertions, 28 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 287aa05d2957..c921dc1cf0c6 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 @@ -115,12 +115,12 @@ src_install() { } pkg_preinst() { - # TODO: move this to gcc-config and call it here? - - 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 - --gcc-install-dir="${gcc_path%%:*}" - EOF + if has_version sys-devel/gcc-config; 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 + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi fi } 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 93434632f168..9d8ad198445d 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 @@ -114,12 +114,12 @@ src_install() { } pkg_preinst() { - # TODO: move this to gcc-config and call it here? - - 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 - --gcc-install-dir="${gcc_path%%:*}" - EOF + if has_version sys-devel/gcc-config; 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 + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi fi } 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 93434632f168..9d8ad198445d 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 @@ -114,12 +114,12 @@ src_install() { } pkg_preinst() { - # TODO: move this to gcc-config and call it here? - - 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 - --gcc-install-dir="${gcc_path%%:*}" - EOF + if has_version sys-devel/gcc-config; 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 + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi fi } 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 93434632f168..9d8ad198445d 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 @@ -114,12 +114,12 @@ src_install() { } pkg_preinst() { - # TODO: move this to gcc-config and call it here? - - 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 - --gcc-install-dir="${gcc_path%%:*}" - EOF + if has_version sys-devel/gcc-config; 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 + --gcc-install-dir="${gcc_path%%:*}" + EOF + fi fi } |