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