# Contributor: Bradley J Chambers # Maintainer: Bart Ribbers pkgname=pdal pkgver=2.5.5 pkgrel=1 pkgdesc="PDAL is a C++ BSD library for translating and manipulating point cloud data." url="https://pdal.io/" arch="all" license="BSD-2-Clause" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends=" cmake cpd-dev curl-dev eigen-dev fgt-dev gdal-dev hdf5-dev libgeotiff-dev libpq-dev libxml2-dev linux-headers openssl-dev>3 py3-numpy-dev python3-dev samurai sqlite-dev zstd-dev " checkdepends="gdal-tools gdal-driver-PNG" subpackages=" $pkgname-dev libpdal-base libpdal-util libpdal-plugins " source="https://github.com/PDAL/PDAL/releases/download/$pkgver/PDAL-$pkgver-src.tar.bz2" builddir="$srcdir/PDAL-$pkgver-src" _with_lazperf="OFF" case "$CARCH" in s390x) # 95% tests passed, 6 tests failed out of 110 options="!check" ;; esac build() { CFLAGS="$CFLAGS -O2" \ CXXFLAGS="$CXXFLAGS -O2" \ cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=None \ -DBUILD_PLUGIN_CPD=ON \ -DBUILD_PLUGIN_ICEBRIDGE=ON \ -DBUILD_PLUGIN_PGPOINTCLOUD=ON \ -DBUILD_PGPOINTCLOUD_TESTS=OFF \ -DWITH_TESTS="$(want_check && echo ON || echo OFF)" cmake --build build } check() { cd build # skipped tests are broken local skipped_tests="pdal_(" local tests=" filters_colorinterp filters_cpd filters_crop filters_overlay filters_stats io_bpf_base io_bpf_zlib io_ept_reader io_las_reader io_las_writer io_stac_reader io_optech merge " case "$CARCH" in arm*|s390x|x86) tests="$tests utils filters_icp file_utils " ;; esac for test in $tests; do skipped_tests="$skipped_tests|$test" done skipped_tests="$skipped_tests)_test|icetest|random_test" msg "$skipped_tests" CTEST_OUTPUT_ON_FAILURE=TRUE ctest -j${JOBS:-1} -E "$skipped_tests" } package() { DESTDIR="$pkgdir" cmake --install build } dev() { default_dev # linker script amove usr/lib/libpdalcpp.so } base() { amove usr/lib/libpdal_base.so.* } util() { amove usr/lib/libpdal_util.so.* } plugins() { amove usr/lib/libpdal_plugin_*.so.* } sha512sums=" a6bd1157f44a6f91ab44b3dc4d9318a070cdaaa9816aafb3f9aadfc72d15cf3ba54c0f37a9397f24702fcaec42a6dcd34f17130d8cc3609d718547cb559261d9 PDAL-2.5.5-src.tar.bz2 "