[89987] trunk/dports/science/netcdf/Portfile

takeshi at macports.org takeshi at macports.org
Sat Feb 18 07:28:01 PST 2012


Revision: 89987
          http://trac.macports.org/changeset/89987
Author:   takeshi at macports.org
Date:     2012-02-18 07:28:00 -0800 (Sat, 18 Feb 2012)
Log Message:
-----------
netcdf: checks if hdf5-18 +openmpi is installed when +openmpi is set. added +gcc46

Modified Paths:
--------------
    trunk/dports/science/netcdf/Portfile

Modified: trunk/dports/science/netcdf/Portfile
===================================================================
--- trunk/dports/science/netcdf/Portfile	2012-02-18 15:16:49 UTC (rev 89986)
+++ trunk/dports/science/netcdf/Portfile	2012-02-18 15:28:00 UTC (rev 89987)
@@ -6,7 +6,7 @@
 name                        netcdf
 epoch                       1
 version                     4.1.3
-revision                    3
+revision                    4
 maintainers                 takeshi openmaintainer
 platforms                   darwin
 categories                  science
@@ -39,6 +39,16 @@
     }
 }
 
+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.cxxflags-append   -fno-common
 configure.cflags-append     -fno-common
@@ -66,28 +76,35 @@
 
 default_variants +netcdf4 +dap
 
-variant gcc43 conflicts g95 gcc44 gcc45 description {Enable Fortran support with gfortran 4.3} {
+variant gcc43 conflicts g95 gcc44 gcc45 gcc46 description {Enable Fortran support with gfortran 4.3} {
     depends_lib-append      port:gcc43
     configure.args-delete   --disable-fortran-compiler-check --disable-f77 --disable-f90
     configure.cppflags-append -DpgiFortran
     configure.compiler      macports-gcc-4.3
 }
 
-variant gcc44 conflicts g95 gcc43 gcc45 description {Enable Fortran support with gfortran 4.4} {
+variant gcc44 conflicts g95 gcc43 gcc45 gcc46 description {Enable Fortran support with gfortran 4.4} {
     depends_lib-append      port:gcc44
     configure.args-delete   --disable-fortran-compiler-check --disable-f77 --disable-f90
     configure.cppflags-append -DpgiFortran
     configure.compiler      macports-gcc-4.4
 }
 
-variant gcc45 conflicts g95 gcc43 gcc44 description {Enable Fortran support with gfortran 4.5} {
+variant gcc45 conflicts g95 gcc43 gcc44 gcc46 description {Enable Fortran support with gfortran 4.5} {
     depends_lib-append      port:gcc45
     configure.args-delete   --disable-fortran-compiler-check --disable-f77 --disable-f90
     configure.cppflags-append -DpgiFortran
     configure.compiler      macports-gcc-4.5
 }
 
-variant g95 conflicts gcc43 gcc44 gcc45 description {Enable Fortran support with g95} {
+variant gcc46 conflicts g95 gcc43 gcc44 gcc45 description {Enable Fortran support with gfortran 4.6} {
+    depends_lib-append      port:gcc46
+    configure.args-delete   --disable-fortran-compiler-check --disable-f77 --disable-f90
+    configure.cppflags-append -DpgiFortran
+    configure.compiler      macports-gcc-4.6
+}
+
+variant g95 conflicts gcc43 gcc44 gcc45 gcc46 description {Enable Fortran support with g95} {
     depends_lib-append      port:g95
     configure.args-delete   --disable-fortran-compiler-check --disable-f77 --disable-f90
     #-lfg95 required or the tests fail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120218/d98f4a61/attachment.html>


More information about the macports-changes mailing list