x11-plugins/wmpager: respect CC

Closes: https://bugs.gentoo.org/726286
Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
This commit is contained in:
Bernard Cafarelli
2022-07-09 14:14:39 +02:00
parent 4dde84689c
commit 066654f5a7

View File

@@ -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