1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="C/C++ library for manipulating the LAS LiDAR format common in GIS"
9 HOMEPAGE="https://github.com/libLAS/libLAS/"
10 SRC_URI="https://github.com/libLAS/libLAS/archive/${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86"
19 sci-geosciences/laszip
21 gdal? ( sci-libs/gdal:= )
25 # tests known to fail due to LD_LIBRARY_PATH issue
28 S="${WORKDIR}/libLAS-${PV}"
31 "${FILESDIR}"/${PN}-1.8.0_remove-std-c++98.patch
32 "${FILESDIR}"/${P}-fix-overload-call.patch # bug 661654
33 "${FILESDIR}"/${P}-CVE-2018-20540.patch # bug 678482
34 "${FILESDIR}"/${P}-CVE-2018-20540-fixup.patch # bug 698846
35 "${FILESDIR}"/${P}-fix-debug.patch # bug 668778
39 use gdal && has_version ">=sci-libs/gdal-2.5.0" && PATCHES+=(
40 "${FILESDIR}"/${P}-gdal-2.5.0.patch # bug 707706
45 sed -e 's:${LAS2COL} ${LIBLAS_C_LIB_NAME}:& ${CMAKE_THREAD_LIBS_INIT}:' \
46 -i "${S}/apps/CMakeLists.txt" || die
51 -DLIBLAS_LIB_SUBDIR=$(get_libdir)
52 -DWITH_GDAL=$(usex gdal)