git: 61615e178cbd - main - graphics/mapnik: Fix build with gdal 3.12.0+
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 05 Apr 2026 17:29:36 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=61615e178cbd517ff28d81f04000b6a14a2c600a
commit 61615e178cbd517ff28d81f04000b6a14a2c600a
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2026-04-05 17:17:10 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2026-04-05 17:20:03 +0000
graphics/mapnik: Fix build with gdal 3.12.0+
Obtained from: https://github.com/mapnik/mapnik/commit/ca60dda74671cb373419b8a8f91b0f730c16f161
---
graphics/mapnik/files/patch-gdal | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/graphics/mapnik/files/patch-gdal b/graphics/mapnik/files/patch-gdal
new file mode 100644
index 000000000000..e4bbd30edbdc
--- /dev/null
+++ b/graphics/mapnik/files/patch-gdal
@@ -0,0 +1,16 @@
+Obtained from: https://github.com/mapnik/mapnik/commit/ca60dda74671cb373419b8a8f91b0f730c16f161
+
+--- plugins/input/ogr/ogr_datasource.cpp.orig 2025-10-01 08:04:52 UTC
++++ plugins/input/ogr/ogr_datasource.cpp
+@@ -378,7 +378,11 @@ void ogr_datasource::init(mapnik::parameters const& pa
+ }
+ }
+ mapnik::parameters& extra_params = desc_.get_extra_parameters();
++#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3, 12, 0)
++ const OGRSpatialReference* srs_ref = layer->GetSpatialRef();
++#else
+ OGRSpatialReference* srs_ref = layer->GetSpatialRef();
++#endif
+ char* srs_output = nullptr;
+ if (srs_ref && srs_ref->exportToProj4(&srs_output) == OGRERR_NONE)
+ {