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/pdal/files
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/pdal/files')
-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
2 files changed, 66 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.");