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