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.
EAPI="5"
-inherit eutils
+inherit eutils toolchain-funcs
DESCRIPTION="a periodic command scheduler"
HOMEPAGE="http://anacron.sourceforge.net/"
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() {