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