summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-08-28 22:08:48 +0100
committerGitHub <noreply@github.com>2017-08-28 22:08:48 +0100
commita2fae4a5c5bc6d224cb9c73b5d84f074ff56d692 (patch)
tree2180315d3cdd859040ee622795475963e9e9a12e
parent14699ac91d69d438b614482f6472bd3209e5cbbe (diff)
parente42c62e05f47c221a393722456d97cac8043df94 (diff)
downloadnixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.tar
nixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.tar.gz
nixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.tar.bz2
nixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.tar.lz
nixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.tar.xz
nixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.tar.zst
nixpkgs-a2fae4a5c5bc6d224cb9c73b5d84f074ff56d692.zip
Merge pull request #28580 from kiloreux/xpdf
xpdf: 3.04-> 4.00
-rw-r--r--pkgs/applications/misc/xpdf/default.nix28
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 13 insertions, 19 deletions
diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix
index d2283c32920..ef031c4b9f4 100644
--- a/pkgs/applications/misc/xpdf/default.nix
+++ b/pkgs/applications/misc/xpdf/default.nix
@@ -1,24 +1,28 @@
 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false
-, stdenv, fetchurl, zlib, libpng, xlibsWrapper ? null, motif ? null, freetype ? null, t1lib ? null
-, base14Fonts ? null
+, stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null
+, cmake, qtbase ? null
 }:
 
-assert enableGUI -> xlibsWrapper != null && motif != null && freetype != null;
+assert enableGUI -> qtbase != null && freetype != null;
 assert enablePDFtoPPM -> freetype != null;
 assert useT1Lib -> t1lib != null;
 
 assert !useT1Lib; # t1lib has multiple unpatched security vulnerabilities
 
 stdenv.mkDerivation {
-  name = "xpdf-3.04";
+  name = "xpdf-4.00";
 
-  src = fetchurl {
-    url = ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz;
-    sha256 = "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i";
+   src = fetchurl {
+    url = http://www.xpdfreader.com/dl/xpdf-4.00.tar.gz;
+    sha256 = "1mhn89738vjva14xr5gblc2zrdgzmpqbbjdflqdmpqv647294ggz";
   };
 
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"];
+
   buildInputs = [ zlib libpng ] ++
-    stdenv.lib.optionals enableGUI [xlibsWrapper motif] ++
+    stdenv.lib.optional enableGUI qtbase ++
     stdenv.lib.optional useT1Lib t1lib ++
     stdenv.lib.optional enablePDFtoPPM freetype;
 
@@ -27,14 +31,6 @@ stdenv.mkDerivation {
 
   hardeningDisable = [ "format" ];
 
-  configureFlags = "--enable-a4-paper";
-
-  postInstall = stdenv.lib.optionalString (base14Fonts != null) ''
-    substituteInPlace $out/etc/xpdfrc \
-      --replace /usr/local/share/ghostscript/fonts ${base14Fonts} \
-      --replace '#fontFile' fontFile
-  '';
-
   meta = {
     homepage = http://www.foolabs.com/xpdf/;
     description = "Viewer for Portable Document Format (PDF) files";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 041bd7dd268..b077d5238ce 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16957,9 +16957,7 @@ with pkgs;
 
   apvlv = callPackage ../applications/misc/apvlv { };
 
-  xpdf = callPackage ../applications/misc/xpdf {
-    base14Fonts = "${ghostscript}/share/ghostscript/fonts";
-  };
+  xpdf = libsForQt5.callPackage ../applications/misc/xpdf { };
 
   xkb_switch = callPackage ../tools/X11/xkb-switch { };