[91550] trunk/dports/science

takeshi at macports.org takeshi at macports.org
Wed Apr 4 17:46:59 PDT 2012


Revision: 91550
          https://trac.macports.org/changeset/91550
Author:   takeshi at macports.org
Date:     2012-04-04 17:46:55 -0700 (Wed, 04 Apr 2012)
Log Message:
-----------
netcdf: revamped to 4.2. As of this version C++ and Fortran interfaces are separate.

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

Added Paths:
-----------
    trunk/dports/science/netcdf-cxx/
    trunk/dports/science/netcdf-cxx/Portfile
    trunk/dports/science/netcdf-fortran/
    trunk/dports/science/netcdf-fortran/Portfile

Modified: trunk/dports/science/netcdf/Portfile
===================================================================
--- trunk/dports/science/netcdf/Portfile	2012-04-05 00:03:53 UTC (rev 91549)
+++ trunk/dports/science/netcdf/Portfile	2012-04-05 00:46:55 UTC (rev 91550)
@@ -5,8 +5,7 @@
 
 name                        netcdf
 epoch                       1
-version                     4.1.3
-revision                    4
+version                     4.2
 maintainers                 takeshi openmaintainer
 platforms                   darwin
 categories                  science
@@ -18,26 +17,20 @@
     and machine-independent data formats that support the creation,  \
     access, and sharing of array-oriented scientific data.
 
+notes \
+    As of version 4.2 c++ and fortran interfaces are separate ports, \
+    netcdf-cxx and netcdf-fortran, respectively.
+
 homepage                    http://www.unidata.ucar.edu/packages/netcdf/
 
 master_sites                ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
                             http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/ \
                             ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/
-checksums           md5     ead16cb3b671f767396387dcb3c1a814 \
-                    sha1    e600322478276f51612e17cca3cda38489003f81 \
-                    rmd160  ac07f570873bba89a49cb2eb2275a40cbc8e502b
+checksums           md5     b920a6c3a30e9cd46fe96d9fb65ef17e \
+                    sha1    949df89cd05ab8386e5f8080a183dc63c2f2f3bd \
+                    rmd160  2cc9064e96df98e82a328c8984bbb4aaf8e4d698
 
-post-patch {
-    if {[variant_isset g95]} {
-        reinplace "s|lt_cv_ld_force_load=yes|lt_cv_ld_force_load=no|" ${worksrcpath}/configure
-    }
-    reinplace "s|szip|sz|" ${worksrcpath}/configure
-    foreach f {configure libcf/configure udunits/configure} {
-        foreach c {g77 g95 gfortran ifort xlf xlf90} {
-            reinplace "s|$c||" $worksrcpath/$f
-        }
-    }
-}
+depends_lib         port:doxygen
 
 pre-configure {
     if {[variant_isset openmpi]} {
@@ -50,16 +43,10 @@
 }
 
 configure.cppflags-append   -DNDEBUG
-configure.cxxflags-append   -fno-common
 configure.cflags-append     -fno-common
-configure.args              --enable-shared \
-                            --disable-fortran-compiler-check \
-                            --disable-f77 --disable-f90 \
+configure.args              --disable-doxygen \
                             --disable-netcdf-4 \
-                            --disable-dap \
-                            --without-udunits \
-                            --without-libcf \
-                            --disable-cxx-4
+                            --disable-dap
 
 test.run                    yes
 test.target                 check
@@ -67,95 +54,38 @@
 destroot.destdir            prefix=${destroot}${prefix} \
                             MANDIR=\\\${prefix}/share/man
 
-post-build {
-    system "cd ${worksrcpath}/man4; touch *.dvi *.ps *.pdf"
-}
 post-destroot {
     file delete -force ${destroot}${prefix}/share/man/whatis.db
 }
 
 default_variants +netcdf4 +dap
 
-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 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 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 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
-    configure.cppflags-append -DpgiFortran
-    configure.fflags-append -fno-second-underscore
-    configure.fcflags-append    -fno-second-underscore
-    configure.ldflags-append    -lf95
-    configure.fc            ${prefix}/bin/g95
-    configure.f77           ${configure.fc}
-}
-
 variant openmpi conflicts mpich2 description {compile with openmpi} {
     depends_lib-append      port:openmpi
-    configure.fc            openmpif77
     configure.cc            openmpicc
-    configure.cxx           openmpicxx
 }
 
 variant mpich2 conflicts openmpi description {compile with mpich2} {
     depends_lib-append      port:mpich2
-    configure.fc            mpif90
     configure.cc            mpicc
-    configure.cxx           mpicxx
 }
 
 variant netcdf4 description {enable support for netcdf-4 API} {
     depends_lib-append      port:hdf5-18 port:szip
-    configure.args-delete   --disable-netcdf-4 \
-                            --without-libcf \
-                            --disable-cxx-4
-    configure.args-append   --enable-netcdf-4 \
-                            --with-hdf5=${prefix} \
-                            --with-libcf \
-                            --with-szlib=${prefix} \
-                            --enable-cxx-4
+    configure.args-delete   --disable-netcdf-4
+    configure.args-append   --enable-netcdf-4
 }
 
 variant hdf4 description {enable support for hdf4} {
     depends_lib-append    port:hdf4
     configure.args-append --enable-hdf4 \
-                          --with-hdf4=${prefix} \
-                          --disable-hdf4-file-tests \
-                          --with-szlib=${prefix}
+                          --disable-hdf4-file-tests
 }
  
 variant dap description {enable dap} {
     depends_lib-append      port:curl
     configure.args-delete   --disable-dap
-    configure.args-append   --enable-dap
 }
 
