commit:     f21d03ff3c0ce73b8be3da53cd309690fe9b2948
Author:     Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
AuthorDate: Wed Sep  8 10:07:12 2021 +0000
Commit:     Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Wed Sep  8 10:09:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f21d03ff

app-text/smu: fix calling CC directly

Closes: https://bugs.gentoo.org/812116
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Nickolas Raymond Kaczynski <nrk <AT> disroot.org>

 app-text/smu/smu-1.5.ebuild  | 7 +++++++
 app-text/smu/smu-9999.ebuild | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/app-text/smu/smu-1.5.ebuild b/app-text/smu/smu-1.5.ebuild
index dee873a6c..d926d593e 100644
--- a/app-text/smu/smu-1.5.ebuild
+++ b/app-text/smu/smu-1.5.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=8
 
+inherit toolchain-funcs
+
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/Gottox/${PN}.git";
@@ -17,9 +19,14 @@ HOMEPAGE="https://github.com/Gottox/smu";
 LICENSE="MIT"
 SLOT="0"
 
+pkg_setup() {
+       export CC="$(tc-getCC)"
+}
+
 src_prepare() {
        default
        sed -i \
+               -e '/^CC/d' \
                -e '/^CFLAGS/ s|-g -O0 ||;s|-Werror ||;s|^CFLAGS =|CFLAGS +=|;' 
\
                -e '/^LDFLAGS/ s|^LDFLAGS =|LDFLAGS +=|' \
                config.mk || die "sed failed"

diff --git a/app-text/smu/smu-9999.ebuild b/app-text/smu/smu-9999.ebuild
index 72ebfc1d5..318067044 100644
--- a/app-text/smu/smu-9999.ebuild
+++ b/app-text/smu/smu-9999.ebuild
@@ -3,6 +3,8 @@
 
 EAPI=8
 
+inherit toolchain-funcs
+
 if [[ ${PV} == 9999 ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://github.com/Gottox/smu.git";
@@ -17,9 +19,14 @@ HOMEPAGE="https://github.com/Gottox/smu";
 LICENSE="MIT"
 SLOT="0"
 
+pkg_setup() {
+       export CC="$(tc-getCC)"
+}
+
 src_prepare() {
        default
        sed -i \
+               -e '/^CC/d' \
                -e '/^CFLAGS/ s|-g -O0 ||;s|-Werror ||;s|^CFLAGS =|CFLAGS +=|;' 
\
                -e '/^LDFLAGS/ s|^LDFLAGS =|LDFLAGS +=|' \
                config.mk || die "sed failed"

Reply via email to