mapnik: use cmake flag instead of patch for catch2 source (#343613)

This commit is contained in:
Mathew Polzin 2024-09-25 10:08:11 -05:00 committed by GitHub
commit 5bd9896118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 36 additions and 47 deletions

View File

@ -1,14 +0,0 @@
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0705ddce1..771291b88 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -7,8 +7,7 @@ include(FetchContent)
FetchContent_Declare(
Catch2
- GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG v2.13.7)
+ SOURCE_DIR @catch2_src@)
FetchContent_MakeAvailable(Catch2)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19.0")

View File

@ -1,29 +1,29 @@
{ lib
, stdenv
, fetchFromGitHub
, buildPackages
, cmake
, pkg-config
, substituteAll
, boost
, cairo
, freetype
, gdal
, harfbuzz
, icu
, libjpeg
, libpng
, libtiff
, libwebp
, libxml2
, proj
, python3
, sqlite
, zlib
, catch2
, postgresql
, protozero
, sparsehash
{
lib,
stdenv,
fetchFromGitHub,
buildPackages,
cmake,
pkg-config,
boost,
cairo,
freetype,
gdal,
harfbuzz,
icu,
libjpeg,
libpng,
libtiff,
libwebp,
libxml2,
proj,
python3,
sqlite,
zlib,
catch2,
postgresql,
protozero,
sparsehash,
}:
stdenv.mkDerivation rec {
@ -56,18 +56,16 @@ stdenv.mkDerivation rec {
# Upstream HarfBuzz wants to drop CMake support anyway.
# See discussion: https://github.com/mapnik/mapnik/issues/4265
./cmake-harfbuzz.patch
# prevent CMake from trying to get libraries on the Internet
(substituteAll {
src = ./catch2-src.patch;
catch2_src = catch2.src;
})
# 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 ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
@ -100,6 +98,8 @@ stdenv.mkDerivation rec {
(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;
@ -122,7 +122,10 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Open source toolkit for developing mapping applications";
homepage = "https://mapnik.org";
maintainers = with maintainers; [ hrdinka hummeltech ];
maintainers = with maintainers; [
hrdinka
hummeltech
];
license = licenses.lgpl21Plus;
platforms = platforms.all;
};