Portfile

# $Id: Portfile 22908 2007-03-18 17:04:14Z takanori@macports.org $

PortSystem 1.0
name netcdf
version 3.6.2
maintainers fulton@cmu.edu
platforms darwin
categories science

description NetCDF - Network Common Data Form
long_description NetCDF is an interface \
for array-oriented data access and a library that \
provides an implementation of the interface. The \
netCDF library also defines a machine-independent \
format for representing scientific data. Together, \
the interface, library, and format support the \
creation, access, and sharing of scientific data. \
The netCDF software was developed at the Unidata \
Program Center in Boulder, Colorado.

homepage http://unidata.ucar.edu/packages/netcdf/

master_sites ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
ftp://www.gfd-dennou.org/arch/netcdf/unidata-mirror/
checksums sha1 ff2d11d2708df08a2370999b19e2c277607afc06
use_bzip2 yes

configure.env CPPFLAGS="-DNDEBUG -Df2cFortran" \
CXXFLAGS="-O2 -fno-common" \
CFLAGS="-O2 -fno-common"
configure.args --enable-shared

test.run yes
test.target check

destroot.destdir prefix=${destroot}${prefix} \
MANDIR=\\\${prefix}/share/man

post-destroot {
file delete -force ${destroot}${prefix}/share/man/whatis.db
}

variant g95 {
depends_lib port:g95
configure.env-append FC=${prefix}/bin/g95 \
FCFLAGS=-O2
}