about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorDavid Hummel <6109326+hummeltech@users.noreply.github.com>2024-06-12 07:17:59 -0700
committerDavid Hummel <6109326+hummeltech@users.noreply.github.com>2024-06-17 19:55:42 -0700
commitfd669cd8a2ee60dd02e72ca7ecddbdc30dfc016b (patch)
treee6f26e8d82ee3398cc42f692a952703ff03196b4 /pkgs/servers
parentd465a92ecc9d8ff43f4325ce6165272ed89b3a09 (diff)
apacheHttpdPackages.mod_tile: Support for Mapnik >=v4.0.0-rc2
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/http/apache-modules/mod_tile/default.nix7
-rw-r--r--pkgs/servers/http/apache-modules/mod_tile/mod_tile-std_optional.patch26
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/servers/http/apache-modules/mod_tile/default.nix b/pkgs/servers/http/apache-modules/mod_tile/default.nix
index cd3937fe1fa62..6c64478cc1259 100644
--- a/pkgs/servers/http/apache-modules/mod_tile/default.nix
+++ b/pkgs/servers/http/apache-modules/mod_tile/default.nix
@@ -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 { };
 
diff --git a/pkgs/servers/http/apache-modules/mod_tile/mod_tile-std_optional.patch b/pkgs/servers/http/apache-modules/mod_tile/mod_tile-std_optional.patch
new file mode 100644
index 0000000000000..1f63ce0bc1f1d
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_tile/mod_tile-std_optional.patch
@@ -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;