Unverified Commit 5bd98961 authored by Mathew Polzin's avatar Mathew Polzin Committed by GitHub
Browse files

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

parents 3a000f59 48e2643e
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
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") 
+36 −33
Original line number Diff line number Diff line
{ 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;
  };