[145541] trunk/dports/security/yara/Portfile

khindenburg at macports.org khindenburg at macports.org
Mon Feb 8 19:28:16 PST 2016


Revision: 145541
          https://trac.macports.org/changeset/145541
Author:   khindenburg at macports.org
Date:     2016-02-08 19:28:16 -0800 (Mon, 08 Feb 2016)
Log Message:
-----------
yara: add fix to build where yara 1.7 is installed #44816

Modified Paths:
--------------
    trunk/dports/security/yara/Portfile

Modified: trunk/dports/security/yara/Portfile
===================================================================
--- trunk/dports/security/yara/Portfile	2016-02-09 02:31:20 UTC (rev 145540)
+++ trunk/dports/security/yara/Portfile	2016-02-09 03:28:16 UTC (rev 145541)
@@ -37,6 +37,15 @@
     pre-configure {
         system -W ${worksrcpath} "./bootstrap.sh"
     }
+    # If yara 1.7 is installed, this build will fail since
+    # /opt/local/include is before ./libyara/include
+    # so swap CPPFLAGS and CFLAGS
+    # Remove this upon the next release after verifying it is not needed.
+    post-configure {
+            reinplace "s|\$(CPPFLAGS) \$(AM_CFLAGS) \$(CFLAGS)|\$(CFLAGS) \$(AM_CFLAGS) \$(CPPFLAGS)|" ${worksrcpath}/Makefile
+            reinplace "s|\$(DEFAULT_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS)|\$(DEFAULT_INCLUDES) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CFLAGS)|" ${worksrcpath}/Makefile
+            reinplace "s|\t\$(AM_CFLAGS) \$(CFLAGS)|\t\$(AM_CFLAGS) \$(CPPFLAGS)|" ${worksrcpath}/Makefile
+    }
 
     configure.cflags-append -std=gnu89
     configure.args-append   --with-crypto \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160208/b1c35654/attachment-0001.html>


More information about the macports-changes mailing list