summaryrefslogtreecommitdiff
path: root/sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch')
-rw-r--r--sci-libs/pdal/files/pdal-2.4.3-fix-gdal37.patch37
1 files changed, 37 insertions, 0 deletions
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.");