# Contributor: Holger Jaekel # Maintainer: Holger Jaekel pkgname=netcdf pkgver=4.7.1 pkgrel=0 pkgdesc="Libraries for the Unidata network Common Data Format" url="https://www.unidata.ucar.edu/software/netcdf/" arch="all !armhf !armv7" # disabling on armhf and armv7 as tests fail license="BSD-3-Clause" makedepends=" bash cmake curl-dev hdf5-dev m4 " subpackages=" $pkgname-doc $pkgname-dev $pkgname-utils:utils " source="$pkgname-$pkgver.tar.gz::https://github.com/Unidata/netcdf-c/archive/v$pkgver.tar.gz" builddir="$srcdir/$pkgname-c-$pkgver" build() { local ENABLE_CDF5=ON case "$CARCH" in x86|armhf|armv7) ENABLE_CDF5=OFF ;; esac cmake . \ -DCFLAGS="$CFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_CDF5=$ENABLE_CDF5 \ -DENABLE_DAP_LONG_TESTS=ON \ -DENABLE_EXAMPLE_TESTS=ON \ -DENABLE_EXTRA_TESTS=ON \ -DENABLE_FAILING_TESTS=ON \ -DENABLE_FILTER_TESTING=ON \ -DENABLE_LARGE_FILE_TESTS=ON make } package() { make DESTDIR="$pkgdir" install } utils() { install -d "$subpkgdir/usr/bin" mv "$pkgdir/usr/bin" "$subpkgdir/usr/" } check() { # One test failure in nc_test as reported in https://github.com/Unidata/netcdf-c/issues/808 ctest -E nc_test } sha512sums="cf651163fe975a53118ae5bec930f65e3a8652b510edaf78913b99471cf4e44e6f41e33e3e98c4e5fa6528f5ce421e6a15f0462204dfe29c4aead03e4de6a3f5 netcdf-4.7.1.tar.gz"