xpdf: fix build failure on darwin

convert the patch to substituteInPlace.
This commit is contained in:
Vikram Narayanan 2023-04-21 12:41:25 -07:00 committed by Anderson Torres
parent 062faf0525
commit 6ab8f2aea5
2 changed files with 4 additions and 16 deletions

View File

@ -1,15 +0,0 @@
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)

View File

@ -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 ]