aports/testing/highfive/APKBUILD
Holger Jaekel 5c60f249df testing/highfive: new aport
https://bluebrain.github.io/HighFive
Header-only C++ HDF5 interface
2025-01-15 02:44:41 +00:00

72 lines
1.9 KiB
Text

# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
maintainer="Holger Jaekel <holger.jaekel@gmx.de>"
pkgname=highfive
_pkgname=HighFive
pkgver=2.10.1
pkgrel=0
pkgdesc="Header-only C++ HDF5 interface"
url="https://bluebrain.github.io/HighFive"
arch="noarch"
license="BSL-1.0"
depends="boost-dev eigen-dev hdf5-dev"
makedepends="cmake samurai"
checkdepends="catch2-3"
source="highfive-$pkgver.tar.gz::https://github.com/BlueBrain/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
# Optional dependency xtensor is not available on s390x
_with_xtensor="OFF"
case "$CARCH" in
s390x) ;;
*)
depends="$depends xtensor"
_with_xtensor="ON" ;;
esac
# Optional dependency opencv-dev is not available on s390x, riscv64, ppc64le
_with_opencv="OFF"
case "$CARCH" in
s390x|riscv64|ppc64le) ;;
*)
depends="$depends opencv-dev"
_with_opencv="ON" ;;
esac
build() {
if [ "$CBUILD" != "$CHOST" ]; then
local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=None \
-DHIGHFIVE_USE_BOOST=ON \
-DHIGHFIVE_USE_XTENSOR=$_with_xtensor \
-DHIGHFIVE_USE_EIGEN=ON \
-DHIGHFIVE_USE_OPENCV=$_with_opencv \
-DHIGHFIVE_EXAMPLES=OFF \
-DHIGHFIVE_UNIT_TESTS="$(want_check && echo TRUE || echo FALSE)" \
-DHIGHFIVE_BUILD_DOCS=OFF \
$crossopts
cmake --build build
}
check() {
local skipped_tests
case "$CARCH" in
x86) skipped_tests="HighFiveCompoundsSeveralPadding" ;;
esac
ctest --test-dir build -E "$skipped_tests"
}
package() {
DESTDIR="$pkgdir" cmake --install build
mkdir -p "$pkgdir"/usr/lib/cmake
mv "$pkgdir"/usr/share/$_pkgname/CMake "$pkgdir"/usr/lib/cmake/$_pkgname
rm -rf "${pkgdir:?}"/usr/share/$_pkgname
}
sha512sums="
3daf16c2ced165ddc7a8f1e9a0d3bf3388836e3878c86f8bf3faf2c42996d5bfd449e71e75a871447c1e7ea9a3e87d4f4a80a2382f1b24095d6051b89f27d6d3 highfive-2.10.1.tar.gz
"