summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bettler <thomas.bettler@gmail.com>2023-05-11 18:33:43 +0200
committerSam James <sam@gentoo.org>2023-05-14 08:26:45 +0100
commitd64174f63fa545f1c60913c1d244eba99483ec13 (patch)
tree894bf4a2275b2e04ebb38a30f9b854415d9b3e9e /sci-libs
parentsys-apps/dbus: tweak USE=valgrind description (diff)
downloadgentoo-d64174f63fa545f1c60913c1d244eba99483ec13.tar.gz
gentoo-d64174f63fa545f1c60913c1d244eba99483ec13.tar.bz2
gentoo-d64174f63fa545f1c60913c1d244eba99483ec13.zip
sci-libs/pdal: fix gcc-13 build
Closes: https://bugs.gentoo.org/906102 Closes: https://github.com/gentoo/gentoo/pull/30999 Signed-off-by: Thomas Bettler <thomas.bettler@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/pdal/files/pdal-2.4.3-fix-gcc13.patch29
-rw-r--r--sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch37
-rw-r--r--sci-libs/pdal/pdal-2.4.3-r1.ebuild63
-rw-r--r--sci-libs/pdal/pdal-2.5.3-r1.ebuild61
4 files changed, 190 insertions, 0 deletions
diff --git a/sci-libs/pdal/files/pdal-2.4.3-fix-gcc13.patch b/sci-libs/pdal/files/pdal-2.4.3-fix-gcc13.patch
new file mode 100644
index 000000000000..0f72473bfe85
--- /dev/null
+++ b/sci-libs/pdal/files/pdal-2.4.3-fix-gcc13.patch
@@ -0,0 +1,29 @@
+From https://github.com/hobuinc/laz-perf/commit/a7f0f4f5b2ca851079574d47918f4f7abc6cc785 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Tue, 13 Dec 2022 22:06:21 +0000
+Subject: [PATCH] Extractor.hpp: add missing <cstdint> header inclusion (#144)
+
+Without the change build fails on upcomit `gcc-13` as:
+
+ In file included from cpp/lazperf/vlr.cpp:33:
+ cpp/lazperf/Extractor.hpp:185:31: error: 'uint8_t' has not been declared
+ 185 | LeExtractor& operator >> (uint8_t& v)
+ | ^~~~~~~
+
+`gcc-13` cleaned header up a bit and `<string>` does not include
+`<cstdint>` implicitly anymore. Let's use it explictly.
+---
+ cpp/lazperf/Extractor.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff -Nru PDAL-2.4.3-src-orig/vendor/lazperf/Extractor.hpp PDAL-2.4.3-src/vendor/lazperf/Extractor.hpp
+--- PDAL-2.4.3-src-orig/vendor/lazperf/Extractor.hpp 2023-05-10 23:13:39.613501276 -0300
++++ PDAL-2.4.3-src/vendor/lazperf/Extractor.hpp 2023-05-10 23:15:41.644241402 -0300
+@@ -34,6 +34,7 @@
+
+ #pragma once
+
++#include <cstdint>
+ #include <cstring>
+ #include <vector>
+
diff --git a/sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch b/sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch
new file mode 100644
index 000000000000..29edb8518b9d
--- /dev/null
+++ b/sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch
@@ -0,0 +1,37 @@
+From https://github.com/PDAL/PDAL/commit/516e33ad7f40e54affd5754617fbe26d70ef2dd4
+From: Jorge Gustavo Rocha <jgr@geomaster.pt>
+Date: Thu, 20 Apr 2023 13:11:46 +0100
+Subject: [PATCH] prevent invalid conversion from const compile error (#4030)
+squashed with
+From https://github.com/dg0yt/PDAL/commit/49eb31840dc1c07d6ff235ea292c7c0703f8a884
+From: Kai Pastor <dg0yt@darc.de>
+Date: Fri, 12 May 2023 07:44:59 +0200
+Subject: [PATCH] Don't use const_cast
+
+Amends #4030.
+---
+ pdal/Geometry.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pdal/Geometry.cpp b/pdal/Geometry.cpp
+index 10d185dbe4..8b010d3378 100644
+--- a/pdal/Geometry.cpp
++++ b/pdal/Geometry.cpp
+@@ -153,7 +153,7 @@ Geometry& Geometry::operator=(const Geometry& input)
+
+ bool Geometry::srsValid() const
+ {
+- OGRSpatialReference *srs = m_geom->getSpatialReference();
++ const OGRSpatialReference *srs = m_geom->getSpatialReference();
+ return srs && srs->GetRoot();
+ }
+
+@@ -172,7 +172,7 @@ Utils::StatusWithReason Geometry::transform(SpatialReference out)
+ return StatusWithReason(-2,
+ "Geometry::transform() failed. NULL target SRS.");
+
+- OGRSpatialReference *inSrs = m_geom->getSpatialReference();
++ const OGRSpatialReference *inSrs = m_geom->getSpatialReference();
+ SrsTransform transform(*inSrs, OGRSpatialReference(out.getWKT().data()));
+ if (m_geom->transform(transform.get()) != OGRERR_NONE)
+ return StatusWithReason(-1, "Geometry::transform() failed.");
diff --git a/sci-libs/pdal/pdal-2.4.3-r1.ebuild b/sci-libs/pdal/pdal-2.4.3-r1.ebuild
new file mode 100644
index 000000000000..81dd25d4f4bb
--- /dev/null
+++ b/sci-libs/pdal/pdal-2.4.3-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2021-2023 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/14"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="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/libunwind:=
+ sys-libs/zlib
+ postgres? ( dev-db/postgresql:*[xml] )
+"
+DEPEND="
+ test? ( sci-libs/gdal[geos,jpeg,png] )
+ ${RDEPEND}
+"
+
+S="${WORKDIR}/PDAL-${PV}-src"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-test.patch"
+ "${FILESDIR}/${P}-fix-gcc13.patch"
+ "${FILESDIR}/${P}-fix-gdal37.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_PLUGIN_PGPOINTCLOUD="$(usex postgres)"
+ -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
+ -j1
+ )
+
+ cmake_src_test
+}
diff --git a/sci-libs/pdal/pdal-2.5.3-r1.ebuild b/sci-libs/pdal/pdal-2.5.3-r1.ebuild
new file mode 100644
index 000000000000..24dfef6f560b
--- /dev/null
+++ b/sci-libs/pdal/pdal-2.5.3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 2021-2023 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.bz2"
+
+LICENSE="BSD"
+SLOT="0/15"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="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/libunwind:=
+ sys-libs/zlib
+ postgres? ( dev-db/postgresql:*[xml] )
+"
+DEPEND="
+ test? ( sci-libs/gdal[geos,jpeg,png] )
+ ${RDEPEND}
+"
+
+S="${WORKDIR}/PDAL-${PV}-src"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.4.3-fix-gdal37.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_PLUGIN_PGPOINTCLOUD="$(usex postgres)"
+ -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|pdal_io_stac_reader_test)'
+ --output-on-failure
+ -j1
+ )
+
+ cmake_src_test
+}