# -*- 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
maintainers {takeshi @tenomoto} openmaintainer
description Climate Data Operators
homepage https://code.mpimet.mpg.de/projects/cdo
master_sites https://code.mpimet.mpg.de/attachments/download/17374
checksums rmd160 0fef303f9bcee461f7154c09d22c22f3369b74ce \
sha256 3d1c0fd3f7d38c5d3d88139ca1546c9d24e1b1ff752a794a4194dfe624695def \
CDO is a collection of command line Operators \
to manipulate and analyse Climate and NWP model Data. \
Supported data formats are GRIB 1/2, netCDF 3/4, SERVICE, \
EXTRA and IEG. There are more than 600 operators available.
depends_lib port:netcdf \
configure.args --with-netcdf=${prefix} \
--disable-dependency-tracking \
--with-proj=${prefix}/lib/proj5 \
--with-udunits2=${prefix} \
configure.cppflags-append -I${prefix}/include/udunits2
configure.ldflags-append -lhdf5
# Setting configure.cc h5pcc has been removed because it causes error
# because -Wl,-headerpad_max_install_names does not work with -pthread.
# See hdfeos5 Portfile to set h5pcc.
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 {*}[glob ${worksrcpath}/doc/*.pdf] ${destroot}${prefix}/share/doc/${name}
foreach f {AUTHORS ChangeLog NEWS OPERATORS README} {
xinstall -m 644 {*}[glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name}
xinstall -m 755 -d ${destroot}${prefix}/share/${name}
file copy ${worksrcpath}/contrib ${destroot}${prefix}/share/${name}
default_variants +eccodes
if {[clang_variant_isset]} {
configure.args-delete --disable-openmp
configure.args-append --enable-openmp
variant grib2 description {obsoleted by grib_api variant} {
default_variants +eccodes
variant grib_api description {obsoleted by eccodes variant} {
default_variants +eccodes
variant eccodes description {enable grib2 support} {
depends_lib-append port:ecCodes
configure.args-append --with-jasper=${prefix} \
--with-eccodes=${prefix} \
configure.ldflags-append -lpng -lopenjpeg
variant szip description {compile with szip support} {
depends_lib-append port:szip
configure.args-append --with-szlib=${prefix}