[82047] trunk/dports/math/arpack/Portfile

mmoll at macports.org mmoll at macports.org
Sat Aug 6 15:01:40 PDT 2011


Revision: 82047
          http://trac.macports.org/changeset/82047
Author:   mmoll at macports.org
Date:     2011-08-06 15:01:36 -0700 (Sat, 06 Aug 2011)
Log Message:
-----------
math/arpack: add g95 and atlas variants. closes #30336

Modified Paths:
--------------
    trunk/dports/math/arpack/Portfile

Modified: trunk/dports/math/arpack/Portfile
===================================================================
--- trunk/dports/math/arpack/Portfile	2011-08-06 21:37:14 UTC (rev 82046)
+++ trunk/dports/math/arpack/Portfile	2011-08-06 22:01:36 UTC (rev 82047)
@@ -45,7 +45,7 @@
 		build.args-append FFLAGS='-O2 -m64'
 	} else {
 		build.args-append FFLAGS='-O2 -m32'
-	}
+        }
 } else {
 	foreach arch {x86_64 i386 ppc ppc64} {
 		set merger_build_args(${arch}) home=${worksrcpath}-${arch}
@@ -78,6 +78,9 @@
 	build.args-append FC=${configure.fc} MAKE=${build.cmd}
 }
 
+set lapacklibs "-latlas -llapack -lblas"
+set flibs -lgfortran
+if {![variant_isset g95]} {
 post-build {
     set curVer ${version}
     set comVer [join [lrange [split ${version} '.'] 0 1 ] '.']
@@ -95,18 +98,22 @@
             set dir ${worksrcpath}-${arch}
         }
 
-        make_dylib arpack ${dir} ${arch} "-latlas -llapack -lblas -lgfortran -lSystem" ${version}
-
+        make_dylib arpack ${dir} ${arch} "${lapacklibs} ${flibs} -lSystem" ${version}
+        
         if { [variant_isset mpi] } {
-            make_dylib parpack ${dir} ${arch} "-latlas -llapack -lblas -lgfortran -lmpi_f77 -lSystem -larpack.1" ${version}
+            make_dylib parpack ${dir} ${arch} "${lapacklibs} ${flibs} -lmpi_f77 -lSystem -larpack.1" ${version}
         }
     }
 }
+}
 
 post-configure {
         if { [variant_isset mpi] } {
             set stlibs "libarpack.a libparpack.a"
             set shlibs "libarpack.1.dylib libparpack.1.dylib"
+        } elseif {![variant_isset g95]} {
+            set stlibs "libarpack.a"
+            set shlibs "libarpack.1.dylib"
         } else {
             set stlibs "libarpack.a"
             set shlibs "libarpack.1.dylib"
@@ -139,27 +146,32 @@
         }
 }
 
-variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 universal {
+variant gcc42 description {build with gfortran-mp-4.2} conflicts gcc43 gcc44 gcc45 g95 universal {
 	depends_build-append    port:gcc42
 	configure.fc ${prefix}/bin/gfortran-mp-4.2
 }
 
-variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 universal {
+variant gcc43 description {build with gfortran-mp-4.3} conflicts gcc42 gcc44 gcc45 g95 universal {
 	depends_build-append    port:gcc43
 	configure.fc ${prefix}/bin/gfortran-mp-4.3
 }
 
-variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 {
+variant gcc44 description {build with gfortran-mp-4.4} conflicts gcc42 gcc43 gcc45 g95 {
 	depends_build-append    port:gcc44
 	configure.fc ${prefix}/bin/gfortran-mp-4.4
 }
 
-variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 {
+variant gcc45 description {build with gfortran-mp-4.5} conflicts gcc42 gcc43 gcc44 g95 {
 	depends_build-append    port:gcc45
 	configure.fc ${prefix}/bin/gfortran-mp-4.5
 }
 
-if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] } {
+variant g95 description {build with g95} conflicts gcc42 gcc43 gcc44 gcc45 universal {
+        depends_build-append    port:g95
+        configure.fc ${prefix}/bin/g95
+}
+
+if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset g95] } {
 	default_variants      +gcc44
 }
 
@@ -189,6 +201,17 @@
 	configure.fc ${prefix}/bin/openmpif77
 }
 
+variant accelerate conflicts atlas description {build with Accelerate framework} {
+        set lapacklibs "-framework Accelerate"
+}
 
+variant atlas description {build with atlas} {
+	depends_lib-append port:atlas
+	set lapacklibs "-latlas -llapack -lblas"
+}
 
+if {![variant_isset atlas]} {
+    default_variants +accelerate
+}
+
 livecheck.type  none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110806/9b012a6c/attachment.html>


More information about the macports-changes mailing list