apacheHttpdPackages.mod_tile: Support for Mapnik >=v4.0.0-rc2

This commit is contained in:
David Hummel 2024-06-12 07:17:59 -07:00
parent d465a92ecc
commit fd669cd8a2
2 changed files with 33 additions and 0 deletions

View File

@ -29,6 +29,11 @@ stdenv.mkDerivation rec {
hash = "sha256-zXUwTG8cqAkY5MC1jAc2TtMgNMQPLc5nc22okVYP4ME=";
};
patches = [
# Support Mapnik >= v4.0.0-rc2 (boost:optional no longer used)
./mod_tile-std_optional.patch
];
nativeBuildInputs = [
cmake
pkg-config
@ -64,6 +69,8 @@ stdenv.mkDerivation rec {
installFlags = [ "DESTDIR=$(out)" ];
doCheck = true;
# Do not run tests in parallel
enableParallelChecking = false;
passthru.updateScript = nix-update-script { };

View File

@ -0,0 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e68d2e9..ddba150 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,7 +48,7 @@ find_package(LIBMEMCACHED)
find_package(LIBRADOS)
if(LIBMAPNIK_VERSION STRGREATER_EQUAL "4")
- set(CMAKE_CXX_STANDARD 14)
+ set(CMAKE_CXX_STANDARD 17)
endif()
# Programs
diff --git a/src/parameterize_style.cpp b/src/parameterize_style.cpp
index 8db7122..7100735 100644
--- a/src/parameterize_style.cpp
+++ b/src/parameterize_style.cpp
@@ -72,7 +74,7 @@ static void parameterize_map_language(mapnik::Map &m, char * parameter)
mapnik::parameters params = l.datasource()->params();
if (params.find("table") != params.end()) {
- boost::optional<std::string> table = params.get<std::string>("table");
+ auto table = params.get<std::string>("table");
if (table && table->find(",name") != std::string::npos) {
std::string str = *table;