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> |
a773f141 | 4 | ;;; Copyright © 2014, 2015, 2016, 2018, 2019 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> |
2b79c683 | 8 | ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
82862153 TGR |
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> |
6d161406 | 13 | ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name> |
92ae98e2 | 14 | ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> |
7da4dbb3 | 15 | ;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com> |
eb6a5dab | 16 | ;;; Copyright © 2017, 2018 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) | |
e2ec95c4 | 37 | #:use-module (guix git-download) |
ab1c2319 | 38 | #:use-module (guix utils) |
135eb524 | 39 | #:use-module (guix build-system gnu) |
0f28ee34 | 40 | #:use-module (guix build-system cmake) |
eb6a5dab | 41 | #:use-module (guix build-system meson) |
3efb57ea | 42 | #:use-module (guix build-system python) |
8d4169a1 | 43 | #:use-module (guix build-system trivial) |
135eb524 | 44 | #:use-module (gnu packages) |
aae8ba47 | 45 | #:use-module (gnu packages autotools) |
31f248fa | 46 | #:use-module (gnu packages backup) |
8d4169a1 LC |
47 | #:use-module (gnu packages base) |
48 | #:use-module (gnu packages bash) | |
ac847543 | 49 | #:use-module (gnu packages check) |
135eb524 | 50 | #:use-module (gnu packages compression) |
31f248fa | 51 | #:use-module (gnu packages curl) |
bac31d1f | 52 | #:use-module (gnu packages djvu) |
31f248fa EF |
53 | #:use-module (gnu packages fontutils) |
54 | #:use-module (gnu packages game-development) | |
3e40bb82 | 55 | #:use-module (gnu packages gettext) |
31f248fa | 56 | #:use-module (gnu packages ghostscript) |
f3e22216 | 57 | #:use-module (gnu packages gl) |
8db824ba | 58 | #:use-module (gnu packages glib) |
31f248fa EF |
59 | #:use-module (gnu packages gnome) |
60 | #:use-module (gnu packages gnupg) | |
e2ec95c4 | 61 | #:use-module (gnu packages gstreamer) |
8db824ba | 62 | #:use-module (gnu packages gtk) |
31f248fa EF |
63 | #:use-module (gnu packages image) |
64 | #:use-module (gnu packages imagemagick) | |
1650cf92 | 65 | #:use-module (gnu packages javascript) |
31f248fa EF |
66 | #:use-module (gnu packages lesstif) |
67 | #:use-module (gnu packages linux) | |
0f28ee34 | 68 | #:use-module (gnu packages lua) |
765f0ac8 RW |
69 | #:use-module (gnu packages pcre) |
70 | #:use-module (gnu packages perl) | |
31f248fa EF |
71 | #:use-module (gnu packages photo) |
72 | #:use-module (gnu packages pkg-config) | |
3fa2dc27 | 73 | #:use-module (gnu packages python) |
44d10b1f | 74 | #:use-module (gnu packages python-xyz) |
31f248fa | 75 | #:use-module (gnu packages qt) |
8d4169a1 | 76 | #:use-module (gnu packages sdl) |
cd0322a3 | 77 | #:use-module (gnu packages sqlite) |
cc2b77df | 78 | #:use-module (gnu packages tls) |
31f248fa EF |
79 | #:use-module (gnu packages xdisorg) |
80 | #:use-module (gnu packages xorg) | |
8db824ba | 81 | #:use-module (srfi srfi-1)) |
135eb524 AE |
82 | |
83 | (define-public poppler | |
84 | (package | |
85 | (name "poppler") | |
021bf6af | 86 | (replacement poppler/fixed) |
1abe0554 | 87 | (version "0.68.0") |
135eb524 AE |
88 | (source (origin |
89 | (method url-fetch) | |
5cc3096c | 90 | (uri (string-append "https://poppler.freedesktop.org/poppler-" |
8befb33d | 91 | version ".tar.xz")) |
6983ba56 SB |
92 | (sha256 |
93 | (base32 | |
1abe0554 | 94 | "0n0f7mv24lzv9p3dlzakpdhqg7ygcvl6l40grcz95xldzgq083gr")))) |
1b821701 | 95 | (build-system cmake-build-system) |
6983ba56 | 96 | ;; FIXME: |
a25fe6d6 | 97 | ;; use libcurl: no |
135eb524 AE |
98 | (inputs `(("fontconfig" ,fontconfig) |
99 | ("freetype" ,freetype) | |
1abe0554 | 100 | ("libjpeg" ,libjpeg-turbo) |
a25fe6d6 | 101 | ("libpng" ,libpng) |
135eb524 | 102 | ("libtiff" ,libtiff) |
927d4d9b | 103 | ("lcms" ,lcms) |
301804d6 | 104 | ("openjpeg" ,openjpeg) |
8db824ba LC |
105 | ("zlib" ,zlib) |
106 | ||
107 | ;; To build poppler-glib (as needed by Evince), we need Cairo and | |
108 | ;; GLib. But of course, that Cairo must not depend on Poppler. | |
109 | ("cairo" ,(package (inherit cairo) | |
110 | (inputs (alist-delete "poppler" | |
eb637c64 MB |
111 | (package-inputs cairo))))))) |
112 | (propagated-inputs | |
113 | ;; As per poppler-cairo and poppler-glib.pc. | |
114 | ;; XXX: Ideally we'd propagate Cairo too, but that would require a | |
115 | ;; different solution to the circular dependency mentioned above. | |
116 | `(("glib" ,glib))) | |
c4c4cc05 | 117 | (native-inputs |
426adbe8 | 118 | `(("pkg-config" ,pkg-config) |
6983ba56 SB |
119 | ("glib" ,glib "bin") ; glib-mkenums, etc. |
120 | ("gobject-introspection" ,gobject-introspection))) | |
135eb524 AE |
121 | (arguments |
122 | `(#:tests? #f ; no test data provided with the tarball | |
a25fe6d6 | 123 | #:configure-flags |
1b821701 MB |
124 | (let* ((out (assoc-ref %outputs "out")) |
125 | (lib (string-append out "/lib"))) | |
126 | (list "-DENABLE_XPDF_HEADERS=ON" ; to install header files | |
127 | "-DENABLE_ZLIB=ON" | |
128 | (string-append "-DCMAKE_INSTALL_LIBDIR=" lib) | |
129 | (string-append "-DCMAKE_INSTALL_RPATH=" lib))))) | |
35b9e423 | 130 | (synopsis "PDF rendering library") |
135eb524 AE |
131 | (description |
132 | "Poppler is a PDF rendering library based on the xpdf-3.0 code base.") | |
14ecc0ef | 133 | (license license:gpl2+) |
5f8fc5e3 | 134 | (home-page "https://poppler.freedesktop.org/"))) |
14ecc0ef | 135 | |
021bf6af LF |
136 | (define poppler/fixed |
137 | (package | |
138 | (inherit poppler) | |
139 | (source (origin | |
140 | (inherit (package-source poppler)) | |
141 | (patches (append (origin-patches (package-source poppler)) | |
142 | (search-patches "poppler-CVE-2018-19149.patch"))))))) | |
143 | ||
6d161406 LF |
144 | (define-public poppler-data |
145 | (package | |
146 | (name "poppler-data") | |
147 | (version "0.4.9") | |
148 | (source (origin | |
149 | (method url-fetch) | |
150 | (uri (string-append "https://poppler.freedesktop.org/poppler-data" | |
151 | "-" version ".tar.gz")) | |
152 | (sha256 | |
153 | (base32 | |
154 | "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z")))) | |
155 | (build-system gnu-build-system) | |
156 | (arguments | |
157 | '(#:tests? #f ; no test suite | |
158 | #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))) | |
159 | #:phases | |
160 | (modify-phases %standard-phases | |
161 | ;; The package only provides some data files, so there is nothing to | |
162 | ;; build. | |
163 | (delete 'configure) | |
164 | (delete 'build)))) | |
165 | (synopsis "Poppler encoding files for rendering of CJK and Cyrillic text") | |
166 | (description "This package provides optional encoding files for Poppler. | |
167 | When present, Poppler is able to correctly render CJK and Cyrillic text.") | |
168 | (home-page (package-home-page poppler)) | |
169 | ;; See COPYING in the source distribution for more information about | |
170 | ;; the licensing. | |
171 | (license (list license:bsd-3 | |
172 | license:gpl2)))) | |
173 | ||
95bbaa02 | 174 | (define-public poppler-qt4 |
021bf6af | 175 | (package/inherit poppler |
8410cb62 RW |
176 | (name "poppler-qt4") |
177 | (inputs `(("qt-4" ,qt-4) | |
178 | ,@(package-inputs poppler))) | |
179 | (synopsis "Qt4 frontend for the Poppler PDF rendering library"))) | |
180 | ||
f22debac | 181 | (define-public poppler-qt5 |
021bf6af | 182 | (package/inherit poppler |
f22debac | 183 | (name "poppler-qt5") |
13297861 | 184 | (inputs `(("qtbase" ,qtbase) |
f22debac RJ |
185 | ,@(package-inputs poppler))) |
186 | (synopsis "Qt5 frontend for the Poppler PDF rendering library"))) | |
187 | ||
99bcae94 RW |
188 | (define-public python-poppler-qt5 |
189 | (package | |
190 | (name "python-poppler-qt5") | |
191 | (version "0.24.2") | |
192 | (source | |
193 | (origin | |
194 | (method url-fetch) | |
195 | (uri (pypi-uri "python-poppler-qt5" version)) | |
196 | (sha256 | |
197 | (base32 | |
198 | "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r")))) | |
199 | (build-system python-build-system) | |
200 | (arguments | |
201 | `(;; There are no tests. The check phase just causes a rebuild. | |
202 | #:tests? #f | |
203 | #:phases | |
204 | (modify-phases %standard-phases | |
205 | (replace 'build | |
206 | (lambda* (#:key inputs #:allow-other-keys) | |
207 | (substitute* "setup.py" | |
208 | ;; This check always fails, so disable it. | |
209 | (("if not check_qtxml\\(\\)") | |
210 | "if True") | |
211 | ;; Enable C++11, which is needed because of Qt5. | |
212 | (("\\*\\*ext_args" line) | |
213 | (string-append "extra_compile_args=['-std=gnu++11'], " line))) | |
214 | ;; We need to pass an extra flag here. This cannot be in | |
215 | ;; configure-flags because it should not be passed for the | |
216 | ;; installation phase. | |
217 | ((@@ (guix build python-build-system) call-setuppy) | |
218 | "build_ext" (list (string-append "--pyqt-sip-dir=" | |
219 | (assoc-ref inputs "python-pyqt") | |
220 | "/share/sip")) #t)))))) | |
221 | (native-inputs | |
222 | `(("pkg-config" ,pkg-config))) | |
223 | (inputs | |
224 | `(("python-sip" ,python-sip) | |
225 | ("python-pyqt" ,python-pyqt) | |
226 | ("poppler-qt5" ,poppler-qt5) | |
227 | ("qtbase" ,qtbase))) | |
228 | (home-page "https://pypi.python.org/pypi/python-poppler-qt5") | |
229 | (synopsis "Python bindings for Poppler-Qt5") | |
230 | (description | |
231 | "This package provides Python bindings for the Qt5 interface of the | |
232 | Poppler PDF rendering library.") | |
233 | (license license:lgpl2.1+))) | |
234 | ||
aae8ba47 RW |
235 | (define-public libharu |
236 | (package | |
237 | (name "libharu") | |
238 | (version "2.3.0") | |
239 | (source (origin | |
2b2ab39c RW |
240 | (method git-fetch) |
241 | (uri (git-reference | |
242 | (url "https://github.com/libharu/libharu.git") | |
243 | (commit (string-append | |
244 | "RELEASE_" | |
245 | (string-join (string-split version #\.) "_"))))) | |
246 | (file-name (git-file-name name version)) | |
aae8ba47 RW |
247 | (sha256 |
248 | (base32 | |
2b2ab39c | 249 | "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q")))) |
aae8ba47 RW |
250 | (build-system gnu-build-system) |
251 | (arguments | |
252 | `(#:configure-flags | |
253 | (list (string-append "--with-zlib=" | |
254 | (assoc-ref %build-inputs "zlib")) | |
255 | (string-append "--with-png=" | |
6f3dd09f | 256 | (assoc-ref %build-inputs "libpng"))))) |
aae8ba47 RW |
257 | (inputs |
258 | `(("zlib" ,zlib) | |
259 | ("libpng" ,libpng))) | |
260 | (native-inputs | |
261 | `(("autoconf" ,autoconf) | |
262 | ("automake" ,automake) | |
263 | ("libtool" ,libtool))) | |
264 | (home-page "http://libharu.org/") | |
265 | (synopsis "Library for generating PDF files") | |
266 | (description | |
267 | "libHaru is a library for generating PDF files. libHaru does not support | |
268 | reading and editing of existing PDF files.") | |
269 | (license license:zlib))) | |
270 | ||
14ecc0ef AE |
271 | (define-public xpdf |
272 | (package | |
273 | (name "xpdf") | |
f410c110 | 274 | (version "3.04") |
14ecc0ef AE |
275 | (source (origin |
276 | (method url-fetch) | |
277 | (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-" | |
278 | version ".tar.gz")) | |
279 | (sha256 (base32 | |
f410c110 | 280 | "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i")))) |
14ecc0ef AE |
281 | (build-system gnu-build-system) |
282 | (inputs `(("freetype" ,freetype) | |
19cb5170 | 283 | ("gs-fonts" ,gs-fonts) |
14ecc0ef AE |
284 | ("lesstif" ,lesstif) |
285 | ("libpaper" ,libpaper) | |
286 | ("libx11" ,libx11) | |
287 | ("libxext" ,libxext) | |
288 | ("libxp" ,libxp) | |
289 | ("libxpm" ,libxpm) | |
290 | ("libxt" ,libxt) | |
f410c110 | 291 | ("libpng" ,libpng) |
01eafd38 | 292 | ("zlib" ,zlib))) |
14ecc0ef AE |
293 | (arguments |
294 | `(#:tests? #f ; there is no check target | |
bdbf227f AE |
295 | #:parallel-build? #f ; build fails randomly on 8-way machines |
296 | #:configure-flags | |
297 | (list (string-append "--with-freetype2-includes=" | |
298 | (assoc-ref %build-inputs "freetype") | |
299 | "/include/freetype2")) | |
19cb5170 | 300 | #:phases |
dc1d3cde KK |
301 | (modify-phases %standard-phases |
302 | (replace 'install | |
303 | (lambda* (#:key outputs inputs #:allow-other-keys #:rest args) | |
304 | (let* ((install (assoc-ref %standard-phases 'install)) | |
305 | (out (assoc-ref outputs "out")) | |
306 | (xpdfrc (string-append out "/etc/xpdfrc")) | |
307 | (gs-fonts (assoc-ref inputs "gs-fonts"))) | |
308 | (apply install args) | |
309 | (substitute* xpdfrc | |
19cb5170 AE |
310 | (("/usr/local/share/ghostscript/fonts") |
311 | (string-append gs-fonts "/share/fonts/type1/ghostscript")) | |
dc1d3cde KK |
312 | (("#fontFile") "fontFile"))) |
313 | #t))))) | |
9e771e3b | 314 | (synopsis "Viewer for PDF files based on the Motif toolkit") |
14ecc0ef | 315 | (description |
e881752c | 316 | "Xpdf is a viewer for Portable Document Format (PDF) files.") |
14ecc0ef AE |
317 | (license license:gpl3) ; or gpl2, but not gpl2+ |
318 | (home-page "http://www.foolabs.com/xpdf/"))) | |
0f28ee34 | 319 | |
b3886e0c PW |
320 | (define-public zathura-cb |
321 | (package | |
322 | (name "zathura-cb") | |
02fcc6f2 | 323 | (version "0.1.8") |
b3886e0c PW |
324 | (source (origin |
325 | (method url-fetch) | |
326 | (uri | |
327 | (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-" | |
02fcc6f2 | 328 | version ".tar.xz")) |
b3886e0c PW |
329 | (sha256 |
330 | (base32 | |
02fcc6f2 | 331 | "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5")))) |
b3886e0c | 332 | (native-inputs `(("pkg-config" ,pkg-config))) |
b3886e0c | 333 | (inputs `(("libarchive" ,libarchive) |
b3886e0c | 334 | ("zathura" ,zathura))) |
02fcc6f2 | 335 | (build-system meson-build-system) |
b3886e0c | 336 | (arguments |
02fcc6f2 | 337 | `(#:tests? #f ; package does not contain tests |
b3886e0c | 338 | #:phases |
02fcc6f2 TGR |
339 | (modify-phases %standard-phases |
340 | (add-after 'unpack 'patch-plugin-directory | |
341 | ;; Something of a regression in 0.1.8: the new Meson build system | |
342 | ;; now hard-codes an incorrect plugin directory. Fix it. | |
343 | (lambda* (#:key outputs #:allow-other-keys) | |
344 | (substitute* "meson.build" | |
345 | (("(install_dir:).*" _ key) | |
346 | (string-append key | |
347 | "'" (assoc-ref outputs "out") "/lib/zathura'\n"))) | |
348 | #t))))) | |
b3886e0c PW |
349 | (home-page "https://pwmt.org/projects/zathura-cb/") |
350 | (synopsis "Comic book support for zathura (libarchive backend)") | |
351 | (description "The zathura-cb plugin adds comic book support to zathura | |
352 | using libarchive.") | |
353 | (license license:zlib))) | |
354 | ||
721a4f7d PW |
355 | (define-public zathura-ps |
356 | (package | |
357 | (name "zathura-ps") | |
06dbfb5d | 358 | (version "0.2.6") |
721a4f7d PW |
359 | (source (origin |
360 | (method url-fetch) | |
361 | (uri | |
362 | (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-" | |
06dbfb5d | 363 | version ".tar.xz")) |
721a4f7d PW |
364 | (sha256 |
365 | (base32 | |
06dbfb5d | 366 | "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y")))) |
721a4f7d | 367 | (native-inputs `(("pkg-config" ,pkg-config))) |
721a4f7d | 368 | (inputs `(("libspectre" ,libspectre) |
721a4f7d | 369 | ("zathura" ,zathura))) |
06dbfb5d | 370 | (build-system meson-build-system) |
721a4f7d | 371 | (arguments |
06dbfb5d | 372 | `(#:tests? #f ; package does not contain tests |
721a4f7d | 373 | #:phases |
06dbfb5d TGR |
374 | (modify-phases %standard-phases |
375 | (add-after 'unpack 'patch-plugin-directory | |
376 | ;; Something of a regression in 0.2.6: the new Meson build system | |
377 | ;; now hard-codes an incorrect plugin directory. Fix it. | |
378 | (lambda* (#:key outputs #:allow-other-keys) | |
379 | (substitute* "meson.build" | |
380 | (("(install_dir:).*" _ key) | |
381 | (string-append key | |
382 | "'" (assoc-ref outputs "out") "/lib/zathura'\n"))) | |
383 | #t))))) | |
721a4f7d PW |
384 | (home-page "https://pwmt.org/projects/zathura-ps/") |
385 | (synopsis "PS support for zathura (libspectre backend)") | |
386 | (description "The zathura-ps plugin adds PS support to zathura | |
387 | using libspectre.") | |
388 | (license license:zlib))) | |
389 | ||
bac31d1f PW |
390 | (define-public zathura-djvu |
391 | (package | |
392 | (name "zathura-djvu") | |
7d475dd4 | 393 | (version "0.2.8") |
bac31d1f PW |
394 | (source (origin |
395 | (method url-fetch) | |
396 | (uri | |
397 | (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-" | |
7d475dd4 | 398 | version ".tar.xz")) |
bac31d1f PW |
399 | (sha256 |
400 | (base32 | |
7d475dd4 | 401 | "0axkv1crdxn0z44whaqp2ibkdqcykhjnxk7qzms0dp1b67an9rnh")))) |
bac31d1f | 402 | (native-inputs `(("pkg-config" ,pkg-config))) |
bac31d1f PW |
403 | (inputs |
404 | `(("djvulibre" ,djvulibre) | |
bac31d1f | 405 | ("zathura" ,zathura))) |
7d475dd4 | 406 | (build-system meson-build-system) |
bac31d1f | 407 | (arguments |
7d475dd4 | 408 | `(#:tests? #f ; package does not contain tests |
bac31d1f | 409 | #:phases |
7d475dd4 TGR |
410 | (modify-phases %standard-phases |
411 | (add-after 'unpack 'patch-plugin-directory | |
412 | ;; Something of a regression in 0.2.8: the new Meson build system | |
413 | ;; now hard-codes an incorrect plugin directory. Fix it. | |
414 | (lambda* (#:key outputs #:allow-other-keys) | |
415 | (substitute* "meson.build" | |
416 | (("(install_dir:).*" _ key) | |
417 | (string-append key | |
418 | "'" (assoc-ref outputs "out") "/lib/zathura'\n"))) | |
419 | #t))))) | |
bac31d1f PW |
420 | (home-page "https://pwmt.org/projects/zathura-djvu/") |
421 | (synopsis "DjVu support for zathura (DjVuLibre backend)") | |
422 | (description "The zathura-djvu plugin adds DjVu support to zathura | |
423 | using the DjVuLibre library.") | |
424 | (license license:zlib))) | |
425 | ||
43dc47fa MB |
426 | (define-public zathura-pdf-mupdf |
427 | (package | |
428 | (name "zathura-pdf-mupdf") | |
24fc8f05 | 429 | (version "0.3.4") |
43dc47fa MB |
430 | (source (origin |
431 | (method url-fetch) | |
432 | (uri | |
433 | (string-append "https://pwmt.org/projects/zathura-pdf-mupdf" | |
aac2006d | 434 | "/download/zathura-pdf-mupdf-" version ".tar.xz")) |
43dc47fa MB |
435 | (sha256 |
436 | (base32 | |
24fc8f05 | 437 | "166d5nz47ixzwj4pixsd5fd9qvjf5v34cdqi3p72vr23pswk2hyn")))) |
43dc47fa | 438 | (native-inputs `(("pkg-config" ,pkg-config))) |
43dc47fa | 439 | (inputs |
3bbd6469 | 440 | `(("jbig2dec" ,jbig2dec) |
43dc47fa | 441 | ("libjpeg" ,libjpeg) |
b42b5afd | 442 | ("mujs" ,mujs) |
43dc47fa MB |
443 | ("mupdf" ,mupdf) |
444 | ("openjpeg" ,openjpeg) | |
445 | ("openssl" ,openssl) | |
446 | ("zathura" ,zathura))) | |
aac2006d | 447 | (build-system meson-build-system) |
43dc47fa | 448 | (arguments |
aac2006d | 449 | `(#:tests? #f ; package does not contain tests |
a6f2afee EF |
450 | #:configure-flags (list (string-append "-Dplugindir=" |
451 | (assoc-ref %outputs "out") | |
7b046b1b SB |
452 | "/lib/zathura") |
453 | "-Dlink-external=true") | |
454 | #:phases | |
455 | (modify-phases %standard-phases | |
456 | (add-before 'configure 'add-mujs-to-dependencies | |
457 | (lambda _ | |
458 | ;; Add mujs to the 'build_dependencies'. | |
459 | (substitute* "meson.build" | |
460 | (("^ libopenjp2 = dependency.*" x) | |
461 | (string-append x " mujs = cc.find_library('mujs')\n")) | |
462 | (("^ libopenjp2") | |
463 | " libopenjp2, mujs"))))))) | |
43dc47fa MB |
464 | (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/") |
465 | (synopsis "PDF support for zathura (mupdf backend)") | |
466 | (description "The zathura-pdf-mupdf plugin adds PDF support to zathura | |
467 | by using the @code{mupdf} rendering library.") | |
468 | (license license:zlib))) | |
469 | ||
7708557f PW |
470 | (define-public zathura-pdf-poppler |
471 | (package | |
472 | (name "zathura-pdf-poppler") | |
0ed99053 | 473 | (version "0.2.9") |
7708557f PW |
474 | (source (origin |
475 | (method url-fetch) | |
476 | (uri | |
477 | (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-" | |
0ed99053 | 478 | version ".tar.xz")) |
7708557f PW |
479 | (sha256 |
480 | (base32 | |
0ed99053 | 481 | "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y")))) |
7708557f | 482 | (native-inputs `(("pkg-config" ,pkg-config))) |
7708557f PW |
483 | (inputs |
484 | `(("poppler" ,poppler) | |
3bbd6469 | 485 | ("zathura" ,zathura))) |
0ed99053 | 486 | (build-system meson-build-system) |
7708557f | 487 | (arguments |
0ed99053 | 488 | `(#:tests? #f ; package does not include tests |
7708557f | 489 | #:phases |
0ed99053 TGR |
490 | (modify-phases %standard-phases |
491 | (add-after 'unpack 'patch-plugin-directory | |
492 | ;; Something of a regression in 0.2.9: the new Meson build system | |
493 | ;; now hard-codes an incorrect plugin directory. Fix it. | |
494 | (lambda* (#:key outputs #:allow-other-keys) | |
495 | (substitute* "meson.build" | |
496 | (("(install_dir:).*" _ key) | |
497 | (string-append key | |
498 | "'" (assoc-ref outputs "out") "/lib/zathura'\n"))) | |
499 | #t))))) | |
7708557f PW |
500 | (home-page "https://pwmt.org/projects/zathura-pdf-poppler/") |
501 | (synopsis "PDF support for zathura (poppler backend)") | |
502 | (description "The zathura-pdf-poppler plugin adds PDF support to zathura | |
503 | by using the poppler rendering engine.") | |
504 | (license license:zlib))) | |
505 | ||
3e40bb82 PW |
506 | (define-public zathura |
507 | (package | |
508 | (name "zathura") | |
d514f601 | 509 | (version "0.4.0") |
3e40bb82 PW |
510 | (source (origin |
511 | (method url-fetch) | |
512 | (uri | |
513 | (string-append "https://pwmt.org/projects/zathura/download/zathura-" | |
eb6a5dab | 514 | version ".tar.xz")) |
3e40bb82 PW |
515 | (sha256 |
516 | (base32 | |
d514f601 | 517 | "1j0yah09adv3bsjhhbqra5lambal32svk8fxmf89wwmcqrcr4qma")) |
fc1adab1 AK |
518 | (patches (search-patches |
519 | "zathura-plugindir-environment-variable.patch")))) | |
3e40bb82 | 520 | (native-inputs `(("pkg-config" ,pkg-config) |
f2984d70 | 521 | ("gettext" ,gettext-minimal) |
ac847543 MB |
522 | ("glib:bin" ,glib "bin") |
523 | ||
eb6a5dab TGR |
524 | ;; For building documentation. |
525 | ("python-sphinx" ,python-sphinx) | |
526 | ||
ac847543 MB |
527 | ;; For tests. |
528 | ("check" ,check) | |
60ecc10f | 529 | ("xorg-server" ,xorg-server-for-tests))) |
1d9032fc MB |
530 | (inputs `(("sqlite" ,sqlite))) |
531 | ;; Listed in 'Requires.private' of 'zathura.pc'. | |
532 | (propagated-inputs `(("cairo" ,cairo) | |
533 | ("girara" ,girara))) | |
3e40bb82 PW |
534 | (native-search-paths |
535 | (list (search-path-specification | |
536 | (variable "ZATHURA_PLUGIN_PATH") | |
537 | (files '("lib/zathura"))))) | |
eb6a5dab | 538 | (build-system meson-build-system) |
3e40bb82 | 539 | (arguments |
eb6a5dab | 540 | `(#:phases (modify-phases %standard-phases |
ac847543 MB |
541 | (add-before 'check 'start-xserver |
542 | ;; Tests require a running X server. | |
543 | (lambda* (#:key inputs #:allow-other-keys) | |
544 | (let ((xorg-server (assoc-ref inputs "xorg-server")) | |
545 | (display ":1")) | |
546 | (setenv "DISPLAY" display) | |
f0eba502 MB |
547 | |
548 | ;; On busy machines, tests may take longer than | |
549 | ;; the default of four seconds. | |
550 | (setenv "CK_DEFAULT_TIMEOUT" "20") | |
551 | ||
ac847543 MB |
552 | ;; Don't fail due to missing '/etc/machine-id'. |
553 | (setenv "DBUS_FATAL_WARNINGS" "0") | |
554 | (zero? (system (string-append xorg-server "/bin/Xvfb " | |
555 | display " &"))))))))) | |
3e40bb82 PW |
556 | (home-page "https://pwmt.org/projects/zathura/") |
557 | (synopsis "Lightweight keyboard-driven PDF viewer") | |
558 | (description "Zathura is a customizable document viewer. It provides a | |
559 | minimalistic interface and an interface that mainly focuses on keyboard | |
560 | interaction.") | |
561 | (license license:zlib))) | |
562 | ||
0f28ee34 LC |
563 | (define-public podofo |
564 | (package | |
565 | (name "podofo") | |
22f00388 | 566 | (version "0.9.6") |
0f28ee34 LC |
567 | (source (origin |
568 | (method url-fetch) | |
de67e922 LF |
569 | (uri (string-append "mirror://sourceforge/podofo/podofo/" version |
570 | "/podofo-" version ".tar.gz")) | |
0f28ee34 LC |
571 | (sha256 |
572 | (base32 | |
37751b48 RW |
573 | "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")) |
574 | (patches (search-patches "podofo-cmake-3.12.patch")))) | |
0f28ee34 | 575 | (build-system cmake-build-system) |
22f00388 EF |
576 | (native-inputs |
577 | `(("cppunit" ,cppunit) | |
578 | ("pkg-config" ,pkg-config))) | |
579 | (inputs | |
580 | `(("libjpeg" ,libjpeg) | |
0f28ee34 | 581 | ("libtiff" ,libtiff) |
22f00388 | 582 | ("fontconfig" ,fontconfig) |
0f28ee34 | 583 | ("freetype" ,freetype) |
22f00388 EF |
584 | ("libpng" ,libpng) |
585 | ("lua" ,lua-5.1) | |
586 | ("openssl" ,openssl) | |
0f28ee34 | 587 | ("zlib" ,zlib))) |
cb6a14ba AE |
588 | (arguments |
589 | `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON" | |
dde70926 AE |
590 | "-DPODOFO_BUILD_STATIC=ON") |
591 | #:phases | |
dc1d3cde KK |
592 | (modify-phases %standard-phases |
593 | (add-before 'configure 'patch | |
594 | (lambda* (#:key inputs #:allow-other-keys) | |
595 | (let ((freetype (assoc-ref inputs "freetype"))) | |
596 | ;; Look for freetype include files in the correct place. | |
597 | (substitute* "cmake/modules/FindFREETYPE.cmake" | |
598 | (("/usr/local") freetype))) | |
599 | #t))))) | |
0f28ee34 LC |
600 | (home-page "http://podofo.sourceforge.net") |
601 | (synopsis "Tools to work with the PDF file format") | |
602 | (description | |
603 | "PoDoFo is a C++ library and set of command-line tools to work with the | |
604 | PDF file format. It can parse PDF files and load them into memory, and makes | |
605 | it easy to modify them and write the changes to disk. It is primarily useful | |
606 | for applications that wish to do lower level manipulation of PDF, such as | |
607 | extracting content or merging files.") | |
608 | (license license:lgpl2.0+))) | |
c0b390ed MB |
609 | |
610 | (define-public mupdf | |
611 | (package | |
612 | (name "mupdf") | |
b1435fe7 | 613 | (version "1.14.0") |
c0b390ed MB |
614 | (source |
615 | (origin | |
616 | (method url-fetch) | |
76379dca | 617 | (uri (string-append "https://mupdf.com/downloads/archive/" |
dab2542f | 618 | name "-" version "-source.tar.xz")) |
c0b390ed | 619 | (sha256 |
c41d97be | 620 | (base32 |
b1435fe7 | 621 | "1psnz02w5p7wc1s1ma7vvjmkjfy641xvsh9ykaqzkk84dflnjgk0")) |
c0b390ed | 622 | (modules '((guix build utils))) |
b1435fe7 EF |
623 | (snippet |
624 | ;; We keep lcms2 since it is different than our lcms. | |
625 | '(begin | |
626 | (for-each | |
627 | (lambda (dir) | |
628 | (delete-file-recursively (string-append "thirdparty/" dir))) | |
629 | '("curl" "freeglut" "freetype" "harfbuzz" "jbig2dec" | |
630 | "libjpeg" "mujs" "openjpeg" "zlib")) | |
631 | #t)))) | |
c0b390ed MB |
632 | (build-system gnu-build-system) |
633 | (inputs | |
634 | `(("curl" ,curl) | |
dab2542f | 635 | ("freeglut" ,freeglut) |
c0b390ed | 636 | ("freetype" ,freetype) |
c41d97be | 637 | ("harfbuzz" ,harfbuzz) |
c0b390ed MB |
638 | ("jbig2dec" ,jbig2dec) |
639 | ("libjpeg" ,libjpeg) | |
640 | ("libx11" ,libx11) | |
641 | ("libxext" ,libxext) | |
1650cf92 | 642 | ("mujs" ,mujs) |
c41d97be | 643 | ("openjpeg" ,openjpeg) |
c0b390ed MB |
644 | ("openssl" ,openssl) |
645 | ("zlib" ,zlib))) | |
646 | (native-inputs | |
647 | `(("pkg-config" ,pkg-config))) | |
648 | (arguments | |
8e755b1b AE |
649 | '(#:tests? #f ; no check target |
650 | #:make-flags (list "CC=gcc" | |
651 | "XCFLAGS=-fpic" | |
b1435fe7 EF |
652 | "USE_SYSTEM_LIBS=yes" |
653 | "USE_SYSTEM_MUJS=yes" | |
8e755b1b AE |
654 | (string-append "prefix=" (assoc-ref %outputs "out"))) |
655 | #:phases (modify-phases %standard-phases | |
656 | (delete 'configure)))) | |
76379dca | 657 | (home-page "https://mupdf.com") |
2274b816 | 658 | (synopsis "Lightweight PDF viewer and toolkit") |
c0b390ed MB |
659 | (description |
660 | "MuPDF is a C library that implements a PDF and XPS parsing and | |
661 | rendering engine. It is used primarily to render pages into bitmaps, | |
662 | but also provides support for other operations such as searching and | |
663 | listing the table of contents and hyperlinks. | |
664 | ||
665 | The library ships with a rudimentary X11 viewer, and a set of command | |
7e0d513f EF |
666 | line tools for batch rendering @command{pdfdraw}, rewriting files |
667 | @command{pdfclean}, and examining the file structure @command{pdfshow}.") | |
e726f093 EF |
668 | (license (list license:agpl3+ |
669 | license:bsd-3 ; resources/cmaps | |
670 | license:x11 ; thirdparty/lcms2 | |
671 | license:silofl1.1 ; resources/fonts/{han,noto,sil,urw} | |
672 | license:asl2.0)))) ; resources/fonts/droid | |
765f0ac8 RW |
673 | |
674 | (define-public qpdf | |
675 | (package | |
676 | (name "qpdf") | |
233e7a02 | 677 | (version "8.2.1") |
765f0ac8 RW |
678 | (source (origin |
679 | (method url-fetch) | |
de67e922 LF |
680 | (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version |
681 | "/qpdf-" version ".tar.gz")) | |
8337cb21 EF |
682 | (sha256 |
683 | (base32 | |
233e7a02 | 684 | "1jdb0jj72fjdp6xip4m7yz31r5x13zs7h4smnxsycgw3vbmx6igl")) |
503409b5 LC |
685 | (modules '((guix build utils))) |
686 | (snippet | |
687 | ;; Replace shebang with the bi-lingual shell/Perl trick to remove | |
688 | ;; dependency on Perl. | |
6cbee49d MW |
689 | '(begin |
690 | (substitute* "qpdf/fix-qdf" | |
691 | (("#!/usr/bin/env perl") | |
692 | "\ | |
503409b5 LC |
693 | eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}' |
694 | & eval 'exec perl -wS \"$0\" $argv:q' | |
6cbee49d MW |
695 | if 0;\n")) |
696 | #t)))) | |
765f0ac8 RW |
697 | (build-system gnu-build-system) |
698 | (arguments | |
503409b5 | 699 | `(#:disallowed-references (,perl) |
0adfe0cc EF |
700 | #:phases |
701 | (modify-phases %standard-phases | |
702 | (add-before 'configure 'patch-paths | |
703 | (lambda _ | |
704 | (substitute* "make/libtool.mk" | |
705 | (("SHELL=/bin/bash") | |
706 | (string-append "SHELL=" (which "bash")))) | |
707 | (substitute* (append | |
708 | '("qtest/bin/qtest-driver") | |
709 | (find-files "." "\\.test")) | |
b5e53019 MW |
710 | (("/usr/bin/env") (which "env"))) |
711 | #t))))) | |
765f0ac8 | 712 | (native-inputs |
503409b5 LC |
713 | `(("pkg-config" ,pkg-config) |
714 | ("perl" ,perl))) | |
765f0ac8 | 715 | (propagated-inputs |
e9a9298b MB |
716 | ;; In Requires.private of libqpdf.pc. |
717 | `(("libjpeg-turbo" ,libjpeg-turbo) | |
718 | ("zlib" ,zlib))) | |
765f0ac8 RW |
719 | (synopsis "Command-line tools and library for transforming PDF files") |
720 | (description | |
721 | "QPDF is a command-line program that does structural, content-preserving | |
722 | transformations on PDF files. It could have been called something like | |
723 | pdf-to-pdf. It includes support for merging and splitting PDFs and to | |
724 | manipulate the list of pages in a PDF file. It is not a PDF viewer or a | |
725 | program capable of converting PDF into other formats.") | |
e9a9298b MB |
726 | ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0. |
727 | ;; Users can still choose to use the old license at their option. | |
728 | (license (list license:asl2.0 license:clarified-artistic)) | |
765f0ac8 | 729 | (home-page "http://qpdf.sourceforge.net/"))) |
7ad608e4 RW |
730 | |
731 | (define-public xournal | |
732 | (package | |
733 | (name "xournal") | |
d0e888c3 | 734 | (version "0.4.8.2016") |
7ad608e4 RW |
735 | (source |
736 | (origin | |
737 | (method url-fetch) | |
de67e922 LF |
738 | (uri (string-append "mirror://sourceforge/xournal/xournal/" version |
739 | "/xournal-" version ".tar.gz")) | |
7ad608e4 RW |
740 | (sha256 |
741 | (base32 | |
d0e888c3 | 742 | "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j")))) |
7ad608e4 RW |
743 | (build-system gnu-build-system) |
744 | (inputs | |
745 | `(("gtk" ,gtk+-2) | |
746 | ("pango" ,pango) | |
747 | ("poppler" ,poppler) | |
748 | ("glib" ,glib) | |
749 | ("libgnomecanvas" ,libgnomecanvas))) | |
750 | (native-inputs | |
751 | `(("pkg-config" ,pkg-config))) | |
752 | (home-page "http://xournal.sourceforge.net/") | |
753 | (synopsis "Notetaking using a stylus") | |
754 | (description | |
755 | "Xournal is an application for notetaking, sketching, keeping a journal | |
756 | using a stylus.") | |
757 | (license license:gpl2+))) | |
3fa2dc27 MB |
758 | |
759 | (define-public python-reportlab | |
760 | (package | |
761 | (name "python-reportlab") | |
02861325 | 762 | (version "3.4.0") |
3fa2dc27 MB |
763 | (source (origin |
764 | (method url-fetch) | |
765 | (uri (pypi-uri "reportlab" version)) | |
766 | (sha256 | |
767 | (base32 | |
02861325 | 768 | "0hy304pzsz9lblmk7mrbk2682bi911lxgvzx2kcfpmfzb5gg7sjv")))) |
3fa2dc27 | 769 | (build-system python-build-system) |
9e378e6a MB |
770 | (arguments |
771 | '(;; FIXME: There is one test failure, but it does not cause the | |
772 | ;; build to fail. No time to investigate right now. | |
773 | #:test-target "tests")) | |
3fa2dc27 MB |
774 | (propagated-inputs |
775 | `(("python-pillow" ,python-pillow))) | |
16c76cc4 | 776 | (home-page "https://www.reportlab.com") |
3fa2dc27 MB |
777 | (synopsis "Python library for generating PDFs and graphics") |
778 | (description "This is the ReportLab PDF Toolkit. It allows rapid creation | |
779 | of rich PDF documents, and also creation of charts in a variety of bitmap and | |
780 | vector formats.") | |
d8013ee2 | 781 | (license license:bsd-3))) |
3fa2dc27 MB |
782 | |
783 | (define-public python2-reportlab | |
d8013ee2 | 784 | (package-with-python2 python-reportlab)) |
8d4169a1 LC |
785 | |
786 | (define-public impressive | |
787 | (package | |
788 | (name "impressive") | |
7d8baff9 | 789 | (version "0.12.0") |
8d4169a1 LC |
790 | (source (origin |
791 | (method url-fetch) | |
792 | (uri (string-append | |
793 | "mirror://sourceforge/impressive/Impressive/" | |
794 | version "/Impressive-" version ".tar.gz")) | |
795 | (sha256 | |
796 | (base32 | |
7d8baff9 | 797 | "0zaqq3yvd296mfr5bxpj2hqlk7vrb0rsbgd4dc1l5ag46giqvivx")))) |
8d4169a1 LC |
798 | (build-system python-build-system) |
799 | ||
800 | ;; TODO: Add dependency on pdftk. | |
ed9b09e4 | 801 | (inputs `(("python2-pygame" ,python2-pygame) |
8d4169a1 LC |
802 | ("python2-pillow" ,python2-pillow) |
803 | ("sdl" ,sdl) | |
804 | ("xpdf" ,xpdf))) | |
805 | ||
806 | (arguments | |
807 | `(#:python ,python-2 | |
808 | #:phases (modify-phases %standard-phases | |
809 | (delete 'build) | |
810 | (delete 'configure) | |
811 | (delete 'check) | |
812 | (replace 'install | |
813 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
814 | ;; There's no 'setup.py' so install things manually. | |
815 | (let* ((out (assoc-ref outputs "out")) | |
816 | (bin (string-append out "/bin")) | |
817 | (man1 (string-append out "/share/man/man1")) | |
818 | (sdl (assoc-ref inputs "sdl")) | |
819 | (xpdf (assoc-ref inputs "xpdf"))) | |
820 | (mkdir-p bin) | |
821 | (copy-file "impressive.py" | |
822 | (string-append bin "/impressive")) | |
823 | (wrap-program (string-append bin "/impressive") | |
824 | `("LIBRARY_PATH" ":" prefix ;for ctypes | |
825 | (,(string-append sdl "/lib"))) | |
826 | `("PATH" ":" prefix ;for pdftoppm | |
827 | (,(string-append xpdf "/bin")))) | |
8d4169a1 LC |
828 | (install-file "impressive.1" man1) |
829 | #t)))))) | |
830 | (home-page "http://impressive.sourceforge.net") | |
831 | (synopsis "PDF presentation tool with visual effects") | |
832 | (description | |
833 | "Impressive is a tool to display PDF files that provides visual effects | |
834 | such as smooth alpha-blended slide transitions. It provides additional tools | |
835 | such as zooming, highlighting an area of the screen, and a tool to navigate | |
836 | the PDF pages.") | |
837 | (license license:gpl2))) | |
f3e22216 JL |
838 | |
839 | (define-public fbida | |
840 | (package | |
841 | (name "fbida") | |
842 | (version "2.12") | |
843 | (home-page "https://www.kraxel.org/blog/linux/fbida/") | |
844 | (source (origin | |
845 | (method url-fetch) | |
846 | (uri (string-append "https://www.kraxel.org/releases/fbida/" | |
847 | name "-" version ".tar.gz")) | |
848 | (sha256 | |
849 | (base32 | |
850 | "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk")))) | |
851 | (build-system gnu-build-system) | |
852 | (arguments | |
dc1d3cde KK |
853 | '(#:phases |
854 | (modify-phases %standard-phases | |
855 | (add-after 'unpack 'patch-ldconfig | |
856 | (lambda _ | |
857 | (substitute* "mk/Autoconf.mk" | |
858 | (("/sbin/ldconfig -p") "echo lib")) #t)) | |
859 | (delete 'configure)) | |
f3e22216 JL |
860 | #:tests? #f |
861 | #:make-flags (list "CC=gcc" | |
862 | (string-append "prefix=" (assoc-ref %outputs "out"))))) | |
863 | (inputs `(("libjpeg" ,libjpeg) | |
864 | ("curl" ,curl) | |
865 | ("libtiff" ,libtiff) | |
866 | ("libudev" ,eudev) | |
867 | ("libwebp" ,libwebp) | |
868 | ("libdrm" ,libdrm) | |
869 | ("imagemagick" ,imagemagick) | |
870 | ("giflib" ,giflib) | |
871 | ("glib" ,glib) | |
872 | ("cairo-xcb" ,cairo-xcb) | |
873 | ("freetype" ,freetype) | |
874 | ("fontconfig" ,fontconfig) | |
875 | ("libexif" ,libexif) | |
876 | ("mesa" ,mesa) | |
877 | ("libepoxy" ,libepoxy) | |
878 | ("libpng" ,libpng) | |
879 | ("poppler" ,poppler))) | |
880 | (native-inputs `(("pkg-config" ,pkg-config))) | |
881 | (synopsis "Framebuffer and drm-based image viewer") | |
882 | (description | |
883 | "fbida contains a few applications for viewing and editing images on | |
884 | the framebuffer.") | |
885 | ||
886 | (license license:gpl2+))) | |
5d68e9d6 AI |
887 | |
888 | (define-public pdf2svg | |
889 | (package | |
890 | (name "pdf2svg") | |
891 | (version "0.2.3") | |
892 | (source (origin | |
1300dc4b RW |
893 | (method git-fetch) |
894 | (uri (git-reference | |
895 | (url "https://github.com/dawbarton/pdf2svg.git") | |
896 | (commit (string-append "v" version)))) | |
897 | (file-name (git-file-name name version)) | |
5d68e9d6 AI |
898 | (sha256 |
899 | (base32 | |
1300dc4b | 900 | "14ffdm4y26imq99wjhkrhy9lp33165xci1l5ndwfia8hz53bl02k")))) |
5d68e9d6 AI |
901 | (build-system gnu-build-system) |
902 | (inputs | |
903 | `(("cairo" ,cairo) | |
904 | ("poppler" ,poppler))) | |
905 | (native-inputs | |
906 | `(("pkg-config" ,pkg-config))) | |
907 | (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/") | |
908 | (synopsis "PDF to SVG converter") | |
909 | (description "@command{pdf2svg} is a simple command-line PDF to SVG | |
910 | converter using the Poppler and Cairo libraries.") | |
911 | (license license:gpl2+))) | |
ad5a7d49 HG |
912 | |
913 | (define-public python-pypdf2 | |
914 | (package | |
915 | (name "python-pypdf2") | |
916 | (version "1.26.0") | |
917 | (source (origin | |
918 | (method url-fetch) | |
919 | (uri (pypi-uri "PyPDF2" version)) | |
920 | (sha256 | |
921 | (base32 | |
922 | "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2")))) | |
923 | (build-system python-build-system) | |
924 | (arguments | |
925 | `(#:phases | |
926 | (modify-phases %standard-phases | |
927 | (add-after | |
928 | 'unpack 'patch-test-suite | |
929 | (lambda _ | |
930 | ;; The text-file needs to be opened in binary mode for Python 3, | |
931 | ;; so patch in the "b" | |
932 | (substitute* "Tests/tests.py" | |
933 | (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line) | |
934 | (string-append line "b"))) | |
935 | #t)) | |
936 | (replace 'check | |
937 | (lambda _ | |
60b88466 | 938 | (invoke "python" "-m" "unittest" "Tests.tests")))))) |
ad5a7d49 HG |
939 | (home-page "http://mstamy2.github.com/PyPDF2") |
940 | (synopsis "Pure Python PDF toolkit") | |
941 | (description "PyPDF2 is a pure Python PDF library capable of: | |
942 | ||
943 | @enumerate | |
944 | @item extracting document information (title, author, …) | |
945 | @item splitting documents page by page | |
946 | @item merging documents page by page | |
947 | @item cropping pages | |
948 | @item merging multiple pages into a single page | |
949 | @item encrypting and decrypting PDF files | |
950 | @end enumerate | |
951 | ||
952 | By being pure Python, it should run on any Python platform without any | |
953 | dependencies on external libraries. It can also work entirely on | |
954 | @code{StringIO} objects rather than file streams, allowing for PDF | |
955 | manipulation in memory. It is therefore a useful tool for websites that | |
956 | manage or manipulate PDFs.") | |
957 | (license license:bsd-3))) | |
958 | ||
959 | (define-public python2-pypdf2 | |
960 | (package-with-python2 python-pypdf2)) | |
c68e8591 HG |
961 | |
962 | (define-public python2-pypdf | |
963 | (package | |
964 | (name "python2-pypdf") | |
965 | (version "1.13") | |
966 | (source (origin | |
967 | (method url-fetch) | |
968 | (uri (pypi-uri "pyPdf" version)) | |
969 | (sha256 | |
970 | (base32 | |
971 | "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s")))) | |
972 | (build-system python-build-system) | |
973 | (arguments | |
974 | `(#:tests? #f ; no tests | |
975 | #:python ,python-2)) | |
976 | (home-page "http://pybrary.net/pyPdf/") | |
977 | (synopsis "Pure Python PDF toolkit") | |
978 | (description "PyPDF2 is a pure Python PDF toolkit. | |
979 | ||
980 | Note: This module isn't maintained anymore. For new projects please use | |
981 | python-pypdf2 instead.") | |
982 | (license license:bsd-3))) | |
99abcdbd HG |
983 | |
984 | (define-public pdfposter | |
985 | (package | |
986 | (name "pdfposter") | |
987 | (version "0.6.0") | |
988 | (source (origin | |
989 | (method url-fetch) | |
990 | (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2")) | |
991 | (sha256 | |
992 | (base32 | |
993 | "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma")))) | |
994 | (build-system python-build-system) | |
995 | (arguments | |
996 | `(#:tests? #f ; no test suite, only for visual control | |
997 | #:python ,python-2)) | |
998 | (inputs | |
999 | ;; pdfposter 0.6.0 still uses the old pyPdf | |
1000 | `(("python2-pypdf" ,python2-pypdf))) | |
99abcdbd HG |
1001 | (home-page "https://pythonhosted.org/pdftools.pdfposter/") |
1002 | (synopsis "Scale and tile PDF images/pages to print on multiple pages") | |
1003 | (description "@command{pdfposter} can be used to create a large poster by | |
1004 | building it from multple pages and/or printing it on large media. It expects | |
1005 | as input a PDF file, normally printing on a single page. The output is again | |
1006 | a PDF file, maybe containing multiple pages together building the poster. The | |
1007 | input page will be scaled to obtain the desired size. | |
1008 | ||
1009 | This is much like @command{poster} does for Postscript files, but working with | |
1010 | PDF. Since sometimes @command{poster} does not like your files converted from | |
1011 | PDF. Indeed @command{pdfposter} was inspired by @command{poster}.") | |
1012 | (license license:gpl3+))) | |
e05fc441 RS |
1013 | |
1014 | (define-public pdfgrep | |
1015 | (package | |
1016 | (name "pdfgrep") | |
7da4dbb3 | 1017 | (version "2.1.2") |
e05fc441 RS |
1018 | (source |
1019 | (origin | |
1020 | (method url-fetch) | |
1021 | (uri (string-append "https://pdfgrep.org/download/" | |
1022 | name "-" version ".tar.gz")) | |
1023 | (sha256 | |
1024 | (base32 | |
7da4dbb3 | 1025 | "1fia10djcxxl7n9jw2prargw4yzbykk6izig2443ycj9syhxrwqf")))) |
e05fc441 RS |
1026 | (build-system gnu-build-system) |
1027 | (native-inputs | |
1028 | `(("pkg-config" ,pkg-config))) | |
1029 | (inputs | |
1030 | `(("libgcrypt" ,libgcrypt) | |
1031 | ("pcre" ,pcre) | |
1032 | ("poppler" ,poppler))) | |
1033 | (home-page "https://pdfgrep.org") | |
1034 | (synopsis "Command-line utility to search text in PDF files") | |
1035 | (description | |
1036 | "Pdfgrep searches in pdf files for strings matching a regular expression. | |
1037 | Support some GNU grep options as file name output, page number output, | |
1038 | optional case insensitivity, count occurrences, color highlights and search in | |
1039 | multiple files.") | |
1040 | (license license:gpl2+))) | |
e2ec95c4 RW |
1041 | |
1042 | (define-public pdfpc | |
1043 | (package | |
1044 | (name "pdfpc") | |
1045 | (version "4.2.1") | |
1046 | (source | |
1047 | (origin | |
1048 | (method git-fetch) | |
1049 | (uri (git-reference | |
1050 | (url "https://github.com/pdfpc/pdfpc.git") | |
1051 | (commit (string-append "v" version)))) | |
1052 | (file-name (git-file-name name version)) | |
1053 | (sha256 | |
1054 | (base32 | |
1055 | "1rmsrpf5vlqhnyyrhq8apndny88ld2qvfjx6258653pqbimv7mx5")))) | |
1056 | (build-system cmake-build-system) | |
1057 | (arguments '(#:tests? #f)) ; no test target | |
1058 | (inputs | |
1059 | `(("cairo" ,cairo) | |
1060 | ("gtk+" ,gtk+) | |
1061 | ("gstreamer" ,gstreamer) | |
1062 | ("gst-plugins-base" ,gst-plugins-base) | |
1063 | ("libgee" ,libgee) | |
1064 | ("poppler" ,poppler) | |
1065 | ("pango" ,pango) | |
1066 | ("vala" ,vala))) | |
1067 | (native-inputs | |
1068 | `(("pkg-config" ,pkg-config))) | |
1069 | (home-page "https://pdfpc.github.io/") | |
1070 | (synopsis "Presenter console with multi-monitor support for PDF files") | |
1071 | (description | |
1072 | "pdfpc is a presentation viewer application which uses multi-monitor | |
1073 | output to provide meta information to the speaker during the presentation. It | |
1074 | is able to show a normal presentation window on one screen, while showing a | |
1075 | more sophisticated overview on the other one providing information like a | |
1076 | picture of the next slide, as well as the left over time till the end of the | |
1077 | presentation. The input files processed by pdfpc are PDF documents.") | |
1078 | (license license:gpl2+))) | |
a773f141 RW |
1079 | |
1080 | (define-public paps | |
11627ca5 RW |
1081 | (let ((commit "37e6ca1cd96d751bbbff5539d795c90d657289a5") |
1082 | (revision "1")) | |
1083 | (package | |
1084 | (name "paps") | |
1085 | ;; The last release was in 2015, but since then there have been security | |
1086 | ;; bug fixes. | |
1087 | (version (git-version "0.7.0" revision commit)) | |
1088 | (source | |
1089 | (origin | |
1090 | (method git-fetch) | |
1091 | (uri (git-reference | |
1092 | (url "https://github.com/dov/paps.git") | |
1093 | (commit commit))) | |
1094 | (file-name (git-file-name name version)) | |
1095 | (sha256 | |
1096 | (base32 | |
1097 | "1ilcyjqdynxsd2p8dnn8h4592dwf531x9pbkxa1w09hkcdn7hgwc")))) | |
1098 | (build-system gnu-build-system) | |
1099 | (arguments | |
1100 | `(#:phases | |
1101 | (modify-phases %standard-phases | |
1102 | (add-after 'unpack 'do-not-run-configure-script-during-bootstrap | |
1103 | (lambda _ | |
1104 | (substitute* "autogen.sh" | |
1105 | (("^./configure") "#")) | |
1106 | #t))))) | |
1107 | (inputs | |
1108 | `(("pango" ,pango))) | |
1109 | (native-inputs | |
1110 | `(("autoconf" ,autoconf) | |
1111 | ("automake" ,automake) | |
1112 | ("gettext" ,gettext-minimal) | |
1113 | ("glib" ,glib "bin") | |
1114 | ("intltool" ,intltool) | |
1115 | ("pkg-config" ,pkg-config))) | |
1116 | (home-page "https://github.com/dov/paps") | |
1117 | (synopsis "Pango to PostScript converter") | |
1118 | (description | |
1119 | "Paps reads a UTF-8 encoded file and generates a PostScript language | |
a773f141 RW |
1120 | rendering of the file. The rendering is done by creating outline curves |
1121 | through the Pango @code{ft2} backend.") | |
11627ca5 | 1122 | (license license:lgpl2.0+)))) |