summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-03-01 10:32:31 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-03-01 10:49:33 -0500
commitf5892d07182c1011816eedde2ec2d7a9bd0f2151 (patch)
tree12c1c190a2a7d8fb8f66d84e973cb11cf0e19f11
parentbd9a562402b97c992f9a985b4f5d210f20e2b623 (diff)
downloadnixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.tar
nixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.tar.gz
nixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.tar.bz2
nixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.tar.lz
nixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.tar.xz
nixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.tar.zst
nixpkgs-f5892d07182c1011816eedde2ec2d7a9bd0f2151.zip
xpdf: fix build on darwin (still broken in runtime)
-rw-r--r--pkgs/applications/misc/xpdf/cmake_version.patch15
-rw-r--r--pkgs/applications/misc/xpdf/default.nix5
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/applications/misc/xpdf/cmake_version.patch b/pkgs/applications/misc/xpdf/cmake_version.patch
new file mode 100644
index 00000000000..59a51f7506d
--- /dev/null
+++ b/pkgs/applications/misc/xpdf/cmake_version.patch
@@ -0,0 +1,15 @@
+
+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)
+ 
diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix
index ef031c4b9f4..87c267bbff1 100644
--- a/pkgs/applications/misc/xpdf/default.nix
+++ b/pkgs/applications/misc/xpdf/default.nix
@@ -17,6 +17,11 @@ stdenv.mkDerivation {
     sha256 = "1mhn89738vjva14xr5gblc2zrdgzmpqbbjdflqdmpqv647294ggz";
   };
 
+  # 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 = stdenv.lib.optional stdenv.isDarwin  ./cmake_version.patch;
+
   nativeBuildInputs = [ cmake ];
 
   cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"];