Commit | Line | Data |
---|---|---|
e55354b8 | 1 | ;;; GNU Guix --- Functional package management for GNU |
0b8e89f6 | 2 | ;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org> |
451b5c5d | 3 | ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr> |
86fa2ea9 | 4 | ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> |
85a02905 | 5 | ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com> |
e32db0fa | 6 | ;;; Copyright © 2014, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> |
0731a47c | 7 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> |
fcc43c1f | 8 | ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net> |
21122bd7 | 9 | ;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org> |
bc806b0c | 10 | ;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name> |
cd5e0843 | 11 | ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> |
10db6778 | 12 | ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
1fa3e336 | 13 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
2235abb2 | 14 | ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net> |
3c8ba11a | 15 | ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net> |
47956fa0 | 16 | ;;; Copyright © 2017 ng0 <ng0@n0.is> |
2f8b9c46 | 17 | ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com> |
f2079849 | 18 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
da4dde61 | 19 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
62813c10 | 20 | ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> |
4715f92e | 21 | ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> |
910a20e2 | 22 | ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> |
3239dcd3 | 23 | ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr> |
6e35bad0 | 24 | ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> |
0290f533 | 25 | ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com> |
e55354b8 DT |
26 | ;;; |
27 | ;;; This file is part of GNU Guix. | |
28 | ;;; | |
29 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
30 | ;;; under the terms of the GNU General Public License as published by | |
31 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
32 | ;;; your option) any later version. | |
33 | ;;; | |
34 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
35 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
36 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
37 | ;;; GNU General Public License for more details. | |
38 | ;;; | |
39 | ;;; You should have received a copy of the GNU General Public License | |
40 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
41 | ||
42 | (define-module (gnu packages image) | |
43 | #:use-module (gnu packages) | |
97039f6e | 44 | #:use-module (gnu packages algebra) |
37e05d64 | 45 | #:use-module (gnu packages assembly) |
894e2cba | 46 | #:use-module (gnu packages autotools) |
97039f6e | 47 | #:use-module (gnu packages boost) |
ac257f12 | 48 | #:use-module (gnu packages check) |
3239dcd3 | 49 | #:use-module (gnu packages curl) |
e55354b8 | 50 | #:use-module (gnu packages compression) |
99828fa7 | 51 | #:use-module (gnu packages documentation) |
efa77baf | 52 | #:use-module (gnu packages fontutils) |
0290f533 | 53 | #:use-module (gnu packages freedesktop) |
0bd1097c LF |
54 | ;; To provide gcc@5 and gcc@6, to work around <http://bugs.gnu.org/24703>. |
55 | #:use-module (gnu packages gcc) | |
1fa3e336 | 56 | #:use-module (gnu packages gettext) |
97039f6e | 57 | #:use-module (gnu packages ghostscript) |
060ad3de | 58 | #:use-module (gnu packages gl) |
023f0fb0 | 59 | #:use-module (gnu packages glib) |
ced7cc92 | 60 | #:use-module (gnu packages graphics) |
f2079849 JL |
61 | #:use-module (gnu packages gtk) |
62 | #:use-module (gnu packages lua) | |
0290f533 | 63 | #:use-module (gnu packages man) |
97039f6e | 64 | #:use-module (gnu packages maths) |
1fa3e336 | 65 | #:use-module (gnu packages mcrypt) |
97039f6e | 66 | #:use-module (gnu packages perl) |
a5d4c96b | 67 | #:use-module (gnu packages photo) |
efa77baf | 68 | #:use-module (gnu packages pkg-config) |
97039f6e | 69 | #:use-module (gnu packages python) |
44d10b1f | 70 | #:use-module (gnu packages python-xyz) |
efa77baf | 71 | #:use-module (gnu packages xml) |
76d88cfa | 72 | #:use-module (gnu packages xorg) |
84567657 | 73 | #:use-module (gnu packages qt) |
b5b73a82 | 74 | #:use-module ((guix licenses) #:prefix license:) |
e55354b8 DT |
75 | #:use-module (guix packages) |
76 | #:use-module (guix download) | |
ac2a38a5 | 77 | #:use-module (guix git-download) |
38c55e5c | 78 | #:use-module (guix build-system gnu) |
e596ab0f | 79 | #:use-module (guix build-system cmake) |
0290f533 | 80 | #:use-module (guix build-system meson) |
f2079849 | 81 | #:use-module (guix build-system python) |
eb60149e | 82 | #:use-module (guix build-system r) |
2235abb2 | 83 | #:use-module (guix build-system scons) |
e596ab0f | 84 | #:use-module (srfi srfi-1)) |
e55354b8 DT |
85 | |
86 | (define-public libpng | |
87 | (package | |
88 | (name "libpng") | |
f19d9db5 | 89 | (version "1.6.34") |
a18581a0 | 90 | (replacement libpng-1.6.37) |
e55354b8 DT |
91 | (source (origin |
92 | (method url-fetch) | |
a2f3c614 | 93 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" |
21ef9843 MW |
94 | version "/libpng-" version ".tar.xz") |
95 | (string-append | |
96 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
913059a1 EF |
97 | "/libpng16/libpng-" version ".tar.xz") |
98 | (string-append | |
99 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
100 | "/libpng16/libpng-" version ".tar.xz"))) | |
e55354b8 | 101 | (sha256 |
8fda37bc | 102 | (base32 |
f19d9db5 | 103 | "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig")))) |
e55354b8 DT |
104 | (build-system gnu-build-system) |
105 | ||
106 | ;; libpng.la says "-lz", so propagate it. | |
107 | (propagated-inputs `(("zlib" ,zlib))) | |
108 | ||
109 | (synopsis "Library for handling PNG files") | |
110 | (description | |
111 | "Libpng is the official PNG (Portable Network Graphics) reference | |
35b9e423 | 112 | library. It supports almost all PNG features and is extensible.") |
e55354b8 DT |
113 | (license license:zlib) |
114 | (home-page "http://www.libpng.org/pub/png/libpng.html"))) | |
115 | ||
a18581a0 MB |
116 | ;; This graft exists to fix CVE-2018-14048, CVE-2018-14550, and CVE-2019-7317. |
117 | (define-public libpng-1.6.37 | |
118 | (package | |
119 | (inherit libpng) | |
120 | (version "1.6.37") | |
121 | (source (origin | |
122 | (method url-fetch) | |
123 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" | |
124 | version "/libpng-" version ".tar.xz") | |
125 | (string-append | |
126 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
127 | "/libpng16/libpng-" version ".tar.xz") | |
128 | (string-append | |
129 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
130 | "/libpng16/libpng-" version ".tar.xz"))) | |
131 | (sha256 | |
132 | (base32 | |
133 | "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh")))))) | |
134 | ||
e0958c2d | 135 | ;; libpng-apng should be updated when the APNG patch is released: |
136 | ;; <https://bugs.gnu.org/27556> | |
114a325e | 137 | (define-public libpng-apng |
138 | (package | |
114a325e | 139 | (name "libpng-apng") |
e0958c2d | 140 | (version "1.6.28") |
141 | (source | |
142 | (origin | |
143 | (method url-fetch) | |
144 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" | |
145 | version "/libpng-" version ".tar.xz") | |
146 | (string-append | |
147 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
148 | "/libpng16/libpng-" version ".tar.xz") | |
149 | (string-append | |
150 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
151 | "/libpng16/libpng-" version ".tar.xz"))) | |
152 | (sha256 | |
153 | (base32 | |
154 | "0ylgyx93hnk38haqrh8prd3ax5ngzwvjqw5cxw7p9nxmwsfyrlyq")))) | |
155 | (build-system gnu-build-system) | |
114a325e | 156 | (arguments |
696f1d0f LF |
157 | `(#:modules ((guix build gnu-build-system) |
158 | (guix build utils) | |
159 | (srfi srfi-1)) | |
160 | #:phases | |
114a325e | 161 | (modify-phases %standard-phases |
162 | (add-after 'unpack 'patch-apng | |
163 | (lambda* (#:key inputs #:allow-other-keys) | |
164 | (define (apply-patch file) | |
fccacffb MW |
165 | (invoke "patch" "-p1" "--force" |
166 | "--input" file)) | |
114a325e | 167 | (let ((apng.gz (assoc-ref inputs "apng"))) |
168 | (format #t "Applying APNG patch '~a'...~%" | |
169 | apng.gz) | |
fccacffb MW |
170 | (invoke "sh" "-c" |
171 | (string-append "gunzip < " apng.gz " > the-patch")) | |
172 | (apply-patch "the-patch") | |
173 | #t))) | |
114a325e | 174 | (add-before 'configure 'no-checks |
175 | (lambda _ | |
176 | (substitute* "Makefile.in" | |
177 | (("^scripts/symbols.chk") "") | |
178 | (("check: scripts/symbols.chk") "")) | |
114a325e | 179 | #t))))) |
180 | (inputs | |
181 | `(("apng" ,(origin | |
182 | (method url-fetch) | |
183 | (uri | |
184 | (string-append "mirror://sourceforge/libpng-apng/libpng16/" | |
185 | version "/libpng-" version "-apng.patch.gz")) | |
186 | (sha256 | |
187 | (base32 | |
e0958c2d | 188 | "0m5nv70n9903x3xzxw9qqc6sgf2rp106ha0x6gix0xf8wcrljaab")))))) |
114a325e | 189 | (native-inputs |
190 | `(("libtool" ,libtool))) | |
e0958c2d | 191 | ;; libpng.la says "-lz", so propagate it. |
192 | (propagated-inputs | |
193 | `(("zlib" ,zlib))) | |
114a325e | 194 | (synopsis "APNG patch for libpng") |
195 | (description | |
196 | "APNG (Animated Portable Network Graphics) is an unofficial | |
197 | extension of the APNG (Portable Network Graphics) format. | |
198 | APNG patch provides APNG support to libpng.") | |
e0958c2d | 199 | (home-page "https://sourceforge.net/projects/libpng-apng/") |
200 | (license license:zlib))) | |
114a325e | 201 | |
2df831a7 RW |
202 | (define-public libpng-1.2 |
203 | (package | |
204 | (inherit libpng) | |
6cdd8c97 | 205 | (version "1.2.59") |
2df831a7 RW |
206 | (source |
207 | (origin | |
208 | (method url-fetch) | |
2df831a7 RW |
209 | (uri (list (string-append "mirror://sourceforge/libpng/libpng12/" |
210 | version "/libpng-" version ".tar.xz") | |
211 | (string-append | |
212 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
913059a1 EF |
213 | "/libpng12/libpng-" version ".tar.xz") |
214 | (string-append | |
215 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
2df831a7 RW |
216 | "/libpng12/libpng-" version ".tar.xz"))) |
217 | (sha256 | |
6cdd8c97 LF |
218 | (base32 |
219 | "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl")))))) | |
2df831a7 | 220 | |
1ee13e01 | 221 | (define-public pngcrush |
2f8b9c46 | 222 | (package |
1ee13e01 | 223 | (name "pngcrush") |
224 | (version "1.8.13") | |
2f8b9c46 HG |
225 | (source (origin |
226 | (method url-fetch) | |
227 | (uri (string-append "mirror://sourceforge/pmt/pngcrush/" | |
1ee13e01 | 228 | version "/pngcrush-" version "-nolib.tar.xz")) |
2f8b9c46 | 229 | (sha256 (base32 |
1ee13e01 | 230 | "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv")))) |
2f8b9c46 HG |
231 | (build-system gnu-build-system) |
232 | (arguments | |
1ee13e01 | 233 | '(#:tests? #f ; no check target |
2f8b9c46 HG |
234 | #:phases |
235 | (modify-phases %standard-phases | |
236 | (replace 'configure | |
237 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1ee13e01 | 238 | (substitute* "Makefile" |
2f8b9c46 HG |
239 | (("^(PNG(INC|LIB) = )/usr/local/" line vardef) |
240 | (string-append vardef (assoc-ref inputs "libpng") "/")) | |
241 | (("^(Z(INC|LIB) = )/usr/local/" line vardef) | |
242 | (string-append vardef (assoc-ref inputs "zlib") "/")) | |
243 | ;; The Makefile is written by hand and not using $PREFIX | |
244 | (("\\$\\(DESTDIR\\)/usr/") | |
fccacffb MW |
245 | (string-append (assoc-ref outputs "out") "/"))) |
246 | #t))))) | |
2f8b9c46 HG |
247 | (inputs |
248 | `(("libpng" ,libpng) | |
249 | ("zlib" , zlib))) | |
1ee13e01 | 250 | (home-page "https://pmt.sourceforge.io/pngcrush") |
2f8b9c46 HG |
251 | (synopsis "Utility to compress PNG files") |
252 | (description "pngcrusqh is an optimizer for PNG (Portable Network Graphics) | |
253 | files. It can compress them as much as 40% losslessly.") | |
254 | (license license:zlib))) | |
255 | ||
1ee13e01 | 256 | (define-public pngcrunch |
257 | ;; This package used to be wrongfully name "pngcrunch". | |
258 | (deprecated-package "pngcrunch" pngcrush)) | |
259 | ||
6e35bad0 AV |
260 | (define-public pnglite |
261 | (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38") | |
262 | (revision "1")) | |
263 | (package | |
264 | (name "pnglite") | |
265 | ;; The project was moved from sourceforge to github. | |
266 | ;; The latest version in sourceforge was 0.1.17: | |
267 | ;; https://sourceforge.net/projects/pnglite/files/pnglite/ | |
268 | ;; No releases are made in github. | |
269 | (version (git-version "0.1.17" revision commit)) | |
270 | (source (origin | |
271 | (method git-fetch) | |
272 | (uri (git-reference | |
273 | (url "https://github.com/dankar/pnglite") | |
274 | (commit commit))) | |
275 | (sha256 | |
276 | (base32 | |
277 | "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby")) | |
278 | (file-name (git-file-name name version)))) | |
279 | (build-system gnu-build-system) | |
280 | (arguments | |
281 | `(#:tests? #f ; no tests | |
282 | #:phases | |
283 | (modify-phases %standard-phases | |
284 | (delete 'configure) | |
285 | (replace 'build | |
286 | (lambda _ | |
287 | ;; common build flags for building shared libraries | |
288 | (let ((cflags '("-O2" "-g" "-fPIC")) | |
289 | (ldflags '("-shared"))) | |
290 | (apply invoke | |
291 | `("gcc" | |
292 | "-o" "libpnglite.so" | |
293 | ,@cflags | |
294 | ,@ldflags | |
295 | "pnglite.c")) | |
296 | #t))) | |
297 | (replace 'install | |
298 | (lambda* (#:key outputs #:allow-other-keys) | |
299 | (let* ((out (assoc-ref outputs "out")) | |
300 | (lib (string-append out "/lib/")) | |
301 | (include (string-append out "/include/")) | |
302 | (doc (string-append out "/share/doc/" | |
303 | ,name "-" ,version "/"))) | |
304 | (install-file "libpnglite.so" lib) | |
305 | (install-file "pnglite.h" include) | |
306 | (install-file "README.md" doc) | |
307 | #t)))))) | |
308 | (inputs `(("zlib" ,zlib))) | |
309 | (home-page "https://github.com/dankar/pnglite") | |
310 | (synopsis "Pretty small png library") | |
311 | (description "A pretty small png library. | |
312 | Currently all documentation resides in @file{pnglite.h}.") | |
313 | (license license:zlib)))) | |
314 | ||
e55354b8 DT |
315 | (define-public libjpeg |
316 | (package | |
317 | (name "libjpeg") | |
38e4d595 | 318 | (version "9c") |
e55354b8 DT |
319 | (source (origin |
320 | (method url-fetch) | |
60562ec2 | 321 | (uri (string-append "https://www.ijg.org/files/jpegsrc.v" |
e55354b8 DT |
322 | version ".tar.gz")) |
323 | (sha256 (base32 | |
38e4d595 | 324 | "08kixcf3a7s9x91174abjnk1xbvj4v8crdc73zi4k9h3jfbm00k5")))) |
e55354b8 | 325 | (build-system gnu-build-system) |
35b9e423 | 326 | (synopsis "Library for handling JPEG files") |
e55354b8 DT |
327 | (description |
328 | "Libjpeg implements JPEG image encoding, decoding, and transcoding. | |
329 | JPEG is a standardized compression method for full-color and gray-scale | |
330 | images. | |
61853b74 MC |
331 | It also includes programs that provide conversion between the JPEG format and |
332 | image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats, as well as | |
333 | lossless JPEG manipulations such as rotation, scaling or cropping: | |
334 | @enumerate | |
335 | @item cjpeg | |
336 | @item djpeg | |
337 | @item jpegtran | |
338 | @item rdjpgcom | |
339 | @item wrjpgcom | |
340 | @end enumerate") | |
e55354b8 | 341 | (license license:ijg) |
60562ec2 | 342 | (home-page "https://www.ijg.org/"))) |
e55354b8 DT |
343 | |
344 | (define-public libjpeg-8 | |
345 | (package (inherit libjpeg) | |
346 | (version "8d") | |
347 | (source (origin | |
348 | (method url-fetch) | |
60562ec2 | 349 | (uri (string-append "https://www.ijg.org/files/jpegsrc.v" |
e55354b8 DT |
350 | version ".tar.gz")) |
351 | (sha256 (base32 | |
352 | "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0")))))) | |
fcc43c1f | 353 | |
b81245cc KK |
354 | (define-public libjxr |
355 | (package | |
356 | (name "libjxr") | |
357 | (version "1.1") | |
358 | (source (origin | |
359 | ;; We are using the Debian source because CodePlex does not | |
360 | ;; deliver an easily downloadable tarball. | |
361 | (method url-fetch) | |
362 | (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_" | |
363 | version ".orig.tar.gz")) | |
364 | (sha256 | |
365 | (base32 | |
366 | "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67")) | |
367 | (patch-flags '("-p1" "--binary")) | |
368 | (patches (search-patches "libjxr-fix-function-signature.patch" | |
369 | "libjxr-fix-typos.patch")))) | |
370 | (build-system gnu-build-system) | |
371 | (arguments '(#:make-flags '("CC=gcc") | |
372 | #:tests? #f ; no check target | |
373 | #:phases | |
374 | (modify-phases %standard-phases | |
375 | (delete 'configure) ; no configure script | |
376 | ;; The upstream makefile does not include an install phase. | |
377 | (replace 'install | |
378 | (lambda* (#:key outputs #:allow-other-keys) | |
379 | (let* ((out (assoc-ref outputs "out")) | |
380 | (bin (string-append out "/bin")) | |
381 | (lib (string-append out "/lib")) | |
382 | (include (string-append out "/include/jxrlib"))) | |
383 | (for-each (lambda (file) | |
384 | (install-file file include) | |
385 | (delete-file file)) | |
386 | (append | |
387 | '("jxrgluelib/JXRGlue.h" | |
388 | "jxrgluelib/JXRMeta.h" | |
389 | "jxrtestlib/JXRTest.h" | |
390 | "image/sys/windowsmediaphoto.h") | |
391 | (find-files "common/include" "\\.h$"))) | |
392 | (for-each (lambda (file) | |
393 | (install-file file lib) | |
394 | (delete-file file)) | |
395 | (find-files "." "\\.a$")) | |
396 | (for-each (lambda (file) | |
397 | (install-file file bin) | |
398 | (delete-file file)) | |
399 | '("JxrDecApp" "JxrEncApp"))) | |
400 | #t))))) | |
401 | (synopsis "Implementation of the JPEG XR standard") | |
402 | (description "JPEG XR is an approved ISO/IEC International standard (its | |
403 | official designation is ISO/IEC 29199-2). This library is an implementation of that standard.") | |
404 | (license | |
405 | (license:non-copyleft | |
406 | "file://Makefile" | |
407 | "See the header of the Makefile in the distribution.")) | |
408 | (home-page "https://jxrlib.codeplex.com/"))) | |
409 | ||
fcc43c1f AB |
410 | (define-public jpegoptim |
411 | (package | |
412 | (name "jpegoptim") | |
b01a8790 | 413 | (version "1.4.6") |
fcc43c1f AB |
414 | (source (origin |
415 | (method url-fetch) | |
416 | (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-" | |
417 | version ".tar.gz")) | |
418 | (sha256 (base32 | |
b01a8790 | 419 | "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8")))) |
fcc43c1f AB |
420 | (build-system gnu-build-system) |
421 | (inputs `(("libjpeg" ,libjpeg))) | |
422 | (arguments | |
b01a8790 | 423 | '(#:tests? #f)) ; no tests |
fcc43c1f AB |
424 | (synopsis "Optimize JPEG images") |
425 | (description | |
426 | "jpegoptim provides lossless optimization (based on optimizing | |
427 | the Huffman tables) and \"lossy\" optimization based on setting | |
428 | maximum quality factor.") | |
429 | (license license:gpl2+) | |
ada3b94f | 430 | (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim"))) |
e55354b8 | 431 | |
f5e4229a BT |
432 | (define-public libicns |
433 | (package | |
434 | (name "libicns") | |
435 | (version "0.8.1") | |
436 | (source (origin | |
437 | (method url-fetch) | |
438 | (uri (string-append | |
439 | "mirror://sourceforge/icns/" | |
440 | "libicns-" version ".tar.gz")) | |
441 | (sha256 | |
442 | (base32 | |
443 | "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk")))) | |
444 | (build-system gnu-build-system) | |
445 | (inputs | |
446 | `(("libpng" ,libpng) | |
447 | ("jasper" ,jasper))) | |
448 | (arguments | |
449 | `(#:tests? #t)) ; No tests. | |
450 | (home-page "http://icns.sourceforge.net/") | |
451 | (synopsis "Library for handling Mac OS icns resource files") | |
452 | (description | |
453 | "Libicns is a library for the manipulation of Mac OS IconFamily resource | |
454 | type files (ICNS). @command{icns2png} and @command{png2icns} are provided to | |
455 | convert between PNG and ICNS. @command{icns2png} will extract image files from | |
456 | ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use | |
457 | with .desktop files. Additionally, @command{icontainer2png} is provided for | |
458 | extracting icontainer icon files.") | |
459 | (license (list license:lgpl2.1+ ; libicns | |
460 | license:lgpl2.0+ ; src/apidocs.* | |
461 | license:gpl2+)))) ; icns2png, png2icns, icontainer2png | |
462 | ||
e55354b8 DT |
463 | (define-public libtiff |
464 | (package | |
465 | (name "libtiff") | |
3f2848a5 | 466 | (version "4.0.10") |
c8eb2b8c LF |
467 | (source |
468 | (origin | |
469 | (method url-fetch) | |
9d7d8e71 | 470 | (uri (string-append "http://download.osgeo.org/libtiff/tiff-" |
c8eb2b8c | 471 | version ".tar.gz")) |
c8eb2b8c LF |
472 | (sha256 |
473 | (base32 | |
3f2848a5 | 474 | "1r4np635gr6zlc0bic38dzvxia6iqzcrary4n1ylarzpr8fd2lic")))) |
e55354b8 | 475 | (build-system gnu-build-system) |
6f6eb857 LC |
476 | (outputs '("out" |
477 | "doc")) ;1.3 MiB of HTML documentation | |
478 | (arguments | |
479 | ;; Instead of using --docdir, this package has its own --with-docdir. | |
480 | `(#:configure-flags (list (string-append "--with-docdir=" | |
481 | (assoc-ref %outputs "doc") | |
482 | "/share/doc/" | |
483 | ,name "-" ,version)))) | |
e55354b8 | 484 | (inputs `(("zlib" ,zlib) |
1de0afd5 | 485 | ("libjpeg" ,libjpeg))) |
35b9e423 | 486 | (synopsis "Library for handling TIFF files") |
e55354b8 DT |
487 | (description |
488 | "Libtiff provides support for the Tag Image File Format (TIFF), a format | |
489 | used for storing image data. | |
490 | Included are a library, libtiff, for reading and writing TIFF and a small | |
491 | collection of tools for doing simple manipulations of TIFF images.") | |
166191b3 LC |
492 | (license (license:non-copyleft "file://COPYRIGHT" |
493 | "See COPYRIGHT in the distribution.")) | |
0bd1097c | 494 | (home-page "http://www.simplesystems.org/libtiff/"))) |
ed5940b6 | 495 | |
894e2cba TUBK |
496 | (define-public leptonica |
497 | (package | |
498 | (name "leptonica") | |
340502ba | 499 | (version "1.74.4") |
894e2cba TUBK |
500 | (source |
501 | (origin | |
69f7d3f4 RW |
502 | (method git-fetch) |
503 | (uri (git-reference | |
504 | (url "https://github.com/DanBloomberg/leptonica.git") | |
505 | (commit version))) | |
506 | (file-name (git-file-name name version)) | |
894e2cba | 507 | (sha256 |
69f7d3f4 | 508 | (base32 "0sfg1ky0lghlq7xx0qii5167bim0wwfnnr83dl4skbj9awyvjiwi")))) |
894e2cba TUBK |
509 | (build-system gnu-build-system) |
510 | (native-inputs | |
d02fb7ce TUBK |
511 | `(("gnuplot" ,gnuplot) ;needed for test suite |
512 | ("autoconf" ,autoconf) | |
513 | ("automake" ,automake) | |
514 | ("libtool" ,libtool) | |
515 | ("pkg-config" ,pkg-config))) | |
894e2cba TUBK |
516 | (inputs |
517 | `(("giflib" ,giflib) | |
518 | ("libjpeg" ,libjpeg) | |
519 | ("libpng" ,libpng) | |
520 | ("libtiff" ,libtiff) | |
521 | ("libwebp" ,libwebp))) | |
522 | (propagated-inputs | |
d02fb7ce | 523 | ;; Linking a program with leptonica also requires these. |
894e2cba TUBK |
524 | `(("openjpeg" ,openjpeg) |
525 | ("zlib" ,zlib))) | |
526 | (arguments | |
d02fb7ce | 527 | '(#:phases |
894e2cba | 528 | (modify-phases %standard-phases |
d02fb7ce TUBK |
529 | (add-after 'unpack 'autogen |
530 | (lambda _ | |
fccacffb | 531 | (invoke "sh" "autobuild"))) |
d02fb7ce TUBK |
532 | (add-after 'unpack 'patch-reg-wrapper |
533 | (lambda _ | |
534 | (substitute* "prog/reg_wrapper.sh" | |
535 | ((" /bin/sh ") | |
536 | (string-append " " (which "sh") " ")) | |
537 | (("which gnuplot") | |
fccacffb MW |
538 | "true")) |
539 | #t))))) | |
894e2cba TUBK |
540 | (home-page "http://www.leptonica.com/") |
541 | (synopsis "Library and tools for image processing and analysis") | |
542 | (description | |
543 | "Leptonica is a C library and set of command-line tools for efficient | |
544 | image processing and image analysis operations. It supports rasterop, affine | |
545 | transformations, binary and grayscale morphology, rank order, and convolution, | |
546 | seedfill and connected components, image transformations combining changes in | |
547 | scale and pixel depth, and pixelwise masking, blending, enhancement, and | |
548 | arithmetic ops.") | |
549 | (license license:bsd-2))) | |
550 | ||
8d9872b5 MB |
551 | (define-public jbig2dec |
552 | (package | |
553 | (name "jbig2dec") | |
fb94354a MB |
554 | (version "0.15") |
555 | (source (origin | |
556 | (method url-fetch) | |
557 | (uri (string-append "https://github.com/ArtifexSoftware" | |
558 | "/ghostpdl-downloads/releases/download" | |
559 | "/gs924/" name "-" version ".tar.gz")) | |
560 | (sha256 | |
561 | (base32 | |
562 | "0m1qwpbjbirgw2fqznbajdhdhh35d6xa2csr64lpjz735pvimykb")) | |
563 | (patches (search-patches "jbig2dec-ignore-testtest.patch")))) | |
8d9872b5 | 564 | (build-system gnu-build-system) |
5e537222 | 565 | (arguments '(#:configure-flags '("--disable-static"))) |
8d9872b5 MB |
566 | (synopsis "Decoder of the JBIG2 image compression format") |
567 | (description | |
36a4366d | 568 | "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit |
7c125ce0 AK |
569 | monochrome) images at moderately high resolution, and in particular scanned |
570 | paper documents. In this domain it is very efficient, offering compression | |
571 | ratios on the order of 100:1. | |
8d9872b5 MB |
572 | |
573 | This is a decoder only implementation, and currently is in the alpha | |
574 | stage, meaning it doesn't completely work yet. However, it is | |
575 | maintaining parity with available encoders, so it is useful for real | |
576 | work.") | |
6acc671b | 577 | (home-page "https://jbig2dec.com") |
8d9872b5 | 578 | (license license:gpl2+))) |
38c55e5c MB |
579 | |
580 | (define-public openjpeg | |
581 | (package | |
582 | (name "openjpeg") | |
3f697ff2 | 583 | (version "2.3.0") |
0e2b0b05 | 584 | (replacement openjpeg-2.3.1) |
38c55e5c MB |
585 | (source |
586 | (origin | |
587 | (method url-fetch) | |
588 | (uri | |
876d80d4 LF |
589 | (string-append "https://github.com/uclouvain/openjpeg/archive/v" |
590 | version ".tar.gz")) | |
591 | (file-name (string-append name "-" version ".tar.gz")) | |
38c55e5c | 592 | (sha256 |
876d80d4 | 593 | (base32 |
3f697ff2 | 594 | "06npqzkg20avnygdwaqpap91r7qpdqgrn39adj2bl8v0pg0qgirx")))) |
38c55e5c MB |
595 | (build-system cmake-build-system) |
596 | (arguments | |
597 | ;; Trying to run `$ make check' results in a no rule fault. | |
598 | '(#:tests? #f)) | |
599 | (inputs | |
600 | `(("lcms" ,lcms) | |
601 | ("libpng" ,libpng) | |
602 | ("libtiff" ,libtiff) | |
603 | ("zlib" ,zlib))) | |
604 | (synopsis "JPEG 2000 codec") | |
605 | (description | |
606 | "The OpenJPEG library is a JPEG 2000 codec written in C. It has | |
607 | been developed in order to promote the use of JPEG 2000, the new | |
608 | still-image compression standard from the Joint Photographic Experts | |
609 | Group (JPEG). | |
610 | ||
611 | In addition to the basic codec, various other features are under | |
612 | development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats, | |
613 | an indexing tool useful for the JPIP protocol, JPWL-tools for | |
614 | error-resilience, a Java-viewer for j2k-images, ...") | |
b9270582 | 615 | (home-page "https://github.com/uclouvain/openjpeg") |
38c55e5c | 616 | (license license:bsd-2))) |
76d88cfa | 617 | |
0e2b0b05 MB |
618 | (define-public openjpeg-2.3.1 |
619 | (package | |
620 | (inherit openjpeg) | |
621 | (version "2.3.1") | |
622 | (source (origin | |
623 | (method git-fetch) | |
624 | (uri (git-reference | |
625 | (url "https://github.com/uclouvain/openjpeg") | |
626 | (commit (string-append "v" version)))) | |
627 | (file-name (git-file-name "openjpeg" version)) | |
628 | (sha256 | |
629 | (base32 | |
630 | "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb")))))) | |
631 | ||
6140b9d8 RW |
632 | (define-public openjpeg-1 |
633 | (package (inherit openjpeg) | |
634 | (name "openjpeg") | |
635 | (version "1.5.2") | |
636 | (source | |
637 | (origin | |
638 | (method url-fetch) | |
639 | (uri | |
de67e922 LF |
640 | (string-append "mirror://sourceforge/openjpeg.mirror/" version "/" |
641 | name "-" version ".tar.gz")) | |
6140b9d8 RW |
642 | (sha256 |
643 | (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm")))))) | |
644 | ||
e596ab0f AK |
645 | (define-public giflib |
646 | (package | |
647 | (name "giflib") | |
3fdb2a84 | 648 | (version "5.1.4") |
e596ab0f AK |
649 | (source (origin |
650 | (method url-fetch) | |
651 | (uri (string-append "mirror://sourceforge/giflib/giflib-" | |
de67e922 | 652 | version ".tar.bz2")) |
e596ab0f | 653 | (sha256 |
44c5f025 | 654 | (base32 |
7ac43c44 HG |
655 | "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz")) |
656 | (patches (search-patches | |
657 | "giflib-make-reallocarray-private.patch")))) | |
e596ab0f AK |
658 | (build-system gnu-build-system) |
659 | (outputs '("bin" ; utility programs | |
660 | "out")) ; library | |
661 | (inputs `(("libx11" ,libx11) | |
662 | ("libice" ,libice) | |
663 | ("libsm" ,libsm) | |
664 | ("perl" ,perl))) | |
665 | (arguments | |
44c5f025 EF |
666 | `(#:phases |
667 | (modify-phases %standard-phases | |
668 | (add-after 'unpack 'disable-html-doc-gen | |
669 | (lambda _ | |
670 | (substitute* "doc/Makefile.in" | |
4a3ee3fb MW |
671 | (("^all: allhtml manpages") "")) |
672 | #t)) | |
44c5f025 EF |
673 | (add-after 'install 'install-manpages |
674 | (lambda* (#:key outputs #:allow-other-keys) | |
675 | (let* ((bin (assoc-ref outputs "bin")) | |
676 | (man1dir (string-append bin "/share/man/man1"))) | |
677 | (mkdir-p man1dir) | |
678 | (for-each (lambda (file) | |
679 | (let ((base (basename file))) | |
680 | (format #t "installing `~a' to `~a'~%" | |
681 | base man1dir) | |
682 | (copy-file file | |
683 | (string-append | |
684 | man1dir "/" base)))) | |
4a3ee3fb MW |
685 | (find-files "doc" "\\.1")) |
686 | #t)))))) | |
e596ab0f AK |
687 | (synopsis "Tools and library for working with GIF images") |
688 | (description | |
35b9e423 | 689 | "GIFLIB is a library for reading and writing GIF images. It is API and |
e596ab0f AK |
690 | ABI compatible with libungif which was in wide use while the LZW compression |
691 | algorithm was patented. Tools are also included to convert, manipulate, | |
692 | compose, and analyze GIF images.") | |
693 | (home-page "http://giflib.sourceforge.net/") | |
694 | (license license:x11))) | |
695 | ||
0731a47c TUBK |
696 | (define-public libungif |
697 | (package | |
698 | (name "libungif") | |
699 | (version "4.1.4") | |
700 | (source (origin | |
701 | (method url-fetch) | |
de67e922 LF |
702 | (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/" |
703 | "libungif-" version "/libungif-" | |
0731a47c TUBK |
704 | version ".tar.bz2")) |
705 | (sha256 | |
706 | (base32 | |
707 | "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh")))) | |
708 | (build-system gnu-build-system) | |
709 | (inputs `(("perl" ,perl))) ;package ships some perl tools | |
710 | (home-page "http://giflib.sourceforge.net/") | |
711 | (synopsis "GIF decompression library") | |
712 | (description | |
713 | "libungif is the old GIF decompression library by the GIFLIB project.") | |
714 | (license license:expat))) | |
715 | ||
76d88cfa AK |
716 | (define-public imlib2 |
717 | (package | |
718 | (name "imlib2") | |
c9838530 | 719 | (version "1.5.1") |
76d88cfa AK |
720 | (source (origin |
721 | (method url-fetch) | |
722 | (uri (string-append | |
de67e922 LF |
723 | "mirror://sourceforge/enlightenment/imlib2-src/" version |
724 | "/imlib2-" version ".tar.bz2")) | |
76d88cfa AK |
725 | (sha256 |
726 | (base32 | |
c9838530 | 727 | "1bms2iwmvnvpz5jqq3r52glarqkafif47zbh1ykz8hw85d2mfkps")))) |
76d88cfa | 728 | (build-system gnu-build-system) |
76d88cfa AK |
729 | (native-inputs |
730 | `(("pkgconfig" ,pkg-config))) | |
731 | (inputs | |
732 | `(("libx11" ,libx11) | |
733 | ("libxext" ,libxext) | |
734 | ("freetype" ,freetype) | |
735 | ("libjpeg" ,libjpeg) | |
736 | ("libpng" ,libpng) | |
737 | ("libtiff" ,libtiff) | |
738 | ("giflib" ,giflib) | |
739 | ("bzip2" ,bzip2))) | |
3b3b60d0 | 740 | (home-page "https://sourceforge.net/projects/enlightenment/") |
76d88cfa AK |
741 | (synopsis |
742 | "Loading, saving, rendering and manipulating image files") | |
743 | (description | |
744 | "Imlib2 is a library that does image file loading and saving as well as | |
745 | rendering, manipulation, arbitrary polygon support, etc. | |
746 | ||
747 | It does ALL of these operations FAST. Imlib2 also tries to be highly | |
748 | intelligent about doing them, so writing naive programs can be done easily, | |
749 | without sacrificing speed. | |
750 | ||
751 | This is a complete rewrite over the Imlib 1.x series. The architecture is | |
752 | more modular, simple, and flexible.") | |
8835aed4 | 753 | (license license:imlib2))) |
f7d28082 AK |
754 | |
755 | (define-public giblib | |
756 | (package | |
757 | (name "giblib") | |
758 | (version "1.2.4") | |
759 | (source (origin | |
760 | (method url-fetch) | |
bf512da1 EF |
761 | (uri (list |
762 | (string-append | |
763 | "http://linuxbrit.co.uk/downloads/giblib-" | |
764 | version ".tar.gz") | |
765 | (string-append | |
766 | "https://sourceforge.net/projects/slackbuildsdirectlinks/" | |
767 | "files/giblib/giblib-" version ".tar.gz"))) | |
f7d28082 AK |
768 | (sha256 |
769 | (base32 | |
770 | "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp")))) | |
771 | (build-system gnu-build-system) | |
772 | (inputs | |
773 | `(("libx11" ,libx11) | |
774 | ("imlib2" ,imlib2))) | |
775 | (home-page "http://linuxbrit.co.uk/software/") ; no real home-page | |
776 | (synopsis "Wrapper library for imlib2") | |
777 | (description | |
35b9e423 | 778 | "Giblib is a simple library which wraps imlib2's context API, avoiding |
f7d28082 AK |
779 | all the context_get/set calls, adds fontstyles to the truetype renderer and |
780 | supplies a generic doubly-linked list and some string functions.") | |
781 | ;; This license removes a clause about X Consortium from the original | |
782 | ;; X11 license. | |
783 | (license (license:x11-style "file://COPYING" | |
784 | "See 'COPYING' in the distribution.")))) | |
43402c5c DT |
785 | |
786 | (define-public freeimage | |
787 | (package | |
788 | (name "freeimage") | |
bcc09d9a | 789 | (version "3.17.0") |
43402c5c DT |
790 | (source (origin |
791 | (method url-fetch) | |
792 | (uri (string-append | |
793 | "mirror://sourceforge/freeimage/Source%20Distribution/" | |
794 | version "/FreeImage" | |
bcc09d9a | 795 | (string-concatenate (string-split version #\.)) |
43402c5c DT |
796 | ".zip")) |
797 | (sha256 | |
798 | (base32 | |
93bd4a37 | 799 | "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v")) |
a5d4c96b EF |
800 | (modules '((guix build utils))) |
801 | (snippet | |
802 | '(begin | |
803 | (for-each | |
804 | (lambda (dir) | |
805 | (delete-file-recursively (string-append "Source/" dir))) | |
f347c24a EF |
806 | '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite" |
807 | ;; "LibJXR" | |
a5d4c96b EF |
808 | "LibWebP" "OpenEXR" "ZLib")))) |
809 | (patches (search-patches "freeimage-unbundle.patch" | |
810 | "freeimage-CVE-2015-0852.patch" | |
dc8a34ed RW |
811 | "freeimage-CVE-2016-5684.patch" |
812 | "freeimage-fix-build-with-gcc-5.patch")))) | |
43402c5c DT |
813 | (build-system gnu-build-system) |
814 | (arguments | |
4a2798e0 EF |
815 | '(#:phases |
816 | (modify-phases %standard-phases | |
a5d4c96b EF |
817 | ;; According to Fedora these files depend on private headers, but their |
818 | ;; presence is required for building, so we replace them with empty files. | |
819 | (add-after 'unpack 'delete-unbuildable-files | |
820 | (lambda _ | |
821 | (for-each (lambda (file) | |
822 | (delete-file file) | |
823 | (close (open file O_CREAT))) | |
824 | '("Source/FreeImage/PluginG3.cpp" | |
825 | "Source/FreeImageToolkit/JPEGTransform.cpp")) | |
826 | #t)) | |
827 | ;; These scripts generate the Makefiles. | |
828 | (replace 'configure | |
829 | (lambda _ | |
830 | (invoke "sh" "gensrclist.sh") | |
831 | (invoke "sh" "genfipsrclist.sh"))) | |
4a2798e0 EF |
832 | (add-before 'build 'patch-makefile |
833 | (lambda* (#:key outputs #:allow-other-keys) | |
834 | (substitute* "Makefile.gnu" | |
835 | (("/usr") (assoc-ref outputs "out")) | |
836 | (("-o root -g root") "")) | |
837 | #t))) | |
a5d4c96b EF |
838 | #:make-flags |
839 | (list "CC=gcc" | |
840 | ;; We need '-fpermissive' for Source/FreeImage.h. | |
841 | ;; libjxr doesn't have a pkg-config file. | |
842 | (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive " | |
f347c24a EF |
843 | ;"-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib" |
844 | )) | |
43402c5c DT |
845 | #:tests? #f)) ; no check target |
846 | (native-inputs | |
a5d4c96b EF |
847 | `(("pkg-config" ,pkg-config) |
848 | ("unzip" ,unzip))) | |
849 | (inputs | |
850 | `(("libjpeg" ,libjpeg) | |
f347c24a | 851 | ;("libjxr" ,libjxr) |
a5d4c96b EF |
852 | ("libpng" ,libpng) |
853 | ("libraw" ,libraw) | |
854 | ("libtiff" ,libtiff) | |
855 | ("libwebp" ,libwebp) | |
856 | ("openexr" ,openexr) | |
857 | ("openjpeg" ,openjpeg) | |
858 | ("zlib" ,zlib))) | |
43402c5c DT |
859 | (synopsis "Library for handling popular graphics image formats") |
860 | (description | |
861 | "FreeImage is a library for developers who would like to support popular | |
862 | graphics image formats like PNG, BMP, JPEG, TIFF and others.") | |
863 | (license license:gpl2+) | |
864 | (home-page "http://freeimage.sourceforge.net"))) | |
97039f6e AE |
865 | |
866 | (define-public vigra | |
019b3875 AE |
867 | (package |
868 | (name "vigra") | |
83273596 | 869 | (version "1.11.1") |
019b3875 AE |
870 | (source |
871 | (origin | |
872 | (method url-fetch) | |
873 | (uri (string-append "https://github.com/ukoethe/vigra/releases/download/" | |
83273596 MB |
874 | "Version-" (string-join (string-split version #\.) "-") |
875 | "/vigra-" version "-src.tar.gz")) | |
019b3875 | 876 | (sha256 (base32 |
83273596 | 877 | "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5")))) |
019b3875 AE |
878 | (build-system cmake-build-system) |
879 | (inputs | |
880 | `(("boost" ,boost) | |
881 | ("fftw" ,fftw) | |
882 | ("fftwf" ,fftwf) | |
883 | ("hdf5" ,hdf5) | |
884 | ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly | |
885 | ; to create a configure-flag | |
886 | ("libjpeg" ,libjpeg) | |
887 | ("libpng" ,libpng) | |
888 | ("libtiff" ,libtiff) | |
889 | ("openexr" ,openexr) | |
890 | ("python" ,python-2) ; print syntax | |
891 | ("python2-numpy" ,python2-numpy) | |
892 | ("zlib" ,zlib))) | |
893 | (native-inputs | |
894 | `(("doxygen" ,doxygen) | |
895 | ("python2-nose" ,python2-nose) | |
896 | ("python2-sphinx" ,python2-sphinx))) | |
897 | (arguments | |
898 | `(#:test-target "check" | |
e32db0fa RW |
899 | #:phases |
900 | (modify-phases %standard-phases | |
43696990 | 901 | (add-after 'unpack 'disable-broken-tests |
e32db0fa | 902 | (lambda _ |
43696990 | 903 | ;; See https://github.com/ukoethe/vigra/issues/432 |
e32db0fa RW |
904 | (substitute* "test/fourier/CMakeLists.txt" |
905 | (("VIGRA_ADD_TEST.*") "")) | |
43696990 MB |
906 | ;; This test fails with Numpy 1.15: |
907 | ;; <https://github.com/ukoethe/vigra/issues/436>. | |
908 | (substitute* "vigranumpy/test/CMakeLists.txt" | |
909 | (("test1\\.py") "")) | |
e32db0fa | 910 | #t))) |
019b3875 AE |
911 | #:configure-flags |
912 | (list "-Wno-dev" ; suppress developer mode with lots of warnings | |
913 | (string-append "-DVIGRANUMPY_INSTALL_DIR=" | |
914 | (assoc-ref %outputs "out") | |
915 | "/lib/python2.7/site-packages") | |
916 | ;; OpenEXR is not enabled by default. | |
917 | "-DWITH_OPENEXR=1" | |
f803f775 LF |
918 | ;; Fix rounding error on 32-bit machines |
919 | "-DCMAKE_C_FLAGS=-ffloat-store" | |
019b3875 AE |
920 | ;; The header files of ilmbase are not found when included |
921 | ;; by the header files of openexr, and an explicit flag | |
922 | ;; needs to be set. | |
923 | (string-append "-DCMAKE_CXX_FLAGS=-I" | |
924 | (assoc-ref %build-inputs "ilmbase") | |
f803f775 LF |
925 | "/include/OpenEXR" |
926 | " -ffloat-store")))) | |
019b3875 AE |
927 | (synopsis "Computer vision library") |
928 | (description | |
929 | "VIGRA stands for Vision with Generic Algorithms. It is an image | |
97039f6e AE |
930 | processing and analysis library that puts its main emphasis on customizable |
931 | algorithms and data structures. It is particularly strong for | |
932 | multi-dimensional image processing.") | |
019b3875 | 933 | (license license:expat) |
83273596 | 934 | (home-page "https://ukoethe.github.io/vigra/"))) |
060ad3de | 935 | |
62813c10 FT |
936 | (define-public vigra-c |
937 | (let* ((commit "a2ff675f42079e2623318d8ff8b4288dbe7a7f06") | |
938 | (revision "0") | |
939 | (version (git-version "0.0.0" revision commit))) | |
940 | (package | |
941 | (name "vigra-c") | |
942 | (version version) | |
943 | (home-page "https://github.com/BSeppke/vigra_c") | |
944 | (source (origin | |
945 | (method git-fetch) | |
946 | (uri (git-reference | |
947 | (url home-page) | |
948 | (commit commit))) | |
949 | (sha256 | |
950 | (base32 | |
951 | "1f1phmfbbz3dsq9330rd6bjmdg29hxskxi9l17cyx1f4mdqpgdgl")) | |
952 | (file-name (git-file-name name version)))) | |
953 | (build-system cmake-build-system) | |
954 | (arguments | |
955 | `(#:tests? #f)) ; No test target. | |
956 | (native-inputs | |
957 | `(("doxygen" ,doxygen))) | |
958 | (inputs | |
959 | `(("fftw" ,fftw) | |
960 | ("fftwf" ,fftwf) | |
961 | ("vigra" ,vigra))) | |
962 | (synopsis "C interface to the VIGRA computer vision library") | |
963 | (description | |
964 | "This package provides a C interface to the VIGRA C++ computer vision | |
965 | library. It is designed primarily to ease the implementation of higher-level | |
966 | language bindings to VIGRA.") | |
967 | (license license:expat)))) | |
968 | ||
060ad3de TUBK |
969 | (define-public libwebp |
970 | (package | |
971 | (name "libwebp") | |
71cb7512 | 972 | (version "1.0.2") |
060ad3de TUBK |
973 | (source |
974 | (origin | |
b981f777 MB |
975 | ;; No tarballs are provided for >0.6.1. |
976 | (method git-fetch) | |
977 | (uri (git-reference | |
978 | (url "https://chromium.googlesource.com/webm/libwebp") | |
979 | (commit (string-append "v" version)))) | |
980 | (file-name (git-file-name name version)) | |
060ad3de | 981 | (sha256 |
b2ed5ca7 | 982 | (base32 |
71cb7512 | 983 | "1ay0sai7f74dyk2gi975qfllmq534vnsx456npf16583mqb6ib2q")))) |
060ad3de TUBK |
984 | (build-system gnu-build-system) |
985 | (inputs | |
986 | `(("freeglut" ,freeglut) | |
987 | ("giflib" ,giflib) | |
988 | ("libjpeg" ,libjpeg) | |
989 | ("libpng" ,libpng) | |
990 | ("libtiff" ,libtiff))) | |
b981f777 MB |
991 | (native-inputs |
992 | `(("autoconf" ,autoconf) | |
993 | ("automake" ,automake) | |
994 | ("libtool" ,libtool))) | |
060ad3de TUBK |
995 | (arguments |
996 | '(#:configure-flags '("--enable-libwebpmux" | |
997 | "--enable-libwebpdemux" | |
b981f777 MB |
998 | "--enable-libwebpdecoder") |
999 | #:phases (modify-phases %standard-phases | |
1000 | (add-after 'unpack 'bootstrap | |
1001 | (lambda _ | |
1002 | (invoke "autoreconf" "-vif")))))) | |
060ad3de TUBK |
1003 | (home-page "https://developers.google.com/speed/webp/") |
1004 | (synopsis "Lossless and lossy image compression") | |
1005 | (description | |
1006 | "WebP is a new image format that provides lossless and lossy compression | |
1eefe4a8 LC |
1007 | for images. WebP lossless images are 26% smaller in size compared to |
1008 | PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at | |
1009 | equivalent SSIM index. WebP supports lossless transparency (also known as | |
1010 | alpha channel) with just 22% additional bytes. Transparency is also supported | |
060ad3de TUBK |
1011 | with lossy compression and typically provides 3x smaller file sizes compared |
1012 | to PNG when lossy compression is acceptable for the red/green/blue color | |
1013 | channels.") | |
1014 | (license license:bsd-3))) | |
b9ecd5ae SB |
1015 | |
1016 | (define-public libmng | |
1017 | (package | |
1018 | (name "libmng") | |
1019 | (version "2.0.3") | |
1020 | (source (origin | |
1021 | (method url-fetch) | |
0f971a04 LF |
1022 | (uri (string-append "mirror://sourceforge/libmng/libmng-devel/" |
1023 | version "/" name "-" version ".tar.xz")) | |
b9ecd5ae SB |
1024 | (sha256 |
1025 | (base32 | |
1026 | "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija")))) | |
1027 | (build-system gnu-build-system) | |
1028 | (propagated-inputs | |
1029 | ;; These are all in the 'Libs.private' field of libmng.pc. | |
1030 | `(("lcms" ,lcms) | |
1031 | ("libjpeg" ,libjpeg) | |
1032 | ("zlib" ,zlib))) | |
1033 | (home-page "http://www.libmng.com/") | |
1034 | (synopsis "Library for handling MNG files") | |
1035 | (description | |
1036 | "Libmng is the MNG (Multiple-image Network Graphics) reference library.") | |
1037 | (license license:bsd-3))) | |
3aab2c83 | 1038 | |
023f0fb0 AK |
1039 | (define-public exiv2 |
1040 | (package | |
1041 | (name "exiv2") | |
f66ea7b8 | 1042 | (version "0.26") |
023f0fb0 AK |
1043 | (source (origin |
1044 | (method url-fetch) | |
f66ea7b8 MB |
1045 | (uri (list (string-append "http://www.exiv2.org/builds/exiv2-" |
1046 | version "-trunk.tar.gz") | |
1047 | (string-append "http://www.exiv2.org/exiv2-" | |
023f0fb0 AK |
1048 | version ".tar.gz") |
1049 | (string-append "https://fossies.org/linux/misc/exiv2-" | |
1050 | version ".tar.gz"))) | |
4119376d MB |
1051 | (patches (search-patches "exiv2-CVE-2017-14860.patch" |
1052 | "exiv2-CVE-2017-14859-14862-14864.patch")) | |
023f0fb0 AK |
1053 | (sha256 |
1054 | (base32 | |
f306825d | 1055 | "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7")))) |
023f0fb0 AK |
1056 | (build-system gnu-build-system) |
1057 | (arguments '(#:tests? #f)) ; no `check' target | |
1058 | (propagated-inputs | |
1059 | `(("expat" ,expat) | |
1060 | ("zlib" ,zlib))) | |
1061 | (native-inputs | |
1062 | `(("intltool" ,intltool))) | |
1063 | (home-page "http://www.exiv2.org/") | |
1064 | (synopsis "Library and command-line utility to manage image metadata") | |
1065 | (description | |
1066 | "Exiv2 is a C++ library and a command line utility to manage image | |
1067 | metadata. It provides fast and easy read and write access to the Exif, IPTC | |
1068 | and XMP metadata of images in various formats.") | |
1069 | ||
1070 | ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the | |
1071 | ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>. | |
1072 | ;; The core is GPLv2+: | |
1073 | ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>. | |
1074 | (license license:gpl2+))) | |
1075 | ||
3aab2c83 DT |
1076 | (define-public devil |
1077 | (package | |
1078 | (name "devil") | |
77ab6983 | 1079 | (version "1.8.0") |
3aab2c83 DT |
1080 | (source (origin |
1081 | (method url-fetch) | |
1082 | (uri (string-append "http://downloads.sourceforge.net/openil/" | |
1083 | "DevIL-" version ".tar.gz")) | |
1084 | (sha256 | |
1085 | (base32 | |
77ab6983 MB |
1086 | "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80")))) |
1087 | (build-system cmake-build-system) | |
3aab2c83 | 1088 | (arguments |
77ab6983 MB |
1089 | '(;; XXX: Not supported in the released CMakeLists.txt. |
1090 | ;; Enable this for > 1.8.0. | |
1091 | #:tests? #f | |
3aab2c83 DT |
1092 | #:phases |
1093 | (modify-phases %standard-phases | |
77ab6983 MB |
1094 | (add-before 'configure 'change-directory |
1095 | (lambda _ (chdir "DevIL") #t))))) | |
3aab2c83 DT |
1096 | (native-inputs |
1097 | `(("pkg-config" ,pkg-config))) | |
1098 | (inputs | |
1099 | `(("lcms" ,lcms) | |
77ab6983 | 1100 | ("libjpeg" ,libjpeg-turbo) |
3aab2c83 DT |
1101 | ("libmng" ,libmng) |
1102 | ("libpng" ,libpng) | |
1103 | ("libtiff" ,libtiff) | |
1104 | ("openexr" ,openexr) | |
1105 | ("zlib" ,zlib))) | |
1106 | (synopsis "Library for manipulating many image formats") | |
1107 | (description "Developer's Image Library (DevIL) is a library to develop | |
1108 | applications with support for many types of images. DevIL can load, save, | |
1109 | convert, manipulate, filter and display a wide variety of image formats.") | |
1110 | (home-page "http://openil.sourceforge.net") | |
1111 | (license license:lgpl2.1+))) | |
b0b23e52 DT |
1112 | |
1113 | (define-public jasper | |
1114 | (package | |
1115 | (name "jasper") | |
8cc3983a | 1116 | (version "2.0.16") |
b0b23e52 | 1117 | (source (origin |
d57b017c RW |
1118 | (method git-fetch) |
1119 | (uri (git-reference | |
1120 | (url "https://github.com/mdadams/jasper.git") | |
1121 | (commit (string-append "version-" version)))) | |
1122 | (file-name (git-file-name name version)) | |
b0b23e52 DT |
1123 | (sha256 |
1124 | (base32 | |
8cc3983a | 1125 | "05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6")))) |
c7a70c33 | 1126 | (build-system cmake-build-system) |
d87c201f | 1127 | (inputs `(("libjpeg" ,libjpeg))) |
b0b23e52 DT |
1128 | (synopsis "JPEG-2000 library") |
1129 | (description "The JasPer Project is an initiative to provide a reference | |
1130 | implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e., | |
1131 | ISO/IEC 15444-1).") | |
1132 | (home-page "https://www.ece.uvic.ca/~frodo/jasper/") | |
1133 | (license (license:x11-style "file://LICENSE")))) | |
365a4a7f EF |
1134 | |
1135 | (define-public zimg | |
1136 | (package | |
1137 | (name "zimg") | |
60092c18 | 1138 | (version "2.5") |
365a4a7f EF |
1139 | (source |
1140 | (origin | |
ba185e2a RW |
1141 | (method git-fetch) |
1142 | (uri (git-reference | |
1143 | (url "https://github.com/sekrit-twc/zimg.git") | |
1144 | (commit (string-append "release-" version)))) | |
1145 | (file-name (git-file-name name version)) | |
365a4a7f EF |
1146 | (sha256 |
1147 | (base32 | |
ba185e2a | 1148 | "05krggiifbl6hyg2j3z8qz2k7si84g1qg9snhsnf1ml7mrhqhhlr")))) |
365a4a7f EF |
1149 | (build-system gnu-build-system) |
1150 | (native-inputs | |
1151 | `(("autoconf" ,autoconf) | |
1152 | ("automake" ,automake) | |
1153 | ("libtool" ,libtool))) | |
1154 | (arguments | |
1155 | '(#:phases | |
1156 | (modify-phases %standard-phases | |
1157 | (add-after 'unpack 'autogen | |
1158 | (lambda _ | |
fccacffb | 1159 | (invoke "sh" "autogen.sh")))))) |
365a4a7f EF |
1160 | (synopsis "Scaling, colorspace conversion, and dithering library") |
1161 | (description "Zimg implements the commonly required image processing basics | |
1162 | of scaling, colorspace conversion, and depth conversion. A simple API enables | |
1163 | conversion between any supported formats to operate with minimal knowledge from | |
1164 | the programmer.") | |
1165 | (home-page "https://github.com/sekrit-twc/zimg") | |
8ee04627 | 1166 | ;; test/extra/ contains musl-libm, |
365a4a7f | 1167 | ;; which is MIT/expat licensed, but only used for tests |
f62e7ce4 | 1168 | (license license:wtfpl2))) |
af7aaaeb TGR |
1169 | |
1170 | (define-public perceptualdiff | |
1171 | (package | |
1172 | (name "perceptualdiff") | |
1173 | (version "1.3") | |
1174 | (source | |
1175 | (origin | |
be59c48d TGR |
1176 | (method git-fetch) |
1177 | (uri (git-reference | |
1178 | (url "https://github.com/myint/perceptualdiff.git") | |
1179 | (commit (string-append "v" version)))) | |
1180 | (file-name (git-file-name name version)) | |
1181 | (sha256 | |
1182 | (base32 "0yys55f9i9g3wjjg0j2m0p0k21zwnid8520a8lrr30khm4k5gibp")))) | |
af7aaaeb TGR |
1183 | (build-system cmake-build-system) |
1184 | (inputs `(("freeimage" ,freeimage))) | |
1185 | (arguments | |
1186 | '(#:phases (modify-phases %standard-phases | |
1187 | (add-after 'unpack 'fix-tests | |
1188 | ;; cmake-build-system uses a build/ directory outside | |
1189 | ;; of the source tree, one level higher than expected | |
1190 | (lambda _ | |
1191 | (substitute* "test/run_tests.bash" | |
fccacffb MW |
1192 | (("../build") "../../build")) |
1193 | #t))))) | |
af7aaaeb TGR |
1194 | (home-page "https://github.com/myint/perceptualdiff") |
1195 | (synopsis "Perceptual image comparison utility") | |
1196 | (description "PerceptualDiff visually compares two images to determine | |
1197 | whether they look alike. It uses a computational model of the human visual | |
1198 | system to detect similarities. This allows it too see beyond irrelevant | |
1199 | differences in file encoding, image quality, and other small variations.") | |
1200 | (license license:gpl2+))) | |
1fa3e336 EB |
1201 | |
1202 | (define-public steghide | |
1203 | (package | |
1204 | (name "steghide") | |
1205 | (version "0.5.1") | |
1206 | (source (origin | |
1207 | (method url-fetch) | |
1208 | (uri (string-append "mirror://sourceforge/steghide/steghide/" | |
1209 | version "/steghide-" version ".tar.bz2")) | |
1210 | (sha256 | |
1211 | (base32 | |
1212 | "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2")) | |
1213 | (patches (list (search-patch "steghide-fixes.patch"))))) | |
1214 | (build-system gnu-build-system) | |
1215 | (native-inputs | |
7c90d0f4 | 1216 | `(("gettext" ,gettext-minimal) |
1fa3e336 EB |
1217 | ("libtool" ,libtool) |
1218 | ("perl" ,perl))) ;for tests | |
1219 | (inputs | |
1220 | `(("libmhash" ,libmhash) | |
1221 | ("libmcrypt" ,libmcrypt) | |
1222 | ("libjpeg" ,libjpeg) | |
1223 | ("zlib" ,zlib))) | |
1224 | (arguments | |
a56bf101 LC |
1225 | `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc |
1226 | ||
1227 | #:phases (modify-phases %standard-phases | |
1228 | (add-before 'configure 'set-perl-search-path | |
1229 | (lambda _ | |
1230 | ;; Work around "dotless @INC" build failure. | |
1231 | (setenv "PERL5LIB" | |
1232 | (string-append (getcwd) "/tests:" | |
1233 | (getenv "PERL5LIB"))) | |
1234 | #t))))) | |
1fa3e336 EB |
1235 | (home-page "http://steghide.sourceforge.net") |
1236 | (synopsis "Image and audio steganography") | |
1237 | (description | |
7832785d TGR |
1238 | "Steghide is a program to hide data in various kinds of image and audio |
1239 | files (known as @dfn{steganography}). Neither color nor sample frequencies are | |
1240 | changed, making the embedding resistant against first-order statistical tests.") | |
1fa3e336 | 1241 | (license license:gpl2+))) |
ac2a38a5 RW |
1242 | |
1243 | (define-public stb-image-for-extempore | |
1244 | (let ((revision "1") | |
1245 | (commit "152a250a702bf28951bb0220d63bc0c99830c498")) | |
1246 | (package | |
1247 | (name "stb-image-for-extempore") | |
1248 | (version (string-append "0-" revision "." (string-take commit 9))) | |
1249 | (source | |
1250 | (origin (method git-fetch) | |
1251 | (uri (git-reference | |
1252 | (url "https://github.com/extemporelang/stb.git") | |
1253 | (commit commit))) | |
1254 | (sha256 | |
1255 | (base32 | |
1256 | "0y0aa20pj9311x2ii06zg8xs34idg14hfgldqc5ymizc6cf1qiqv")) | |
1257 | (file-name (string-append name "-" version "-checkout")))) | |
1258 | (build-system cmake-build-system) | |
1259 | (arguments `(#:tests? #f)) ; no tests included | |
39162ee4 RW |
1260 | ;; Extempore refuses to build on architectures other than x86_64 |
1261 | (supported-systems '("x86_64-linux")) | |
ac2a38a5 RW |
1262 | (home-page "https://github.com/extemporelang/stb") |
1263 | (synopsis "Image library for Extempore") | |
1264 | (description | |
1265 | "This package is a collection of assorted single-file libraries. Of | |
1266 | all included libraries only the image loading and decoding library is | |
1267 | installed as @code{stb_image}.") | |
1268 | (license license:public-domain)))) | |
93117227 AI |
1269 | |
1270 | (define-public optipng | |
1271 | (package | |
1272 | (name "optipng") | |
bbf8832f | 1273 | (version "0.7.7") |
93117227 AI |
1274 | (source |
1275 | (origin | |
1276 | (method url-fetch) | |
1277 | (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-" | |
1278 | version ".tar.gz")) | |
1279 | (sha256 | |
1280 | (base32 | |
64ed4b6a EF |
1281 | "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg")) |
1282 | (modules '((guix build utils))) | |
1283 | (snippet | |
1284 | '(begin | |
1285 | (delete-file-recursively "src/libpng") | |
1286 | (delete-file-recursively "src/zlib") | |
1287 | #t)))) | |
93117227 AI |
1288 | (build-system gnu-build-system) |
1289 | (inputs | |
64ed4b6a EF |
1290 | `(("libpng" ,libpng) |
1291 | ("zlib" ,zlib))) | |
93117227 AI |
1292 | (arguments |
1293 | '(#:phases | |
1294 | (modify-phases %standard-phases | |
93117227 AI |
1295 | (replace 'configure |
1296 | (lambda* (#:key outputs #:allow-other-keys) | |
bbf8832f TGR |
1297 | ;; configure script doesn't accept arguments CONFIG_SHELL and SHELL |
1298 | (invoke "sh" "configure" | |
64ed4b6a EF |
1299 | (string-append "--prefix=" (assoc-ref outputs "out")) |
1300 | "-with-system-libs") | |
bbf8832f TGR |
1301 | #t))))) |
1302 | (synopsis "Optimizer that recompresses PNG image files to a smaller size") | |
93117227 AI |
1303 | (description "OptiPNG is a PNG optimizer that recompresses image |
1304 | files to a smaller size, without losing any information. This program | |
1305 | also converts external formats (BMP, GIF, PNM and TIFF) to optimized | |
1306 | PNG, and performs PNG integrity checks and corrections.") | |
1307 | (home-page "http://optipng.sourceforge.net/") | |
1308 | (license license:zlib))) | |
37e05d64 TGR |
1309 | |
1310 | (define-public libjpeg-turbo | |
1311 | (package | |
1312 | (name "libjpeg-turbo") | |
92f19f13 | 1313 | (version "2.0.1") |
02961420 | 1314 | (replacement libjpeg-turbo-2.0.2) |
37e05d64 TGR |
1315 | (source (origin |
1316 | (method url-fetch) | |
ec92d786 MB |
1317 | (uri (string-append "mirror://sourceforge/libjpeg-turbo/" |
1318 | version "/libjpeg-turbo-" version ".tar.gz")) | |
37e05d64 TGR |
1319 | (sha256 |
1320 | (base32 | |
92f19f13 | 1321 | "1zv6z093l3x3jzygvni7b819j7xhn6d63jhcdrckj7fz67n6ry75")))) |
6871121b | 1322 | (build-system cmake-build-system) |
37e05d64 TGR |
1323 | (native-inputs |
1324 | `(("nasm" ,nasm))) | |
1325 | (arguments | |
6871121b MB |
1326 | '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib" |
1327 | "-DENABLE_STATIC=0"))) | |
a77de47a | 1328 | (home-page "https://libjpeg-turbo.org/") |
37e05d64 TGR |
1329 | (synopsis "SIMD-accelerated JPEG image handling library") |
1330 | (description "libjpeg-turbo is a JPEG image codec that accelerates baseline | |
1331 | JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on | |
1332 | x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems, | |
1333 | its highly-optimized Huffman coding routines allow it to outperform libjpeg by | |
1334 | a significant amount. | |
1335 | libjpeg-turbo implements both the traditional libjpeg API and the less powerful | |
1336 | but more straightforward TurboJPEG API, and provides a full-featured Java | |
1337 | interface. It supports color space extensions that allow it to compress from | |
1338 | and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).") | |
71de61c3 MB |
1339 | ;; libjpeg-turbo is covered by three different licenses; see LICENSE.md. |
1340 | (license (list license:bsd-3 ;the TurboJPEG API library and programs | |
1341 | license:ijg ;the libjpeg library and associated tools | |
1342 | license:zlib)))) ;the libjpeg-turbo SIMD extensions | |
21122bd7 | 1343 | |
02961420 MB |
1344 | (define-public libjpeg-turbo-2.0.2 |
1345 | (package | |
1346 | (inherit libjpeg-turbo) | |
1347 | (version "2.0.2") | |
1348 | (source (origin | |
1349 | (inherit (package-source libjpeg-turbo)) | |
1350 | (uri (string-append "mirror://sourceforge/libjpeg-turbo/" | |
1351 | version "/libjpeg-turbo-" version ".tar.gz")) | |
1352 | (sha256 | |
1353 | (base32 | |
1354 | "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c")))))) | |
1355 | ||
21122bd7 JD |
1356 | (define-public niftilib |
1357 | (package | |
f729a4d8 RW |
1358 | (name "niftilib") |
1359 | (version "2.0.0") | |
1360 | (source (origin | |
1361 | (method url-fetch) | |
1362 | (uri (list (string-append "mirror://sourceforge/niftilib/" | |
1363 | "nifticlib/nifticlib_" | |
1364 | (string-join (string-split version #\.) "_") | |
1365 | "/nifticlib-" version ".tar.gz"))) | |
1366 | (sha256 | |
1367 | (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3")))) | |
1368 | (build-system gnu-build-system) | |
1369 | (arguments | |
1370 | '(#:tests? #f ; there is no test target | |
1371 | #:parallel-build? #f ; not supported | |
1372 | #:make-flags | |
1373 | (list "SHELL=bash" | |
1374 | (string-append "ZLIB_INC=" | |
1375 | (assoc-ref %build-inputs "zlib") "/include") | |
1376 | ;; Append "-fPIC" to CFLAGS. | |
1377 | (string-append "CFLAGS=" | |
1378 | "-Wall -ansi -pedantic -fPIC")) | |
1379 | #:phases | |
1380 | (modify-phases %standard-phases | |
1381 | (replace 'install | |
1382 | (lambda* (#:key outputs #:allow-other-keys) | |
1383 | (let ((out (assoc-ref outputs "out"))) | |
1384 | (for-each | |
1385 | (lambda (dir) | |
1386 | (copy-recursively dir (string-append out "/" dir))) | |
1387 | '("bin" "lib" "include"))) | |
1388 | #t)) | |
1389 | (delete 'configure)))) | |
1390 | (inputs | |
1391 | `(("zlib" ,zlib))) | |
1392 | (synopsis "Library for reading and writing files in the nifti-1 format") | |
1393 | (description "Niftilib is a set of i/o libraries for reading and writing | |
21122bd7 JD |
1394 | files in the nifti-1 data format - a binary file format for storing |
1395 | medical image data, e.g. magnetic resonance image (MRI) and functional MRI | |
1396 | (fMRI) brain images.") | |
f729a4d8 RW |
1397 | (home-page "http://niftilib.sourceforge.net") |
1398 | (license license:public-domain))) | |
f2079849 JL |
1399 | |
1400 | (define-public gpick | |
1401 | (package | |
1402 | (name "gpick") | |
1403 | (version "0.2.5") | |
1404 | (source (origin | |
94be94cf RW |
1405 | (method git-fetch) |
1406 | (uri (git-reference | |
1407 | (url "https://github.com/thezbyg/gpick.git") | |
1408 | (commit (string-append name "-" version)))) | |
1409 | (file-name (git-file-name name version)) | |
f2079849 JL |
1410 | (sha256 |
1411 | (base32 | |
94be94cf | 1412 | "0mcj806zagh122qgrdkrg0macpzby97y89xi2sjyn3bh8vmmyxjy")))) |
2235abb2 | 1413 | (build-system scons-build-system) |
f2079849 JL |
1414 | (native-inputs |
1415 | `(("boost" ,boost) | |
1416 | ("gettext" ,gnu-gettext) | |
2235abb2 | 1417 | ("pkg-config" ,pkg-config))) |
f2079849 JL |
1418 | (inputs |
1419 | `(("expat" ,expat) | |
1420 | ("gtk2" ,gtk+-2) | |
1421 | ("lua" ,lua-5.2))) | |
1422 | (arguments | |
1423 | `(#:tests? #f | |
2235abb2 AI |
1424 | #:scons ,scons-python2 |
1425 | #:scons-flags (list (string-append "DESTDIR=" %output)) | |
f2079849 JL |
1426 | #:phases |
1427 | (modify-phases %standard-phases | |
1428 | (add-before 'build 'fix-lua-reference | |
1429 | (lambda _ | |
1430 | (substitute* "SConscript" | |
1431 | (("lua5.2") "lua-5.2")) | |
2235abb2 | 1432 | #t))))) |
f2079849 JL |
1433 | (home-page "http://www.gpick.org/") |
1434 | (synopsis "Color picker") | |
1435 | (description "Gpick is an advanced color picker and palette editing tool.") | |
1436 | (license license:bsd-3))) | |
bc806b0c LF |
1437 | |
1438 | (define-public libiptcdata | |
1439 | (package | |
1440 | (name "libiptcdata") | |
a42b6848 | 1441 | (version "1.0.5") |
bc806b0c LF |
1442 | (source (origin |
1443 | (method url-fetch) | |
a42b6848 TGR |
1444 | (uri (string-append "https://github.com/ianw/libiptcdata" |
1445 | "/releases/download/release_" | |
1446 | (string-join (string-split version #\.) "_") | |
1447 | "/" name "-" version ".tar.gz")) | |
bc806b0c LF |
1448 | (sha256 |
1449 | (base32 | |
a42b6848 | 1450 | "17m2bscc76r1bymjgb44fbbfrdsjfqyb2ivg9wchyllm8pgx1560")))) |
bc806b0c | 1451 | (build-system gnu-build-system) |
a42b6848 | 1452 | (home-page "https://github.com/ianw/libiptcdata") |
bc806b0c | 1453 | (synopsis "IPTC metadata manipulation library") |
a09a2119 TGR |
1454 | (description |
1455 | "Libiptcdata is a C library for manipulating the International Press | |
1456 | Telecommunications Council (@dfn{IPTC}) metadata stored within multimedia files | |
bc806b0c LF |
1457 | such as images. This metadata can include captions and keywords, often used by |
1458 | popular photo management applications. The library provides routines for | |
1459 | parsing, viewing, modifying, and saving this metadata.") | |
1460 | (license license:lgpl2.0+))) | |
84567657 OP |
1461 | |
1462 | (define-public flameshot | |
1463 | (package | |
1464 | (name "flameshot") | |
1465 | (version "0.5.1") | |
1466 | (source | |
1467 | (origin | |
743600e9 RW |
1468 | (method git-fetch) |
1469 | (uri (git-reference | |
1470 | (url "https://github.com/lupoDharkael/flameshot.git") | |
1471 | (commit (string-append "v" version)))) | |
1472 | (file-name (git-file-name name version)) | |
84567657 OP |
1473 | (sha256 |
1474 | (base32 | |
743600e9 | 1475 | "13h77np93r796jf289v4r687cmnpqkyqs34dm9gif4akaig74ky0")))) |
84567657 OP |
1476 | (build-system gnu-build-system) |
1477 | (native-inputs | |
1478 | `(("qttools" ,qttools))) | |
1479 | (inputs | |
1480 | `(("qtbase" ,qtbase))) | |
1481 | (arguments | |
1482 | `(#:tests? #f ; no tests | |
1483 | #:phases | |
1484 | (modify-phases %standard-phases | |
1485 | (replace 'configure | |
1486 | (lambda* (#:key outputs #:allow-other-keys) | |
1487 | (invoke "qmake" | |
1488 | "CONFIG+=packaging" | |
1489 | (string-append "BASEDIR=" (assoc-ref outputs "out")) | |
1490 | "PREFIX=/")))))) | |
1491 | (home-page "https://github.com/lupoDharkael/flameshot") | |
1492 | (synopsis "Powerful yet simple to use screenshot software") | |
1493 | (description "Flameshot is a screenshot program. | |
1494 | Features: | |
1495 | ||
1496 | @itemize | |
1497 | @item Customizable appearance. | |
1498 | @item Easy to use. | |
1499 | @item In-app screenshot edition. | |
1500 | @item DBus interface. | |
1501 | @item Upload to Imgur. | |
1502 | @end itemize\n") | |
1503 | (license license:gpl3+))) | |
da4dde61 LF |
1504 | |
1505 | (define-public r-jpeg | |
1506 | (package | |
1507 | (name "r-jpeg") | |
1508 | (version "0.1-8") | |
1509 | (source | |
1510 | (origin | |
1511 | (method url-fetch) | |
1512 | (uri (cran-uri "jpeg" version)) | |
1513 | (sha256 | |
1514 | (base32 | |
1515 | "05hawv5qcb82ljc1l2nchx1wah8mq2k2kfkhpzyww554ngzbwcnh")))) | |
1516 | (build-system r-build-system) | |
1517 | (inputs `(("libjpeg" ,libjpeg))) | |
1518 | (home-page "http://www.rforge.net/jpeg/") | |
1519 | (synopsis "Read and write JPEG images with R") | |
1520 | (description "This package provides a way to read, write and display bitmap | |
1521 | images stored in the JPEG format with R. It can read and write both files and | |
1522 | in-memory raw vectors.") | |
1523 | (license license:gpl2+))) | |
0d529a7c PN |
1524 | |
1525 | (define-public gifsicle | |
1526 | (package | |
1527 | (name "gifsicle") | |
5c46e1dd | 1528 | (version "1.92") |
0d529a7c PN |
1529 | (source |
1530 | (origin | |
1531 | (method url-fetch) | |
645b6c7f | 1532 | (uri (string-append "https://www.lcdf.org/gifsicle/gifsicle-" |
0d529a7c PN |
1533 | version ".tar.gz")) |
1534 | (sha256 | |
5c46e1dd | 1535 | (base32 "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas")))) |
0d529a7c PN |
1536 | (build-system gnu-build-system) |
1537 | (arguments | |
1538 | '(#:phases | |
1539 | (modify-phases %standard-phases | |
1540 | (add-before 'check 'patch-tests | |
1541 | (lambda _ | |
1542 | (substitute* "test/testie" | |
1543 | (("/usr/bin/perl") | |
1544 | (which "perl")) | |
1545 | (("/bin/sh") | |
1546 | (which "sh")) | |
1547 | (("/bin/rm") | |
1548 | (which "rm"))) | |
1549 | #t))))) | |
5c46e1dd | 1550 | (native-inputs `(("perl" ,perl))) ; only for tests |
0d529a7c | 1551 | (inputs `(("libx11" ,libx11))) |
645b6c7f | 1552 | (home-page "https://www.lcdf.org/gifsicle/") |
0d529a7c PN |
1553 | (synopsis "Edit GIF images and animations") |
1554 | (description "Gifsicle is a command-line GIF image manipulation tool that: | |
1555 | ||
1556 | @itemize | |
1557 | @item Provides a batch mode for changing GIFs in place. | |
1558 | @item Prints detailed information about GIFs, including comments. | |
1559 | @item Control over interlacing, comments, looping, transparency, etc. | |
1560 | @item Creates well-behaved GIFs: removes redundant colors, only uses local color | |
1561 | tables, etc. | |
1562 | @item Shrinks colormaps and change images to use the Web-safe palette. | |
1563 | @item Optimizes GIF animations, or unoptimizes them for easier editing. | |
1564 | @end itemize | |
1565 | ||
1566 | Two other programs are included with Gifsicle: @command{gifview} is a | |
1567 | lightweight animated-GIF viewer, and @command{gifdiff} compares two GIFs for | |
1568 | identical visual appearance.") | |
1569 | (license license:gpl2+))) | |
3239dcd3 PAR |
1570 | |
1571 | (define-public jp2a | |
1572 | (package | |
1573 | (name "jp2a") | |
1574 | (version "1.0.7") | |
1575 | (source | |
1576 | (origin | |
5bc593df RW |
1577 | (method git-fetch) |
1578 | (uri (git-reference | |
1579 | (url "https://github.com/cslarsen/jp2a.git") | |
1580 | (commit (string-append "v" version)))) | |
1581 | (file-name (git-file-name name version)) | |
3239dcd3 PAR |
1582 | (sha256 |
1583 | (base32 | |
5bc593df | 1584 | "12a1z9ba2j16y67f41y8ax5sgv1wdjd71pg7circdxkj263n78ql")))) |
3239dcd3 PAR |
1585 | (build-system gnu-build-system) |
1586 | (inputs | |
1587 | `(("libjpeg" ,libjpeg) | |
1588 | ("curl" ,curl))) | |
1589 | (native-inputs | |
1590 | `(("autoconf" ,autoconf) | |
1591 | ("automake" ,automake) | |
1592 | ("pkg-config" ,pkg-config))) | |
1593 | (home-page "https://csl.name/jp2a/") | |
1594 | (synopsis "Convert JPEG images to ASCII") | |
1595 | (description | |
1596 | "Jp2a is a small utility that converts JPEG images to ASCII.") | |
1597 | (license license:gpl2))) | |
0290f533 RH |
1598 | |
1599 | (define-public grim | |
1600 | (package | |
444c4c08 | 1601 | (name "grim") |
3d4c4fc2 | 1602 | (version "1.1") |
444c4c08 RH |
1603 | (source |
1604 | (origin | |
90c7ea44 TGR |
1605 | (method git-fetch) |
1606 | (uri (git-reference | |
1607 | (url "https://github.com/emersion/grim.git") | |
1608 | (commit (string-append "v" version)))) | |
1609 | (file-name (git-file-name name version)) | |
444c4c08 | 1610 | (sha256 |
90c7ea44 | 1611 | (base32 "1bcvkggqszcwy6hg8g4mch3yr25ic0baafbd90af5s5mrhrjxxxz")))) |
444c4c08 RH |
1612 | (build-system meson-build-system) |
1613 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1614 | (inputs `(("cairo" ,cairo) | |
1615 | ("libjpeg-turbo" ,libjpeg-turbo) | |
1616 | ("scdoc" ,scdoc) | |
1617 | ("wayland" ,wayland) | |
1618 | ("wayland-protocols" ,wayland-protocols))) | |
1619 | (home-page "https://github.com/emersion/grim") | |
1620 | (synopsis "Create screenshots from a Wayland compositor") | |
1621 | (description "grim can create screenshots from a Wayland compositor.") | |
1622 | ;; MIT license. | |
1623 | (license license:expat))) | |
bd86a1be RH |
1624 | |
1625 | (define-public slurp | |
1626 | (package | |
1627 | (name "slurp") | |
10db6778 | 1628 | (version "1.0.1") |
bd86a1be RH |
1629 | (source |
1630 | (origin | |
1631 | (method git-fetch) | |
1632 | (uri (git-reference | |
1633 | (url "https://github.com/emersion/slurp.git") | |
1634 | (commit (string-append "v" version)))) | |
1635 | (file-name (git-file-name name version)) | |
1636 | (sha256 | |
10db6778 | 1637 | (base32 "072lkwhpvr753wfqzmd994bnhbrgfavxcgqcyml7abab28sdhs1y")))) |
bd86a1be RH |
1638 | (build-system meson-build-system) |
1639 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1640 | (inputs `(("cairo" ,cairo) | |
1641 | ("scdoc" ,scdoc) | |
1642 | ("wayland" ,wayland) | |
1643 | ("wayland-protocols" ,wayland-protocols))) | |
1644 | (home-page "https://github.com/emersion/slurp") | |
1645 | (synopsis "Select a region in a Wayland compositor") | |
1646 | (description "Slurp can select a region in a Wayland compositor and print it | |
1647 | to the standard output. It works well together with grim.") | |
1648 | ;; MIT license. | |
1649 | (license license:expat))) |