[49334] trunk/dports/devel/ossp-uuid/Portfile

mcalhoun at macports.org mcalhoun at macports.org
Tue Apr 7 16:44:04 PDT 2009


Revision: 49334
          http://trac.macports.org/changeset/49334
Author:   mcalhoun at macports.org
Date:     2009-04-07 16:44:03 -0700 (Tue, 07 Apr 2009)
Log Message:
-----------
ossp-uuid: Use muniversal PortGroup to build universal binaries.

Modified Paths:
--------------
    trunk/dports/devel/ossp-uuid/Portfile

Modified: trunk/dports/devel/ossp-uuid/Portfile
===================================================================
--- trunk/dports/devel/ossp-uuid/Portfile	2009-04-07 23:27:22 UTC (rev 49333)
+++ trunk/dports/devel/ossp-uuid/Portfile	2009-04-07 23:44:03 UTC (rev 49334)
@@ -1,6 +1,7 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup  muniversal 1.0
 
 name			ossp-uuid
 version			1.6.2
@@ -26,6 +27,32 @@
 
 configure.cflags-append	"-D_POSIX_C_SOURCE"
 
+if {[variant_isset universal]} {
+    if { ${os.arch} == "i386" } {
+        if { ${os.major} >= 10 } {
+            set merger_configure_env(ppc) ac_cv_va_copy=yes
+        }
+        set merger_configure_env(ppc64)   ac_cv_va_copy=yes
+    } else {
+        set merger_configure_env(i386)    ac_cv_va_copy=yes
+        set merger_configure_env(x86_64)  ac_cv_va_copy=yes
+    }
+
+    post-configure {
+        set all_archs ""
+        foreach arch ${universal_archs_to_use} {
+            lappend all_archs -arch ${arch}
+        }
+
+        # When uuid-config is asked about cflags and ldflags, have all architectures give the same answer.
+        foreach arch ${universal_archs_to_use} {
+            reinplace "s|-arch \[a-z0-9_\]*|${all_archs}|"  ${worksrcpath}-${arch}/uuid-config
+            reinplace "s|-m32|${all_archs}|"                ${worksrcpath}-${arch}/uuid-config
+            reinplace "s|-m64|${all_archs}|"                ${worksrcpath}-${arch}/uuid-config
+        }
+    }
+}
+
 test.run		yes
 test.target		check
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090407/f5c1882c/attachment.html>


More information about the macports-changes mailing list