nixpkgs/pkgs/development/libraries/mapnik/cmake-harfbuzz.patch
David Hummel dfa2fbc087 mapnik: unstable-2022-10-18 -> unstable-2023-11-28
Removed no-longer-needed patch:
* `include.patch`: Fixed [here](64a031a19b)

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`
2023-12-29 00:44:09 -08:00

27 lines
1.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ffb86d4ac..1775b986f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -177,19 +177,8 @@ endif()
mapnik_find_package(Freetype REQUIRED)
-# try to find harfbuzz with the native configuration and fallback to our "own" FindHarfBuzz
-mapnik_find_package(harfbuzz CONFIG QUIET)
-if(harfbuzz_FOUND)
- message(STATUS "Found harfbuzz native cmake")
- list(APPEND MAPNIK_OPTIONAL_LIBS harfbuzz::harfbuzz)
-else()
- # Use pkg-config when harfbuzz is not found.
- # 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...")
- 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)
+list(APPEND MAPNIK_OPTIONAL_LIBS PkgConfig::harfbuzz)
if(USE_EXTERNAL_MAPBOX_GEOMETRY)
# this is used to provide a way to specify include dirs with CACHE VARIABLES