Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / image.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2014, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
8 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
9 ;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
10 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
12 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
14 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
15 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
16 ;;; Copyright © 2016, 2017 Kei Kebreau <kei@openmailbox.org>
17 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
18 ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
19 ;;;
20 ;;; This file is part of GNU Guix.
21 ;;;
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
26 ;;;
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
31 ;;;
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35 (define-module (gnu packages image)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages algebra)
38 #:use-module (gnu packages assembly)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages compression)
42 #:use-module (gnu packages documentation)
43 #:use-module (gnu packages fontutils)
44 ;; To provide gcc@5 and gcc@6, to work around <http://bugs.gnu.org/24703>.
45 #:use-module (gnu packages gcc)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages ghostscript)
48 #:use-module (gnu packages gl)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages graphics)
51 #:use-module (gnu packages maths)
52 #:use-module (gnu packages mcrypt)
53 #:use-module (gnu packages perl)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages xml)
57 #:use-module (gnu packages xorg)
58 #:use-module (gnu packages zip)
59 #:use-module ((guix licenses) #:prefix license:)
60 #:use-module (guix packages)
61 #:use-module (guix download)
62 #:use-module (guix git-download)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system cmake)
65 #:use-module (srfi srfi-1))
66
67 (define-public libpng
68 (package
69 (name "libpng")
70 (version "1.6.29")
71 (source (origin
72 (method url-fetch)
73 (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
74 version "/libpng-" version ".tar.xz")
75 (string-append
76 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
77 "/libpng16/libpng-" version ".tar.xz")
78 (string-append
79 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
80 "/libpng16/libpng-" version ".tar.xz")))
81 (sha256
82 (base32
83 "0fgjqp7x6jynacmqh6dj72cn6nnf6yxjfqqqfsxrx0pyx22bcia2"))))
84 (build-system gnu-build-system)
85
86 ;; libpng.la says "-lz", so propagate it.
87 (propagated-inputs `(("zlib" ,zlib)))
88
89 (synopsis "Library for handling PNG files")
90 (description
91 "Libpng is the official PNG (Portable Network Graphics) reference
92 library. It supports almost all PNG features and is extensible.")
93 (license license:zlib)
94 (home-page "http://www.libpng.org/pub/png/libpng.html")))
95
96 (define-public libpng-apng
97 (package
98 (inherit libpng)
99 (replacement #f) ;libpng's replacement doesn't apply here
100 (name "libpng-apng")
101 (version (package-version libpng))
102 (arguments
103 `(#:phases
104 (modify-phases %standard-phases
105 (add-after 'unpack 'patch-apng
106 (lambda* (#:key inputs #:allow-other-keys)
107 (define (apply-patch file)
108 (zero? (system* "patch" "-p1" "--force"
109 "--input" file)))
110 (let ((apng.gz (assoc-ref inputs "apng")))
111 (format #t "Applying APNG patch '~a'...~%"
112 apng.gz)
113 (system (string-append "gunzip < " apng.gz " > the-patch"))
114 (and (apply-patch "the-patch")
115 (for-each apply-patch
116 (find-files "\\.patch"))))
117 #t))
118 (add-before 'configure 'no-checks
119 (lambda _
120 (substitute* "Makefile.in"
121 (("^scripts/symbols.chk") "")
122 (("check: scripts/symbols.chk") ""))
123 #t)))))
124 (inputs
125 `(("apng" ,(origin
126 (method url-fetch)
127 (uri
128 (string-append "mirror://sourceforge/libpng-apng/libpng16/"
129 version "/libpng-" version "-apng.patch.gz"))
130 (sha256
131 (base32
132 "026r0gbkf6d6v54wca02cdxln8sj4m2c1yk62sj2aasv2ki2ffh5"))))))
133 (native-inputs
134 `(("libtool" ,libtool)))
135 (synopsis "APNG patch for libpng")
136 (description
137 "APNG (Animated Portable Network Graphics) is an unofficial
138 extension of the APNG (Portable Network Graphics) format.
139 APNG patch provides APNG support to libpng.")
140 (home-page "https://sourceforge.net/projects/libpng-apng/")))
141
142 (define-public libpng-1.2
143 (package
144 (inherit libpng)
145 (version "1.2.57")
146 (source
147 (origin
148 (method url-fetch)
149 (uri (list (string-append "mirror://sourceforge/libpng/libpng12/"
150 version "/libpng-" version ".tar.xz")
151 (string-append
152 "ftp://ftp.simplesystems.org/pub/libpng/png/src"
153 "/libpng12/libpng-" version ".tar.xz")
154 (string-append
155 "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
156 "/libpng12/libpng-" version ".tar.xz")))
157 (sha256
158 (base32 "1n2lrzjkm5jhfg2bs10q398lkwbbx742fi27zgdgx0x23zhj0ihg"))))))
159
160 (define-public pngcrunch
161 (package
162 (name "pngcrunch")
163 (version "1.8.11")
164 (source (origin
165 (method url-fetch)
166 (uri (string-append "mirror://sourceforge/pmt/pngcrush/"
167 version "/pngcrush-" version ".tar.xz"))
168 (sha256 (base32
169 "1c7m316i91jp3h1dj1ppppdv6zilm2njk1wrpqy2zj0fcll06lwd"))))
170 (build-system gnu-build-system)
171 (arguments
172 '(#:make-flags '("-f" "Makefile-nolib")
173 #:tests? #f ; no check target
174 #:phases
175 (modify-phases %standard-phases
176 (replace 'configure
177 (lambda* (#:key inputs outputs #:allow-other-keys)
178 (substitute* "Makefile-nolib"
179 (("^(PNG(INC|LIB) = )/usr/local/" line vardef)
180 (string-append vardef (assoc-ref inputs "libpng") "/"))
181 (("^(Z(INC|LIB) = )/usr/local/" line vardef)
182 (string-append vardef (assoc-ref inputs "zlib") "/"))
183 ;; The Makefile is written by hand and not using $PREFIX
184 (("\\$\\(DESTDIR\\)/usr/")
185 (string-append (assoc-ref outputs "out") "/"))))))))
186 (inputs
187 `(("libpng" ,libpng)
188 ("zlib" , zlib)))
189 (home-page "https://pmt.sourceforge.net/pngcrush")
190 (synopsis "Utility to compress PNG files")
191 (description "pngcrusqh is an optimizer for PNG (Portable Network Graphics)
192 files. It can compress them as much as 40% losslessly.")
193 (license license:zlib)))
194
195 (define-public libjpeg
196 (package
197 (name "libjpeg")
198 (version "9b")
199 (source (origin
200 (method url-fetch)
201 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
202 version ".tar.gz"))
203 (sha256 (base32
204 "0lnhpahgdwlrkd41lx6cr90r199f8mc6ydlh7jznj5klvacd63r4"))))
205 (build-system gnu-build-system)
206 (synopsis "Library for handling JPEG files")
207 (description
208 "Libjpeg implements JPEG image encoding, decoding, and transcoding.
209 JPEG is a standardized compression method for full-color and gray-scale
210 images.
211 The included programs provide conversion between the JPEG format and
212 image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.")
213 (license license:ijg)
214 (home-page "http://www.ijg.org/")))
215
216 (define-public libjpeg-8
217 (package (inherit libjpeg)
218 (version "8d")
219 (source (origin
220 (method url-fetch)
221 (uri (string-append "http://www.ijg.org/files/jpegsrc.v"
222 version ".tar.gz"))
223 (sha256 (base32
224 "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
225
226 (define-public libjxr
227 (package
228 (name "libjxr")
229 (version "1.1")
230 (source (origin
231 ;; We are using the Debian source because CodePlex does not
232 ;; deliver an easily downloadable tarball.
233 (method url-fetch)
234 (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
235 version ".orig.tar.gz"))
236 (sha256
237 (base32
238 "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
239 (patch-flags '("-p1" "--binary"))
240 (patches (search-patches "libjxr-fix-function-signature.patch"
241 "libjxr-fix-typos.patch"))))
242 (build-system gnu-build-system)
243 (arguments '(#:make-flags '("CC=gcc")
244 #:tests? #f ; no check target
245 #:phases
246 (modify-phases %standard-phases
247 (delete 'configure) ; no configure script
248 ;; The upstream makefile does not include an install phase.
249 (replace 'install
250 (lambda* (#:key outputs #:allow-other-keys)
251 (let* ((out (assoc-ref outputs "out"))
252 (bin (string-append out "/bin"))
253 (lib (string-append out "/lib"))
254 (include (string-append out "/include/jxrlib")))
255 (for-each (lambda (file)
256 (install-file file include)
257 (delete-file file))
258 (append
259 '("jxrgluelib/JXRGlue.h"
260 "jxrgluelib/JXRMeta.h"
261 "jxrtestlib/JXRTest.h"
262 "image/sys/windowsmediaphoto.h")
263 (find-files "common/include" "\\.h$")))
264 (for-each (lambda (file)
265 (install-file file lib)
266 (delete-file file))
267 (find-files "." "\\.a$"))
268 (for-each (lambda (file)
269 (install-file file bin)
270 (delete-file file))
271 '("JxrDecApp" "JxrEncApp")))
272 #t)))))
273 (synopsis "Implementation of the JPEG XR standard")
274 (description "JPEG XR is an approved ISO/IEC International standard (its
275 official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
276 (license
277 (license:non-copyleft
278 "file://Makefile"
279 "See the header of the Makefile in the distribution."))
280 (home-page "https://jxrlib.codeplex.com/")))
281
282 (define-public jpegoptim
283 (package
284 (name "jpegoptim")
285 (version "1.4.4")
286 (source (origin
287 (method url-fetch)
288 (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-"
289 version ".tar.gz"))
290 (sha256 (base32
291 "1cn1i0g1xjdwa12w0ifbnzgb1vqbpr8ji6h05vxksj79vyi3x849"))))
292 (build-system gnu-build-system)
293 (inputs `(("libjpeg" ,libjpeg)))
294 (arguments
295 ;; no tests
296 '(#:tests? #f))
297 (synopsis "Optimize JPEG images")
298 (description
299 "jpegoptim provides lossless optimization (based on optimizing
300 the Huffman tables) and \"lossy\" optimization based on setting
301 maximum quality factor.")
302 (license license:gpl2+)
303 (home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim")))
304
305 (define-public libicns
306 (package
307 (name "libicns")
308 (version "0.8.1")
309 (source (origin
310 (method url-fetch)
311 (uri (string-append
312 "mirror://sourceforge/icns/"
313 "libicns-" version ".tar.gz"))
314 (sha256
315 (base32
316 "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
317 (build-system gnu-build-system)
318 (inputs
319 `(("libpng" ,libpng)
320 ("jasper" ,jasper)))
321 (arguments
322 `(#:tests? #t)) ; No tests.
323 (home-page "http://icns.sourceforge.net/")
324 (synopsis "Library for handling Mac OS icns resource files")
325 (description
326 "Libicns is a library for the manipulation of Mac OS IconFamily resource
327 type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
328 convert between PNG and ICNS. @command{icns2png} will extract image files from
329 ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
330 with .desktop files. Additionally, @command{icontainer2png} is provided for
331 extracting icontainer icon files.")
332 (license (list license:lgpl2.1+ ; libicns
333 license:lgpl2.0+ ; src/apidocs.*
334 license:gpl2+)))) ; icns2png, png2icns, icontainer2png
335
336 (define-public libtiff
337 (package
338 (name "libtiff")
339 (version "4.0.8")
340 (source (origin
341 (method url-fetch)
342 (uri (string-append "ftp://download.osgeo.org/libtiff/tiff-"
343 version ".tar.gz"))
344 (patches (search-patches "libtiff-tiffgetfield-bugs.patch"))
345 (sha256
346 (base32
347 "0419mh6kkhz5fkyl77gv0in8x4d2jpdpfs147y8mj86rrjlabmsr"))))
348 (build-system gnu-build-system)
349 (outputs '("out"
350 "doc")) ;1.3 MiB of HTML documentation
351 (arguments
352 ;; Instead of using --docdir, this package has its own --with-docdir.
353 `(#:configure-flags (list (string-append "--with-docdir="
354 (assoc-ref %outputs "doc")
355 "/share/doc/"
356 ,name "-" ,version))))
357 (inputs `(("zlib" ,zlib)
358 ("libjpeg" ,libjpeg)))
359 (synopsis "Library for handling TIFF files")
360 (description
361 "Libtiff provides support for the Tag Image File Format (TIFF), a format
362 used for storing image data.
363 Included are a library, libtiff, for reading and writing TIFF and a small
364 collection of tools for doing simple manipulations of TIFF images.")
365 (license (license:non-copyleft "file://COPYRIGHT"
366 "See COPYRIGHT in the distribution."))
367 (home-page "http://www.simplesystems.org/libtiff/")))
368
369 (define-public libwmf
370 (package
371 (name "libwmf")
372 (version "0.2.8.4")
373 (source
374 (origin
375 (method url-fetch)
376 (uri (string-append "mirror://sourceforge/wvware/"
377 name "/" version
378 "/" name "-" version ".tar.gz"))
379 (sha256
380 (base32 "1y3wba4q8pl7kr51212jwrsz1x6nslsx1gsjml1x0i8549lmqd2v"))
381 (patches
382 (search-patches "libwmf-CAN-2004-0941.patch"
383 "libwmf-CVE-2006-3376.patch"
384 "libwmf-CVE-2007-0455.patch"
385 "libwmf-CVE-2007-2756.patch"
386 "libwmf-CVE-2007-3472.patch"
387 "libwmf-CVE-2007-3473.patch"
388 "libwmf-CVE-2007-3477.patch"
389 "libwmf-CVE-2009-1364.patch"
390 "libwmf-CVE-2009-3546.patch"
391 "libwmf-CVE-2015-0848+CVE-2015-4588.patch"
392 "libwmf-CVE-2015-4695.patch"
393 "libwmf-CVE-2015-4696.patch"))))
394
395 (build-system gnu-build-system)
396 (inputs
397 `(("freetype" ,freetype)
398 ("libjpeg" ,libjpeg)
399 ("libpng",libpng)
400 ("libxml2" ,libxml2)
401 ("zlib" ,zlib)))
402 (native-inputs
403 `(("pkg-config" ,pkg-config)))
404 (synopsis "Library for reading images in the Microsoft WMF format")
405 (description
406 "libwmf is a library for reading vector images in Microsoft's native
407 Windows Metafile Format (WMF) and for either (a) displaying them in, e.g., an X
408 window; or (b) converting them to more standard/free file formats such as, e.g.,
409 the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
410 (home-page "http://wvware.sourceforge.net/libwmf.html")
411
412 ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+.
413 (license license:lgpl2.0+)))
414
415 (define-public leptonica
416 (package
417 (name "leptonica")
418 (version "1.74.4")
419 (source
420 (origin
421 (method url-fetch)
422 (uri (string-append
423 "https://github.com/DanBloomberg/leptonica/archive/" version
424 ".tar.gz"))
425 (file-name (string-append "leptonica-" version ".tar.gz"))
426 (sha256
427 (base32 "10pw7pwccd0m0fc9rlrr2m41s7j1qvba2wcrav17pw1gclkf34i0"))))
428 (build-system gnu-build-system)
429 (native-inputs
430 `(("gnuplot" ,gnuplot) ;needed for test suite
431 ("autoconf" ,autoconf)
432 ("automake" ,automake)
433 ("libtool" ,libtool)
434 ("pkg-config" ,pkg-config)))
435 (inputs
436 `(("giflib" ,giflib)
437 ("libjpeg" ,libjpeg)
438 ("libpng" ,libpng)
439 ("libtiff" ,libtiff)
440 ("libwebp" ,libwebp)))
441 (propagated-inputs
442 ;; Linking a program with leptonica also requires these.
443 `(("openjpeg" ,openjpeg)
444 ("zlib" ,zlib)))
445 (arguments
446 '(#:phases
447 (modify-phases %standard-phases
448 (add-after 'unpack 'autogen
449 (lambda _
450 (zero? (system* "sh" "autobuild"))))
451 (add-after 'unpack 'patch-reg-wrapper
452 (lambda _
453 (substitute* "prog/reg_wrapper.sh"
454 ((" /bin/sh ")
455 (string-append " " (which "sh") " "))
456 (("which gnuplot")
457 "true")))))))
458 (home-page "http://www.leptonica.com/")
459 (synopsis "Library and tools for image processing and analysis")
460 (description
461 "Leptonica is a C library and set of command-line tools for efficient
462 image processing and image analysis operations. It supports rasterop, affine
463 transformations, binary and grayscale morphology, rank order, and convolution,
464 seedfill and connected components, image transformations combining changes in
465 scale and pixel depth, and pixelwise masking, blending, enhancement, and
466 arithmetic ops.")
467 (license license:bsd-2)))
468
469 (define-public jbig2dec
470 (package
471 (name "jbig2dec")
472 (version "0.13")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (string-append "http://downloads.ghostscript.com/public/" name "/"
477 name "-" version ".tar.gz"))
478 (sha256
479 (base32 "04akiwab8iy5iy34razcvh9mcja9wy737civ3sbjxk4j143s1b2s"))
480 (patches (search-patches "jbig2dec-ignore-testtest.patch"
481 "jbig2dec-CVE-2016-9601.patch"
482 "jbig2dec-CVE-2017-7885.patch"
483 "jbig2dec-CVE-2017-7975.patch"
484 "jbig2dec-CVE-2017-7976.patch"))))
485
486 (build-system gnu-build-system)
487 (synopsis "Decoder of the JBIG2 image compression format")
488 (description
489 "JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit
490 monochrome) images at moderately high resolution, and in particular scanned
491 paper documents. In this domain it is very efficient, offering compression
492 ratios on the order of 100:1.
493
494 This is a decoder only implementation, and currently is in the alpha
495 stage, meaning it doesn't completely work yet. However, it is
496 maintaining parity with available encoders, so it is useful for real
497 work.")
498 (home-page "http://www.ghostscript.com/jbig2dec.html")
499 (license license:gpl2+)))
500
501 (define-public openjpeg
502 (package
503 (name "openjpeg")
504 (version "2.1.2")
505 (source
506 (origin
507 (method url-fetch)
508 (uri
509 (string-append "https://github.com/uclouvain/openjpeg/archive/v"
510 version ".tar.gz"))
511 (file-name (string-append name "-" version ".tar.gz"))
512 (sha256
513 (base32
514 "19yz4g0c45sm8y1z01j9djsrl1mkz3pmw7fykc6hkvrqymp7prsc"))
515 (patches (search-patches "openjpeg-CVE-2016-9850-CVE-2016-9851.patch"
516 "openjpeg-CVE-2016-9572-CVE-2016-9573.patch"))))
517 (build-system cmake-build-system)
518 (arguments
519 ;; Trying to run `$ make check' results in a no rule fault.
520 '(#:tests? #f))
521 (inputs
522 `(("lcms" ,lcms)
523 ("libpng" ,libpng)
524 ("libtiff" ,libtiff)
525 ("zlib" ,zlib)))
526 (synopsis "JPEG 2000 codec")
527 (description
528 "The OpenJPEG library is a JPEG 2000 codec written in C. It has
529 been developed in order to promote the use of JPEG 2000, the new
530 still-image compression standard from the Joint Photographic Experts
531 Group (JPEG).
532
533 In addition to the basic codec, various other features are under
534 development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats,
535 an indexing tool useful for the JPIP protocol, JPWL-tools for
536 error-resilience, a Java-viewer for j2k-images, ...")
537 (home-page "https://github.com/uclouvain/openjpeg")
538 (license license:bsd-2)))
539
540 (define-public openjpeg-1
541 (package (inherit openjpeg)
542 (name "openjpeg")
543 (version "1.5.2")
544 (source
545 (origin
546 (method url-fetch)
547 (uri
548 (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
549 name "-" version ".tar.gz"))
550 (sha256
551 (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
552
553 (define-public giflib
554 (package
555 (name "giflib")
556 (version "5.1.4")
557 (source (origin
558 (method url-fetch)
559 (uri (string-append "mirror://sourceforge/giflib/giflib-"
560 version ".tar.bz2"))
561 (sha256
562 (base32
563 "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))))
564 (build-system gnu-build-system)
565 (outputs '("bin" ; utility programs
566 "out")) ; library
567 (inputs `(("libx11" ,libx11)
568 ("libice" ,libice)
569 ("libsm" ,libsm)
570 ("perl" ,perl)))
571 (arguments
572 `(#:phases
573 (modify-phases %standard-phases
574 (add-after 'unpack 'disable-html-doc-gen
575 (lambda _
576 (substitute* "doc/Makefile.in"
577 (("^all: allhtml manpages") ""))))
578 (add-after 'install 'install-manpages
579 (lambda* (#:key outputs #:allow-other-keys)
580 (let* ((bin (assoc-ref outputs "bin"))
581 (man1dir (string-append bin "/share/man/man1")))
582 (mkdir-p man1dir)
583 (for-each (lambda (file)
584 (let ((base (basename file)))
585 (format #t "installing `~a' to `~a'~%"
586 base man1dir)
587 (copy-file file
588 (string-append
589 man1dir "/" base))))
590 (find-files "doc" "\\.1"))))))))
591 (synopsis "Tools and library for working with GIF images")
592 (description
593 "GIFLIB is a library for reading and writing GIF images. It is API and
594 ABI compatible with libungif which was in wide use while the LZW compression
595 algorithm was patented. Tools are also included to convert, manipulate,
596 compose, and analyze GIF images.")
597 (home-page "http://giflib.sourceforge.net/")
598 (license license:x11)))
599
600 (define-public libungif
601 (package
602 (name "libungif")
603 (version "4.1.4")
604 (source (origin
605 (method url-fetch)
606 (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
607 "libungif-" version "/libungif-"
608 version ".tar.bz2"))
609 (sha256
610 (base32
611 "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
612 (build-system gnu-build-system)
613 (inputs `(("perl" ,perl))) ;package ships some perl tools
614 (home-page "http://giflib.sourceforge.net/")
615 (synopsis "GIF decompression library")
616 (description
617 "libungif is the old GIF decompression library by the GIFLIB project.")
618 (license license:expat)))
619
620 (define-public imlib2
621 (package
622 (name "imlib2")
623 (version "1.4.10")
624 (source (origin
625 (method url-fetch)
626 (uri (string-append
627 "mirror://sourceforge/enlightenment/imlib2-src/" version
628 "/imlib2-" version ".tar.bz2"))
629 (sha256
630 (base32
631 "0wm2q2xlkbm71k7mw2jyzbxgzylrkcj5yh6nq58w5gybhp98qs9z"))))
632 (build-system gnu-build-system)
633 (native-inputs
634 `(("pkgconfig" ,pkg-config)))
635 (inputs
636 `(("libx11" ,libx11)
637 ("libxext" ,libxext)
638 ("freetype" ,freetype)
639 ("libjpeg" ,libjpeg)
640 ("libpng" ,libpng)
641 ("libtiff" ,libtiff)
642 ("giflib" ,giflib)
643 ("bzip2" ,bzip2)))
644 (home-page "https://sourceforge.net/projects/enlightenment/")
645 (synopsis
646 "Loading, saving, rendering and manipulating image files")
647 (description
648 "Imlib2 is a library that does image file loading and saving as well as
649 rendering, manipulation, arbitrary polygon support, etc.
650
651 It does ALL of these operations FAST. Imlib2 also tries to be highly
652 intelligent about doing them, so writing naive programs can be done easily,
653 without sacrificing speed.
654
655 This is a complete rewrite over the Imlib 1.x series. The architecture is
656 more modular, simple, and flexible.")
657 (license license:imlib2)))
658
659 (define-public giblib
660 (package
661 (name "giblib")
662 (version "1.2.4")
663 (source (origin
664 (method url-fetch)
665 (uri (list
666 (string-append
667 "http://linuxbrit.co.uk/downloads/giblib-"
668 version ".tar.gz")
669 (string-append
670 "https://sourceforge.net/projects/slackbuildsdirectlinks/"
671 "files/giblib/giblib-" version ".tar.gz")))
672 (sha256
673 (base32
674 "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
675 (build-system gnu-build-system)
676 (inputs
677 `(("libx11" ,libx11)
678 ("imlib2" ,imlib2)))
679 (home-page "http://linuxbrit.co.uk/software/") ; no real home-page
680 (synopsis "Wrapper library for imlib2")
681 (description
682 "Giblib is a simple library which wraps imlib2's context API, avoiding
683 all the context_get/set calls, adds fontstyles to the truetype renderer and
684 supplies a generic doubly-linked list and some string functions.")
685 ;; This license removes a clause about X Consortium from the original
686 ;; X11 license.
687 (license (license:x11-style "file://COPYING"
688 "See 'COPYING' in the distribution."))))
689
690 (define-public freeimage
691 (package
692 (name "freeimage")
693 (version "3.17.0")
694 (source (origin
695 (method url-fetch)
696 (uri (string-append
697 "mirror://sourceforge/freeimage/Source%20Distribution/"
698 version "/FreeImage"
699 (string-concatenate (string-split version #\.))
700 ".zip"))
701 (sha256
702 (base32
703 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"))
704 (patches (search-patches "freeimage-CVE-2015-0852.patch"
705 "freeimage-CVE-2016-5684.patch"
706 "freeimage-fix-build-with-gcc-5.patch"))))
707 (build-system gnu-build-system)
708 (arguments
709 '(#:phases
710 (modify-phases %standard-phases
711 (delete 'configure)
712 (add-before 'build 'patch-makefile
713 (lambda* (#:key outputs #:allow-other-keys)
714 (substitute* "Makefile.gnu"
715 (("/usr") (assoc-ref outputs "out"))
716 (("-o root -g root") ""))
717 #t)))
718 #:make-flags '("CC=gcc")
719 #:tests? #f)) ; no check target
720 (native-inputs
721 `(("unzip" ,unzip)))
722 ;; Fails to build on MIPS due to assembly code in the source.
723 (supported-systems (delete "mips64el-linux" %supported-systems))
724 (synopsis "Library for handling popular graphics image formats")
725 (description
726 "FreeImage is a library for developers who would like to support popular
727 graphics image formats like PNG, BMP, JPEG, TIFF and others.")
728 (license license:gpl2+)
729 (home-page "http://freeimage.sourceforge.net")))
730
731 (define-public vigra
732 (package
733 (name "vigra")
734 (version "1.11.0")
735 (source
736 (origin
737 (method url-fetch)
738 (uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
739 "Version-1-11-0/vigra-"
740 version "-src.tar.gz"))
741 (sha256 (base32
742 "1jzm79kqiiilvys3b8mlzy9cvmiirrcwsrlg19qd9rza8zipsqb8"))))
743 (build-system cmake-build-system)
744 (inputs
745 `(("boost" ,boost)
746 ("fftw" ,fftw)
747 ("fftwf" ,fftwf)
748 ("hdf5" ,hdf5)
749 ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
750 ; to create a configure-flag
751 ("libjpeg" ,libjpeg)
752 ("libpng" ,libpng)
753 ("libtiff" ,libtiff)
754 ("openexr" ,openexr)
755 ("python" ,python-2) ; print syntax
756 ("python2-numpy" ,python2-numpy)
757 ("zlib" ,zlib)))
758 (native-inputs
759 `(("doxygen" ,doxygen)
760 ("python2-nose" ,python2-nose)
761 ("python2-sphinx" ,python2-sphinx)))
762 (arguments
763 `(#:test-target "check"
764 #:parallel-build? #f ; parallel builds trigger an ICE
765 #:configure-flags
766 (list "-Wno-dev" ; suppress developer mode with lots of warnings
767 (string-append "-DVIGRANUMPY_INSTALL_DIR="
768 (assoc-ref %outputs "out")
769 "/lib/python2.7/site-packages")
770 ;; OpenEXR is not enabled by default.
771 "-DWITH_OPENEXR=1"
772 ;; Fix rounding error on 32-bit machines
773 "-DCMAKE_C_FLAGS=-ffloat-store"
774 ;; The header files of ilmbase are not found when included
775 ;; by the header files of openexr, and an explicit flag
776 ;; needs to be set.
777 (string-append "-DCMAKE_CXX_FLAGS=-I"
778 (assoc-ref %build-inputs "ilmbase")
779 "/include/OpenEXR"
780 " -ffloat-store"))))
781 (synopsis "Computer vision library")
782 (description
783 "VIGRA stands for Vision with Generic Algorithms. It is an image
784 processing and analysis library that puts its main emphasis on customizable
785 algorithms and data structures. It is particularly strong for
786 multi-dimensional image processing.")
787 (license license:expat)
788 (home-page "https://hci.iwr.uni-heidelberg.de/vigra")))
789
790 (define-public libwebp
791 (package
792 (name "libwebp")
793 (version "0.6.0")
794 (source
795 (origin
796 (method url-fetch)
797 (uri (string-append
798 "http://downloads.webmproject.org/releases/webp/libwebp-" version
799 ".tar.gz"))
800 (sha256
801 (base32
802 "0h1brwkyxc7lb8lc53aacdks5vc1y9hzngqi41gg7y6l56912a69"))))
803 (build-system gnu-build-system)
804 (inputs
805 `(("freeglut" ,freeglut)
806 ("giflib" ,giflib)
807 ("libjpeg" ,libjpeg)
808 ("libpng" ,libpng)
809 ("libtiff" ,libtiff)))
810 (arguments
811 '(#:configure-flags '("--enable-libwebpmux"
812 "--enable-libwebpdemux"
813 "--enable-libwebpdecoder")))
814 (home-page "https://developers.google.com/speed/webp/")
815 (synopsis "Lossless and lossy image compression")
816 (description
817 "WebP is a new image format that provides lossless and lossy compression
818 for images. WebP lossless images are 26% smaller in size compared to
819 PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
820 equivalent SSIM index. WebP supports lossless transparency (also known as
821 alpha channel) with just 22% additional bytes. Transparency is also supported
822 with lossy compression and typically provides 3x smaller file sizes compared
823 to PNG when lossy compression is acceptable for the red/green/blue color
824 channels.")
825 (license license:bsd-3)))
826
827 (define-public libmng
828 (package
829 (name "libmng")
830 (version "2.0.3")
831 (source (origin
832 (method url-fetch)
833 (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
834 version "/" name "-" version ".tar.xz"))
835 (sha256
836 (base32
837 "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
838 (build-system gnu-build-system)
839 (propagated-inputs
840 ;; These are all in the 'Libs.private' field of libmng.pc.
841 `(("lcms" ,lcms)
842 ("libjpeg" ,libjpeg)
843 ("zlib" ,zlib)))
844 (home-page "http://www.libmng.com/")
845 (synopsis "Library for handling MNG files")
846 (description
847 "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
848 (license license:bsd-3)))
849
850 (define-public exiv2
851 (package
852 (name "exiv2")
853 (version "0.26")
854 (source (origin
855 (method url-fetch)
856 (uri (list (string-append "http://www.exiv2.org/builds/exiv2-"
857 version "-trunk.tar.gz")
858 (string-append "http://www.exiv2.org/exiv2-"
859 version ".tar.gz")
860 (string-append "https://fossies.org/linux/misc/exiv2-"
861 version ".tar.gz")))
862 (sha256
863 (base32
864 "1hsdzlzgkipprqh93yj81mrckl2l7c2mn2i84691pallnjz5qqhc"))))
865 (build-system gnu-build-system)
866 (arguments '(#:tests? #f)) ; no `check' target
867 (propagated-inputs
868 `(("expat" ,expat)
869 ("zlib" ,zlib)))
870 (native-inputs
871 `(("intltool" ,intltool)))
872 (home-page "http://www.exiv2.org/")
873 (synopsis "Library and command-line utility to manage image metadata")
874 (description
875 "Exiv2 is a C++ library and a command line utility to manage image
876 metadata. It provides fast and easy read and write access to the Exif, IPTC
877 and XMP metadata of images in various formats.")
878
879 ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the
880 ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>.
881 ;; The core is GPLv2+:
882 ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
883 (license license:gpl2+)))
884
885 (define-public devil
886 (package
887 (name "devil")
888 (version "1.8.0")
889 (source (origin
890 (method url-fetch)
891 (uri (string-append "http://downloads.sourceforge.net/openil/"
892 "DevIL-" version ".tar.gz"))
893 (sha256
894 (base32
895 "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80"))))
896 (build-system cmake-build-system)
897 (arguments
898 '(;; XXX: Not supported in the released CMakeLists.txt.
899 ;; Enable this for > 1.8.0.
900 #:tests? #f
901 #:phases
902 (modify-phases %standard-phases
903 (add-before 'configure 'change-directory
904 (lambda _ (chdir "DevIL") #t)))))
905 (native-inputs
906 `(("pkg-config" ,pkg-config)))
907 (inputs
908 `(("lcms" ,lcms)
909 ("libjpeg" ,libjpeg-turbo)
910 ("libmng" ,libmng)
911 ("libpng" ,libpng)
912 ("libtiff" ,libtiff)
913 ("openexr" ,openexr)
914 ("zlib" ,zlib)))
915 (synopsis "Library for manipulating many image formats")
916 (description "Developer's Image Library (DevIL) is a library to develop
917 applications with support for many types of images. DevIL can load, save,
918 convert, manipulate, filter and display a wide variety of image formats.")
919 (home-page "http://openil.sourceforge.net")
920 (license license:lgpl2.1+)))
921
922 (define-public jasper
923 (package
924 (name "jasper")
925 (version "2.0.13")
926 (source (origin
927 (method url-fetch)
928 (uri (string-append "https://github.com/mdadams/jasper/archive/"
929 "version-" version ".tar.gz"))
930 (file-name (string-append name "-" version ".tar.gz"))
931 (sha256
932 (base32
933 "090cyqcvqp4y12nc57gvcbrk3ap1rnnixd4qj90sx0pw3fs1615m"))))
934 (build-system cmake-build-system)
935 (inputs `(("libjpeg" ,libjpeg)))
936 (synopsis "JPEG-2000 library")
937 (description "The JasPer Project is an initiative to provide a reference
938 implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
939 ISO/IEC 15444-1).")
940 (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
941 (license (license:x11-style "file://LICENSE"))))
942
943 (define-public zimg
944 (package
945 (name "zimg")
946 (version "2.5")
947 (source
948 (origin
949 (method url-fetch)
950 (uri (string-append "https://github.com/sekrit-twc/zimg/archive/"
951 "release-" version ".tar.gz"))
952 (file-name (string-append name "-" version ".tar.gz"))
953 (sha256
954 (base32
955 "0kbq2dy659645fmgxpzg38b6y6x82kwkydhc380kdkaikv2brcjh"))))
956 (build-system gnu-build-system)
957 (native-inputs
958 `(("autoconf" ,autoconf)
959 ("automake" ,automake)
960 ("libtool" ,libtool)))
961 (arguments
962 '(#:phases
963 (modify-phases %standard-phases
964 (add-after 'unpack 'autogen
965 (lambda _
966 (zero? (system* "sh" "autogen.sh")))))))
967 (synopsis "Scaling, colorspace conversion, and dithering library")
968 (description "Zimg implements the commonly required image processing basics
969 of scaling, colorspace conversion, and depth conversion. A simple API enables
970 conversion between any supported formats to operate with minimal knowledge from
971 the programmer.")
972 (home-page "https://github.com/sekrit-twc/zimg")
973 ;; test/extra/ contains musl-libm,
974 ;; which is MIT/expat licensed, but only used for tests
975 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
976
977 (define-public perceptualdiff
978 (package
979 (name "perceptualdiff")
980 (version "1.3")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (string-append "https://github.com/myint/perceptualdiff/archive/v"
985 version ".tar.gz"))
986 (file-name (string-append name "-" version ".tar.gz"))
987 (sha256
988 (base32
989 "0zl6xmp971fffg7fzcz2fbgxg5x2w7l8qa65c008i4kbkc9016ps"))))
990 (build-system cmake-build-system)
991 (inputs `(("freeimage" ,freeimage)))
992 (arguments
993 '(#:phases (modify-phases %standard-phases
994 (add-after 'unpack 'fix-tests
995 ;; cmake-build-system uses a build/ directory outside
996 ;; of the source tree, one level higher than expected
997 (lambda _
998 (substitute* "test/run_tests.bash"
999 (("../build") "../../build")))))))
1000 (home-page "https://github.com/myint/perceptualdiff")
1001 (synopsis "Perceptual image comparison utility")
1002 (description "PerceptualDiff visually compares two images to determine
1003 whether they look alike. It uses a computational model of the human visual
1004 system to detect similarities. This allows it too see beyond irrelevant
1005 differences in file encoding, image quality, and other small variations.")
1006 (license license:gpl2+)))
1007
1008 (define-public steghide
1009 (package
1010 (name "steghide")
1011 (version "0.5.1")
1012 (source (origin
1013 (method url-fetch)
1014 (uri (string-append "mirror://sourceforge/steghide/steghide/"
1015 version "/steghide-" version ".tar.bz2"))
1016 (sha256
1017 (base32
1018 "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
1019 (patches (list (search-patch "steghide-fixes.patch")))))
1020 (build-system gnu-build-system)
1021 (native-inputs
1022 `(("gettext" ,gettext-minimal)
1023 ("libtool" ,libtool)
1024 ("perl" ,perl))) ;for tests
1025 (inputs
1026 `(("libmhash" ,libmhash)
1027 ("libmcrypt" ,libmcrypt)
1028 ("libjpeg" ,libjpeg)
1029 ("zlib" ,zlib)))
1030 (arguments
1031 `(#:make-flags '("CXXFLAGS=-fpermissive"))) ;required for MHashPP.cc
1032 (home-page "http://steghide.sourceforge.net")
1033 (synopsis "Image and audio steganography")
1034 (description
1035 "Steghide is a steganography program that is able to hide data in various
1036 kinds of image- and audio-files. The color- respectivly sample-frequencies
1037 are not changed thus making the embedding resistant against first-order
1038 statistical tests.")
1039 (license license:gpl2+)))
1040
1041 (define-public stb-image-for-extempore
1042 (let ((revision "1")
1043 (commit "152a250a702bf28951bb0220d63bc0c99830c498"))
1044 (package
1045 (name "stb-image-for-extempore")
1046 (version (string-append "0-" revision "." (string-take commit 9)))
1047 (source
1048 (origin (method git-fetch)
1049 (uri (git-reference
1050 (url "https://github.com/extemporelang/stb.git")
1051 (commit commit)))
1052 (sha256
1053 (base32
1054 "0y0aa20pj9311x2ii06zg8xs34idg14hfgldqc5ymizc6cf1qiqv"))
1055 (file-name (string-append name "-" version "-checkout"))))
1056 (build-system cmake-build-system)
1057 (arguments `(#:tests? #f)) ; no tests included
1058 ;; Extempore refuses to build on architectures other than x86_64
1059 (supported-systems '("x86_64-linux"))
1060 (home-page "https://github.com/extemporelang/stb")
1061 (synopsis "Image library for Extempore")
1062 (description
1063 "This package is a collection of assorted single-file libraries. Of
1064 all included libraries only the image loading and decoding library is
1065 installed as @code{stb_image}.")
1066 (license license:public-domain))))
1067
1068 (define-public optipng
1069 (package
1070 (name "optipng")
1071 (version "0.7.6")
1072 (source
1073 (origin
1074 (method url-fetch)
1075 (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
1076 version ".tar.gz"))
1077 (sha256
1078 (base32
1079 "105yk5qykvhiahzag67gm36s2kplxf6qn5hay02md0nkrcgn6w28"))))
1080 (build-system gnu-build-system)
1081 (inputs
1082 `(("zlib" ,zlib)))
1083 (arguments
1084 '(#:phases
1085 (modify-phases %standard-phases
1086 ;; configure script does not accept arguments CONFIG_SHELL and SHELL
1087 (replace 'configure
1088 (lambda* (#:key outputs #:allow-other-keys)
1089 (zero? (system* "sh" "configure"
1090 (string-append "--prefix=" (assoc-ref outputs "out")))))))))
1091 (synopsis "Optimizer that recompresses PNG image files to a
1092 smaller size")
1093 (description "OptiPNG is a PNG optimizer that recompresses image
1094 files to a smaller size, without losing any information. This program
1095 also converts external formats (BMP, GIF, PNM and TIFF) to optimized
1096 PNG, and performs PNG integrity checks and corrections.")
1097 (home-page "http://optipng.sourceforge.net/")
1098 (license license:zlib)))
1099
1100 (define-public libjpeg-turbo
1101 (package
1102 (name "libjpeg-turbo")
1103 (version "1.5.1")
1104 (source (origin
1105 (method url-fetch)
1106 (uri (string-append "mirror://sourceforge/" name "/" version "/"
1107 name "-" version ".tar.gz"))
1108 (sha256
1109 (base32
1110 "0v365hm6z6lddcqagjj15wflk66rqyw75m73cqzl65rh4lyrshj1"))))
1111 (build-system gnu-build-system)
1112 (native-inputs
1113 `(("nasm" ,nasm)))
1114 (arguments
1115 '(#:test-target "test"
1116 #:phases
1117 (modify-phases %standard-phases
1118 (add-after 'unpack 'set-env-on-MIPS
1119 ;; This is borrowed from Debian's patchset for libjpeg
1120 ;; https://sources.debian.net/data/main/libj/libjpeg-turbo/1:1.5.1-2/debian/patches/0001-Declare-env-on-MIPS-on-first-use-Courtesy-of-Aurelie.patch
1121 (lambda _
1122 (substitute* "simd/jsimd_mips.c"
1123 (("env = getenv\\(\"JSIMD_FORCEDSPR2")
1124 "char *env = getenv(\"JSIMD_FORCEDSPR2"))
1125 #t)))))
1126 (home-page "http://www.libjpeg-turbo.org/")
1127 (synopsis "SIMD-accelerated JPEG image handling library")
1128 (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
1129 JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
1130 x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems,
1131 its highly-optimized Huffman coding routines allow it to outperform libjpeg by
1132 a significant amount.
1133 libjpeg-turbo implements both the traditional libjpeg API and the less powerful
1134 but more straightforward TurboJPEG API, and provides a full-featured Java
1135 interface. It supports color space extensions that allow it to compress from
1136 and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
1137 (license (list license:bsd-3 ; jsimd*.[ch] and most of simd/
1138 license:ijg)))) ; the rest
1139
1140 (define-public niftilib
1141 (package
1142 (name "niftilib")
1143 (version "2.0.0")
1144 (source (origin
1145 (method url-fetch)
1146 (uri (list (string-append "mirror://sourceforge/niftilib/"
1147 "nifticlib/nifticlib_"
1148 (string-join (string-split version #\.) "_")
1149 "/nifticlib-" version ".tar.gz")))
1150 (sha256
1151 (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3"))))
1152 (build-system gnu-build-system)
1153 (arguments
1154 '(#:tests? #f ; there is no test target
1155 #:parallel-build? #f ; not supported
1156 #:make-flags
1157 (list "SHELL=bash"
1158 (string-append "ZLIB_INC="
1159 (assoc-ref %build-inputs "zlib") "/include")
1160 ;; Append "-fPIC" to CFLAGS.
1161 (string-append "CFLAGS="
1162 "-Wall -ansi -pedantic -fPIC"))
1163 #:phases
1164 (modify-phases %standard-phases
1165 (replace 'install
1166 (lambda* (#:key outputs #:allow-other-keys)
1167 (let ((out (assoc-ref outputs "out")))
1168 (for-each
1169 (lambda (dir)
1170 (copy-recursively dir (string-append out "/" dir)))
1171 '("bin" "lib" "include")))
1172 #t))
1173 (delete 'configure))))
1174 (inputs
1175 `(("zlib" ,zlib)))
1176 (synopsis "Library for reading and writing files in the nifti-1 format")
1177 (description "Niftilib is a set of i/o libraries for reading and writing
1178 files in the nifti-1 data format - a binary file format for storing
1179 medical image data, e.g. magnetic resonance image (MRI) and functional MRI
1180 (fMRI) brain images.")
1181 (home-page "http://niftilib.sourceforge.net")
1182 (license license:public-domain)))