aboutsummaryrefslogtreecommitdiffstats
path: root/testing/netcdf/APKBUILD
blob: 6f48ba4cdf8218ff3da93ed8405d95aedc3849b4 (plain)
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
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=netcdf
pkgver=4.7.3
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="5cef5b3499b230b503f87d99cbf5d1ef107550f81489d9be6bb64740692fdd6f967f95f6cb2ab6174d968ee77a08a4e5f3f9d401b2ebc6b482c0e7ded6036f7a  netcdf-4.7.3.tar.gz"