commit:     066654f5a7210de20c2f8447b0fef17c74be19eb
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  9 12:14:39 2022 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sat Jul  9 15:40:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=066654f5

x11-plugins/wmpager: respect CC

Closes: https://bugs.gentoo.org/726286
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 x11-plugins/wmpager/wmpager-1.2-r2.ebuild | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/x11-plugins/wmpager/wmpager-1.2-r2.ebuild 
b/x11-plugins/wmpager/wmpager-1.2-r2.ebuild
index 920a6e876ac9..541b6e136aad 100644
--- a/x11-plugins/wmpager/wmpager-1.2-r2.ebuild
+++ b/x11-plugins/wmpager/wmpager-1.2-r2.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
+inherit toolchain-funcs
+
 DESCRIPTION="A simple pager docklet for the WindowMaker window manager"
 HOMEPAGE="http://wmpager.sourceforge.net/";
 SRC_URI="mirror://sourceforge/wmpager/${P}.tar.gz"
@@ -21,12 +23,17 @@ src_prepare() {
        sed -i "s:\(WMPAGER_DEFAULT_INSTALL_DIR \).*:\1\"/usr/share/wmpager\":" 
\
                src/wmpager.c || die
 
-       #Honour Gentoo CFLAGS and LDFLAGS, see bug #337604
-       sed -i -e "s/-g/${CFLAGS}/" \
+       #Honour Gentoo CC, CFLAGS and LDFLAGS, see bug #337604 and #726286
+       sed -i -e "s/-g/\${CFLAGS}/" \
                -e "s/\${LIBS}/\${LIBS} \${LDFLAGS}/" \
+               -e "s/gcc/\$(CC)/" \
                src/Makefile || die
 }
 
+src_compile() {
+       emake CC="$(tc-getCC)"
+}
+
 src_install() {
        emake INSTALLDIR="${ED}/usr" install
        rm -rf "${ED}"/usr/man || die

Reply via email to