# -*- 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 PortSystem 1.0 PortGroup mpi 1.0 PortGroup legacysupport 1.0 name cdo version 2.4.4 revision 0 maintainers {takeshi @tenomoto} \ {me.com:remko.scharroo @remkos} \ openmaintainer license GPL-2 categories science description Climate Data Operators homepage https://code.mpimet.mpg.de/projects/cdo master_sites https://code.mpimet.mpg.de/attachments/download/29649 checksums rmd160 af0ce66796ebcc5a7cace1db9fe38dad26d24fc9 \ sha256 49f50bd18dacd585e9518cfd4f55548f692426edfb3b27ddcd1c653eab53d063 \ size 13551047 long_description \ 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. fetch.ignore_sslcert yes # Since cdo 2.4.0, we need to select C++20 capable compilers. # On MacOS-13 compilation with /usr/bin/clang++ fails, so we blacklist it. compiler.cxx_standard 2020 compiler.blacklist-append clang compiler.thread_local_storage yes compilers.choose cc cxx mpi.setup mpi.enforce_variant hdf5 depends_lib port:netcdf \ port:hdf5 \ port:curl \ port:udunits2 \ port:proj9 \ port:fftw-3 patchfiles patch-cdo-mach-task-10.8.diff configure.args --with-netcdf=${prefix} \ --disable-dependency-tracking \ --disable-openmp \ --with-proj=${prefix}/lib/proj9 \ --with-hdf5=${prefix} \ --with-udunits2=${prefix} \ --with-fftw3 \ --with-curl=${prefix} \ --with-zlib=${prefix} configure.cppflags-append -I${prefix}/include/udunits2 configure.ldflags-append -lhdf5 # Since cdo 2.2.0, running tests requires the Python 3 interpreter. But since the configure always looks # for a recent Python and does not distinguish whether test is requested, it is added here as a build dependency. # To make sure that it works prior to Catalina, it is best to simply require the latest python3 package. depends_build-append port:python312 configure.env-append PYTHON=${prefix}/bin/python3.12 test.run yes test.args -j1 test.target check # 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. post-destroot { 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-eccodes=${prefix} \ --disable-cgribex configure.ldflags-append -lpng -lopenjpeg } variant szip description {compile with szip support} { depends_lib-append port:szip configure.args-append --with-szlib=${prefix} } variant magicspp description {compile with ECMWF magics support} { depends_lib-append port:libxml2 \ port:magicspp configure.args-append --with-libxml2=${prefix} \ --with-magics=${prefix} } variant cdi description {build, install and link to a CDI library} { configure.args-append --enable-cdi-lib } livecheck.type regex livecheck.url ${homepage} livecheck.regex {Version ([0-9]+\.[0-9]+\.[0-9]+\.*[0-9]*)}