Skip to content

Commit

Permalink
mapnik: unstable-2022-10-18 -> unstable-2023-11-28
Browse files Browse the repository at this point in the history
Removed no-longer-needed patch:
* `include.patch`: Fixed [here](mapnik/mapnik@64a031a)

Added patch to account for `FONTS_INSTALL_DIR`/`PLUGINS_INSTALL_DIR`
containing full paths, causing this issue:
```
Broken paths found in a .pc file! /nix/store/lriysmfydb9p6g6s02q6ri24nzwmi494-mapnik-unstable-2023-11-28/lib/pkgconfig/libmapnik.pc
The following lines have issues (specifically '//' in paths).
5:fonts_dir=${prefix}//nix/store/lriysmfydb9p6g6s02q6ri24nzwmi494-mapnik-unstable-2023-11-28/lib/mapnik/fonts
6:plugins_dir=${prefix}//nix/store/lriysmfydb9p6g6s02q6ri24nzwmi494-mapnik-unstable-2023-11-28/lib/mapnik/input
```

Enabled `Checks`, which requires a patch to allow one test to fail:
* `datasource-ogr-test-should-fail.patch`
  • Loading branch information
hummeltech authored and dotlambda committed Dec 29, 2023
1 parent ae9397e commit dfa2fbc
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
6 changes: 3 additions & 3 deletions pkgs/development/libraries/mapnik/cmake-harfbuzz.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d87a7052d..837867551 100644
index ffb86d4ac..1775b986f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,19 +153,8 @@ endif()
@@ -177,19 +177,8 @@ endif()

mapnik_find_package(Freetype REQUIRED)

Expand All @@ -16,7 +16,7 @@ index d87a7052d..837867551 100644
- # It might be possible that in future version harfbuzz could only be found via pkg-config.
- # harfbuzz related discussion: https://github.com/harfbuzz/harfbuzz/issues/2653
- message(STATUS "harfbuzz not found via cmake. Searching via pkg-config...")
- pkg_check_modules(harfbuzz REQUIRED IMPORTED_TARGET harfbuzz>=${HARFBUZZ_MIN_VERSION})
- mapnik_pkg_check_modules(harfbuzz REQUIRED IMPORTED_TARGET harfbuzz>=${HARFBUZZ_MIN_VERSION})
- list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::harfbuzz)
-endif()
+pkg_check_modules(harfbuzz REQUIRED IMPORTED_TARGET harfbuzz)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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)
16 changes: 11 additions & 5 deletions pkgs/development/libraries/mapnik/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

stdenv.mkDerivation rec {
pname = "mapnik";
version = "unstable-2022-10-18";
version = "unstable-2023-11-28";

src = fetchFromGitHub {
owner = "mapnik";
repo = "mapnik";
rev = "05661e54392bcbb3367747f97a3ef6e468c105ba";
hash = "sha256-96AneLPH1gbh/u880Pdc9OdFq2MniSdaTJoKYqId7sw=";
rev = "2e1b32512b1f8b52331994f2a809d8a383c0c984";
hash = "sha256-qGdUfu6gFWum/Id/W3ICeGZroMQ3Tz9PQf1tt+gaaXM=";
fetchSubmodules = true;
};

Expand All @@ -57,7 +57,11 @@ stdenv.mkDerivation rec {
src = ./catch2-src.patch;
catch2_src = catch2.src;
})
./include.patch
# 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
];

nativeBuildInputs = [ cmake pkg-config ];
Expand All @@ -83,9 +87,11 @@ stdenv.mkDerivation rec {

cmakeFlags = [
# Would require qt otherwise.
"-DBUILD_DEMO_VIEWER=OFF"
"-DBUILD_DEMO_VIEWER:BOOL=OFF"
];

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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/cmake/MapnikExportPkgConfig.cmake b/cmake/MapnikExportPkgConfig.cmake
index e459f80ef..ec18a71a2 100644
--- a/cmake/MapnikExportPkgConfig.cmake
+++ b/cmake/MapnikExportPkgConfig.cmake
@@ -65,8 +65,8 @@ prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
-fonts_dir=${prefix}/@FONTS_INSTALL_DIR@
-plugins_dir=${prefix}/@PLUGINS_INSTALL_DIR@
+fonts_dir=@FONTS_INSTALL_DIR@
+plugins_dir=@PLUGINS_INSTALL_DIR@

Name: @_lib_name@
Description: @_description@
11 changes: 0 additions & 11 deletions pkgs/development/libraries/mapnik/include.patch

This file was deleted.

0 comments on commit dfa2fbc

Please sign in to comment.