[69829] trunk/dports/audio/liblastfm/Portfile

michaelld at macports.org michaelld at macports.org
Sat Jul 17 15:07:09 PDT 2010


Revision: 69829
          http://trac.macports.org/changeset/69829
Author:   michaelld at macports.org
Date:     2010-07-17 15:07:07 -0700 (Sat, 17 Jul 2010)
Log Message:
-----------
Trial fix for ticket #25716.  Better way to generate Makefile's and
fix qmake flaw in them.

Modified Paths:
--------------
    trunk/dports/audio/liblastfm/Portfile

Modified: trunk/dports/audio/liblastfm/Portfile
===================================================================
--- trunk/dports/audio/liblastfm/Portfile	2010-07-17 21:39:24 UTC (rev 69828)
+++ trunk/dports/audio/liblastfm/Portfile	2010-07-17 22:07:07 UTC (rev 69829)
@@ -35,11 +35,18 @@
 
 post-configure {
     # create Makefile's, then patch them to remove a flaw made by qmake
-    foreach tMf {src/Makefile src/fingerprint/Makefile \
-                 tests/Makefile demos/Makefile} {
+
+    # (1) find subdir Makefile names from top-level Makefile, and have
+    # 'make' create each in turn.
+    foreach tMf [exec grep -e "Makefile\[\^ \]\*:" ${worksrcpath}/Makefile | \
+                     sed -e "s@\\(\[^ \]*/Makefile\[^ \]*\\):\[^ \]*@\\1 at g"] {
         system "cd ${worksrcpath} && make ${tMf}"
-        reinplace "s|-arch ${build_arch} -arch|-arch ${build_arch}|" ${worksrcpath}/${tMf}
     }
+
+    # (2) find all created Makefile*'s, and reinplace the offending flaw
+    foreach tMf [exec find ${worksrcpath} -name "Makefile*"] {
+        reinplace "s|-arch ${build_arch} -arch|-arch ${build_arch}|" ${tMf}
+    }
 }
 
 build.env           PATH=${qtdir}/bin:$env(PATH)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100717/91207792/attachment.html>


More information about the macports-changes mailing list