1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/community/netcdf/APKBUILD
2021-06-28 20:01:53 +02:00

67 lines
2.1 KiB
Text

# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=netcdf
pkgver=4.8.0
pkgrel=0
pkgdesc="Libraries for the Unidata network Common Data Format"
url="https://www.unidata.ucar.edu/software/netcdf/"
arch="all !mips !mips64 !s390x" # disabling on mips as tests fail; disabled on s390x because of https://github.com/Unidata/netcdf-c/issues/1987
license="BSD-3-Clause"
makedepends="
bash
cmake
curl-dev
hdf5-dev
libexecinfo-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
fix-test-on-big-endian.patch
tst_h_atts3.patch::https://github.com/Unidata/netcdf-c/commit/9fc8ae62a8564e095ff17f4612874581db0e4db5.diff
"
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=None \
-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
# Server test.opendap.org:8080 seems to be down for dap4_test_test_hyrax test
ctest -E 'nc_test|dap4_test_test_hyrax'
}
sha512sums="
367017338954f1cc2da00a93e7a79f17bbee447a655f98dfa35cac95cd002c40d6122eec9c5670376fad109c2266254ff6e9c82e197b488fcc412790d5b27088 netcdf-4.8.0.tar.gz
29dda7a0e28333afb91f948c1f5527606634ab8014c6f123e73b092e550d9514c45391f11b33c59cbfbb1fd1ff581848305a47d3768f9b4d1a2be63609009d82 fix-test-on-big-endian.patch
1e6aaf95741e18ae5eb77b45f7c8cbf449a13a0d4aada34c4a75026c293d302f8d26a04e72fa83cfddc40a978be0810ad8c9e9c5e7cc6833d92d3d9c08ff910c tst_h_atts3.patch
"