-variant static description {build static libraries} {
-    configure.args-delete  --enable-shared
+variant static description {dummy. obsolete option} {
 }

Added: trunk/dports/science/netcdf-cxx/Portfile
===================================================================
--- trunk/dports/science/netcdf-cxx/Portfile	                        (rev 0)
+++ trunk/dports/science/netcdf-cxx/Portfile	2012-04-05 00:46:55 UTC (rev 91550)
@@ -0,0 +1,60 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 89987 2012-02-18 15:28:00Z takeshi at macports.org $
+
+PortSystem                  1.0
+
+name                        netcdf-cxx
+version                     4.2
+distname                    ${name}4-${version}
+maintainers                 takeshi openmaintainer
+platforms                   darwin
+categories                  science
+license                     Permissive
+
+description                 libraries for array-oriented scientific data
+long_description \
+    NetCDF (network Common Data Form) is a set of software libraries \
+    and machine-independent data formats that support the creation,  \
+    access, and sharing of array-oriented scientific data.
+
+homepage                    http://www.unidata.ucar.edu/packages/netcdf/
+
+master_sites                ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
+                            http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/ \
+                            ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/
+checksums           md5     d019853802092cf686254aaba165fc81 \
+                    sha1    59628c9f06c211a47517fc00d8b068da159ffa9d \
+                    rmd160  776927fe4869b5c4b9b4ee8f8b2a6e5643f002fd
+
+depends_lib         port:netcdf
+
+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
+
+test.run                    yes
+test.target                 check
+
+destroot.destdir            prefix=${destroot}${prefix}
+
+variant openmpi conflicts mpich2 description {compile with openmpi} {
+    depends_lib-append      port:openmpi
+    configure.cc            openmpicc
+    configure.cxx           openmpicxx
+}
+
+variant mpich2 conflicts openmpi description {compile with mpich2} {
+    depends_lib-append      port:mpich2
+    configure.cc            mpicc
+    configure.cxx           mpicxx
+}

Added: trunk/dports/science/netcdf-fortran/Portfile
===================================================================
--- trunk/dports/science/netcdf-fortran/Portfile	                        (rev 0)
+++ trunk/dports/science/netcdf-fortran/Portfile	2012-04-05 00:46:55 UTC (rev 91550)
@@ -0,0 +1,104 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id: Portfile 89987 2012-02-18 15:28:00Z takeshi at macports.org $
+
+PortSystem                  1.0
+
+name                        netcdf-fortran
+version                     4.2
+maintainers                 takeshi openmaintainer
+platforms                   darwin
+categories                  science
+license                     Permissive
+
+description                 libraries for array-oriented scientific data
+long_description \
+    NetCDF (network Common Data Form) is a set of software libraries \
+    and machine-independent data formats that support the creation,  \
+    access, and sharing of array-oriented scientific data.
+
+homepage                    http://www.unidata.ucar.edu/packages/netcdf/
+
+master_sites                ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
+                            http://www.gfd-dennou.org/arch/netcdf/unidata-mirror/ \
+                            ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/
+checksums           md5     cc3bf530223e8f4aff93793b9f197bf3 \
+                    sha1    f1887314455330f4057bc8eab432065f8f6f74ef \
+                    rmd160  e10c342a5d6ab2740cd910122b0164d16730e194
+
+depends_lib         port:netcdf
+
+post-patch {
+    if {[variant_isset g95]} {
+        reinplace "s|lt_cv_ld_force_load=yes|lt_cv_ld_force_load=no|" ${worksrcpath}/configure
+    }
+}
+
+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
+
+test.run                    yes
+test.target                 check
+
+destroot.destdir            prefix=${destroot}${prefix} \
+                            MANDIR=\\\${prefix}/share/man
+
+if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc46] && ![variant_isset g95]} {
+    default_variants +gcc45
+}
+
+variant gcc43 conflicts g95 gcc44 gcc45 gcc46 description {Enable Fortran support with gfortran 4.3} {
+    depends_lib-append      port:gcc43
+    configure.cppflags-append -DpgiFortran
+    configure.compiler      macports-gcc-4.3
+}
+
+variant gcc44 conflicts g95 gcc43 gcc45 gcc46 description {Enable Fortran support with gfortran 4.4} {
+    depends_lib-append      port:gcc44
+    configure.cppflags-append -DpgiFortran
+    configure.compiler      macports-gcc-4.4
+}
+
+variant gcc45 conflicts g95 gcc43 gcc44 gcc46 description {Enable Fortran support with gfortran 4.5} {
+    depends_lib-append      port:gcc45
+    configure.cppflags-append -DpgiFortran
+    configure.compiler      macports-gcc-4.5
+}
+
+variant gcc46 conflicts g95 gcc43 gcc44 gcc45 description {Enable Fortran support with gfortran 4.6} {
+    depends_lib-append      port:gcc46
+    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
+    #-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
+    configure.fc            ${prefix}/bin/g95
+    configure.f77           ${configure.fc}
+}
+
+variant openmpi conflicts mpich2 description {compile with openmpi} {
+    depends_lib-append      port:openmpi
+    configure.fc            openmpif77
+    configure.cc            openmpicc
+}
+
+variant mpich2 conflicts openmpi description {compile with mpich2} {
+    depends_lib-append      port:mpich2
+    configure.fc            mpif90
+    configure.cc            mpicc
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120404/b1de624d/attachment-0001.html>


More information about the macports-changes mailing list