From 38839a0aba3250c63e8a392ca9c34c23494da9a4 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sat, 7 Jun 2025 23:50:27 +0400 Subject: [PATCH] mapnik: drop cmake-harfbuzz.patch --- pkgs/by-name/ma/mapnik/cmake-harfbuzz.patch | 26 --------------------- pkgs/by-name/ma/mapnik/package.nix | 8 ++----- 2 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 pkgs/by-name/ma/mapnik/cmake-harfbuzz.patch diff --git a/pkgs/by-name/ma/mapnik/cmake-harfbuzz.patch b/pkgs/by-name/ma/mapnik/cmake-harfbuzz.patch deleted file mode 100644 index aa08f351aa69..000000000000 --- a/pkgs/by-name/ma/mapnik/cmake-harfbuzz.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 diff --git a/pkgs/by-name/ma/mapnik/package.nix b/pkgs/by-name/ma/mapnik/package.nix index 79a043b36e98..9410c72ebad3 100644 --- a/pkgs/by-name/ma/mapnik/package.nix +++ b/pkgs/by-name/ma/mapnik/package.nix @@ -55,12 +55,6 @@ stdenv.mkDerivation (finalAttrs: { outputs = [ "out" ]; patches = [ - # The lib/cmake/harfbuzz/harfbuzz-config.cmake file in harfbuzz.dev is faulty, - # as it provides the wrong libdir. The workaround is to just rely on - # pkg-config to locate harfbuzz shared object files. - # Upstream HarfBuzz wants to drop CMake support anyway. - # See discussion: https://github.com/mapnik/mapnik/issues/4265 - ./cmake-harfbuzz.patch # Account for full paths when generating libmapnik.pc ./export-pkg-config-full-paths.patch # Use 'sparsehash' package. @@ -99,6 +93,8 @@ stdenv.mkDerivation (finalAttrs: { (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.