[116383] trunk/dports/science/netcdf-fortran/Portfile
sean at macports.org
sean at macports.org
Thu Jan 23 12:15:12 PST 2014
Revision: 116383
https://trac.macports.org/changeset/116383
Author: sean at macports.org
Date: 2014-01-23 12:15:12 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
netcdf-fortran: use mpi port group
This change also updates the g95 variant logic to bring it up to date with
other fortran compilers. All tests pass using the g95 compiler with and without
mpi enabled.
Modified Paths:
--------------
trunk/dports/science/netcdf-fortran/Portfile
Modified: trunk/dports/science/netcdf-fortran/Portfile
===================================================================
--- trunk/dports/science/netcdf-fortran/Portfile 2014-01-23 20:15:09 UTC (rev 116382)
+++ trunk/dports/science/netcdf-fortran/Portfile 2014-01-23 20:15:12 UTC (rev 116383)
@@ -3,7 +3,13 @@
PortSystem 1.0
PortGroup muniversal 1.0
+PortGroup mpi 1.0
+compilers.choose f77 f90 fc
+mpi.setup require_fortran
+
+mpi.enforce_variant hdf5-18
+
name netcdf-fortran
version 4.2
revision 10
@@ -44,16 +50,6 @@
}
}
-pre-configure {
- if {[variant_isset openmpi]} {
- set hdf5cc [exec grep "C Compiler" ${prefix}/lib/libhdf5.settings | awk {BEGIN{FS="/"}{print $NF}}]
- if {${hdf5cc}!="openmpicc"} {
- ui_error "Install hdf5-18 +openmpi"
- return -code error "hdf5-18 +openmpi not installed"
- }
- }
-}
-
configure.cppflags-append -DNDEBUG
configure.cflags-append -fno-common
@@ -83,86 +79,8 @@
destroot.destdir prefix=${destroot}${prefix} \
MANDIR=\\\${prefix}/share/man
-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 ""
- }
- }
+if {![fortran_variant_isset]} {
+ default_variants-append +gcc48
}
-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-append "${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}
- configure.cppflags-append -DpgiFortran
- }
-}
-
-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
- #-lfg95 required or the tests fail
- configure.cppflags-append -DpgiFortran
- configure.fflags-append -fno-second-underscore
- configure.fcflags-append -fno-second-underscore
- configure.ldflags-append -lf95
-}
-
-variant openmpi conflicts mpich description {compile with openmpi} {
- depends_lib-append port:openmpi
- configure.fc openmpif77
- configure.cc openmpicc
-}
-
-variant mpich conflicts openmpi description {compile with mpich} {
- depends_lib-append path:bin/mpicc-mp:mpich-default
- configure.fc mpif90-mp
- configure.cc mpicc-mp
-}
-
variant mpich2 requires mpich description {Legacy compatibility variant} {}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140123/84662837/attachment-0001.html>
More information about the macports-changes
mailing list