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