Merge pull request #36177 from veprbl/xpdf_fixes

fix Xpdf on darwin

authored by Daiderd Jordan and committed by GitHub 6d685a5b e05c99cf

+27 -2
+15
pkgs/applications/misc/xpdf/cmake_version.patch
···
··· 1 + 2 + Fix "No known features for CXX compiler", see 3 + https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at 4 + https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html 5 + --- a/CMakeLists.txt 6 + +++ b/CMakeLists.txt 7 + @@ -8,7 +8,7 @@ 8 + # 9 + #======================================================================== 10 + 11 + -cmake_minimum_required(VERSION 2.8.8) 12 + +cmake_minimum_required(VERSION 3.1.0) 13 + 14 + project(xpdf) 15 +
+12 -2
pkgs/applications/misc/xpdf/default.nix
··· 1 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false 2 , stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null 3 - , cmake, qtbase ? null 4 }: 5 6 assert enableGUI -> qtbase != null && freetype != null; ··· 17 sha256 = "1mhn89738vjva14xr5gblc2zrdgzmpqbbjdflqdmpqv647294ggz"; 18 }; 19 20 - nativeBuildInputs = [ cmake ]; 21 22 cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; 23 ··· 30 CXXFLAGS = "-O2 -fpermissive"; 31 32 hardeningDisable = [ "format" ]; 33 34 meta = { 35 homepage = http://www.foolabs.com/xpdf/;
··· 1 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false 2 , stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null 3 + , cmake, qtbase ? null, makeWrapper 4 }: 5 6 assert enableGUI -> qtbase != null && freetype != null; ··· 17 sha256 = "1mhn89738vjva14xr5gblc2zrdgzmpqbbjdflqdmpqv647294ggz"; 18 }; 19 20 + # Fix "No known features for CXX compiler", see 21 + # https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at 22 + # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html 23 + patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch; 24 + 25 + nativeBuildInputs = [ cmake makeWrapper ]; 26 27 cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; 28 ··· 35 CXXFLAGS = "-O2 -fpermissive"; 36 37 hardeningDisable = [ "format" ]; 38 + 39 + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' 40 + wrapProgram $out/bin/xpdf \ 41 + --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms 42 + ''; 43 44 meta = { 45 homepage = http://www.foolabs.com/xpdf/;