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