1 | # $Id: Portfile 22920 2007-03-19 09:41:48Z takanori@macports.org $ |
---|
2 | PortSystem 1.0 |
---|
3 | name nco |
---|
4 | version 3.1.9 |
---|
5 | revision 1 |
---|
6 | platforms darwin |
---|
7 | maintainers takeshi@mac.com |
---|
8 | categories science |
---|
9 | description The netCDF Operators |
---|
10 | master_sites http://${name}.sourceforge.net/src/ |
---|
11 | checksums sha1 b669e64d4eecadc6b4d96ca3c7482a3894fa8ba2 |
---|
12 | homepage http://nco.sourceforge.net/ |
---|
13 | long_description \ |
---|
14 | Each NCO operator (e.g., ncks) takes netCDF or HDF input file(s), \ |
---|
15 | performs an operation (e.g., averaging, hyperslabbing, or renaming), \ |
---|
16 | and outputs a processed netCDF file. Although most users of \ |
---|
17 | netCDF and HDF data are involved in scientific research, \ |
---|
18 | these data formats, and thus NCO, are generic and \ |
---|
19 | are equally useful in fields like finance. \ |
---|
20 | This version is OPeNDAP/DODS enabled, so it can be given \ |
---|
21 | URLs to read remote datasets as if they were local netCDF files. |
---|
22 | |
---|
23 | depends_lib port:curl \ |
---|
24 | port:gettext \ |
---|
25 | port:libdap \ |
---|
26 | port:libiconv \ |
---|
27 | port:libnc-dap \ |
---|
28 | port:libxml2 \ |
---|
29 | port:netcdf \ |
---|
30 | port:openssl \ |
---|
31 | port:udunits \ |
---|
32 | port:zlib |
---|
33 | depends_build port:bison \ |
---|
34 | port:m4 |
---|
35 | |
---|
36 | patchfiles patch-configure |
---|
37 | |
---|
38 | configure.env MACOSX_DEPLOYMENT_TARGET=10.4 \ |
---|
39 | CPPFLAGS=-I/usr/include/malloc |
---|
40 | configure.args --disable-ncoxx --disable-dependency-tracking \ |
---|
41 | --mandir=${prefix}/share/man |
---|
42 | |
---|
43 | post-destroot { |
---|
44 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
45 | foreach f {ANNOUNCE ChangeLog LICENSE NEWS README TODO VERSION *.txt *.pdf} { |
---|
46 | eval xinstall -m 644 [glob ${worksrcpath}/doc/${f}] ${destroot}${prefix}/share/doc/${name} |
---|
47 | } |
---|
48 | } |
---|
49 | |
---|
50 | variant ncap2 { |
---|
51 | depends_lib-append port:antlr |
---|
52 | post-extract { |
---|
53 | file rename ${worksrcpath}/src/nco++/ncap2.hh \ |
---|
54 | ${worksrcpath}/src/nco++/ncap.hh |
---|
55 | foreach f {ncoGrammer.g ncoLexer.hpp ncoParser.hpp \ |
---|
56 | ncoTree.hpp ncap2_utl.cc} { |
---|
57 | reinplace "s|ncap2.hh|ncap.hh|" ${worksrcpath}/src/nco++/$f |
---|
58 | } |
---|
59 | system "cd ${workpath}; \ |
---|
60 | tar zxvf ${distpath}/${distname}${extract.suffix} \ |
---|
61 | ./${distname}/src/nco++/Ncap2.hh" |
---|
62 | } |
---|
63 | configure.env-append HAVE_ANTLR=yes ANTLR_ROOT=${prefix} |
---|
64 | configure.args-delete --disable-ncoxx |
---|
65 | } |
---|
66 | |
---|