[71347] trunk/dports/python/py26-pymvpa/Portfile

jameskyle at macports.org jameskyle at macports.org
Thu Sep 9 14:03:26 PDT 2010


Revision: 71347
          http://trac.macports.org/changeset/71347
Author:   jameskyle at macports.org
Date:     2010-09-09 14:03:25 -0700 (Thu, 09 Sep 2010)
Log Message:
-----------
Updated the py26-pymvpa port for gcc variants. set default to gcc45. Fixed static calling of a gcc version

Modified Paths:
--------------
    trunk/dports/python/py26-pymvpa/Portfile

Modified: trunk/dports/python/py26-pymvpa/Portfile
===================================================================
--- trunk/dports/python/py26-pymvpa/Portfile	2010-09-09 21:03:22 UTC (rev 71346)
+++ trunk/dports/python/py26-pymvpa/Portfile	2010-09-09 21:03:25 UTC (rev 71347)
@@ -34,19 +34,6 @@
 
 depends_build           port:git-core
 
-configure.env           CC=${prefix}/bin/gcc-mp-4.3 \
-                        CPP=${prefix}/bin/gcc-mp-4.3
-
-build.env           CC=${prefix}/bin/gcc-mp-4.3 \
-                    CPP=${prefix}/bin/gcc-mp-4.3 \
-                    CCFLAGS="-I${prefix}/include -L${prefix}/lib" \
-                    CPPFLAGS="-I${prefix}/include -L${prefix}/lib"
-
-destroot.env           CC=${prefix}/bin/gcc-mp-4.3 \
-                       CPP=${prefix}/bin/gcc-mp-4.3 \
-                       CCFLAGS="-I${prefix}/include -L${prefix}/lib" \
-                       CPPFLAGS="-I${prefix}/include -L${prefix}/lib"
-
 configure.args          --with-libsvm
 build.args              --with-libsvm
 patch.pre_args          -p1
@@ -55,7 +42,6 @@
 
 build.target            build_ext
 
-configure.compiler      macports-gcc-4.3
 pre-fetch {
     if {[file exists ${prefix}/share/doc/mvpa]} {
         ui_error "It appears the 2.5 version of mvpa is installed"
@@ -76,6 +62,37 @@
 variant no_shogun description {Do not build shogun} {
     depends_lib-delete port:shogun
 }
+
+variant gcc43 conflicts gcc44 description {build with gcc 4.3} {}
+variant gcc44 conflicts gcc43 description {build with gcc 4.4} {}
+variant gcc45 conflicts gcc43 gcc44 description {build with gcc 4.5} {}
+
+if {[variant_isset gcc43]} {
+    set gccversion 4.3
+} elseif {[variant_isset gcc44]} {
+    set gccversion 4.4
+} else {
+    default_variants +gcc45
+    set gccversion 4.5
+}
+
+set gccnumber [join [split ${gccversion} .] ""]
+ 
+configure.compiler      macports-gcc-${gccversion}
+configure.env           CC=${prefix}/bin/gcc-mp-${gccversion} \
+                        CPP=${prefix}/bin/g++-mp-${gccversion}
+
+build.env           CC=${prefix}/bin/gcc-mp-${gccversion} \
+                    CPP=${prefix}/bin/g++-mp-${gccversion} \
+                    CCFLAGS="-I${prefix}/include -L${prefix}/lib" \
+                    CPPFLAGS="-I${prefix}/include -L${prefix}/lib"
+
+destroot.env           CC=${prefix}/bin/gcc-mp-${gccversion} \
+                       CPP=${prefix}/bin/g++-mp-${gccversion} \
+                       CCFLAGS="-I${prefix}/include -L${prefix}/lib" \
+                       CPPFLAGS="-I${prefix}/include -L${prefix}/lib"
+
+
 post-destroot {
   xinstall -m 755 -d "${destroot}${prefix}/share/doc/"
   file delete ${worksrcpath}/doc/todo.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100909/edfcc7df/attachment-0001.html>


More information about the macports-changes mailing list