summaryrefslogtreecommitdiff
path: root/gnu/packages/pdf.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/pdf.scm')
-rw-r--r--gnu/packages/pdf.scm119
1 files changed, 93 insertions, 26 deletions
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index a1984e0695..879bc7f93f 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -45,6 +46,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
+ #:use-module (guix build-system qt)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages audio)
@@ -54,6 +56,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cups)
#:use-module (gnu packages curl)
#:use-module (gnu packages djvu)
#:use-module (gnu packages fontutils)
@@ -88,6 +91,7 @@
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tex)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages web)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -218,17 +222,17 @@ please install the @code{flyer-composer-gui} package.")))
(define-public poppler-data
(package
(name "poppler-data")
- (version "0.4.9")
+ (version "0.4.10")
(source (origin
(method url-fetch)
(uri (string-append "https://poppler.freedesktop.org/poppler-data"
"-" version ".tar.gz"))
(sha256
(base32
- "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z"))))
+ "0c3vjs3p7rjc4yfacnhd865r27czmzwcr4j2z4jldi68dvvcwbvf"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ; no test suite
+ '(#:tests? #f ; no test suite
#:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
@@ -498,7 +502,7 @@ using the DjVuLibre library.")
(define-public zathura-pdf-mupdf
(package
(name "zathura-pdf-mupdf")
- (version "0.3.5")
+ (version "0.3.6")
(source (origin
(method url-fetch)
(uri
@@ -506,7 +510,7 @@ using the DjVuLibre library.")
"/download/zathura-pdf-mupdf-" version ".tar.xz"))
(sha256
(base32
- "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq"))))
+ "1r3v37k9fl2rxipvacgxr36llywvy7n20a25h3ajlyk70697sa66"))))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs
`(("jbig2dec" ,jbig2dec)
@@ -525,6 +529,12 @@ using the DjVuLibre library.")
"-Dlink-external=true")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'remove-libmupdfthird.a-requirement
+ (lambda _
+ ;; Ignore a missing (apparently superfluous) static library.
+ (substitute* "meson.build"
+ ((".*mupdfthird.*") ""))
+ #t))
(add-before 'configure 'add-mujs-to-dependencies
(lambda _
;; Add mujs to the 'build_dependencies'.
@@ -683,30 +693,35 @@ extracting content or merging files.")
(define-public mupdf
(package
(name "mupdf")
- (version "1.16.1")
+ (version "1.18.0")
(source
- (origin
- (method url-fetch)
- (uri (string-append "https://mupdf.com/downloads/archive/"
- "mupdf-" version "-source.tar.xz"))
- (sha256
- (base32
- "1npmy92lkj41nnc14b4fpq7z62pminy94zsdbrczj22jpn283rvg"))
- (modules '((guix build utils)))
- (snippet
- ;; We keep lcms2 since it is different than our lcms.
- '(begin
- (for-each
- (lambda (dir)
- (delete-file-recursively (string-append "thirdparty/" dir)))
- '("freeglut" "freetype" "harfbuzz" "jbig2dec"
- "libjpeg" "mujs" "openjpeg" "zlib"))
- #t))))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://mupdf.com/downloads/archive/"
+ "mupdf-" version "-source.tar.xz"))
+ (sha256
+ (base32 "16m5sksil22sshxy70xkslsb2qhvcqb1d95i9savnhds1xn4ybar"))
+ (patches (search-patches "mupdf-fix-linkage.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Remove bundled software.
+ (let* ((keep (list "lcms2")) ; different from our lcms2 package
+ (from "thirdparty")
+ (kept (string-append from "~temp")))
+ (mkdir-p kept)
+ (for-each (lambda (file) (rename-file (string-append from "/" file)
+ (string-append kept "/" file)))
+ keep)
+ (delete-file-recursively from)
+ (rename-file kept from))
+ #t))))
(build-system gnu-build-system)
(inputs
`(("curl" ,curl)
("freeglut" ,freeglut)
("freetype" ,freetype)
+ ("gumbo-parser" ,gumbo-parser)
("harfbuzz" ,harfbuzz)
("jbig2dec" ,jbig2dec)
("libjpeg" ,libjpeg-turbo)
@@ -719,14 +734,19 @@ extracting content or merging files.")
(native-inputs
`(("pkg-config" ,pkg-config)))
(arguments
- '(#:tests? #f ; no check target
- #:make-flags (list "CC=gcc"
+ `(#:tests? #f ; no check target
+ #:make-flags (list "verbose=yes"
+ (string-append "CC=" ,(cc-for-target))
"XCFLAGS=-fpic"
"USE_SYSTEM_LIBS=yes"
"USE_SYSTEM_MUJS=yes"
+ "shared=yes"
+ ;; Even with the linkage patch we must fix RUNPATH.
+ (string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out") "/lib")
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases (modify-phases %standard-phases
- (delete 'configure))))
+ (delete 'configure)))) ; no configure script
(home-page "https://mupdf.com")
(synopsis "Lightweight PDF viewer and toolkit")
(description
@@ -789,6 +809,53 @@ program capable of converting PDF into other formats.")
(license (list license:asl2.0 license:clarified-artistic))
(home-page "http://qpdf.sourceforge.net/")))
+(define-public qpdfview
+ (package
+ (name "qpdfview")
+ (version "0.4.18")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://launchpad.net/qpdfview/"
+ "trunk/" version "/+download/"
+ "qpdfview-" version ".tar.gz"))
+ (sha256
+ (base32 "0v1rl126hvblajnph2hkansgi0s8vjdc5yxrm4y3faa0lxzjwr6c"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("cups" ,cups)
+ ("djvulibre" ,djvulibre)
+ ("libspectre" ,libspectre)
+ ("poppler-qt5" ,poppler-qt5)
+ ("qtbase" ,qtbase)
+ ("qtsvg" ,qtsvg)))
+ (arguments
+ `(#:imported-modules ((guix build qt-build-system)
+ (guix build cmake-build-system)
+ ,@%gnu-build-system-modules)
+ #:modules ((guix build utils)
+ (guix build gnu-build-system)
+ ((guix build qt-build-system) #:prefix qt:))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute* "qpdfview.pri"
+ (("/usr") (assoc-ref %outputs "out")))
+ (invoke "qmake" "qpdfview.pro")))
+ ;; Otherwise, the user interface will not display any icons.
+ (add-after 'install 'qt-wrap
+ (assoc-ref qt:%standard-phases 'qt-wrap)))))
+ (home-page "https://launchpad.net/qpdfview")
+ (synopsis "Tabbed document viewer")
+ (description "@command{qpdfview} is a document viewer for PDF, PS and DJVU
+files. It uses the Qt toolkit and features persistent per-file settings,
+configurable toolbars and shortcuts, continuous and multi‐page layouts,
+SyncTeX support, and rudimentary support for annotations and forms.")
+ (license license:gpl2+)))
+
(define-public xournal
(package
(name "xournal")