7313ee397476b86bede4f58911accd362296c8b2
[jackhill/guix/guix.git] / gnu / packages / pdf.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
6 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
7 ;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
8 ;;; Coypright © 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Coypright © 2016 Marius Bakke <mbakke@fastmail.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages pdf)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix utils)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system python)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages fontutils)
38 #:use-module (gnu packages ghostscript)
39 #:use-module (gnu packages databases)
40 #:use-module (gnu packages djvu)
41 #:use-module (gnu packages gettext)
42 #:use-module (gnu packages backup)
43 #:use-module (gnu packages lesstif)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages qt)
47 #:use-module (gnu packages xorg)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages gtk)
51 #:use-module (gnu packages lua)
52 #:use-module (gnu packages curl)
53 #:use-module (gnu packages pcre)
54 #:use-module (gnu packages perl)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages tls)
57 #:use-module (srfi srfi-1))
58
59 (define-public poppler
60 (package
61 (name "poppler")
62 (version "0.47.0")
63 (source (origin
64 (method url-fetch)
65 (uri (string-append "https://poppler.freedesktop.org/poppler-"
66 version ".tar.xz"))
67 (sha256
68 (base32
69 "0hnjkcqqk87dw3hlda4gh4l7brkslniax9a79g772jn3iwiffwmq"))))
70 (build-system gnu-build-system)
71 ;; FIXME:
72 ;; use libcurl: no
73 (inputs `(("fontconfig" ,fontconfig)
74 ("freetype" ,freetype)
75 ("libjpeg" ,libjpeg)
76 ("libpng" ,libpng)
77 ("libtiff" ,libtiff)
78 ("lcms" ,lcms)
79 ("openjpeg-1" ,openjpeg-1)
80 ("zlib" ,zlib)
81
82 ;; To build poppler-glib (as needed by Evince), we need Cairo and
83 ;; GLib. But of course, that Cairo must not depend on Poppler.
84 ("cairo" ,(package (inherit cairo)
85 (inputs (alist-delete "poppler"
86 (package-inputs cairo)))))
87 ("glib" ,glib)))
88 (native-inputs
89 `(("pkg-config" ,pkg-config)
90 ("glib" ,glib "bin") ; glib-mkenums, etc.
91 ("gobject-introspection" ,gobject-introspection)))
92 (arguments
93 `(#:tests? #f ; no test data provided with the tarball
94 #:configure-flags
95 '("--enable-xpdf-headers" ; to install header files
96 "--enable-zlib"
97
98 ;; Saves 8 MiB of .a files.
99 "--disable-static")
100 #:phases
101 (modify-phases %standard-phases
102 (add-before 'configure 'setenv
103 (lambda _
104 (setenv "CPATH"
105 (string-append (assoc-ref %build-inputs "openjpeg-1")
106 "/include/openjpeg-1.5"
107 ":" (or (getenv "CPATH") ""))))))))
108 (synopsis "PDF rendering library")
109 (description
110 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
111 (license license:gpl2+)
112 (home-page "https://poppler.freedesktop.org/")))
113
114 (define-public poppler-qt4
115 (package (inherit poppler)
116 (name "poppler-qt4")
117 (inputs `(("qt-4" ,qt-4)
118 ,@(package-inputs poppler)))
119 (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
120
121 (define-public poppler-qt5
122 (package (inherit poppler)
123 (name "poppler-qt5")
124 (inputs `(("qtbase" ,qtbase)
125 ,@(package-inputs poppler)))
126 (arguments
127 (substitute-keyword-arguments (package-arguments poppler)
128 ((#:configure-flags flags)
129 `(cons "CXXFLAGS=-std=gnu++11" ,flags))))
130 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
131
132 (define-public python-poppler-qt4
133 (package
134 (name "python-poppler-qt4")
135 (version "0.24.0")
136 (source
137 (origin
138 (method url-fetch)
139 (uri (string-append "https://pypi.python.org/packages/source/p"
140 "/python-poppler-qt4/python-poppler-qt4-"
141 version ".tar.gz"))
142 (sha256
143 (base32
144 "0x63niylkk4q3h3ay8zrk3m1xiik0x3hlr4gvj7kswx48qi1vb99"))))
145 (build-system python-build-system)
146 (arguments
147 `(#:phases
148 (modify-phases %standard-phases
149 (add-after
150 'unpack 'patch-poppler-include-paths
151 (lambda _
152 (substitute* (find-files "." "poppler-.*\\.sip")
153 (("qt4/poppler-.*\\.h" header)
154 (string-append "poppler/" header)))
155 #t)))))
156 (native-inputs
157 `(("pkg-config" ,pkg-config)))
158 (inputs
159 `(("python-sip" ,python-sip)
160 ("python-pyqt-4" ,python-pyqt-4)
161 ("poppler-qt4" ,poppler-qt4)))
162 (home-page "https://pypi.python.org/pypi/python-poppler-qt4")
163 (synopsis "Python bindings for Poppler-Qt4")
164 (description
165 "This package provides Python bindings for the Qt4 interface of the
166 Poppler PDF rendering library.")
167 (license license:lgpl2.1+)))
168
169 (define-public libharu
170 (package
171 (name "libharu")
172 (version "2.3.0")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append "https://github.com/libharu/libharu/archive/"
176 "RELEASE_"
177 (string-join (string-split version #\.) "_")
178 ".tar.gz"))
179 (file-name (string-append name "-" version ".tar.gz"))
180 (sha256
181 (base32
182 "1lm4v539y9cb1lvbq387j57sy7yxda3yv8b1pk8m6zazbp66i7lg"))))
183 (build-system gnu-build-system)
184 (arguments
185 `(#:configure-flags
186 (list (string-append "--with-zlib="
187 (assoc-ref %build-inputs "zlib"))
188 (string-append "--with-png="
189 (assoc-ref %build-inputs "libpng")))
190 #:phases
191 (modify-phases %standard-phases
192 (add-before 'configure 'autogen
193 (lambda _ (zero? (system* "autoreconf" "-vif")))))))
194 (inputs
195 `(("zlib" ,zlib)
196 ("libpng" ,libpng)))
197 (native-inputs
198 `(("autoconf" ,autoconf)
199 ("automake" ,automake)
200 ("libtool" ,libtool)))
201 (home-page "http://libharu.org/")
202 (synopsis "Library for generating PDF files")
203 (description
204 "libHaru is a library for generating PDF files. libHaru does not support
205 reading and editing of existing PDF files.")
206 (license license:zlib)))
207
208 (define-public xpdf
209 (package
210 (name "xpdf")
211 (version "3.04")
212 (source (origin
213 (method url-fetch)
214 (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
215 version ".tar.gz"))
216 (sha256 (base32
217 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
218 (build-system gnu-build-system)
219 (inputs `(("freetype" ,freetype)
220 ("gs-fonts" ,gs-fonts)
221 ("lesstif" ,lesstif)
222 ("libpaper" ,libpaper)
223 ("libx11" ,libx11)
224 ("libxext" ,libxext)
225 ("libxp" ,libxp)
226 ("libxpm" ,libxpm)
227 ("libxt" ,libxt)
228 ("libpng" ,libpng)
229 ("zlib" ,zlib)))
230 (arguments
231 `(#:tests? #f ; there is no check target
232 #:parallel-build? #f ; build fails randomly on 8-way machines
233 #:configure-flags
234 (list (string-append "--with-freetype2-includes="
235 (assoc-ref %build-inputs "freetype")
236 "/include/freetype2"))
237 #:phases
238 (alist-replace
239 'install
240 (lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
241 (let* ((install (assoc-ref %standard-phases 'install))
242 (out (assoc-ref outputs "out"))
243 (xpdfrc (string-append out "/etc/xpdfrc"))
244 (gs-fonts (assoc-ref inputs "gs-fonts")))
245 (apply install args)
246 (substitute* xpdfrc
247 (("/usr/local/share/ghostscript/fonts")
248 (string-append gs-fonts "/share/fonts/type1/ghostscript"))
249 (("#fontFile") "fontFile"))))
250 %standard-phases)))
251 (synopsis "Viewer for PDF files based on the Motif toolkit")
252 (description
253 "Xpdf is a viewer for Portable Document Format (PDF) files.")
254 (license license:gpl3) ; or gpl2, but not gpl2+
255 (home-page "http://www.foolabs.com/xpdf/")))
256
257 (define-public zathura-cb
258 (package
259 (name "zathura-cb")
260 (version "0.1.5")
261 (source (origin
262 (method url-fetch)
263 (uri
264 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
265 version ".tar.gz"))
266 (sha256
267 (base32
268 "1zbazysdjwwnzw01qlnzyixwmsi8rqskc76mp81qcr3rpl96jprp"))))
269 (native-inputs `(("pkg-config" ,pkg-config)))
270 (propagated-inputs `(("girara" ,girara)))
271 (inputs `(("libarchive" ,libarchive)
272 ("gtk+" ,gtk+)
273 ("zathura" ,zathura)))
274 (build-system gnu-build-system)
275 (arguments
276 `(#:make-flags (list (string-append "PREFIX=" %output)
277 (string-append "PLUGINDIR=" %output "/lib/zathura")
278 "CC=gcc")
279 #:tests? #f ; Package does not contain tests.
280 #:phases
281 (alist-delete 'configure %standard-phases)))
282 (home-page "https://pwmt.org/projects/zathura-cb/")
283 (synopsis "Comic book support for zathura (libarchive backend)")
284 (description "The zathura-cb plugin adds comic book support to zathura
285 using libarchive.")
286 (license license:zlib)))
287
288 (define-public zathura-ps
289 (package
290 (name "zathura-ps")
291 (version "0.2.3")
292 (source (origin
293 (method url-fetch)
294 (uri
295 (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
296 version ".tar.gz"))
297 (sha256
298 (base32
299 "18wsfy8pqficdgj8wy2aws7j4fy8z78157rhqk17mj5f295zgvm9"))))
300 (native-inputs `(("pkg-config" ,pkg-config)))
301 (propagated-inputs `(("girara" ,girara)))
302 (inputs `(("libspectre" ,libspectre)
303 ("gtk+" ,gtk+)
304 ("zathura" ,zathura)))
305 (build-system gnu-build-system)
306 (arguments
307 `(#:make-flags (list (string-append "PREFIX=" %output)
308 (string-append "PLUGINDIR=" %output "/lib/zathura")
309 "CC=gcc")
310 #:tests? #f ; Package does not contain tests.
311 #:phases
312 (alist-delete 'configure %standard-phases)))
313 (home-page "https://pwmt.org/projects/zathura-ps/")
314 (synopsis "PS support for zathura (libspectre backend)")
315 (description "The zathura-ps plugin adds PS support to zathura
316 using libspectre.")
317 (license license:zlib)))
318
319 (define-public zathura-djvu
320 (package
321 (name "zathura-djvu")
322 (version "0.2.5")
323 (source (origin
324 (method url-fetch)
325 (uri
326 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
327 version ".tar.gz"))
328 (sha256
329 (base32
330 "03cw54d2fipvbrnbqy0xccqkx6s77dyhyymx479aj5ryy4513dq8"))))
331 (native-inputs `(("pkg-config" ,pkg-config)))
332 (propagated-inputs `(("girara" ,girara)))
333 (inputs
334 `(("djvulibre" ,djvulibre)
335 ("gtk+" ,gtk+)
336 ("zathura" ,zathura)))
337 (build-system gnu-build-system)
338 (arguments
339 `(#:make-flags (list (string-append "PREFIX=" %output)
340 (string-append "PLUGINDIR=" %output "/lib/zathura")
341 "CC=gcc")
342 #:tests? #f ; Package does not contain tests.
343 #:phases
344 (alist-delete 'configure %standard-phases)))
345 (home-page "https://pwmt.org/projects/zathura-djvu/")
346 (synopsis "DjVu support for zathura (DjVuLibre backend)")
347 (description "The zathura-djvu plugin adds DjVu support to zathura
348 using the DjVuLibre library.")
349 (license license:zlib)))
350
351 (define-public zathura-pdf-poppler
352 (package
353 (name "zathura-pdf-poppler")
354 (version "0.2.6")
355 (source (origin
356 (method url-fetch)
357 (uri
358 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
359 version ".tar.gz"))
360 (sha256
361 (base32
362 "1maqiv7yv8d8hymlffa688c5z71v85kbzmx2j88i8z349xx0rsyi"))))
363 (native-inputs `(("pkg-config" ,pkg-config)))
364 (propagated-inputs `(("girara" ,girara)))
365 (inputs
366 `(("poppler" ,poppler)
367 ("gtk+" ,gtk+)
368 ("zathura" ,zathura)
369 ("cairo" ,cairo)))
370 (build-system gnu-build-system)
371 (arguments
372 `(#:make-flags (list (string-append "PREFIX=" %output)
373 (string-append "PLUGINDIR=" %output "/lib/zathura")
374 "CC=gcc")
375 #:tests? #f ; Package does not include tests.
376 #:phases
377 (alist-delete 'configure %standard-phases)))
378 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
379 (synopsis "PDF support for zathura (poppler backend)")
380 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
381 by using the poppler rendering engine.")
382 (license license:zlib)))
383
384 (define-public zathura
385 (package
386 (name "zathura")
387 (version "0.3.6")
388 (source (origin
389 (method url-fetch)
390 (uri
391 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
392 version ".tar.gz"))
393 (sha256
394 (base32
395 "0fyb5hak0knqvg90rmdavwcmilhnrwgg1s5ykx9wd3skbpi8nsh8"))
396 (patches (search-patches
397 "zathura-plugindir-environment-variable.patch"))))
398 (native-inputs `(("pkg-config" ,pkg-config)
399 ("gettext" ,gnu-gettext)))
400 (inputs `(("girara" ,girara)
401 ("sqlite" ,sqlite)
402 ("gtk+" ,gtk+)))
403 (native-search-paths
404 (list (search-path-specification
405 (variable "ZATHURA_PLUGIN_PATH")
406 (files '("lib/zathura")))))
407 (build-system gnu-build-system)
408 (arguments
409 `(#:make-flags
410 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
411 "CC=gcc" "COLOR=0")
412 #:tests? #f ; Tests fail: "Gtk cannot open display".
413 #:test-target "test"
414 #:phases
415 (alist-delete 'configure %standard-phases)))
416 (home-page "https://pwmt.org/projects/zathura/")
417 (synopsis "Lightweight keyboard-driven PDF viewer")
418 (description "Zathura is a customizable document viewer. It provides a
419 minimalistic interface and an interface that mainly focuses on keyboard
420 interaction.")
421 (license license:zlib)))
422
423 (define-public podofo
424 (package
425 (name "podofo")
426 (version "0.9.3")
427 (source (origin
428 (method url-fetch)
429 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
430 "/podofo-" version ".tar.gz"))
431 (sha256
432 (base32
433 "1n12lbq9x15vqn7dc0hsccp56l5jdff1xrhvlfqlbklxx0qiw9pc"))))
434 (build-system cmake-build-system)
435 (inputs ; TODO: Add cppunit for tests
436 `(("lua" ,lua-5.1)
437 ("libpng" ,libpng)
438 ("openssl" ,openssl)
439 ("fontconfig" ,fontconfig)
440 ("libtiff" ,libtiff)
441 ("libjpeg" ,libjpeg-8)
442 ("freetype" ,freetype)
443 ("zlib" ,zlib)))
444 (arguments
445 `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON"
446 "-DPODOFO_BUILD_STATIC=ON")
447 #:phases
448 (alist-cons-before
449 'configure 'patch
450 (lambda* (#:key inputs #:allow-other-keys)
451 (let ((freetype (assoc-ref inputs "freetype")))
452 ;; Look for freetype include files in the correct place.
453 (substitute* "cmake/modules/FindFREETYPE.cmake"
454 (("/usr/local") freetype))))
455 %standard-phases)))
456 (home-page "http://podofo.sourceforge.net")
457 (synopsis "Tools to work with the PDF file format")
458 (description
459 "PoDoFo is a C++ library and set of command-line tools to work with the
460 PDF file format. It can parse PDF files and load them into memory, and makes
461 it easy to modify them and write the changes to disk. It is primarily useful
462 for applications that wish to do lower level manipulation of PDF, such as
463 extracting content or merging files.")
464 (license license:lgpl2.0+)))
465
466 (define-public mupdf
467 (package
468 (name "mupdf")
469 (version "1.8")
470 (source
471 (origin
472 (method url-fetch)
473 (uri (string-append "http://mupdf.com/downloads/archive/"
474 name "-" version "-source.tar.gz"))
475 (sha256
476 (base32 "01n26cy41lc2fjri63s4js23ixxb4nd37aafry3hz4i4id6wd8x2"))
477 (patches (search-patches "mupdf-CVE-2016-6265.patch"
478 "mupdf-CVE-2016-6525.patch"))
479 (modules '((guix build utils)))
480 (snippet
481 ;; Don't build the bundled-in third party libraries.
482 '(delete-file-recursively "thirdparty"))))
483 (build-system gnu-build-system)
484 (inputs
485 `(("curl" ,curl)
486 ("freetype" ,freetype)
487 ("jbig2dec" ,jbig2dec)
488 ("libjpeg" ,libjpeg)
489 ("libx11" ,libx11)
490 ("libxext" ,libxext)
491 ("openjpeg" ,openjpeg-2.0)
492 ("openssl" ,openssl)
493 ("zlib" ,zlib)))
494 (native-inputs
495 `(("pkg-config" ,pkg-config)))
496 (arguments
497 '(#:tests? #f ; no check target
498 #:make-flags (list "CC=gcc"
499 "XCFLAGS=-fpic"
500 (string-append "prefix=" (assoc-ref %outputs "out")))
501 #:phases (modify-phases %standard-phases
502 (delete 'configure))))
503 (home-page "http://mupdf.com")
504 (synopsis "Lightweight PDF viewer and toolkit")
505 (description
506 "MuPDF is a C library that implements a PDF and XPS parsing and
507 rendering engine. It is used primarily to render pages into bitmaps,
508 but also provides support for other operations such as searching and
509 listing the table of contents and hyperlinks.
510
511 The library ships with a rudimentary X11 viewer, and a set of command
512 line tools for batch rendering (pdfdraw), rewriting files (pdfclean),
513 and examining the file structure (pdfshow).")
514 (license license:agpl3+)))
515
516 (define-public qpdf
517 (package
518 (name "qpdf")
519 (version "6.0.0")
520 (source (origin
521 (method url-fetch)
522 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
523 "/qpdf-" version ".tar.gz"))
524 (sha256
525 (base32
526 "0csj2p2gkxrc0rk8ykymlsdgfas96vzf1dip3y1x7z1q9plwgzd9"))
527 (modules '((guix build utils)))
528 (snippet
529 ;; Replace shebang with the bi-lingual shell/Perl trick to remove
530 ;; dependency on Perl.
531 '(substitute* "qpdf/fix-qdf"
532 (("#!/usr/bin/env perl")
533 "\
534 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
535 & eval 'exec perl -wS \"$0\" $argv:q'
536 if 0;\n")))))
537 (build-system gnu-build-system)
538 (arguments
539 `(#:disallowed-references (,perl)
540 #:phases
541 (modify-phases %standard-phases
542 (add-before 'configure 'patch-paths
543 (lambda _
544 (substitute* "make/libtool.mk"
545 (("SHELL=/bin/bash")
546 (string-append "SHELL=" (which "bash"))))
547 (substitute* (append
548 '("qtest/bin/qtest-driver")
549 (find-files "." "\\.test"))
550 (("/usr/bin/env") (which "env"))))))))
551 (native-inputs
552 `(("pkg-config" ,pkg-config)
553 ("perl" ,perl)))
554 (propagated-inputs
555 `(("pcre" ,pcre)))
556 (inputs
557 `(("zlib" ,zlib)))
558 (synopsis "Command-line tools and library for transforming PDF files")
559 (description
560 "QPDF is a command-line program that does structural, content-preserving
561 transformations on PDF files. It could have been called something like
562 pdf-to-pdf. It includes support for merging and splitting PDFs and to
563 manipulate the list of pages in a PDF file. It is not a PDF viewer or a
564 program capable of converting PDF into other formats.")
565 (license license:clarified-artistic)
566 (home-page "http://qpdf.sourceforge.net/")))
567
568 (define-public xournal
569 (package
570 (name "xournal")
571 (version "0.4.8")
572 (source
573 (origin
574 (method url-fetch)
575 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
576 "/xournal-" version ".tar.gz"))
577 (sha256
578 (base32
579 "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13"))))
580 (build-system gnu-build-system)
581 (inputs
582 `(("gtk" ,gtk+-2)
583 ("pango" ,pango)
584 ("poppler" ,poppler)
585 ("glib" ,glib)
586 ("libgnomecanvas" ,libgnomecanvas)))
587 (native-inputs
588 `(("pkg-config" ,pkg-config)))
589 (home-page "http://xournal.sourceforge.net/")
590 (synopsis "Notetaking using a stylus")
591 (description
592 "Xournal is an application for notetaking, sketching, keeping a journal
593 using a stylus.")
594 (license license:gpl2+)))
595
596 (define-public python-reportlab
597 (package
598 (name "python-reportlab")
599 (version "3.3.0")
600 (source (origin
601 (method url-fetch)
602 (uri (pypi-uri "reportlab" version))
603 (sha256
604 (base32
605 "0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"))))
606 (build-system python-build-system)
607 (arguments
608 ;; Prevent creation of the egg. Without this flag, various artifacts
609 ;; from the build inputs end up in the final python3 output. It also
610 ;; works around https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20765 .
611 `(#:configure-flags '("--single-version-externally-managed" "--root=/")))
612 (propagated-inputs
613 `(("python-pillow" ,python-pillow)))
614 (home-page "http://www.reportlab.com")
615 (synopsis "Python library for generating PDFs and graphics")
616 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
617 of rich PDF documents, and also creation of charts in a variety of bitmap and
618 vector formats.")
619 (license license:bsd-3)
620 (properties `((python2-variant . ,(delay python2-reportlab))))))
621
622 (define-public python2-reportlab
623 (package
624 (inherit (package-with-python2
625 (strip-python2-variant python-reportlab)))
626 (native-inputs `(("python2-pip" ,python2-pip)))))