COMMENT =		manipulate and analyse climate and NWP model data

DISTNAME =		cdo-2.5.2

CATEGORIES =		geo

HOMEPAGE =		https://code.mpimet.mpg.de/projects/cdo

MAINTAINER =		Marco van Hulten <marco@hulten.org>

# BSD-3-Clause
PERMIT_PACKAGE =	Yes

# number changes at newer version
SITES =			https://code.mpimet.mpg.de/attachments/download/29938/

COMPILER =		base-clang ports-gcc

BUILD_DEPENDS =		devel/uuid math/netcdf
RUN_DEPENDS =		math/netcdf
LIB_DEPENDS =		math/netcdf
WANTLIB =		${COMPILER_LIBCXX} blosc bz2 c crypto curl execinfo
WANTLIB += 		hdf5 hdf5_hl m netcdf nghttp2 nghttp3 ngtcp2 ngtcp2_crypto_quictls
WANTLIB +=		ssl xml2 z zip zstd


SEPARATE_BUILD =	Yes
USE_GMAKE =		Yes
CONFIGURE_ARGS =	--with-netcdf=$(LOCALBASE) --with-hdf5=$(LOCALBASE) \
			--disable-util-linux-uuid --disable-dce-uuid
CONFIGURE_ENV =		CC=clang-19 CXX="clang++-19" F77=egfortran \
			OSSP_UUID_C_INCLUDE=$(LOCALBASE)/include/ossp \
			OSSP_UUID_C_LIB=$(LOCALBASE)/lib

CONFIGURE_STYLE =	gnu

.include <bsd.port.mk>
