push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
diff --git a/cmake/MapnikExportPkgConfig.cmake b/cmake/MapnikExportPkgConfig.cmake
index f12ed57f1..548e1e6e9 100644
--- a/cmake/MapnikExportPkgConfig.cmake
+++ b/cmake/MapnikExportPkgConfig.cmake
@@ -3,7 +3,7 @@ function(create_pkg_config_file _target _lib_name _description)
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
-libdir=${exec_prefix}/@MAPNIK_LIB_DIR@
+libdir=${exec_prefix}@MAPNIK_LIB_DIR@
Name: @_lib_name@
Description: @_description@
@@ -64,9 +64,9 @@ function(create_pkg_config_file_mapnik _lib_name _description)
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
-libdir=${exec_prefix}/@MAPNIK_LIB_DIR@
-fonts_dir=${prefix}/@FONTS_INSTALL_DIR@
-plugins_dir=${prefix}/@PLUGINS_INSTALL_DIR@
+libdir=${exec_prefix}@MAPNIK_LIB_DIR@
+fonts_dir=@FONTS_INSTALL_DIR@
+plugins_dir=@PLUGINS_INSTALL_DIR@
Name: @_lib_name@
Description: @_description@

View File

@@ -0,0 +1,134 @@
{
lib,
stdenv,
fetchFromGitHub,
gitUpdater,
buildPackages,
cmake,
pkg-config,
boost,
cairo,
freetype,
gdal,
harfbuzz,
icu,
libjpeg,
libpng,
libtiff,
libwebp,
libxml2,
proj,
python3,
sqlite,
zlib,
catch2,
libpq,
protozero,
sparsehash,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mapnik";
version = "4.1.1";
src = fetchFromGitHub {
owner = "mapnik";
repo = "mapnik";
tag = "v${finalAttrs.version}";
hash = "sha256-+PCN3bjLGqfK4MF6fWApnSua4Pn/mKo2m9CY8/c5xC4=";
fetchSubmodules = true;
};
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
postPatch = ''
substituteInPlace configure \
--replace-fail '$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
# Remove bundled 'protozero' directory in favor of 'protozero' package
rm -r deps/mapbox/protozero
'';
# a distinct dev output makes python-mapnik fail
outputs = [ "out" ];
patches = [
# 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
];
buildInputs = [
boost
cairo
freetype
gdal
(harfbuzz.override { withIcu = true; })
icu
libjpeg
libpng
libtiff
libwebp
proj
python3
sqlite
zlib
libxml2
libpq
protozero
sparsehash
];
cmakeFlags = [
# 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)
# disable the find_package call and force pkg-config, see https://github.com/mapnik/mapnik/pull/4270
(lib.cmakeBool "CMAKE_DISABLE_FIND_PACKAGE_harfbuzz" true)
# Use 'protozero' package.
(lib.cmakeBool "USE_EXTERNAL_MAPBOX_PROTOZERO" true)
# macOS builds fail when using memory mapped file cache.
(lib.cmakeBool "USE_MEMORY_MAPPED_FILE" (!stdenv.hostPlatform.isDarwin))
# don't try to download sources for catch2, use our own
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_CATCH2" "${catch2.src}")
];
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. C++17 is the minimum supported
# C++ version.
preBuild = ''
cd ..
env CXX_STD=17 ${buildPackages.scons}/bin/scons utils/mapnik-config
cd build
'';
preInstall = ''
install -Dm755 ../utils/mapnik-config/mapnik-config -t $out/bin
'';
meta = {
description = "Open source toolkit for developing mapping applications";
homepage = "https://mapnik.org";
changelog = "https://github.com/mapnik/mapnik/blob/${finalAttrs.src.tag}/CHANGELOG.md";
maintainers = with lib.maintainers; [
hrdinka
hummeltech
];
teams = [ lib.teams.geospatial ];
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.all;
};
})

View File

@@ -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>