summaryrefslogtreecommitdiff
path: root/sci-libs/pdal
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /sci-libs/pdal
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'sci-libs/pdal')
-rw-r--r--sci-libs/pdal/Manifest6
-rw-r--r--sci-libs/pdal/files/pdal-2.3.0-fix_cmake_install_location.patch17
-rw-r--r--sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch110
-rw-r--r--sci-libs/pdal/files/pdal-2.3.0-upgrade_cmake_min.patch77
-rw-r--r--sci-libs/pdal/metadata.xml23
-rw-r--r--sci-libs/pdal/pdal-2.3.0.ebuild60
6 files changed, 293 insertions, 0 deletions
diff --git a/sci-libs/pdal/Manifest b/sci-libs/pdal/Manifest
new file mode 100644
index 000000000000..b5f77ab7a9b1
--- /dev/null
+++ b/sci-libs/pdal/Manifest
@@ -0,0 +1,6 @@
+AUX pdal-2.3.0-fix_cmake_install_location.patch 677 BLAKE2B b89c4908a316fb15ad349b692b0aab1ee656f48157b2846275c06a20442c77846a0248309a5b8cc05478025062c0d46979af15c09c1005a7e262dca0d6654e15 SHA512 a89f8b8449defcaef57dabb5d9e1a987f476cddb85639b8f27bf52dfaae43e52ace7d5145e4064311b1fb119a5f395eb8aff01f6b00501b0babc21ce739187cf
+AUX pdal-2.3.0-fix_tests_for_proj811.patch 3402 BLAKE2B 59c6a8b208d0ae2afd46c13452c1b0a20e650ab15cb20efe3ac7f2b234db4de19b8a2e7f1dbac317743b8464cf6443f0feec0b46bffc3b2f728ef1ba78fb8b4d SHA512 ff5fcbf194a06e504f59cbe25cc070182de4c4d5d707173b02abe9c3dfb25f2a6cf1dbacefcf999f6a7165772e84bb435794d681bed66712cfa3dbaa4ee95984
+AUX pdal-2.3.0-upgrade_cmake_min.patch 2605 BLAKE2B 972bfd638ccc22b1773a8d26a76fd63c439de7526ebd49dd9a25ccb755abfc417e789f756efebbcc426444cd4c4db0293594f061e5e5d4050e6b15c7469f5353 SHA512 0c3a3fe9f8b3b43ca4b93fbedc601002ed79d9e474aa1a7a7b1ff33d2f73e3beee753330bf3017c65734b63362a95dacc4421bd38b8212f19a5682e94a43f21d
+DIST PDAL-2.3.0-src.tar.gz 110530128 BLAKE2B 435997e7ae7fe84ff77d8546e68ce6d32e54a221b5a4bbea45543554355506d7900f65ebb47a4f5333d0f3a44192ffe548178b6b3e8b3b7575d3c104618e288b SHA512 9de87de7370175e76b95d3ec08667eb28b90a63eed8133f144427ff931e575d1f37aa13496f12054577539ee552458475dd054bcbdedfabe52eb0e32c4483d05
+EBUILD pdal-2.3.0.ebuild 1305 BLAKE2B f2f29fcda43121027c034414716cc497e27c85c9d3e19bb048ecef17ab94bbf94070b14efac383a6f6504a4b78c22f17c88235c41cdce1078fef74bdd5d9befa SHA512 12937578161941ac2b10b3d761bb2f3fda758aaf87a7f260dc84200ac56a935fad09ab6cecf43d2b75d2581f88e7e6e8998a3a6d5e9bdba41d6cd163e6d9dbef
+MISC metadata.xml 799 BLAKE2B 44fff88edc36553687a49ecf5113b1f7f3c8d092e82ef4e45f0d96cf53cc619647f45b3d3439a5b98bf43a8965e1b80582e7b074489dcd69f6f3aad9e5c7f59a SHA512 da405bacd840b714fe274fa5ca658f7a51b0078054058dcce46f690b33e641579981739de9511f4a876ff0f88aec5c2dbaa59e4db035eb9a85bdd8e9725bc7c2
diff --git a/sci-libs/pdal/files/pdal-2.3.0-fix_cmake_install_location.patch b/sci-libs/pdal/files/pdal-2.3.0-fix_cmake_install_location.patch
new file mode 100644
index 000000000000..65e32100d18d
--- /dev/null
+++ b/sci-libs/pdal/files/pdal-2.3.0-fix_cmake_install_location.patch
@@ -0,0 +1,17 @@
+--- a/cmake/config.cmake.orig 2022-02-19 13:06:41.654048306 +0100
++++ b/cmake/config.cmake 2022-02-19 13:07:21.007165692 +0100
+@@ -6,7 +6,7 @@
+ configure_package_config_file(
+ PDALConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/PDALConfig.cmake
+- INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/PDAL
++ INSTALL_DESTINATION ${PDAL_LIB_INSTALL_DIR}/cmake/PDAL
+ PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
+
+ write_basic_package_version_file(
+@@ -17,4 +17,4 @@
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/PDALConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/PDALConfigVersion.cmake
+- DESTINATION ${LIB_INSTALL_DIR}/cmake/PDAL)
++ DESTINATION ${PDAL_LIB_INSTALL_DIR}/cmake/PDAL)
diff --git a/sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch b/sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch
new file mode 100644
index 000000000000..6a34686330f4
--- /dev/null
+++ b/sci-libs/pdal/files/pdal-2.3.0-fix_tests_for_proj811.patch
@@ -0,0 +1,110 @@
+From https://github.com/PDAL/PDAL/commit/1a7415f67cfe13f816345ce4b7fc1c68f0a45c83
+Bug https://bugs.gentoo.org/833820
+From: Andrew Bell <andrew.bell.ia@gmail.com>
+Date: Thu, 7 Oct 2021 11:15:18 -0400
+Subject: [PATCH] Work around test issues with varying versions of PROJ (#3560)
+
+* Add range for crop because of varying proj precision.
+
+* Fix tests for PROJ 8.1.1
+
+* More test workaround for proj.
+---
+ test/unit/filters/CropFilterTest.cpp | 10 +++++++
+ test/unit/io/EptReaderTest.cpp | 41 +++++++++++++++++++++++++++-
+ 2 files changed, 50 insertions(+), 1 deletion(-)
+
+diff --git a/test/unit/filters/CropFilterTest.cpp b/test/unit/filters/CropFilterTest.cpp
+index 23ccb465bc..f4b825c891 100644
+--- a/test/unit/filters/CropFilterTest.cpp
++++ b/test/unit/filters/CropFilterTest.cpp
+@@ -250,7 +250,17 @@ TEST(CropFilterTest, test_crop_polygon_reprojection)
+ PointViewSet viewSet = crop.execute(table);
+ EXPECT_EQ(viewSet.size(), 1u);
+ view = *viewSet.begin();
++//ABELL - I'd like to do the following, but we don't necessarily have proj.h
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(view->size(), 45u);
++#else
+ EXPECT_EQ(view->size(), 47u);
++#endif
++**/
++// So instead...
++ EXPECT_GE(view->size(), 45u);
++ EXPECT_LE(view->size(), 47u);
+
+ FileUtils::closeFile(wkt_stream);
+ }
+diff --git a/test/unit/io/EptReaderTest.cpp b/test/unit/io/EptReaderTest.cpp
+index ab5cfdee4a..0d274d4c08 100644
+--- a/test/unit/io/EptReaderTest.cpp
++++ b/test/unit/io/EptReaderTest.cpp
+@@ -625,8 +625,21 @@ TEST(EptReaderTest, boundedCrop)
+ }
+
+ EXPECT_EQ(eptNp, sourceNp);
++
++//ABELL - A change in proj changed the numbers, but we don't necessarily have proj.h
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(eptNp, 45u);
++ EXPECT_EQ(sourceNp, 45u);
++#else
+ EXPECT_EQ(eptNp, 47u);
+ EXPECT_EQ(sourceNp, 47u);
++#endif
++**/
++ EXPECT_GE(eptNp, 45u);
++ EXPECT_GE(sourceNp, 45u);
++ EXPECT_LE(eptNp, 47u);
++ EXPECT_LE(sourceNp, 47u);
+ }
+
+ TEST(EptReaderTest, polygonAndBoundsCrop)
+@@ -769,8 +782,20 @@ TEST(EptReaderTest, boundedCropReprojection)
+ sourceNp += view->size();
+
+ EXPECT_EQ(eptNp, sourceNp);
++//ABELL - We don't necessarily have proj.h, so we can't do this:
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(eptNp, 45u);
++ EXPECT_EQ(sourceNp, 45u);
++#else
+ EXPECT_EQ(eptNp, 47u);
+ EXPECT_EQ(sourceNp, 47u);
++#endif
++**/
++ EXPECT_GE(eptNp, 45u);
++ EXPECT_GE(sourceNp, 45u);
++ EXPECT_LE(eptNp, 47u);
++ EXPECT_LE(sourceNp, 47u);
+ }
+
+
+@@ -811,9 +836,23 @@ TEST(EptReaderTest, ogrCrop)
+ for (const PointViewPtr& view : source.execute(sourceTable))
+ sourceNp += view->size();
+
+- EXPECT_EQ(eptNp, sourceNp);
++//ABELL - PROJ changed to make the number of points that pass the filter different from
++// what's in the file we've got stored.
++// EXPECT_EQ(eptNp, sourceNp);
++//ABELL - We don't necessarily have proj.h, so can't do the following:
++/**
++#if defined(PROJ_VERSION_NUMBER) && PROJ_VERSION_NUMBER > 80101
++ EXPECT_EQ(eptNp, 89u);
++ EXPECT_EQ(sourceNp, 89u);
++#else
+ EXPECT_EQ(eptNp, 86u);
+ EXPECT_EQ(sourceNp, 86u);
++#endif
++**/
++ EXPECT_LE(eptNp, 89u);
++ EXPECT_LE(sourceNp, 89u);
++ EXPECT_GE(eptNp, 86u);
++ EXPECT_GE(sourceNp, 86u);
+ }
+
+ } // namespace pdal
diff --git a/sci-libs/pdal/files/pdal-2.3.0-upgrade_cmake_min.patch b/sci-libs/pdal/files/pdal-2.3.0-upgrade_cmake_min.patch
new file mode 100644
index 000000000000..9b712cb0e789
--- /dev/null
+++ b/sci-libs/pdal/files/pdal-2.3.0-upgrade_cmake_min.patch
@@ -0,0 +1,77 @@
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index 8dd8845f35..c4b7e37543 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -3,7 +3,7 @@
+ #
+ # (based originally on the libLAS files copyright Mateusz Loskot)
+
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 3.5)
+
+ #------------------------------------------------------------------------------
+ # Configure build targets
+diff --git a/cmake/ctest.cmake b/cmake/ctest.cmake
+index a8382aaef5..98035205d1 100644
+--- a/cmake/ctest.cmake
++++ b/cmake/ctest.cmake
+@@ -5,7 +5,7 @@ if(ENABLE_CTEST)
+ if (WITH_TESTS)
+ message(STATUS
+ "Enable CTest to support submissions of results to CDash at http://cdash.org")
+- cmake_minimum_required(VERSION 2.8.0)
++ cmake_minimum_required(VERSION 3.5.0)
+ #
+ # Dashboard has been prepared for experiments
+ # http://my.cdash.org/index.php?project=PDAL
+diff --git a/dimbuilder/CMakeLists.txt b/dimbuilder/CMakeLists.txt
+index 09d334f1f8..9aa9742f63 100644
+--- a/dimbuilder/CMakeLists.txt
++++ b/dimbuilder/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ # The seemingly strange arrangement of this cmake file allows you to build
+ # this application as a standalone.
+ #
+-cmake_minimum_required(VERSION 2.8.6)
++cmake_minimum_required(VERSION 3.5)
+
+ set(MAKE_COLOR_MAKEFILE ON)
+
+diff --git a/plugins/rdb/CMakeLists.txt b/plugins/rdb/CMakeLists.txt
+index 2ec0adcf92..2e8ae422de 100644
+--- a/plugins/rdb/CMakeLists.txt
++++ b/plugins/rdb/CMakeLists.txt
+@@ -1,6 +1,6 @@
+
+ if (STANDALONE)
+-cmake_minimum_required(VERSION 3.1)
++cmake_minimum_required(VERSION 3.5)
+ set(ROOT_DIR "../../${PROJECT_SOURCE_DIR}")
+ include(../../cmake/common.cmake NO_POLICY_SCOPE)
+ include(FeatureSummary)
+diff --git a/tools/lasdump/CMakeLists.txt b/tools/lasdump/CMakeLists.txt
+index 8083a228d8..767d642e76 100644
+--- a/tools/lasdump/CMakeLists.txt
++++ b/tools/lasdump/CMakeLists.txt
+@@ -2,7 +2,7 @@
+ # The seemingly strange arrangement of this cmake file allows you to build
+ # lasdump as a standalone.
+ #
+-cmake_minimum_required(VERSION 2.8.6)
++cmake_minimum_required(VERSION 3.5)
+
+ set(MAKE_COLOR_MAKEFILE ON)
+
+diff --git a/vendor/gtest/CMakeLists.txt b/vendor/gtest/CMakeLists.txt
+index db292946a5..e41e59761e 100644
+--- a/vendor/gtest/CMakeLists.txt
++++ b/vendor/gtest/CMakeLists.txt
+@@ -53,7 +53,7 @@ else()
+ cmake_policy(SET CMP0048 NEW)
+ project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
+ endif()
+-cmake_minimum_required(VERSION 2.6.4)
++cmake_minimum_required(VERSION 3.5)
+
+ if (POLICY CMP0063) # Visibility
+ cmake_policy(SET CMP0063 NEW)
diff --git a/sci-libs/pdal/metadata.xml b/sci-libs/pdal/metadata.xml
new file mode 100644
index 000000000000..d73ed813e338
--- /dev/null
+++ b/sci-libs/pdal/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>thomas.bettler@gmail.com</email>
+ <name>Thomas Bettler</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-geosciences@gentoo.org</email>
+ <name>Gentoo Geosciences Project</name>
+ </maintainer>
+ <longdescription>
+ PDAL is a C++ library for translating and manipulating point cloud data.
+ It is very much like the GDAL library which handles raster and vector data.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">PDAL/PDAL</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/pdal/pdal-2.3.0.ebuild b/sci-libs/pdal/pdal-2.3.0.ebuild
new file mode 100644
index 000000000000..949b5ab43e8b
--- /dev/null
+++ b/sci-libs/pdal/pdal-2.3.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+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.gz"
+
+LICENSE="BSD"
+SLOT="0/13"
+KEYWORDS="~amd64 ~x86"
+IUSE="postgres test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ virtual/pkgconfig
+"
+DEPEND="
+ dev-libs/jsoncpp
+ net-misc/curl
+ sci-libs/gdal
+ sci-libs/libgeotiff
+ sci-geosciences/laszip
+ sys-libs/libunwind
+ sys-libs/zlib
+ postgres? ( dev-db/postgresql:*[xml] )
+ test? ( sci-libs/gdal[geos,jpeg,png] )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix_cmake_install_location.patch
+ "${FILESDIR}"/${P}-upgrade_cmake_min.patch
+ "${FILESDIR}"/${P}-fix_tests_for_proj811.patch
+)
+
+S="${WORKDIR}/PDAL-${PV}-src"
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_PLUGIN_PGPOINTCLOUD="$(usex postgres)"
+ -DWITH_LAZPERF=OFF
+ -DWITH_LASZIP=ON
+ -DWITH_COMPLETION=ON
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ local myctestargs=(
+ --exclude-regex '(pgpointcloudtest|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)'
+ --output-on-failure
+ )
+
+ cmake_src_test
+}