/
Portfile
124 lines (101 loc) · 4.67 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# -*- 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.0
revision 1
platforms darwin
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/29313
checksums rmd160 b70d79025fd141b93bfb733467dc36fb74b51914 \
sha256 a4790fb8cc07f353b11f9bbe49218b8e4be8e5ae56aade8420bad390510b4d2c \
size 13497565
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
compiler.cxx_standard 2020
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]*)}