[116353] trunk/dports/math/fftw/Portfile

sean at macports.org sean at macports.org
Thu Jan 23 12:13:11 PST 2014


Revision: 116353
          https://trac.macports.org/changeset/116353
Author:   sean at macports.org
Date:     2014-01-23 12:13:10 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
fftw: use mpi portgroup

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

Modified: trunk/dports/math/fftw/Portfile
===================================================================
--- trunk/dports/math/fftw/Portfile	2014-01-23 20:13:05 UTC (rev 116352)
+++ trunk/dports/math/fftw/Portfile	2014-01-23 20:13:10 UTC (rev 116353)
@@ -2,10 +2,16 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           mpi 1.0
 
+# don't change configure.cc, etc. since we'll take care of that manually with
+# MPICC env var
+mpi.choose
+mpi.setup           require_fortran
+
 name                fftw
 version             2.1.5
-revision            6
+revision            7
 categories          math devel
 license             GPL-2+
 maintainers         sean
@@ -28,9 +34,9 @@
                     ftp://ftp.fftw.org/pub/fftw/ \
                     ftp://ftp.kusastro.kyoto-u.ac.jp/pub/src/GNU/fftw/
 
-checksums           md5 8d16a84f3ca02a785ef9eb36249ba433 \
-                    sha1 12020b58edc1b0490a83db4aa912fac5dfdfb26b \
-                    rmd160 723308722d76c12710db6473979adf8d086b0909
+checksums           rmd160  723308722d76c12710db6473979adf8d086b0909 \
+                    sha256  f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630
+
 configure.args      --enable-type-prefix --enable-threads \
                     --enable-fortran --infodir=${prefix}/share/info \
                     --enable-shared
@@ -46,79 +52,18 @@
     xinstall -m 644 ${worksrcpath}/fortran/fftw_f77.i ${destroot}${prefix}/include
 }
 
-variant mpi description {Include FFTW MPI library} {
-    depends_lib-append path:bin/mpicc-mp:mpich-default
+if {![fortran_variant_isset]} {
+    default_variants +gfortran
+}
+
+if {[mpi_variant_isset]} {
     configure.args-append --enable-mpi
 
     post-extract {
-        reinplace "s/mpicc/mpicc-mp mpicc/" configure
+        reinplace "s/mpicc/${mpi.cc} mpicc/" configure
     }
 }
 
-set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
-set default_fortran_variant +gcc48
-set g95_conflicts {}
-
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-
-    set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
-
-    foreach over ${gcc_versions} {
-        if {${ver} == ${over}} {
-            continue
-        }
-
-        set over_no_dot [join [split ${over} "."] ""]
-        append variant_line " conflicts gcc${over_no_dot}"
-    }
-    append variant_line { {}}
-
-    eval $variant_line
-
-    append g95_conflicts " conflicts gcc${ver_no_dot}"
-
-    if {[variant_isset gcc${ver_no_dot}]} {
-        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
-            set default_fortran_variant ""
-        }
-    }
-}
-
-eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
-
-if {[variant_isset g95]} {
-    if {${default_fortran_variant} != "+g95"} {
-        set default_fortran_variant ""
-    }
-}
-
-if {${default_fortran_variant} != ""} {
-    default_variants "${default_fortran_variant}"
-}
-
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-
-    if {[variant_isset gcc${ver_no_dot}]} {
-        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-        depends_build-append port:gcc${ver_no_dot}
-
-        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
-        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
-        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
-    }
-}
-
-if {[variant_isset g95]} {
-    depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-    depends_build-append port:g95
-
-    configure.fc ${prefix}/bin/g95
-    configure.f77 ${prefix}/bin/g95
-    configure.f90 ${prefix}/bin/g95
-}
-
 subport fftw-single {
     configure.args-append --enable-float
 
@@ -129,3 +74,5 @@
         delete ${destroot}${prefix}/include/fftw_f77.i
     }
 }
+
+livecheck.type      none
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/20a87375/attachment.html>


More information about the macports-changes mailing list