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