mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 01:54:34 +00:00
mapnik: unstable-2023-11-28 -> 4.0.0
This commit is contained in:
parent
98be6d2af8
commit
d465a92ecc
@ -1,13 +0,0 @@
|
||||
diff --git a/test/unit/datasource/ogr.cpp b/test/unit/datasource/ogr.cpp
|
||||
index 8441ecc55..8dabc67b0 100644
|
||||
--- a/test/unit/datasource/ogr.cpp
|
||||
+++ b/test/unit/datasource/ogr.cpp
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <mapnik/image_util.hpp>
|
||||
#include <mapnik/datasource_cache.hpp>
|
||||
|
||||
-TEST_CASE("ogr")
|
||||
+TEST_CASE("ogr", "[!shouldfail]")
|
||||
{
|
||||
const bool have_ogr_plugin = mapnik::datasource_cache::instance().plugin_registered("ogr");
|
||||
if (have_ogr_plugin)
|
@ -22,17 +22,19 @@
|
||||
, zlib
|
||||
, catch2
|
||||
, postgresql
|
||||
, protozero
|
||||
, sparsehash
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mapnik";
|
||||
version = "unstable-2023-11-28";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mapnik";
|
||||
repo = "mapnik";
|
||||
rev = "2e1b32512b1f8b52331994f2a809d8a383c0c984";
|
||||
hash = "sha256-qGdUfu6gFWum/Id/W3ICeGZroMQ3Tz9PQf1tt+gaaXM=";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-CNFNGMJU3kzkRrOGsf8/uv5ebHPEQ0tkA+5OubRVEjs=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@ -40,6 +42,8 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace configure \
|
||||
--replace '$PYTHON scons/scons.py' ${buildPackages.scons}/bin/scons
|
||||
rm -r scons
|
||||
# Remove bundled 'sparsehash' directory in favor of 'sparsehash' package
|
||||
rm -r deps/mapnik/sparsehash
|
||||
'';
|
||||
|
||||
# a distinct dev output makes python-mapnik fail
|
||||
@ -57,11 +61,10 @@ stdenv.mkDerivation rec {
|
||||
src = ./catch2-src.patch;
|
||||
catch2_src = catch2.src;
|
||||
})
|
||||
# Disable broken test
|
||||
# See discussion: https://github.com/mapnik/mapnik/issues/4329#issuecomment-1248778398
|
||||
./datasource-ogr-test-should-fail.patch
|
||||
# Account for full paths when generating libmapnik.pc
|
||||
./export-pkg-config-full-paths.patch
|
||||
# Use 'sparsehash' package.
|
||||
./use-sparsehash-package.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
@ -83,21 +86,32 @@ stdenv.mkDerivation rec {
|
||||
zlib
|
||||
libxml2
|
||||
postgresql
|
||||
protozero
|
||||
sparsehash
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
# Would require qt otherwise.
|
||||
"-DBUILD_DEMO_VIEWER:BOOL=OFF"
|
||||
# Save time by not building some development-related code.
|
||||
(lib.cmakeBool "BUILD_BENCHMARK" false)
|
||||
(lib.cmakeBool "BUILD_DEMO_CPP" false)
|
||||
## Would require QT otherwise.
|
||||
(lib.cmakeBool "BUILD_DEMO_VIEWER" false)
|
||||
# Use 'protozero' package.
|
||||
(lib.cmakeBool "USE_EXTERNAL_MAPBOX_PROTOZERO" true)
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# macOS builds fail when using memory mapped file cache.
|
||||
(lib.cmakeBool "USE_MEMORY_MAPPED_FILE" false)
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# mapnik-config is currently not build with CMake. So we use the SCons for
|
||||
# this one. We can't add SCons to nativeBuildInputs though, as stdenv would
|
||||
# then try to build everything with scons.
|
||||
# then try to build everything with scons. C++17 is the minimum supported
|
||||
# C++ version.
|
||||
preBuild = ''
|
||||
cd ..
|
||||
${buildPackages.scons}/bin/scons utils/mapnik-config
|
||||
env CXX_STD=17 ${buildPackages.scons}/bin/scons utils/mapnik-config
|
||||
cd build
|
||||
'';
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
commit c1cea9e10ffec54d0f675478e541ee4a6e87f653
|
||||
Author: Tom Hughes <tom@compton.nu>
|
||||
Date: Wed Jun 5 18:45:57 2013 +0100
|
||||
|
||||
Use system sparsehash
|
||||
|
||||
diff --git a/include/mapnik/palette.hpp b/include/mapnik/palette.hpp
|
||||
index 5f96272..44d06aa 100644
|
||||
--- a/include/mapnik/palette.hpp
|
||||
+++ b/include/mapnik/palette.hpp
|
||||
@@ -33,7 +33,7 @@
|
||||
#pragma GCC diagnostic push
|
||||
#include <mapnik/warning_ignore.hpp>
|
||||
#ifdef USE_DENSE_HASH_MAP
|
||||
-#include <mapnik/sparsehash/dense_hash_map>
|
||||
+#include <google/dense_hash_map>
|
||||
using rgba_hash_table = google::dense_hash_map<unsigned int, unsigned char>;
|
||||
#else
|
||||
#include <unordered_map>
|
Loading…
Reference in New Issue
Block a user