aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorHolger Jaekel <holger.jaekel@gmx.de>2020-05-08 21:31:44 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-05-15 14:04:03 +0200
commit5a2e18dc13dd178a8c4e09e09e02df952e464b28 (patch)
tree199bf41d194af9382a8e144252671b3a5eae700f /community
parentb4c4e026123bfe41c1cb4120794f7535c21efdb6 (diff)
downloadaports-5a2e18dc13dd178a8c4e09e09e02df952e464b28.tar.gz
aports-5a2e18dc13dd178a8c4e09e09e02df952e464b28.tar.bz2
aports-5a2e18dc13dd178a8c4e09e09e02df952e464b28.tar.xz
community/netcdf: move from testing
Diffstat (limited to 'community')
-rw-r--r--community/netcdf/APKBUILD63
-rw-r--r--community/netcdf/byteswap.patch18
2 files changed, 81 insertions, 0 deletions
diff --git a/community/netcdf/APKBUILD b/community/netcdf/APKBUILD
new file mode 100644
index 0000000000..1f7895b079
--- /dev/null
+++ b/community/netcdf/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
+# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
+pkgname=netcdf
+pkgver=4.7.4
+pkgrel=0
+pkgdesc="Libraries for the Unidata network Common Data Format"
+url="https://www.unidata.ucar.edu/software/netcdf/"
+# s390x: error: static declaration of 'byteswap8' follows non-static declaration
+arch="all !armhf !armv7 !s390x !mips !mips64" # disabling on mips, armhf and armv7 as tests fail
+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
+ byteswap.patch
+ "
+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
+ ctest -E nc_test
+}
+sha512sums="15922818fdd71be285eb7dd2fc9be2594fe9af979de3ed316465636c7bbdaec65eb151ca57ef8b703e6a360cdba036b8f9bc193ddff01ff7ce4214c0a66efa79 netcdf-4.7.4.tar.gz
+fa74a75eb064901878dc37b2049534bec7571885393f78692d7ac27ad9a1ec622574bf4bbfdb741d714c45b4a0b8a1ebbd532277603c154d50513eecad70d002 byteswap.patch"
diff --git a/community/netcdf/byteswap.patch b/community/netcdf/byteswap.patch
new file mode 100644
index 0000000000..eb4305be6a
--- /dev/null
+++ b/community/netcdf/byteswap.patch
@@ -0,0 +1,18 @@
+Description: Add forward declarations for byteswap8 & byteswap4.
+Author: Dennis Heimbigner
+Bug: https://github.com/Unidata/netcdf-c/issues/1687
+
+diff --git a/libdispatch/dfilter.c b/libdispatch/dfilter.c
+index 8938464..8efe591 100644
+--- a/libdispatch/dfilter.c
++++ b/libdispatch/dfilter.c
+@@ -20,6 +20,9 @@
+ #include "hdf5internal.h"
+ #endif
+
++static void byteswap8(unsigned char*);
++static void byteswap4(unsigned char*);
++
+ /*
+ Unified filter related code
+ */