Merge branch 'origin/core-updates-next' into core-updates
[jackhill/guix/guix.git] / gnu / packages / pdf.scm
index 43c832c..a215fce 100644 (file)
@@ -4,15 +4,16 @@
 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
-;;; Coypright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
-;;; Coypright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Coypright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
-;;; Coypright © 2016 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2016 Nils Gillmann <ng0@n0.is>
+;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
 (define-public poppler
   (package
    (name "poppler")
 (define-public poppler
   (package
    (name "poppler")
-   (version "0.62.0")
+   (version "0.64.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://poppler.freedesktop.org/poppler-"
                                 version ".tar.xz"))
             (sha256
              (base32
    (source (origin
             (method url-fetch)
             (uri (string-append "https://poppler.freedesktop.org/poppler-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "1ii9ly1pngyvs0aiq2wxpya08hidpl54y7nsb8b1vxnnskgp76jv"))))
+              "1cb4gz3h7cfqyphhx71qc9mp417bdphchbfghmvhcy4zm4ngj7dj"))))
    (build-system cmake-build-system)
    ;; FIXME:
    ;;  use libcurl:        no
    (build-system cmake-build-system)
    ;; FIXME:
    ;;  use libcurl:        no
    (license license:gpl2+)
    (home-page "https://poppler.freedesktop.org/")))
 
    (license license:gpl2+)
    (home-page "https://poppler.freedesktop.org/")))
 
+(define-public poppler-data
+  (package
+    (name "poppler-data")
+    (version "0.4.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://poppler.freedesktop.org/poppler-data"
+                                  "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f ; no test suite
+       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         ;; The package only provides some data files, so there is nothing to
+         ;; build.
+         (delete 'configure)
+         (delete 'build))))
+    (synopsis "Poppler encoding files for rendering of CJK and Cyrillic text")
+    (description "This package provides optional encoding files for Poppler.
+When present, Poppler is able to correctly render CJK and Cyrillic text.")
+    (home-page (package-home-page poppler))
+    ;; See COPYING in the source distribution for more information about
+    ;; the licensing.
+    (license (list license:bsd-3
+                   license:gpl2))))
+
 (define-public poppler-qt4
   (package (inherit poppler)
    (name "poppler-qt4")
 (define-public poppler-qt4
   (package (inherit poppler)
    (name "poppler-qt4")
@@ -311,7 +343,7 @@ reading and editing of existing PDF files.")
 (define-public zathura-cb
   (package
     (name "zathura-cb")
 (define-public zathura-cb
   (package
     (name "zathura-cb")
-    (version "0.1.6")
+    (version "0.1.7")
     (source (origin
               (method url-fetch)
               (uri
     (source (origin
               (method url-fetch)
               (uri
@@ -319,11 +351,9 @@ reading and editing of existing PDF files.")
                               version ".tar.gz"))
               (sha256
                (base32
                               version ".tar.gz"))
               (sha256
                (base32
-                "1fim4mpm8l2g3msj1vg70ks3c9lrwllv3yh4jv8l9f8k3r19b3l8"))))
+                "0r4viisycj39kaz4281cmkr7n9w5q96dmlf7nf45n8zq8qy2npw3"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (native-inputs `(("pkg-config" ,pkg-config)))
-    (propagated-inputs `(("girara" ,girara)))
     (inputs `(("libarchive" ,libarchive)
     (inputs `(("libarchive" ,libarchive)
-              ("gtk+" ,gtk+)
               ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
               ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
@@ -342,7 +372,7 @@ using libarchive.")
 (define-public zathura-ps
   (package
     (name "zathura-ps")
 (define-public zathura-ps
   (package
     (name "zathura-ps")
-    (version "0.2.4")
+    (version "0.2.5")
     (source (origin
               (method url-fetch)
               (uri
     (source (origin
               (method url-fetch)
               (uri
@@ -350,11 +380,9 @@ using libarchive.")
                               version ".tar.gz"))
               (sha256
                (base32
                               version ".tar.gz"))
               (sha256
                (base32
-                "1nxbl0glnzpan78fhdfzhkcd0cikcvrkzf9m56mb0pvnwzlwg7zv"))))
+                "1x4knqja8pw2a5cb3y2209nr3iddj1z8nwasy48v5nprj61fdxqj"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (native-inputs `(("pkg-config" ,pkg-config)))
-    (propagated-inputs `(("girara" ,girara)))
     (inputs `(("libspectre" ,libspectre)
     (inputs `(("libspectre" ,libspectre)
-              ("gtk+" ,gtk+)
               ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
               ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
@@ -373,7 +401,7 @@ using libspectre.")
 (define-public zathura-djvu
   (package
     (name "zathura-djvu")
 (define-public zathura-djvu
   (package
     (name "zathura-djvu")
-    (version "0.2.6")
+    (version "0.2.7")
     (source (origin
               (method url-fetch)
               (uri
     (source (origin
               (method url-fetch)
               (uri
@@ -381,12 +409,10 @@ using libspectre.")
                               version ".tar.gz"))
               (sha256
                (base32
                               version ".tar.gz"))
               (sha256
                (base32
-                "0py0ra44f65cg064xzds0qr6vnglj2a5bwhnbwa0dyh2nyizdzmf"))))
+                "1sbfdsyp50qc85xc4458sn4w1rv1qbygdwmcr5kjlfpsmdq98vhd"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (native-inputs `(("pkg-config" ,pkg-config)))
-    (propagated-inputs `(("girara" ,girara)))
     (inputs
      `(("djvulibre" ,djvulibre)
     (inputs
      `(("djvulibre" ,djvulibre)
-       ("gtk+" ,gtk+)
        ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
        ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
@@ -405,7 +431,7 @@ using the DjVuLibre library.")
 (define-public zathura-pdf-mupdf
   (package
     (name "zathura-pdf-mupdf")
 (define-public zathura-pdf-mupdf
   (package
     (name "zathura-pdf-mupdf")
-    (version "0.3.1")
+    (version "0.3.2")
     (source (origin
               (method url-fetch)
               (uri
     (source (origin
               (method url-fetch)
               (uri
@@ -413,12 +439,10 @@ using the DjVuLibre library.")
                               "/download/zathura-pdf-mupdf-" version ".tar.gz"))
               (sha256
                (base32
                               "/download/zathura-pdf-mupdf-" version ".tar.gz"))
               (sha256
                (base32
-                "06zqn8z6a0hfsx3s1kzqvqzb73afgcl6z5r062sxv7kv570fvffr"))))
+                "0xkajc3is7ncmb2fmymbzfgrran2bz12i7zsm1vvxhxds728h7ck"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (native-inputs `(("pkg-config" ,pkg-config)))
-    (propagated-inputs `(("girara" ,girara)))
     (inputs
     (inputs
-     `(("gtk+" ,gtk+)
-       ("jbig2dec" ,jbig2dec)
+     `(("jbig2dec" ,jbig2dec)
        ("libjpeg" ,libjpeg)
        ("mupdf" ,mupdf)
        ("openjpeg" ,openjpeg)
        ("libjpeg" ,libjpeg)
        ("mupdf" ,mupdf)
        ("openjpeg" ,openjpeg)
@@ -440,7 +464,7 @@ by using the @code{mupdf} rendering library.")
 (define-public zathura-pdf-poppler
   (package
     (name "zathura-pdf-poppler")
 (define-public zathura-pdf-poppler
   (package
     (name "zathura-pdf-poppler")
-    (version "0.2.7")
+    (version "0.2.8")
     (source (origin
               (method url-fetch)
               (uri
     (source (origin
               (method url-fetch)
               (uri
@@ -448,14 +472,11 @@ by using the @code{mupdf} rendering library.")
                               version ".tar.gz"))
               (sha256
                (base32
                               version ".tar.gz"))
               (sha256
                (base32
-                "1h43sgxpsbrsnn5z19661642plzhpv6b0y3f4kyzshv1rr6lwplq"))))
+                "1m55m7s7f8ng8a7lmcw9z4n5zv7xk4vp9n6fp9j84z6rk2imf7a2"))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (native-inputs `(("pkg-config" ,pkg-config)))
-    (propagated-inputs `(("girara" ,girara)))
     (inputs
      `(("poppler" ,poppler)
     (inputs
      `(("poppler" ,poppler)
-       ("gtk+" ,gtk+)
-       ("zathura" ,zathura)
-       ("cairo" ,cairo)))
+       ("zathura" ,zathura)))
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list (string-append "PREFIX=" %output)
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags (list (string-append "PREFIX=" %output)
@@ -473,7 +494,7 @@ by using the poppler rendering engine.")
 (define-public zathura
   (package
     (name "zathura")
 (define-public zathura
   (package
     (name "zathura")
-    (version "0.3.7")
+    (version "0.3.8")
     (source (origin
               (method url-fetch)
               (uri
     (source (origin
               (method url-fetch)
               (uri
@@ -481,14 +502,20 @@ by using the poppler rendering engine.")
                               version ".tar.gz"))
               (sha256
                (base32
                               version ".tar.gz"))
               (sha256
                (base32
-                "1w0g74dq4z2vl3f99s2gkaqrb5pskgzig10qhbxj4gq9yj4zzbr2"))
+                "0dz5pky3vmf3s2cp2rv1c099gb1s49p9xlgm3ghyy4pzyxc8bgs6"))
               (patches (search-patches
                         "zathura-plugindir-environment-variable.patch"))))
     (native-inputs `(("pkg-config" ,pkg-config)
               (patches (search-patches
                         "zathura-plugindir-environment-variable.patch"))))
     (native-inputs `(("pkg-config" ,pkg-config)
-                     ("gettext" ,gettext-minimal)))
-    (inputs `(("girara" ,girara)
-              ("sqlite" ,sqlite)
-              ("gtk+" ,gtk+)))
+                     ("gettext" ,gettext-minimal)
+                     ("glib:bin" ,glib "bin")
+
+                     ;; For tests.
+                     ("check" ,check)
+                     ("xorg-server" ,xorg-server-1.19.3)))
+    (inputs `(("sqlite" ,sqlite)))
+    ;; Listed in 'Requires.private' of 'zathura.pc'.
+    (propagated-inputs `(("cairo" ,cairo)
+                         ("girara" ,girara)))
     (native-search-paths
      (list (search-path-specification
             (variable "ZATHURA_PLUGIN_PATH")
     (native-search-paths
      (list (search-path-specification
             (variable "ZATHURA_PLUGIN_PATH")
@@ -498,10 +525,25 @@ by using the poppler rendering engine.")
      `(#:make-flags
        `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
          "CC=gcc" "COLOR=0")
      `(#:make-flags
        `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
          "CC=gcc" "COLOR=0")
-       #:tests? #f ; Tests fail: "Gtk cannot open display".
        #:test-target "test"
        #:test-target "test"
-       #:phases
-       (modify-phases %standard-phases (delete 'configure))))
+       #:disallowed-references (,xorg-server-1.19.3)
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure)
+                  (add-before 'check 'start-xserver
+                    ;; Tests require a running X server.
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (let ((xorg-server (assoc-ref inputs "xorg-server"))
+                            (display ":1"))
+                        (setenv "DISPLAY" display)
+
+                        ;; On busy machines, tests may take longer than
+                        ;; the default of four seconds.
+                        (setenv "CK_DEFAULT_TIMEOUT" "20")
+
+                        ;; Don't fail due to missing '/etc/machine-id'.
+                        (setenv "DBUS_FATAL_WARNINGS" "0")
+                        (zero? (system (string-append xorg-server "/bin/Xvfb "
+                                                      display " &")))))))))
     (home-page "https://pwmt.org/projects/zathura/")
     (synopsis "Lightweight keyboard-driven PDF viewer")
     (description "Zathura is a customizable document viewer.  It provides a
     (home-page "https://pwmt.org/projects/zathura/")
     (synopsis "Lightweight keyboard-driven PDF viewer")
     (description "Zathura is a customizable document viewer.  It provides a
@@ -555,25 +597,21 @@ extracting content or merging files.")
 (define-public mupdf
   (package
     (name "mupdf")
 (define-public mupdf
   (package
     (name "mupdf")
-    (version "1.11")
+    (version "1.13.0")
     (source
       (origin
         (method url-fetch)
         (uri (string-append "https://mupdf.com/downloads/archive/"
     (source
       (origin
         (method url-fetch)
         (uri (string-append "https://mupdf.com/downloads/archive/"
-                            name "-" version "-source.tar.gz"))
+                            name "-" version "-source.tar.xz"))
         (sha256
          (base32
         (sha256
          (base32
-          "02phamcchgsmvjnb3ir7r5sssvx9fcrscn297z73b82n1jl79510"))
-        (patches (search-patches "mupdf-build-with-openjpeg-2.1.patch"
-                                 "mupdf-CVE-2017-14685.patch"
-                                 "mupdf-CVE-2017-14686.patch"
-                                 "mupdf-CVE-2017-14687.patch"
-                                 "mupdf-CVE-2017-15587.patch"))
+          "0129k92bav692l6lyw10ryldx7h2f9khjpgnp3f3n4fdsph9hrkl"))
         (modules '((guix build utils)))
         (modules '((guix build utils)))
-        (snippet '(delete-file-recursively "thirdparty"))))
+        (snippet '(begin (delete-file-recursively "thirdparty") #t))))
     (build-system gnu-build-system)
     (inputs
       `(("curl" ,curl)
     (build-system gnu-build-system)
     (inputs
       `(("curl" ,curl)
+        ("freeglut" ,freeglut)
         ("freetype" ,freetype)
         ("harfbuzz" ,harfbuzz)
         ("jbig2dec" ,jbig2dec)
         ("freetype" ,freetype)
         ("harfbuzz" ,harfbuzz)
         ("jbig2dec" ,jbig2dec)
@@ -621,12 +659,14 @@ line tools for batch rendering @command{pdfdraw}, rewriting files
             (snippet
              ;; Replace shebang with the bi-lingual shell/Perl trick to remove
              ;; dependency on Perl.
             (snippet
              ;; Replace shebang with the bi-lingual shell/Perl trick to remove
              ;; dependency on Perl.
-             '(substitute* "qpdf/fix-qdf"
-                (("#!/usr/bin/env perl")
-                 "\
+             '(begin
+                (substitute* "qpdf/fix-qdf"
+                  (("#!/usr/bin/env perl")
+                   "\
 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
   & eval 'exec perl -wS \"$0\" $argv:q'
 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
   & eval 'exec perl -wS \"$0\" $argv:q'
-    if 0;\n")))))
+    if 0;\n"))
+                #t))))
    (build-system gnu-build-system)
    (arguments
     `(#:disallowed-references (,perl)
    (build-system gnu-build-system)
    (arguments
     `(#:disallowed-references (,perl)
@@ -640,7 +680,8 @@ eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
             (substitute* (append
                           '("qtest/bin/qtest-driver")
                           (find-files "." "\\.test"))
             (substitute* (append
                           '("qtest/bin/qtest-driver")
                           (find-files "." "\\.test"))
-              (("/usr/bin/env") (which "env"))))))))
+              (("/usr/bin/env") (which "env")))
+            #t)))))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("perl" ,perl)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("perl" ,perl)))
@@ -661,7 +702,7 @@ program capable of converting PDF into other formats.")
 (define-public xournal
   (package
     (name "xournal")
 (define-public xournal
   (package
     (name "xournal")
-    (version "0.4.8")
+    (version "0.4.8.2016")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
@@ -669,7 +710,7 @@ program capable of converting PDF into other formats.")
                            "/xournal-" version ".tar.gz"))
        (sha256
         (base32
                            "/xournal-" version ".tar.gz"))
        (sha256
         (base32
-         "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13"))))
+         "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j"))))
     (build-system gnu-build-system)
     (inputs
      `(("gtk" ,gtk+-2)
     (build-system gnu-build-system)
     (inputs
      `(("gtk" ,gtk+-2)
@@ -689,13 +730,13 @@ using a stylus.")
 (define-public python-reportlab
   (package
     (name "python-reportlab")
 (define-public python-reportlab
   (package
     (name "python-reportlab")
-    (version "3.3.0")
+    (version "3.4.0")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "reportlab" version))
               (sha256
                (base32
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "reportlab" version))
               (sha256
                (base32
-                "0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"))))
+                "0hy304pzsz9lblmk7mrbk2682bi911lxgvzx2kcfpmfzb5gg7sjv"))))
     (build-system python-build-system)
     (arguments
      '(;; FIXME: There is one test failure, but it does not cause the
     (build-system python-build-system)
     (arguments
      '(;; FIXME: There is one test failure, but it does not cause the
@@ -703,7 +744,7 @@ using a stylus.")
        #:test-target "tests"))
     (propagated-inputs
      `(("python-pillow" ,python-pillow)))
        #:test-target "tests"))
     (propagated-inputs
      `(("python-pillow" ,python-pillow)))
-    (home-page "http://www.reportlab.com")
+    (home-page "https://www.reportlab.com")
     (synopsis "Python library for generating PDFs and graphics")
     (description "This is the ReportLab PDF Toolkit.  It allows rapid creation
 of rich PDF documents, and also creation of charts in a variety of bitmap and
     (synopsis "Python library for generating PDFs and graphics")
     (description "This is the ReportLab PDF Toolkit.  It allows rapid creation
 of rich PDF documents, and also creation of charts in a variety of bitmap and
@@ -944,7 +985,7 @@ PDF.  Indeed @command{pdfposter} was inspired by @command{poster}.")
 (define-public pdfgrep
   (package
     (name "pdfgrep")
 (define-public pdfgrep
   (package
     (name "pdfgrep")
-    (version "2.0.1")
+    (version "2.1.1")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
@@ -952,7 +993,7 @@ PDF.  Indeed @command{pdfposter} was inspired by @command{poster}.")
                            name "-" version ".tar.gz"))
        (sha256
         (base32
                            name "-" version ".tar.gz"))
        (sha256
         (base32
-         "07llkrkcfjwd3ybai9ad10ybhr0biffcplmy7lw4fb87nd2dfw03"))))
+         "02qcl5kmr5qzjfc99qpbpfb1890bxlrq3r208gnding51zrmb09c"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))