sys-block/open-iscsi: fix handling of user CPPFLAGS
authorMike Frysinger <vapier@gentoo.org>
Thu, 17 Dec 2015 23:56:48 +0000 (18:56 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 18 Dec 2015 00:00:05 +0000 (19:00 -0500)
sys-block/open-iscsi/open-iscsi-2.0.873-r1.ebuild

index 4392860d304dff4c1bd8565b715bb9052087853f..05d9790807116cd032479929353127a9cdf8e900 100644 (file)
@@ -52,6 +52,8 @@ src_prepare() {
 }
 
 src_configure() {
+       use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI
+
        cd utils/open-isns || die
 
        # SSL (--with-security) is broken
@@ -60,11 +62,11 @@ src_configure() {
 }
 
 src_compile() {
-       use debug && append-flags -DDEBUG_TCP -DDEBUG_SCSI
-
+       # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build
+       # is messed up already here, so it's not making it that much worse.
        KSRC="${KV_DIR}" CFLAGS="" \
        emake \
-               OPTFLAGS="${CFLAGS}" \
+               OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \
                AR="$(tc-getAR)" CC="$(tc-getCC)" \
                user
 }