Commit 6ab8f2ae authored by Vikram Narayanan's avatar Vikram Narayanan Committed by Anderson Torres
Browse files

xpdf: fix build failure on darwin

convert the patch to substituteInPlace.
parent 062faf05
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line

Fix "No known features for CXX compiler", see
https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at
https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@
 #
 #========================================================================
 
-cmake_minimum_required(VERSION 2.8.8)
+cmake_minimum_required(VERSION 3.1.0)
 
 project(xpdf)
 
+4 −1
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
  # Fix "No known features for CXX compiler", see
  # https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at
  # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html
  patches = lib.optional stdenv.isDarwin  ./cmake_version.patch;
  postPatch = lib.optionalString stdenv.isDarwin ''
    substituteInPlace CMakeLists.txt --replace \
        'cmake_minimum_required(VERSION 2.8.12)' 'cmake_minimum_required(VERSION 3.1.0)'
    '';

  nativeBuildInputs =
    [ cmake ]