Merge pull request #28580 from kiloreux/xpdf

xpdf: 3.04-> 4.00

authored by Jörg Thalheim and committed by GitHub a2fae4a5 14699ac9

+13 -19
+12 -16
pkgs/applications/misc/xpdf/default.nix
··· 1 1 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false 2 - , stdenv, fetchurl, zlib, libpng, xlibsWrapper ? null, motif ? null, freetype ? null, t1lib ? null 3 - , base14Fonts ? null 2 + , stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null 3 + , cmake, qtbase ? null 4 4 }: 5 5 6 - assert enableGUI -> xlibsWrapper != null && motif != null && freetype != null; 6 + assert enableGUI -> qtbase != null && freetype != null; 7 7 assert enablePDFtoPPM -> freetype != null; 8 8 assert useT1Lib -> t1lib != null; 9 9 10 10 assert !useT1Lib; # t1lib has multiple unpatched security vulnerabilities 11 11 12 12 stdenv.mkDerivation { 13 - name = "xpdf-3.04"; 13 + name = "xpdf-4.00"; 14 14 15 - src = fetchurl { 16 - url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz; 17 - sha256 = "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"; 15 + src = fetchurl { 16 + url = http://www.xpdfreader.com/dl/xpdf-4.00.tar.gz; 17 + sha256 = "1mhn89738vjva14xr5gblc2zrdgzmpqbbjdflqdmpqv647294ggz"; 18 18 }; 19 19 20 + nativeBuildInputs = [ cmake ]; 21 + 22 + cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; 23 + 20 24 buildInputs = [ zlib libpng ] ++ 21 - stdenv.lib.optionals enableGUI [xlibsWrapper motif] ++ 25 + stdenv.lib.optional enableGUI qtbase ++ 22 26 stdenv.lib.optional useT1Lib t1lib ++ 23 27 stdenv.lib.optional enablePDFtoPPM freetype; 24 28 ··· 26 30 CXXFLAGS = "-O2 -fpermissive"; 27 31 28 32 hardeningDisable = [ "format" ]; 29 - 30 - configureFlags = "--enable-a4-paper"; 31 - 32 - postInstall = stdenv.lib.optionalString (base14Fonts != null) '' 33 - substituteInPlace $out/etc/xpdfrc \ 34 - --replace /usr/local/share/ghostscript/fonts ${base14Fonts} \ 35 - --replace '#fontFile' fontFile 36 - ''; 37 33 38 34 meta = { 39 35 homepage = http://www.foolabs.com/xpdf/;
+1 -3
pkgs/top-level/all-packages.nix
··· 16957 16957 16958 16958 apvlv = callPackage ../applications/misc/apvlv { }; 16959 16959 16960 - xpdf = callPackage ../applications/misc/xpdf { 16961 - base14Fonts = "${ghostscript}/share/ghostscript/fonts"; 16962 - }; 16960 + xpdf = libsForQt5.callPackage ../applications/misc/xpdf { }; 16963 16961 16964 16962 xkb_switch = callPackage ../tools/X11/xkb-switch { }; 16965 16963