Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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

+33
+7
pkgs/servers/http/apache-modules/mod_tile/default.nix
··· 29 29 hash = "sha256-zXUwTG8cqAkY5MC1jAc2TtMgNMQPLc5nc22okVYP4ME="; 30 30 }; 31 31 32 + patches = [ 33 + # Support Mapnik >= v4.0.0-rc2 (boost:optional no longer used) 34 + ./mod_tile-std_optional.patch 35 + ]; 36 + 32 37 nativeBuildInputs = [ 33 38 cmake 34 39 pkg-config ··· 64 69 installFlags = [ "DESTDIR=$(out)" ]; 65 70 66 71 doCheck = true; 72 + # Do not run tests in parallel 73 + enableParallelChecking = false; 67 74 68 75 passthru.updateScript = nix-update-script { }; 69 76
+26
pkgs/servers/http/apache-modules/mod_tile/mod_tile-std_optional.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index e68d2e9..ddba150 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -48,7 +48,7 @@ find_package(LIBMEMCACHED) 6 + find_package(LIBRADOS) 7 + 8 + if(LIBMAPNIK_VERSION STRGREATER_EQUAL "4") 9 + - set(CMAKE_CXX_STANDARD 14) 10 + + set(CMAKE_CXX_STANDARD 17) 11 + endif() 12 + 13 + # Programs 14 + diff --git a/src/parameterize_style.cpp b/src/parameterize_style.cpp 15 + index 8db7122..7100735 100644 16 + --- a/src/parameterize_style.cpp 17 + +++ b/src/parameterize_style.cpp 18 + @@ -72,7 +74,7 @@ static void parameterize_map_language(mapnik::Map &m, char * parameter) 19 + mapnik::parameters params = l.datasource()->params(); 20 + 21 + if (params.find("table") != params.end()) { 22 + - boost::optional<std::string> table = params.get<std::string>("table"); 23 + + auto table = params.get<std::string>("table"); 24 + 25 + if (table && table->find(",name") != std::string::npos) { 26 + std::string str = *table;