sci-geosciences/liblas: bump to 1.8.1
[gentoo.git] / sci-geosciences / liblas / liblas-1.8.1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 inherit cmake-utils
8
9 DESCRIPTION="C/C++ library for manipulating the LAS LiDAR format common in GIS"
10 HOMEPAGE="http://www.liblas.org"
11 SRC_URI="http://download.osgeo.org/${PN}/libLAS-${PV}.tar.bz2"
12
13 # tests known to fail due to LD_LIBRARY_PATH issue
14 RESTRICT="test"
15
16 SLOT="0"
17 LICENSE="BSD"
18 KEYWORDS="~amd64 ~ppc64 ~x86"
19 IUSE="gdal"
20
21 RDEPEND="
22         dev-libs/boost:=
23         sci-geosciences/laszip
24         sci-libs/libgeotiff
25         gdal? ( sci-libs/gdal )
26 "
27 DEPEND="${RDEPEND}"
28
29 S="${WORKDIR}/libLAS-${PV}"
30
31 PATCHES=(
32         "${FILESDIR}"/${PN}-1.8.0_remove-std-c++98.patch
33 )
34
35 src_prepare() {
36         default
37
38         # add missing linkage
39         sed -e 's:${LAS2COL} ${LIBLAS_C_LIB_NAME}:& ${CMAKE_THREAD_LIBS_INIT}:' \
40                 -i "${S}/apps/CMakeLists.txt" || die
41 }
42
43 src_configure() {
44         local mycmakeargs=(
45                 "-DWITH_GDAL=$(usex gdal)"
46                 -DLIBLAS_LIB_SUBDIR=$(get_libdir)
47         )
48         cmake-utils_src_configure
49 }