Commit | Line | Data |
---|---|---|
135eb524 | 1 | ;;; GNU Guix --- Functional package management for GNU |
8e755b1b | 2 | ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr> |
8befb33d | 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
aae8ba47 | 4 | ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net> |
3e40bb82 | 5 | ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> |
f22debac | 6 | ;;; Copyright © 2016 Roel Janssen <roel@gnu.org> |
4a78fd46 | 7 | ;;; Copyright © 2016 Nils Gillmann <ng0@n0.is> |
82862153 TGR |
8 | ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
9 | ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> | |
10 | ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> | |
11 | ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu> | |
5d68e9d6 | 12 | ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net> |
af8c7e10 | 13 | ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> |
92ae98e2 | 14 | ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> |
e05fc441 | 15 | ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org> |
02861325 | 16 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
135eb524 AE |
17 | ;;; |
18 | ;;; This file is part of GNU Guix. | |
19 | ;;; | |
20 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
21 | ;;; under the terms of the GNU General Public License as published by | |
22 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
23 | ;;; your option) any later version. | |
24 | ;;; | |
25 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
26 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
27 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28 | ;;; GNU General Public License for more details. | |
29 | ;;; | |
30 | ;;; You should have received a copy of the GNU General Public License | |
31 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
32 | ||
33 | (define-module (gnu packages pdf) | |
b5b73a82 | 34 | #:use-module ((guix licenses) #:prefix license:) |
135eb524 AE |
35 | #:use-module (guix packages) |
36 | #:use-module (guix download) | |
ab1c2319 | 37 | #:use-module (guix utils) |
135eb524 | 38 | #:use-module (guix build-system gnu) |
0f28ee34 | 39 | #:use-module (guix build-system cmake) |
3efb57ea | 40 | #:use-module (guix build-system python) |
8d4169a1 | 41 | #:use-module (guix build-system trivial) |
135eb524 | 42 | #:use-module (gnu packages) |
aae8ba47 | 43 | #:use-module (gnu packages autotools) |
31f248fa | 44 | #:use-module (gnu packages backup) |
8d4169a1 LC |
45 | #:use-module (gnu packages base) |
46 | #:use-module (gnu packages bash) | |
ac847543 | 47 | #:use-module (gnu packages check) |
135eb524 | 48 | #:use-module (gnu packages compression) |
31f248fa | 49 | #:use-module (gnu packages curl) |
3e40bb82 | 50 | #:use-module (gnu packages databases) |
bac31d1f | 51 | #:use-module (gnu packages djvu) |
31f248fa EF |
52 | #:use-module (gnu packages fontutils) |
53 | #:use-module (gnu packages game-development) | |
3e40bb82 | 54 | #:use-module (gnu packages gettext) |
31f248fa | 55 | #:use-module (gnu packages ghostscript) |
f3e22216 | 56 | #:use-module (gnu packages gl) |
8db824ba | 57 | #:use-module (gnu packages glib) |
31f248fa EF |
58 | #:use-module (gnu packages gnome) |
59 | #:use-module (gnu packages gnupg) | |
8db824ba | 60 | #:use-module (gnu packages gtk) |
31f248fa EF |
61 | #:use-module (gnu packages image) |
62 | #:use-module (gnu packages imagemagick) | |
1650cf92 | 63 | #:use-module (gnu packages javascript) |
31f248fa EF |
64 | #:use-module (gnu packages lesstif) |
65 | #:use-module (gnu packages linux) | |
0f28ee34 | 66 | #:use-module (gnu packages lua) |
765f0ac8 RW |
67 | #:use-module (gnu packages pcre) |
68 | #:use-module (gnu packages perl) | |
31f248fa EF |
69 | #:use-module (gnu packages photo) |
70 | #:use-module (gnu packages pkg-config) | |
3fa2dc27 | 71 | #:use-module (gnu packages python) |
31f248fa | 72 | #:use-module (gnu packages qt) |
8d4169a1 | 73 | #:use-module (gnu packages sdl) |
cc2b77df | 74 | #:use-module (gnu packages tls) |
31f248fa EF |
75 | #:use-module (gnu packages xdisorg) |
76 | #:use-module (gnu packages xorg) | |
8db824ba | 77 | #:use-module (srfi srfi-1)) |
135eb524 AE |
78 | |
79 | (define-public poppler | |
80 | (package | |
81 | (name "poppler") | |
1b821701 | 82 | (version "0.62.0") |
135eb524 AE |
83 | (source (origin |
84 | (method url-fetch) | |
5cc3096c | 85 | (uri (string-append "https://poppler.freedesktop.org/poppler-" |
8befb33d | 86 | version ".tar.xz")) |
6983ba56 SB |
87 | (sha256 |
88 | (base32 | |
1b821701 MB |
89 | "1ii9ly1pngyvs0aiq2wxpya08hidpl54y7nsb8b1vxnnskgp76jv")))) |
90 | (build-system cmake-build-system) | |
6983ba56 | 91 | ;; FIXME: |
a25fe6d6 | 92 | ;; use libcurl: no |
135eb524 AE |
93 | (inputs `(("fontconfig" ,fontconfig) |
94 | ("freetype" ,freetype) | |
7363cda4 | 95 | ("libjpeg" ,libjpeg) |
a25fe6d6 | 96 | ("libpng" ,libpng) |
135eb524 | 97 | ("libtiff" ,libtiff) |
927d4d9b | 98 | ("lcms" ,lcms) |
301804d6 | 99 | ("openjpeg" ,openjpeg) |
8db824ba LC |
100 | ("zlib" ,zlib) |
101 | ||
102 | ;; To build poppler-glib (as needed by Evince), we need Cairo and | |
103 | ;; GLib. But of course, that Cairo must not depend on Poppler. | |
104 | ("cairo" ,(package (inherit cairo) | |
105 | (inputs (alist-delete "poppler" | |
106 | (package-inputs cairo))))) | |
107 | ("glib" ,glib))) | |
c4c4cc05 | 108 | (native-inputs |
426adbe8 | 109 | `(("pkg-config" ,pkg-config) |
6983ba56 SB |
110 | ("glib" ,glib "bin") ; glib-mkenums, etc. |
111 | ("gobject-introspection" ,gobject-introspection))) | |
135eb524 AE |
112 | (arguments |
113 | `(#:tests? #f ; no test data provided with the tarball | |
a25fe6d6 | 114 | #:configure-flags |
1b821701 MB |
115 | (let* ((out (assoc-ref %outputs "out")) |
116 | (lib (string-append out "/lib"))) | |
117 | (list "-DENABLE_XPDF_HEADERS=ON" ; to install header files | |
118 | "-DENABLE_ZLIB=ON" | |
119 | (string-append "-DCMAKE_INSTALL_LIBDIR=" lib) | |
120 | (string-append "-DCMAKE_INSTALL_RPATH=" lib))))) | |
35b9e423 | 121 | (synopsis "PDF rendering library") |
135eb524 AE |
122 | (description |
123 | "Poppler is a PDF rendering library based on the xpdf-3.0 code base.") | |
14ecc0ef | 124 | (license license:gpl2+) |
5f8fc5e3 | 125 | (home-page "https://poppler.freedesktop.org/"))) |
14ecc0ef | 126 | |
95bbaa02 | 127 | (define-public poppler-qt4 |
c74acb56 | 128 | (package (inherit poppler) |
8410cb62 RW |
129 | (name "poppler-qt4") |
130 | (inputs `(("qt-4" ,qt-4) | |
131 | ,@(package-inputs poppler))) | |
132 | (synopsis "Qt4 frontend for the Poppler PDF rendering library"))) | |
133 | ||
f22debac | 134 | (define-public poppler-qt5 |
c74acb56 | 135 | (package (inherit poppler) |
f22debac | 136 | (name "poppler-qt5") |
13297861 | 137 | (inputs `(("qtbase" ,qtbase) |
f22debac RJ |
138 | ,@(package-inputs poppler))) |
139 | (synopsis "Qt5 frontend for the Poppler PDF rendering library"))) | |
140 | ||
3efb57ea RW |
141 | (define-public python-poppler-qt4 |
142 | (package | |
143 | (name "python-poppler-qt4") | |
144 | (version "0.24.0") | |
145 | (source | |
146 | (origin | |
147 | (method url-fetch) | |
148 | (uri (string-append "https://pypi.python.org/packages/source/p" | |
149 | "/python-poppler-qt4/python-poppler-qt4-" | |
150 | version ".tar.gz")) | |
151 | (sha256 | |
152 | (base32 | |
153 | "0x63niylkk4q3h3ay8zrk3m1xiik0x3hlr4gvj7kswx48qi1vb99")))) | |
154 | (build-system python-build-system) | |
155 | (arguments | |
156 | `(#:phases | |
157 | (modify-phases %standard-phases | |
158 | (add-after | |
159 | 'unpack 'patch-poppler-include-paths | |
160 | (lambda _ | |
161 | (substitute* (find-files "." "poppler-.*\\.sip") | |
162 | (("qt4/poppler-.*\\.h" header) | |
163 | (string-append "poppler/" header))) | |
164 | #t))))) | |
165 | (native-inputs | |
166 | `(("pkg-config" ,pkg-config))) | |
167 | (inputs | |
168 | `(("python-sip" ,python-sip) | |
169 | ("python-pyqt-4" ,python-pyqt-4) | |
170 | ("poppler-qt4" ,poppler-qt4))) | |
171 | (home-page "https://pypi.python.org/pypi/python-poppler-qt4") | |
172 | (synopsis "Python bindings for Poppler-Qt4") | |
173 | (description | |
174 | "This package provides Python bindings for the Qt4 interface of the | |
175 | Poppler PDF rendering library.") | |
176 | (license license:lgpl2.1+))) | |
177 | ||
99bcae94 RW |
178 | (define-public python-poppler-qt5 |
179 | (package | |
180 | (name "python-poppler-qt5") | |
181 | (version "0.24.2") | |
182 | (source | |
183 | (origin | |
184 | (method url-fetch) | |
185 | (uri (pypi-uri "python-poppler-qt5" version)) | |
186 | (sha256 | |
187 | (base32 | |
188 | "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r")))) | |
189 | (build-system python-build-system) | |
190 | (arguments | |
191 | `(;; There are no tests. The check phase just causes a rebuild. | |
192 | #:tests? #f | |
193 | #:phases | |
194 | (modify-phases %standard-phases | |
195 | (replace 'build | |
196 | (lambda* (#:key inputs #:allow-other-keys) | |
197 | (substitute* "setup.py" | |
198 | ;; This check always fails, so disable it. | |
199 | (("if not check_qtxml\\(\\)") | |
200 | "if True") | |
201 | ;; Enable C++11, which is needed because of Qt5. | |
202 | (("\\*\\*ext_args" line) | |
203 | (string-append "extra_compile_args=['-std=gnu++11'], " line))) | |
204 | ;; We need to pass an extra flag here. This cannot be in | |
205 | ;; configure-flags because it should not be passed for the | |
206 | ;; installation phase. | |
207 | ((@@ (guix build python-build-system) call-setuppy) | |
208 | "build_ext" (list (string-append "--pyqt-sip-dir=" | |
209 | (assoc-ref inputs "python-pyqt") | |
210 | "/share/sip")) #t)))))) | |
211 | (native-inputs | |
212 | `(("pkg-config" ,pkg-config))) | |
213 | (inputs | |
214 | `(("python-sip" ,python-sip) | |
215 | ("python-pyqt" ,python-pyqt) | |
216 | ("poppler-qt5" ,poppler-qt5) | |
217 | ("qtbase" ,qtbase))) | |
218 | (home-page "https://pypi.python.org/pypi/python-poppler-qt5") | |
219 | (synopsis "Python bindings for Poppler-Qt5") | |
220 | (description | |
221 | "This package provides Python bindings for the Qt5 interface of the | |
222 | Poppler PDF rendering library.") | |
223 | (license license:lgpl2.1+))) | |
224 | ||
aae8ba47 RW |
225 | (define-public libharu |
226 | (package | |
227 | (name "libharu") | |
228 | (version "2.3.0") | |
229 | (source (origin | |
230 | (method url-fetch) | |
231 | (uri (string-append "https://github.com/libharu/libharu/archive/" | |
232 | "RELEASE_" | |
233 | (string-join (string-split version #\.) "_") | |
234 | ".tar.gz")) | |
235 | (file-name (string-append name "-" version ".tar.gz")) | |
236 | (sha256 | |
237 | (base32 | |
238 | "1lm4v539y9cb1lvbq387j57sy7yxda3yv8b1pk8m6zazbp66i7lg")))) | |
239 | (build-system gnu-build-system) | |
240 | (arguments | |
241 | `(#:configure-flags | |
242 | (list (string-append "--with-zlib=" | |
243 | (assoc-ref %build-inputs "zlib")) | |
244 | (string-append "--with-png=" | |
245 | (assoc-ref %build-inputs "libpng"))) | |
246 | #:phases | |
247 | (modify-phases %standard-phases | |
d10092b8 | 248 | (add-after 'unpack 'autogen |
aae8ba47 RW |
249 | (lambda _ (zero? (system* "autoreconf" "-vif"))))))) |
250 | (inputs | |
251 | `(("zlib" ,zlib) | |
252 | ("libpng" ,libpng))) | |
253 | (native-inputs | |
254 | `(("autoconf" ,autoconf) | |
255 | ("automake" ,automake) | |
256 | ("libtool" ,libtool))) | |
257 | (home-page "http://libharu.org/") | |
258 | (synopsis "Library for generating PDF files") | |
259 | (description | |
260 | "libHaru is a library for generating PDF files. libHaru does not support | |
261 | reading and editing of existing PDF files.") | |
262 | (license license:zlib))) | |
263 | ||
14ecc0ef AE |
264 | (define-public xpdf |
265 | (package | |
266 | (name "xpdf") | |
f410c110 | 267 | (version "3.04") |
14ecc0ef AE |
268 | (source (origin |
269 | (method url-fetch) | |
270 | (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-" | |
271 | version ".tar.gz")) | |
272 | (sha256 (base32 | |
f410c110 | 273 | "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i")))) |
14ecc0ef AE |
274 | (build-system gnu-build-system) |
275 | (inputs `(("freetype" ,freetype) | |
19cb5170 | 276 | ("gs-fonts" ,gs-fonts) |
14ecc0ef AE |
277 | ("lesstif" ,lesstif) |
278 | ("libpaper" ,libpaper) | |
279 | ("libx11" ,libx11) | |
280 | ("libxext" ,libxext) | |
281 | ("libxp" ,libxp) | |
282 | ("libxpm" ,libxpm) | |
283 | ("libxt" ,libxt) | |
f410c110 | 284 | ("libpng" ,libpng) |
01eafd38 | 285 | ("zlib" ,zlib))) |
14ecc0ef AE |
286 | (arguments |
287 | `(#:tests? #f ; there is no check target | |
bdbf227f AE |
288 | #:parallel-build? #f ; build fails randomly on 8-way machines |
289 | #:configure-flags | |
290 | (list (string-append "--with-freetype2-includes=" | |
291 | (assoc-ref %build-inputs "freetype") | |
292 | "/include/freetype2")) | |
19cb5170 | 293 | #:phases |
dc1d3cde KK |
294 | (modify-phases %standard-phases |
295 | (replace 'install | |
296 | (lambda* (#:key outputs inputs #:allow-other-keys #:rest args) | |
297 | (let* ((install (assoc-ref %standard-phases 'install)) | |
298 | (out (assoc-ref outputs "out")) | |
299 | (xpdfrc (string-append out "/etc/xpdfrc")) | |
300 | (gs-fonts (assoc-ref inputs "gs-fonts"))) | |
301 | (apply install args) | |
302 | (substitute* xpdfrc | |
19cb5170 AE |
303 | (("/usr/local/share/ghostscript/fonts") |
304 | (string-append gs-fonts "/share/fonts/type1/ghostscript")) | |
dc1d3cde KK |
305 | (("#fontFile") "fontFile"))) |
306 | #t))))) | |
9e771e3b | 307 | (synopsis "Viewer for PDF files based on the Motif toolkit") |
14ecc0ef | 308 | (description |
e881752c | 309 | "Xpdf is a viewer for Portable Document Format (PDF) files.") |
14ecc0ef AE |
310 | (license license:gpl3) ; or gpl2, but not gpl2+ |
311 | (home-page "http://www.foolabs.com/xpdf/"))) | |
0f28ee34 | 312 | |
b3886e0c PW |
313 | (define-public zathura-cb |
314 | (package | |
315 | (name "zathura-cb") | |
8bad37d8 | 316 | (version "0.1.7") |
b3886e0c PW |
317 | (source (origin |
318 | (method url-fetch) | |
319 | (uri | |
320 | (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-" | |
321 | version ".tar.gz")) | |
322 | (sha256 | |
323 | (base32 | |
8bad37d8 | 324 | "0r4viisycj39kaz4281cmkr7n9w5q96dmlf7nf45n8zq8qy2npw3")))) |
b3886e0c | 325 | (native-inputs `(("pkg-config" ,pkg-config))) |
b3886e0c | 326 | (inputs `(("libarchive" ,libarchive) |
b3886e0c PW |
327 | ("zathura" ,zathura))) |
328 | (build-system gnu-build-system) | |
329 | (arguments | |
b1982b80 MW |
330 | `(#:make-flags (list (string-append "PREFIX=" %output) |
331 | (string-append "PLUGINDIR=" %output "/lib/zathura") | |
332 | "CC=gcc") | |
b3886e0c PW |
333 | #:tests? #f ; Package does not contain tests. |
334 | #:phases | |
dc1d3cde | 335 | (modify-phases %standard-phases (delete 'configure)))) |
b3886e0c PW |
336 | (home-page "https://pwmt.org/projects/zathura-cb/") |
337 | (synopsis "Comic book support for zathura (libarchive backend)") | |
338 | (description "The zathura-cb plugin adds comic book support to zathura | |
339 | using libarchive.") | |
340 | (license license:zlib))) | |
341 | ||
721a4f7d PW |
342 | (define-public zathura-ps |
343 | (package | |
344 | (name "zathura-ps") | |
85f330b9 | 345 | (version "0.2.5") |
721a4f7d PW |
346 | (source (origin |
347 | (method url-fetch) | |
348 | (uri | |
349 | (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-" | |
350 | version ".tar.gz")) | |
351 | (sha256 | |
352 | (base32 | |
85f330b9 | 353 | "1x4knqja8pw2a5cb3y2209nr3iddj1z8nwasy48v5nprj61fdxqj")))) |
721a4f7d | 354 | (native-inputs `(("pkg-config" ,pkg-config))) |
721a4f7d | 355 | (inputs `(("libspectre" ,libspectre) |
721a4f7d PW |
356 | ("zathura" ,zathura))) |
357 | (build-system gnu-build-system) | |
358 | (arguments | |
b1982b80 MW |
359 | `(#:make-flags (list (string-append "PREFIX=" %output) |
360 | (string-append "PLUGINDIR=" %output "/lib/zathura") | |
361 | "CC=gcc") | |
721a4f7d PW |
362 | #:tests? #f ; Package does not contain tests. |
363 | #:phases | |
dc1d3cde | 364 | (modify-phases %standard-phases (delete 'configure)))) |
721a4f7d PW |
365 | (home-page "https://pwmt.org/projects/zathura-ps/") |
366 | (synopsis "PS support for zathura (libspectre backend)") | |
367 | (description "The zathura-ps plugin adds PS support to zathura | |
368 | using libspectre.") | |
369 | (license license:zlib))) | |
370 | ||
bac31d1f PW |
371 | (define-public zathura-djvu |
372 | (package | |
373 | (name "zathura-djvu") | |
71a18fe2 | 374 | (version "0.2.7") |
bac31d1f PW |
375 | (source (origin |
376 | (method url-fetch) | |
377 | (uri | |
378 | (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-" | |
379 | version ".tar.gz")) | |
380 | (sha256 | |
381 | (base32 | |
71a18fe2 | 382 | "1sbfdsyp50qc85xc4458sn4w1rv1qbygdwmcr5kjlfpsmdq98vhd")))) |
bac31d1f | 383 | (native-inputs `(("pkg-config" ,pkg-config))) |
bac31d1f PW |
384 | (inputs |
385 | `(("djvulibre" ,djvulibre) | |
bac31d1f PW |
386 | ("zathura" ,zathura))) |
387 | (build-system gnu-build-system) | |
388 | (arguments | |
b1982b80 MW |
389 | `(#:make-flags (list (string-append "PREFIX=" %output) |
390 | (string-append "PLUGINDIR=" %output "/lib/zathura") | |
391 | "CC=gcc") | |
bac31d1f PW |
392 | #:tests? #f ; Package does not contain tests. |
393 | #:phases | |
dc1d3cde | 394 | (modify-phases %standard-phases (delete 'configure)))) |
bac31d1f PW |
395 | (home-page "https://pwmt.org/projects/zathura-djvu/") |
396 | (synopsis "DjVu support for zathura (DjVuLibre backend)") | |
397 | (description "The zathura-djvu plugin adds DjVu support to zathura | |
398 | using the DjVuLibre library.") | |
399 | (license license:zlib))) | |
400 | ||
43dc47fa MB |
401 | (define-public zathura-pdf-mupdf |
402 | (package | |
403 | (name "zathura-pdf-mupdf") | |
19fc21d7 | 404 | (version "0.3.2") |
43dc47fa MB |
405 | (source (origin |
406 | (method url-fetch) | |
407 | (uri | |
408 | (string-append "https://pwmt.org/projects/zathura-pdf-mupdf" | |
409 | "/download/zathura-pdf-mupdf-" version ".tar.gz")) | |
410 | (sha256 | |
411 | (base32 | |
19fc21d7 | 412 | "0xkajc3is7ncmb2fmymbzfgrran2bz12i7zsm1vvxhxds728h7ck")))) |
43dc47fa | 413 | (native-inputs `(("pkg-config" ,pkg-config))) |
43dc47fa | 414 | (inputs |
3bbd6469 | 415 | `(("jbig2dec" ,jbig2dec) |
43dc47fa MB |
416 | ("libjpeg" ,libjpeg) |
417 | ("mupdf" ,mupdf) | |
418 | ("openjpeg" ,openjpeg) | |
419 | ("openssl" ,openssl) | |
420 | ("zathura" ,zathura))) | |
421 | (build-system gnu-build-system) | |
422 | (arguments | |
423 | `(#:make-flags (list (string-append "PREFIX=" %output) | |
424 | (string-append "PLUGINDIR=" %output "/lib/zathura") | |
425 | "CC=gcc") | |
426 | #:tests? #f ;No tests. | |
427 | #:phases (modify-phases %standard-phases (delete 'configure)))) | |
428 | (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/") | |
429 | (synopsis "PDF support for zathura (mupdf backend)") | |
430 | (description "The zathura-pdf-mupdf plugin adds PDF support to zathura | |
431 | by using the @code{mupdf} rendering library.") | |
432 | (license license:zlib))) | |
433 | ||
7708557f PW |
434 | (define-public zathura-pdf-poppler |
435 | (package | |
436 | (name "zathura-pdf-poppler") | |
d81581a2 | 437 | (version "0.2.8") |
7708557f PW |
438 | (source (origin |
439 | (method url-fetch) | |
440 | (uri | |
441 | (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-" | |
442 | version ".tar.gz")) | |
443 | (sha256 | |
444 | (base32 | |
d81581a2 | 445 | "1m55m7s7f8ng8a7lmcw9z4n5zv7xk4vp9n6fp9j84z6rk2imf7a2")))) |
7708557f | 446 | (native-inputs `(("pkg-config" ,pkg-config))) |
7708557f PW |
447 | (inputs |
448 | `(("poppler" ,poppler) | |
3bbd6469 | 449 | ("zathura" ,zathura))) |
7708557f PW |
450 | (build-system gnu-build-system) |
451 | (arguments | |
b1982b80 MW |
452 | `(#:make-flags (list (string-append "PREFIX=" %output) |
453 | (string-append "PLUGINDIR=" %output "/lib/zathura") | |
454 | "CC=gcc") | |
7708557f PW |
455 | #:tests? #f ; Package does not include tests. |
456 | #:phases | |
dc1d3cde | 457 | (modify-phases %standard-phases (delete 'configure)))) |
7708557f PW |
458 | (home-page "https://pwmt.org/projects/zathura-pdf-poppler/") |
459 | (synopsis "PDF support for zathura (poppler backend)") | |
460 | (description "The zathura-pdf-poppler plugin adds PDF support to zathura | |
461 | by using the poppler rendering engine.") | |
462 | (license license:zlib))) | |
463 | ||
3e40bb82 PW |
464 | (define-public zathura |
465 | (package | |
466 | (name "zathura") | |
f2984d70 | 467 | (version "0.3.8") |
3e40bb82 PW |
468 | (source (origin |
469 | (method url-fetch) | |
470 | (uri | |
471 | (string-append "https://pwmt.org/projects/zathura/download/zathura-" | |
472 | version ".tar.gz")) | |
473 | (sha256 | |
474 | (base32 | |
f2984d70 | 475 | "0dz5pky3vmf3s2cp2rv1c099gb1s49p9xlgm3ghyy4pzyxc8bgs6")) |
fc1adab1 AK |
476 | (patches (search-patches |
477 | "zathura-plugindir-environment-variable.patch")))) | |
3e40bb82 | 478 | (native-inputs `(("pkg-config" ,pkg-config) |
f2984d70 | 479 | ("gettext" ,gettext-minimal) |
ac847543 MB |
480 | ("glib:bin" ,glib "bin") |
481 | ||
482 | ;; For tests. | |
483 | ("check" ,check) | |
2416665e | 484 | ("xorg-server" ,xorg-server-1.19.3))) |
1d9032fc MB |
485 | (inputs `(("sqlite" ,sqlite))) |
486 | ;; Listed in 'Requires.private' of 'zathura.pc'. | |
487 | (propagated-inputs `(("cairo" ,cairo) | |
488 | ("girara" ,girara))) | |
3e40bb82 PW |
489 | (native-search-paths |
490 | (list (search-path-specification | |
491 | (variable "ZATHURA_PLUGIN_PATH") | |
492 | (files '("lib/zathura"))))) | |
493 | (build-system gnu-build-system) | |
494 | (arguments | |
495 | `(#:make-flags | |
496 | `(,(string-append "PREFIX=" (assoc-ref %outputs "out")) | |
497 | "CC=gcc" "COLOR=0") | |
3e40bb82 | 498 | #:test-target "test" |
2416665e | 499 | #:disallowed-references (,xorg-server-1.19.3) |
ac847543 MB |
500 | #:phases (modify-phases %standard-phases |
501 | (delete 'configure) | |
502 | (add-before 'check 'start-xserver | |
503 | ;; Tests require a running X server. | |
504 | (lambda* (#:key inputs #:allow-other-keys) | |
505 | (let ((xorg-server (assoc-ref inputs "xorg-server")) | |
506 | (display ":1")) | |
507 | (setenv "DISPLAY" display) | |
f0eba502 MB |
508 | |
509 | ;; On busy machines, tests may take longer than | |
510 | ;; the default of four seconds. | |
511 | (setenv "CK_DEFAULT_TIMEOUT" "20") | |
512 | ||
ac847543 MB |
513 | ;; Don't fail due to missing '/etc/machine-id'. |
514 | (setenv "DBUS_FATAL_WARNINGS" "0") | |
515 | (zero? (system (string-append xorg-server "/bin/Xvfb " | |
516 | display " &"))))))))) | |
3e40bb82 PW |
517 | (home-page "https://pwmt.org/projects/zathura/") |
518 | (synopsis "Lightweight keyboard-driven PDF viewer") | |
519 | (description "Zathura is a customizable document viewer. It provides a | |
520 | minimalistic interface and an interface that mainly focuses on keyboard | |
521 | interaction.") | |
522 | (license license:zlib))) | |
523 | ||
0f28ee34 LC |
524 | (define-public podofo |
525 | (package | |
526 | (name "podofo") | |
0b181ff9 | 527 | (version "0.9.5") |
0f28ee34 LC |
528 | (source (origin |
529 | (method url-fetch) | |
de67e922 LF |
530 | (uri (string-append "mirror://sourceforge/podofo/podofo/" version |
531 | "/podofo-" version ".tar.gz")) | |
0f28ee34 LC |
532 | (sha256 |
533 | (base32 | |
0b181ff9 | 534 | "012kgfx5j5n6w4zkc1d290d2cwjk60jhzsjlr2x19g3yi75q2jc5")))) |
0f28ee34 LC |
535 | (build-system cmake-build-system) |
536 | (inputs ; TODO: Add cppunit for tests | |
5cc0e486 | 537 | `(("lua" ,lua-5.1) |
0f28ee34 LC |
538 | ("libpng" ,libpng) |
539 | ("openssl" ,openssl) | |
540 | ("fontconfig" ,fontconfig) | |
541 | ("libtiff" ,libtiff) | |
542 | ("libjpeg" ,libjpeg-8) | |
543 | ("freetype" ,freetype) | |
544 | ("zlib" ,zlib))) | |
cb6a14ba AE |
545 | (arguments |
546 | `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON" | |
dde70926 AE |
547 | "-DPODOFO_BUILD_STATIC=ON") |
548 | #:phases | |
dc1d3cde KK |
549 | (modify-phases %standard-phases |
550 | (add-before 'configure 'patch | |
551 | (lambda* (#:key inputs #:allow-other-keys) | |
552 | (let ((freetype (assoc-ref inputs "freetype"))) | |
553 | ;; Look for freetype include files in the correct place. | |
554 | (substitute* "cmake/modules/FindFREETYPE.cmake" | |
555 | (("/usr/local") freetype))) | |
556 | #t))))) | |
0f28ee34 LC |
557 | (home-page "http://podofo.sourceforge.net") |
558 | (synopsis "Tools to work with the PDF file format") | |
559 | (description | |
560 | "PoDoFo is a C++ library and set of command-line tools to work with the | |
561 | PDF file format. It can parse PDF files and load them into memory, and makes | |
562 | it easy to modify them and write the changes to disk. It is primarily useful | |
563 | for applications that wish to do lower level manipulation of PDF, such as | |
564 | extracting content or merging files.") | |
565 | (license license:lgpl2.0+))) | |
c0b390ed MB |
566 | |
567 | (define-public mupdf | |
568 | (package | |
569 | (name "mupdf") | |
dab2542f | 570 | (version "1.12.0") |
c0b390ed MB |
571 | (source |
572 | (origin | |
573 | (method url-fetch) | |
76379dca | 574 | (uri (string-append "https://mupdf.com/downloads/archive/" |
dab2542f | 575 | name "-" version "-source.tar.xz")) |
0b18c0b0 | 576 | (patches (search-patches "mupdf-build-with-latest-openjpeg.patch" |
4d99a321 LF |
577 | "mupdf-CVE-2017-17858.patch" |
578 | "mupdf-CVE-2018-6544.patch" | |
579 | "mupdf-CVE-2018-1000051.patch")) | |
c0b390ed | 580 | (sha256 |
c41d97be | 581 | (base32 |
dab2542f | 582 | "0b9j0gqbc3jhmx87r6idcsh8lnb30840c3hyx6dk2gdjqqh3hysp")) |
c0b390ed | 583 | (modules '((guix build utils))) |
1650cf92 | 584 | (snippet '(delete-file-recursively "thirdparty")))) |
c0b390ed MB |
585 | (build-system gnu-build-system) |
586 | (inputs | |
587 | `(("curl" ,curl) | |
dab2542f | 588 | ("freeglut" ,freeglut) |
c0b390ed | 589 | ("freetype" ,freetype) |
c41d97be | 590 | ("harfbuzz" ,harfbuzz) |
c0b390ed MB |
591 | ("jbig2dec" ,jbig2dec) |
592 | ("libjpeg" ,libjpeg) | |
593 | ("libx11" ,libx11) | |
594 | ("libxext" ,libxext) | |
1650cf92 | 595 | ("mujs" ,mujs) |
c41d97be | 596 | ("openjpeg" ,openjpeg) |
c0b390ed MB |
597 | ("openssl" ,openssl) |
598 | ("zlib" ,zlib))) | |
599 | (native-inputs | |
600 | `(("pkg-config" ,pkg-config))) | |
601 | (arguments | |
8e755b1b AE |
602 | '(#:tests? #f ; no check target |
603 | #:make-flags (list "CC=gcc" | |
604 | "XCFLAGS=-fpic" | |
605 | (string-append "prefix=" (assoc-ref %outputs "out"))) | |
606 | #:phases (modify-phases %standard-phases | |
607 | (delete 'configure)))) | |
76379dca | 608 | (home-page "https://mupdf.com") |
2274b816 | 609 | (synopsis "Lightweight PDF viewer and toolkit") |
c0b390ed MB |
610 | (description |
611 | "MuPDF is a C library that implements a PDF and XPS parsing and | |
612 | rendering engine. It is used primarily to render pages into bitmaps, | |
613 | but also provides support for other operations such as searching and | |
614 | listing the table of contents and hyperlinks. | |
615 | ||
616 | The library ships with a rudimentary X11 viewer, and a set of command | |
7e0d513f EF |
617 | line tools for batch rendering @command{pdfdraw}, rewriting files |
618 | @command{pdfclean}, and examining the file structure @command{pdfshow}.") | |
c0b390ed | 619 | (license license:agpl3+))) |
765f0ac8 RW |
620 | |
621 | (define-public qpdf | |
622 | (package | |
623 | (name "qpdf") | |
8337cb21 | 624 | (version "6.0.0") |
765f0ac8 RW |
625 | (source (origin |
626 | (method url-fetch) | |
de67e922 LF |
627 | (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version |
628 | "/qpdf-" version ".tar.gz")) | |
8337cb21 EF |
629 | (sha256 |
630 | (base32 | |
631 | "0csj2p2gkxrc0rk8ykymlsdgfas96vzf1dip3y1x7z1q9plwgzd9")) | |
503409b5 LC |
632 | (modules '((guix build utils))) |
633 | (snippet | |
634 | ;; Replace shebang with the bi-lingual shell/Perl trick to remove | |
635 | ;; dependency on Perl. | |
636 | '(substitute* "qpdf/fix-qdf" | |
637 | (("#!/usr/bin/env perl") | |
638 | "\ | |
639 | eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}' | |
640 | & eval 'exec perl -wS \"$0\" $argv:q' | |
641 | if 0;\n"))))) | |
765f0ac8 RW |
642 | (build-system gnu-build-system) |
643 | (arguments | |
503409b5 | 644 | `(#:disallowed-references (,perl) |
0adfe0cc EF |
645 | #:phases |
646 | (modify-phases %standard-phases | |
647 | (add-before 'configure 'patch-paths | |
648 | (lambda _ | |
649 | (substitute* "make/libtool.mk" | |
650 | (("SHELL=/bin/bash") | |
651 | (string-append "SHELL=" (which "bash")))) | |
652 | (substitute* (append | |
653 | '("qtest/bin/qtest-driver") | |
654 | (find-files "." "\\.test")) | |
655 | (("/usr/bin/env") (which "env")))))))) | |
765f0ac8 | 656 | (native-inputs |
503409b5 LC |
657 | `(("pkg-config" ,pkg-config) |
658 | ("perl" ,perl))) | |
765f0ac8 RW |
659 | (propagated-inputs |
660 | `(("pcre" ,pcre))) | |
661 | (inputs | |
503409b5 | 662 | `(("zlib" ,zlib))) |
765f0ac8 RW |
663 | (synopsis "Command-line tools and library for transforming PDF files") |
664 | (description | |
665 | "QPDF is a command-line program that does structural, content-preserving | |
666 | transformations on PDF files. It could have been called something like | |
667 | pdf-to-pdf. It includes support for merging and splitting PDFs and to | |
668 | manipulate the list of pages in a PDF file. It is not a PDF viewer or a | |
669 | program capable of converting PDF into other formats.") | |
670 | (license license:clarified-artistic) | |
671 | (home-page "http://qpdf.sourceforge.net/"))) | |
7ad608e4 RW |
672 | |
673 | (define-public xournal | |
674 | (package | |
675 | (name "xournal") | |
d0e888c3 | 676 | (version "0.4.8.2016") |
7ad608e4 RW |
677 | (source |
678 | (origin | |
679 | (method url-fetch) | |
de67e922 LF |
680 | (uri (string-append "mirror://sourceforge/xournal/xournal/" version |
681 | "/xournal-" version ".tar.gz")) | |
7ad608e4 RW |
682 | (sha256 |
683 | (base32 | |
d0e888c3 | 684 | "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j")))) |
7ad608e4 RW |
685 | (build-system gnu-build-system) |
686 | (inputs | |
687 | `(("gtk" ,gtk+-2) | |
688 | ("pango" ,pango) | |
689 | ("poppler" ,poppler) | |
690 | ("glib" ,glib) | |
691 | ("libgnomecanvas" ,libgnomecanvas))) | |
692 | (native-inputs | |
693 | `(("pkg-config" ,pkg-config))) | |
694 | (home-page "http://xournal.sourceforge.net/") | |
695 | (synopsis "Notetaking using a stylus") | |
696 | (description | |
697 | "Xournal is an application for notetaking, sketching, keeping a journal | |
698 | using a stylus.") | |
699 | (license license:gpl2+))) | |
3fa2dc27 MB |
700 | |
701 | (define-public python-reportlab | |
702 | (package | |
703 | (name "python-reportlab") | |
02861325 | 704 | (version "3.4.0") |
3fa2dc27 MB |
705 | (source (origin |
706 | (method url-fetch) | |
707 | (uri (pypi-uri "reportlab" version)) | |
708 | (sha256 | |
709 | (base32 | |
02861325 | 710 | "0hy304pzsz9lblmk7mrbk2682bi911lxgvzx2kcfpmfzb5gg7sjv")))) |
3fa2dc27 | 711 | (build-system python-build-system) |
9e378e6a MB |
712 | (arguments |
713 | '(;; FIXME: There is one test failure, but it does not cause the | |
714 | ;; build to fail. No time to investigate right now. | |
715 | #:test-target "tests")) | |
3fa2dc27 MB |
716 | (propagated-inputs |
717 | `(("python-pillow" ,python-pillow))) | |
16c76cc4 | 718 | (home-page "https://www.reportlab.com") |
3fa2dc27 MB |
719 | (synopsis "Python library for generating PDFs and graphics") |
720 | (description "This is the ReportLab PDF Toolkit. It allows rapid creation | |
721 | of rich PDF documents, and also creation of charts in a variety of bitmap and | |
722 | vector formats.") | |
d8013ee2 | 723 | (license license:bsd-3))) |
3fa2dc27 MB |
724 | |
725 | (define-public python2-reportlab | |
d8013ee2 | 726 | (package-with-python2 python-reportlab)) |
8d4169a1 LC |
727 | |
728 | (define-public impressive | |
729 | (package | |
730 | (name "impressive") | |
731 | (version "0.11.1") | |
732 | (source (origin | |
733 | (method url-fetch) | |
734 | (uri (string-append | |
735 | "mirror://sourceforge/impressive/Impressive/" | |
736 | version "/Impressive-" version ".tar.gz")) | |
737 | (sha256 | |
738 | (base32 | |
739 | "0b3rmy6acp2vmf5nill3aknxvr9a5aawk1vnphkah61anxp62gsr")))) | |
740 | (build-system python-build-system) | |
741 | ||
742 | ;; TODO: Add dependency on pdftk. | |
ed9b09e4 | 743 | (inputs `(("python2-pygame" ,python2-pygame) |
8d4169a1 LC |
744 | ("python2-pillow" ,python2-pillow) |
745 | ("sdl" ,sdl) | |
746 | ("xpdf" ,xpdf))) | |
747 | ||
748 | (arguments | |
749 | `(#:python ,python-2 | |
750 | #:phases (modify-phases %standard-phases | |
751 | (delete 'build) | |
752 | (delete 'configure) | |
753 | (delete 'check) | |
754 | (replace 'install | |
755 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
756 | ;; There's no 'setup.py' so install things manually. | |
757 | (let* ((out (assoc-ref outputs "out")) | |
758 | (bin (string-append out "/bin")) | |
759 | (man1 (string-append out "/share/man/man1")) | |
760 | (sdl (assoc-ref inputs "sdl")) | |
761 | (xpdf (assoc-ref inputs "xpdf"))) | |
762 | (mkdir-p bin) | |
763 | (copy-file "impressive.py" | |
764 | (string-append bin "/impressive")) | |
765 | (wrap-program (string-append bin "/impressive") | |
766 | `("LIBRARY_PATH" ":" prefix ;for ctypes | |
767 | (,(string-append sdl "/lib"))) | |
768 | `("PATH" ":" prefix ;for pdftoppm | |
769 | (,(string-append xpdf "/bin")))) | |
8d4169a1 LC |
770 | (install-file "impressive.1" man1) |
771 | #t)))))) | |
772 | (home-page "http://impressive.sourceforge.net") | |
773 | (synopsis "PDF presentation tool with visual effects") | |
774 | (description | |
775 | "Impressive is a tool to display PDF files that provides visual effects | |
776 | such as smooth alpha-blended slide transitions. It provides additional tools | |
777 | such as zooming, highlighting an area of the screen, and a tool to navigate | |
778 | the PDF pages.") | |
779 | (license license:gpl2))) | |
f3e22216 JL |
780 | |
781 | (define-public fbida | |
782 | (package | |
783 | (name "fbida") | |
784 | (version "2.12") | |
785 | (home-page "https://www.kraxel.org/blog/linux/fbida/") | |
786 | (source (origin | |
787 | (method url-fetch) | |
788 | (uri (string-append "https://www.kraxel.org/releases/fbida/" | |
789 | name "-" version ".tar.gz")) | |
790 | (sha256 | |
791 | (base32 | |
792 | "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk")))) | |
793 | (build-system gnu-build-system) | |
794 | (arguments | |
dc1d3cde KK |
795 | '(#:phases |
796 | (modify-phases %standard-phases | |
797 | (add-after 'unpack 'patch-ldconfig | |
798 | (lambda _ | |
799 | (substitute* "mk/Autoconf.mk" | |
800 | (("/sbin/ldconfig -p") "echo lib")) #t)) | |
801 | (delete 'configure)) | |
f3e22216 JL |
802 | #:tests? #f |
803 | #:make-flags (list "CC=gcc" | |
804 | (string-append "prefix=" (assoc-ref %outputs "out"))))) | |
805 | (inputs `(("libjpeg" ,libjpeg) | |
806 | ("curl" ,curl) | |
807 | ("libtiff" ,libtiff) | |
808 | ("libudev" ,eudev) | |
809 | ("libwebp" ,libwebp) | |
810 | ("libdrm" ,libdrm) | |
811 | ("imagemagick" ,imagemagick) | |
812 | ("giflib" ,giflib) | |
813 | ("glib" ,glib) | |
814 | ("cairo-xcb" ,cairo-xcb) | |
815 | ("freetype" ,freetype) | |
816 | ("fontconfig" ,fontconfig) | |
817 | ("libexif" ,libexif) | |
818 | ("mesa" ,mesa) | |
819 | ("libepoxy" ,libepoxy) | |
820 | ("libpng" ,libpng) | |
821 | ("poppler" ,poppler))) | |
822 | (native-inputs `(("pkg-config" ,pkg-config))) | |
823 | (synopsis "Framebuffer and drm-based image viewer") | |
824 | (description | |
825 | "fbida contains a few applications for viewing and editing images on | |
826 | the framebuffer.") | |
827 | ||
828 | (license license:gpl2+))) | |
5d68e9d6 AI |
829 | |
830 | (define-public pdf2svg | |
831 | (package | |
832 | (name "pdf2svg") | |
833 | (version "0.2.3") | |
834 | (source (origin | |
835 | (method url-fetch) | |
836 | (uri (string-append | |
837 | "https://github.com/dawbarton/pdf2svg/archive/v" | |
838 | version ".tar.gz")) | |
839 | (file-name (string-append name "-" version ".tar.gz")) | |
840 | (sha256 | |
841 | (base32 | |
842 | "12pa1pajirnlrkz2il3h4l30lc2prryk1qr132jk6z9y1c3qdcag")))) | |
843 | (build-system gnu-build-system) | |
844 | (inputs | |
845 | `(("cairo" ,cairo) | |
846 | ("poppler" ,poppler))) | |
847 | (native-inputs | |
848 | `(("pkg-config" ,pkg-config))) | |
849 | (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/") | |
850 | (synopsis "PDF to SVG converter") | |
851 | (description "@command{pdf2svg} is a simple command-line PDF to SVG | |
852 | converter using the Poppler and Cairo libraries.") | |
853 | (license license:gpl2+))) | |
ad5a7d49 HG |
854 | |
855 | (define-public python-pypdf2 | |
856 | (package | |
857 | (name "python-pypdf2") | |
858 | (version "1.26.0") | |
859 | (source (origin | |
860 | (method url-fetch) | |
861 | (uri (pypi-uri "PyPDF2" version)) | |
862 | (sha256 | |
863 | (base32 | |
864 | "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2")))) | |
865 | (build-system python-build-system) | |
866 | (arguments | |
867 | `(#:phases | |
868 | (modify-phases %standard-phases | |
869 | (add-after | |
870 | 'unpack 'patch-test-suite | |
871 | (lambda _ | |
872 | ;; The text-file needs to be opened in binary mode for Python 3, | |
873 | ;; so patch in the "b" | |
874 | (substitute* "Tests/tests.py" | |
875 | (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line) | |
876 | (string-append line "b"))) | |
877 | #t)) | |
878 | (replace 'check | |
879 | (lambda _ | |
880 | (zero? (system* "python" "-m" "unittest" "Tests.tests"))))))) | |
881 | (home-page "http://mstamy2.github.com/PyPDF2") | |
882 | (synopsis "Pure Python PDF toolkit") | |
883 | (description "PyPDF2 is a pure Python PDF library capable of: | |
884 | ||
885 | @enumerate | |
886 | @item extracting document information (title, author, …) | |
887 | @item splitting documents page by page | |
888 | @item merging documents page by page | |
889 | @item cropping pages | |
890 | @item merging multiple pages into a single page | |
891 | @item encrypting and decrypting PDF files | |
892 | @end enumerate | |
893 | ||
894 | By being pure Python, it should run on any Python platform without any | |
895 | dependencies on external libraries. It can also work entirely on | |
896 | @code{StringIO} objects rather than file streams, allowing for PDF | |
897 | manipulation in memory. It is therefore a useful tool for websites that | |
898 | manage or manipulate PDFs.") | |
899 | (license license:bsd-3))) | |
900 | ||
901 | (define-public python2-pypdf2 | |
902 | (package-with-python2 python-pypdf2)) | |
c68e8591 HG |
903 | |
904 | (define-public python2-pypdf | |
905 | (package | |
906 | (name "python2-pypdf") | |
907 | (version "1.13") | |
908 | (source (origin | |
909 | (method url-fetch) | |
910 | (uri (pypi-uri "pyPdf" version)) | |
911 | (sha256 | |
912 | (base32 | |
913 | "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s")))) | |
914 | (build-system python-build-system) | |
915 | (arguments | |
916 | `(#:tests? #f ; no tests | |
917 | #:python ,python-2)) | |
918 | (home-page "http://pybrary.net/pyPdf/") | |
919 | (synopsis "Pure Python PDF toolkit") | |
920 | (description "PyPDF2 is a pure Python PDF toolkit. | |
921 | ||
922 | Note: This module isn't maintained anymore. For new projects please use | |
923 | python-pypdf2 instead.") | |
924 | (license license:bsd-3))) | |
99abcdbd HG |
925 | |
926 | (define-public pdfposter | |
927 | (package | |
928 | (name "pdfposter") | |
929 | (version "0.6.0") | |
930 | (source (origin | |
931 | (method url-fetch) | |
932 | (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2")) | |
933 | (sha256 | |
934 | (base32 | |
935 | "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma")))) | |
936 | (build-system python-build-system) | |
937 | (arguments | |
938 | `(#:tests? #f ; no test suite, only for visual control | |
939 | #:python ,python-2)) | |
940 | (inputs | |
941 | ;; pdfposter 0.6.0 still uses the old pyPdf | |
942 | `(("python2-pypdf" ,python2-pypdf))) | |
99abcdbd HG |
943 | (home-page "https://pythonhosted.org/pdftools.pdfposter/") |
944 | (synopsis "Scale and tile PDF images/pages to print on multiple pages") | |
945 | (description "@command{pdfposter} can be used to create a large poster by | |
946 | building it from multple pages and/or printing it on large media. It expects | |
947 | as input a PDF file, normally printing on a single page. The output is again | |
948 | a PDF file, maybe containing multiple pages together building the poster. The | |
949 | input page will be scaled to obtain the desired size. | |
950 | ||
951 | This is much like @command{poster} does for Postscript files, but working with | |
952 | PDF. Since sometimes @command{poster} does not like your files converted from | |
953 | PDF. Indeed @command{pdfposter} was inspired by @command{poster}.") | |
954 | (license license:gpl3+))) | |
e05fc441 RS |
955 | |
956 | (define-public pdfgrep | |
957 | (package | |
958 | (name "pdfgrep") | |
959 | (version "2.0.1") | |
960 | (source | |
961 | (origin | |
962 | (method url-fetch) | |
963 | (uri (string-append "https://pdfgrep.org/download/" | |
964 | name "-" version ".tar.gz")) | |
965 | (sha256 | |
966 | (base32 | |
967 | "07llkrkcfjwd3ybai9ad10ybhr0biffcplmy7lw4fb87nd2dfw03")))) | |
968 | (build-system gnu-build-system) | |
969 | (native-inputs | |
970 | `(("pkg-config" ,pkg-config))) | |
971 | (inputs | |
972 | `(("libgcrypt" ,libgcrypt) | |
973 | ("pcre" ,pcre) | |
974 | ("poppler" ,poppler))) | |
975 | (home-page "https://pdfgrep.org") | |
976 | (synopsis "Command-line utility to search text in PDF files") | |
977 | (description | |
978 | "Pdfgrep searches in pdf files for strings matching a regular expression. | |
979 | Support some GNU grep options as file name output, page number output, | |
980 | optional case insensitivity, count occurrences, color highlights and search in | |
981 | multiple files.") | |
982 | (license license:gpl2+))) |