anacron: improve CFLAGS/CC handling

Rather than expand CFLAGS in the sed statement, pass it via the env later
on when running make.

Make sure we set up CC to a sane default.
This commit is contained in:
Mike Frysinger
2015-08-10 03:59:50 -04:00
parent 74c93ee190
commit 2f16839228
+8 -2
View File
@@ -4,7 +4,7 @@
EAPI="5"
inherit eutils
inherit eutils toolchain-funcs
DESCRIPTION="a periodic command scheduler"
HOMEPAGE="http://anacron.sourceforge.net/"
@@ -21,7 +21,13 @@ RDEPEND="${RDEPEND}
src_prepare() {
epatch "${FILESDIR}"/${P}-compile-fix-from-debian.patch
sed -i "s:^CFLAGS =:CFLAGS = $CFLAGS:" Makefile
sed -i \
-e '/^CFLAGS/{s:=:+=:;s:-O2::}' \
Makefile || die
}
src_configure() {
tc-export CC
}
src_install() {