[73103] trunk/dports/aqua/djview/Portfile

michaelld at macports.org michaelld at macports.org
Wed Nov 3 18:28:06 PDT 2010


Revision: 73103
          http://trac.macports.org/changeset/73103
Author:   michaelld at macports.org
Date:     2010-11-03 18:28:03 -0700 (Wed, 03 Nov 2010)
Log Message:
-----------
djview: Fixes ticket #27073 : qmake sometimes creates a Makefile with
"-arch foo -arch" for linking, which generates an error -- so patch
the created Makefile to remove this issue.

Modified Paths:
--------------
    trunk/dports/aqua/djview/Portfile

Modified: trunk/dports/aqua/djview/Portfile
===================================================================
--- trunk/dports/aqua/djview/Portfile	2010-11-04 01:17:13 UTC (rev 73102)
+++ trunk/dports/aqua/djview/Portfile	2010-11-04 01:28:03 UTC (rev 73103)
@@ -29,17 +29,42 @@
 depends_lib-append \
     port:djvulibre
 
+archcheck.files \
+    lib/libdjvulibre.dylib \
+    lib/libQtCore.dylib
+
+universal_variant yes
+
+configure.ldflags
 configure.args \
     --disable-nsdejavu \
     --disable-desktopfiles \
     QMAKESPEC=${qt_mkspecs_dir}/macx-g++
 
-universal_variant yes
-
-# QMake does not handle this flag.
+# djview's 'configure' does not handle this flag.
 configure.universal_args-delete --disable-dependency-tracking
-configure.args-delete  --disable-dependency-tracking
+configure.args-append           --disable-dependency-tracking
 
+# when Qt is installed without +universal, and qmake is called with
+# "QMAKE_LDFLAGS += -arch foo", 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]} {
+        reinplace "s|\\(-arch ${build_arch}\\) -arch|\\1|" \
+            ${worksrcpath}/src/Makefile
+    }
+}
+
+# allow ccache, if specified by the user
+pre-build {
+    if {[tbool configure.ccache]} {
+        build.post_args "CCACHE=ccache"
+    }
+}
+
 destroot {
     xinstall -m 755 -d ${destroot}${applications_dir}
     copy ${worksrcpath}/src/djview.app ${destroot}${applications_dir}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101103/b864908a/attachment.html>


More information about the macports-changes mailing list