[78552] trunk/dports/devel/ppl/Portfile

adfernandes at macports.org adfernandes at macports.org
Wed May 11 15:18:41 PDT 2011


Revision: 78552
          http://trac.macports.org/changeset/78552
Author:   adfernandes at macports.org
Date:     2011-05-11 15:18:40 -0700 (Wed, 11 May 2011)
Log Message:
-----------
devel/ppl: enable universal variant and do not emit unsupported AVX instructions (#29313 and #29314)

Modified Paths:
--------------
    trunk/dports/devel/ppl/Portfile

Modified: trunk/dports/devel/ppl/Portfile
===================================================================
--- trunk/dports/devel/ppl/Portfile	2011-05-11 21:43:16 UTC (rev 78551)
+++ trunk/dports/devel/ppl/Portfile	2011-05-11 22:18:40 UTC (rev 78552)
@@ -1,5 +1,6 @@
 # $Id$
 PortSystem        1.0
+PortGroup         muniversal 1.0
 
 name              ppl
 version           0.11.2
@@ -36,8 +37,6 @@
 
 depends_lib       port:gmp port:glpk
 
-universal_variant   no
-
 configure.compiler  gcc-4.2
 
 variant gcc43 conflicts gcc44 gcc45 description "Use GCC 4.3 for compilation of PPL" {
@@ -58,6 +57,31 @@
     configure.cflags-append     "-ftree-vectorize -O3 -march=native"
 }
 
+if { ${os.arch} == "i386" } {
+    set native_target {i386 x86_64}
+} else {
+    set native_target {ppc ppc64}
+}
+
+if { [variant_isset universal] } {
+    configure.cflags-delete -march=native
+    configure.args-append   --build=${build_arch}-apple-${os.platform}${os.version}
+
+    foreach arch ${universal_archs_supported} {
+        lappend merger_configure_args($arch)    --host=${arch}-apple-${os.platform}${os.version}
+    }
+    foreach arch ${native_target} {
+        lappend merger_configure_cflags($arch)  -march=native
+    }
+}
+
+platform i386 {
+    if { [variant_isset gcc44] || [variant_isset gcc45] } {
+        configure.cflags-append    -mno-avx
+        configure.cxxflags-append  -mno-avx
+    }
+}
+
 test.run          yes
 test.target       check
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110511/a7280f13/attachment.html>


More information about the macports-changes mailing list