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

michaelld at macports.org michaelld at macports.org
Tue Nov 9 05:25:13 PST 2010


Revision: 73290
          http://trac.macports.org/changeset/73290
Author:   michaelld at macports.org
Date:     2010-11-09 05:25:08 -0800 (Tue, 09 Nov 2010)
Log Message:
-----------
liblastfm changes:
* fixes ticket #22924 by reinstating "-arch foo -arch" QMake output
  correction, with explanation.
* allow for use of ccache/distcc

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

Modified: trunk/dports/audio/liblastfm/Portfile
===================================================================
--- trunk/dports/audio/liblastfm/Portfile	2010-11-09 11:35:32 UTC (rev 73289)
+++ trunk/dports/audio/liblastfm/Portfile	2010-11-09 13:25:08 UTC (rev 73290)
@@ -50,9 +50,40 @@
         ${worksrcpath}/tests/tests.pro
 }
 
-# QMake does not handle this flag.
-configure.universal_args-delete --disable-dependency-tracking
-configure.args-delete  --disable-dependency-tracking
-
 configure.pre_args  --prefix ${prefix}
 configure.args      --release
+configure.universal_args
+
+# when Qt is installed without +universal, and qmake is called with
+# "QMAKE_LDFLAGS += -arch foo" (or this is in the .qmake.cache, or
+# some other location that is used by QMake), and "foo" is the native
+# arch, then, at least sometimes, qmake will erroneously remove the
+# second "foo" but leave the "-arch" flag -- generating an error at
+# linking.  Not sure if this is the case with +debug; does not matter
+# for this port, since it has not debug variant.
+post-configure {
+    if {![variant_isset universal]} {
+        # (1) find subdir Makefile names from top-level
+        # Makefile, and have 'make' create each in turn.
+        foreach fixfile [exec grep -e "Makefile\[\^ \]\*:" \
+                ${worksrcpath}/Makefile | \
+                sed -e "s@\\(\[^ \]*/Makefile\[^ \]*\\):\[^ \]*@\\1 at g"] {
+            system "cd ${worksrcpath} && \
+                    PATH=${qt_bins_dir}:$env(PATH) \
+                    make ${fixfile}"
+        }
+
+        # (2) find all of the just-created Makefile*'s, and reinplace
+        # the offending QMake flaw
+        foreach fixfile [exec find ${worksrcpath} -name "Makefile*"] {
+            reinplace "s@\\(-arch \[^ \]*\\) -arch@\\1@" ${fixfile}
+        }
+    }
+}
+
+# allow ccache, if specified by the user
+pre-build {
+    if {[tbool configure.ccache]} {
+        build.post_args "CCACHE=ccache"
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101109/32908cfc/attachment.html>


More information about the macports-changes mailing list