summaryrefslogtreecommitdiff
blob: fe23045ca1ca3031cc4ce3448ae43add57f53b69 (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
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit cmake-utils

DESCRIPTION="C/C++ library for manipulating the LAS LiDAR format common in GIS"
HOMEPAGE="http://www.liblas.org"
SRC_URI="http://download.osgeo.org/${PN}/libLAS-${PV}.tar.bz2"

# tests known to fail due to LD_LIBRARY_PATH issue
RESTRICT="test"

SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
IUSE="gdal"

RDEPEND="
	dev-libs/boost:=
	sci-geosciences/laszip
	sci-libs/libgeotiff
	gdal? ( sci-libs/gdal )
"
DEPEND="${RDEPEND}"

S="${WORKDIR}/libLAS-${PV}"

PATCHES=(
	"${FILESDIR}"/${PN}-1.8.0_remove-std-c++98.patch
)

src_prepare() {
	default

	# add missing linkage
	sed -e 's:${LAS2COL} ${LIBLAS_C_LIB_NAME}:& ${CMAKE_THREAD_LIBS_INIT}:' \
		-i "${S}/apps/CMakeLists.txt" || die
}

src_configure() {
	local mycmakeargs=(
		"-DWITH_GDAL=$(usex gdal)"
		-DLIBLAS_LIB_SUBDIR=$(get_libdir)
	)
	cmake-utils_src_configure
}