# $Id: Portfile 23096 2007-03-24 22:29:04Z takanori@macports.org $ PortSystem 1.0 name nco version 3.1.9 revision 1 platforms darwin maintainers takeshi@mac.com categories science description The netCDF Operators master_sites http://${name}.sourceforge.net/src/ checksums sha1 b669e64d4eecadc6b4d96ca3c7482a3894fa8ba2 homepage http://nco.sourceforge.net/ long_description \ Each NCO operator (e.g., ncks) takes netCDF or HDF input file(s), \ performs an operation (e.g., averaging, hyperslabbing, or renaming), \ and outputs a processed netCDF file. Although most users of \ netCDF and HDF data are involved in scientific research, \ these data formats, and thus NCO, are generic and \ are equally useful in fields like finance. \ This version is OPeNDAP/DODS enabled, so it can be given \ URLs to read remote datasets as if they were local netCDF files. depends_lib port:curl \ port:gettext \ port:libdap \ port:libiconv \ port:libnc-dap \ port:libxml2 \ port:netcdf \ port:openssl \ port:udunits \ port:zlib depends_build port:bison \ port:m4 patchfiles patch-configure configure.env MACOSX_DEPLOYMENT_TARGET=10.4 \ CPPFLAGS=-I/usr/include/malloc configure.args --disable-ncoxx --disable-dependency-tracking \ --mandir=${prefix}/share/man post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} foreach f {ANNOUNCE ChangeLog LICENSE NEWS README TODO VERSION *.txt *.pdf} { eval xinstall -m 644 [glob ${worksrcpath}/doc/${f}] ${destroot}${prefix}/share/doc/${name} } } variant ncap2 { depends_lib-append port:antlr post-extract { file rename ${worksrcpath}/src/nco++/ncap2.hh \ ${worksrcpath}/src/nco++/ncap.hh foreach f {ncoGrammer.g ncoLexer.hpp ncoParser.hpp \ ncoTree.hpp ncap2_utl.cc} { reinplace "s|ncap2.hh|ncap.hh|" ${worksrcpath}/src/nco++/$f } system "cd ${workpath}; \ tar zxvf ${distpath}/${distname}${extract.suffix} \ ./${distname}/src/nco++/Ncap2.hh" } configure.env-append HAVE_ANTLR=yes ANTLR_ROOT=${prefix} configure.args-delete --disable-ncoxx }