aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdal/APKBUILD
blob: b4b6bf902bdefc5dcac3f684d563dbd0953caeb3 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=pdal
pkgver=2.3.0
pkgrel=2
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="python3 py3-numpy>=1.14.3-r1"
makedepends="
	cmake
	eigen-dev
	gdal-dev
	libgeotiff-dev
	libxml2-dev
	python3-dev
	py3-numpy-dev
	hdf5-dev
	cpd-dev
	fgt-dev
	sqlite-dev
	libpq-dev
	curl-dev
	laszip-dev
	linux-headers
	libexecinfo-dev
	samurai
	zstd-dev
	"
checkdepends="gdal-tools"
subpackages="$pkgname-dev"
source="https://github.com/PDAL/PDAL/releases/download/$pkgver/PDAL-$pkgver-src.tar.gz"
builddir="$srcdir/PDAL-$pkgver-src"

_with_lazperf="OFF"
case "$CARCH" in
	arm*|mips*) ;;
	s390x)
		# 95% tests passed, 6 tests failed out of 110
		options="!check"
		;;
	*)
		makedepends="$makedepends laz-perf laz-perf-dev"
		_with_lazperf="ON"
		;;
esac

build() {
	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_LASZIP=ON \
		-DWITH_LAZPERF=$_with_lazperf \
		-DWITH_TESTS=ON
	cmake --build build
}

check() {
	cd build

	# skipped tests are broken
	local skipped_tests="pdal_("
	local tests="
		filters_cpd
		filters_crop
		filters_stats
		io_ept_reader
		io_las_writer
		io_optech
		"
	case "$CARCH" in
		arm*|s390x|x86) tests="$tests
			utils
			filters_icp
			" ;;
	esac
	for test in $tests; do
		skipped_tests="$skipped_tests|$test"
	done
	skipped_tests="$skipped_tests)_test"
	msg "$skipped_tests"
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "$skipped_tests"
}


package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9de87de7370175e76b95d3ec08667eb28b90a63eed8133f144427ff931e575d1f37aa13496f12054577539ee552458475dd054bcbdedfabe52eb0e32c4483d05  PDAL-2.3.0-src.tar.gz
"