summaryrefslogtreecommitdiff
blob: a5c701ad7ee0b63312097ff39edeb17edbccd8ee (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
# Copyright 2021-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake flag-o-matic

DESCRIPTION="A C++ library for translating and manipulating point cloud data"
HOMEPAGE="https://pdal.io/"
SRC_URI="https://github.com/PDAL/PDAL/releases/download/${PV}/PDAL-${PV}-src.tar.bz2"

LICENSE="BSD"
SLOT="0/16"
KEYWORDS="amd64 ~arm ~arm64 ~x86"
IUSE="debug postgres test"
RESTRICT="!test? ( test )"

BDEPEND="
	sys-devel/gettext
	virtual/pkgconfig
"
RDEPEND="
	net-misc/curl
	app-arch/zstd:=
	dev-libs/libxml2
	dev-libs/openssl:=
	sci-libs/gdal:=
	sci-libs/libgeotiff:=
	sys-libs/zlib
	debug? ( sys-libs/libunwind:= )
	postgres? ( dev-db/postgresql:*[xml] )
"

DEPEND="
	test? ( sci-libs/gdal[geos,jpeg,png] )
	${RDEPEND}
"

S="${WORKDIR}/PDAL-${PV}-src"

src_configure() {
	# -Werror=strict-aliasing
	# https://bugs.gentoo.org/862915
	# https://github.com/PDAL/PDAL/issues/3836
	#
	# only occurs inside unwind support
	if use debug; then
		append-flags -fno-strict-aliasing
		filter-lto
	fi

	local mycmakeargs=(
		-DBUILD_PLUGIN_PGPOINTCLOUD="$(usex postgres)"
		-DWITH_COMPLETION=ON
		-DWITH_BACKTRACE="$(usex debug)"
	)

	cmake_src_configure
}

src_test() {
	local myctestargs=(
		--exclude-regex '(pgpointcloudtest|pdal_info_test|pdal_io_bpf_base_test|pdal_io_bpf_zlib_test|pdal_filters_overlay_test|pdal_filters_stats_test|pdal_app_plugin_test|pdal_merge_test|pdal_io_stac_reader_test)'
		--output-on-failure
		-j1
	)

	cmake_src_test
}