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> |
002c7a4f | 4 | ;;; Copyright © 2014, 2015, 2016, 2020 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> |
fecd608f | 10 | ;;; Copyright © 2016, 2017, 2018, 2020 Leo Famulari <leo@famulari.name> |
2f823fb4 | 11 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
8933abaf | 12 | ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
1fa3e336 | 13 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
1367ee7a | 14 | ;;; Copyright © 2016, 2017, 2020 Arun Isaac <arunisaac@systemreboot.net> |
3c8ba11a | 15 | ;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net> |
3c986a7d | 16 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
14138912 | 17 | ;;; Copyright © 2017,2019,2020 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> |
a82e6faa | 22 | ;;; Copyright © 2018, 2019, 2020 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> |
7eed5845 | 26 | ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> |
95b800e6 | 27 | ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in> |
3f1f98d9 | 28 | ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
98f5548c | 29 | ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com> |
66f10906 | 30 | ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> |
bc7879cc | 31 | ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com> |
e55354b8 DT |
32 | ;;; |
33 | ;;; This file is part of GNU Guix. | |
34 | ;;; | |
35 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
36 | ;;; under the terms of the GNU General Public License as published by | |
37 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
38 | ;;; your option) any later version. | |
39 | ;;; | |
40 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
41 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
42 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
43 | ;;; GNU General Public License for more details. | |
44 | ;;; | |
45 | ;;; You should have received a copy of the GNU General Public License | |
46 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
47 | ||
48 | (define-module (gnu packages image) | |
49 | #:use-module (gnu packages) | |
97039f6e | 50 | #:use-module (gnu packages algebra) |
37e05d64 | 51 | #:use-module (gnu packages assembly) |
894e2cba | 52 | #:use-module (gnu packages autotools) |
95b800e6 | 53 | #:use-module (gnu packages base) |
97039f6e | 54 | #:use-module (gnu packages boost) |
ac257f12 | 55 | #:use-module (gnu packages check) |
ff5733d1 | 56 | #:use-module (gnu packages cmake) |
3239dcd3 | 57 | #:use-module (gnu packages curl) |
e55354b8 | 58 | #:use-module (gnu packages compression) |
99828fa7 | 59 | #:use-module (gnu packages documentation) |
efa77baf | 60 | #:use-module (gnu packages fontutils) |
0290f533 | 61 | #:use-module (gnu packages freedesktop) |
1fa3e336 | 62 | #:use-module (gnu packages gettext) |
97039f6e | 63 | #:use-module (gnu packages ghostscript) |
8a55a399 | 64 | #:use-module (gnu packages gimp) |
060ad3de | 65 | #:use-module (gnu packages gl) |
023f0fb0 | 66 | #:use-module (gnu packages glib) |
8a55a399 | 67 | #:use-module (gnu packages gnome) |
ced7cc92 | 68 | #:use-module (gnu packages graphics) |
f2079849 JL |
69 | #:use-module (gnu packages gtk) |
70 | #:use-module (gnu packages lua) | |
0290f533 | 71 | #:use-module (gnu packages man) |
97039f6e | 72 | #:use-module (gnu packages maths) |
1fa3e336 | 73 | #:use-module (gnu packages mcrypt) |
115ace6b | 74 | #:use-module (gnu packages mp3) |
dc7e5783 | 75 | #:use-module (gnu packages ncurses) |
97039f6e | 76 | #:use-module (gnu packages perl) |
a5d4c96b | 77 | #:use-module (gnu packages photo) |
efa77baf | 78 | #:use-module (gnu packages pkg-config) |
97039f6e | 79 | #:use-module (gnu packages python) |
44d10b1f | 80 | #:use-module (gnu packages python-xyz) |
14138912 | 81 | #:use-module (gnu packages qt) |
8933abaf | 82 | #:use-module (gnu packages ragel) |
9d0c291e | 83 | #:use-module (gnu packages sphinx) |
8a55a399 | 84 | #:use-module (gnu packages swig) |
3f1f98d9 | 85 | #:use-module (gnu packages textutils) |
fecd608f | 86 | #:use-module (gnu packages video) |
14138912 | 87 | #:use-module (gnu packages web) |
007edfb7 | 88 | #:use-module (gnu packages xdisorg) |
efa77baf | 89 | #:use-module (gnu packages xml) |
76d88cfa | 90 | #:use-module (gnu packages xorg) |
b5b73a82 | 91 | #:use-module ((guix licenses) #:prefix license:) |
e55354b8 DT |
92 | #:use-module (guix packages) |
93 | #:use-module (guix download) | |
ac2a38a5 | 94 | #:use-module (guix git-download) |
a82e6faa | 95 | #:use-module (guix utils) |
38c55e5c | 96 | #:use-module (guix build-system gnu) |
e596ab0f | 97 | #:use-module (guix build-system cmake) |
1367ee7a | 98 | #:use-module (guix build-system copy) |
0290f533 | 99 | #:use-module (guix build-system meson) |
f2079849 | 100 | #:use-module (guix build-system python) |
98f5548c | 101 | #:use-module (guix build-system qt) |
2235abb2 | 102 | #:use-module (guix build-system scons) |
a1552f52 | 103 | #:use-module (guix deprecation) |
e596ab0f | 104 | #:use-module (srfi srfi-1)) |
e55354b8 | 105 | |
c42526e9 RG |
106 | (define-public iqa |
107 | (package | |
108 | (name "iqa") | |
109 | (version "1.1.2") | |
110 | (source | |
111 | (origin | |
112 | (method url-fetch) | |
113 | (uri | |
114 | (string-append "https://sourceforge.net/projects/iqa/files/" | |
115 | "1.1.2%20Release/iqa_1.1.2_src.tar.gz/download")) | |
116 | (sha256 | |
117 | (base32 "00mgwy031ammab6bwmd1whhvqv3fxy1cs1igabq0n3ag12zhjs77")))) | |
118 | (build-system gnu-build-system) | |
119 | (arguments | |
120 | `(#:test-target "test" | |
121 | #:phases | |
122 | (modify-phases %standard-phases | |
123 | (delete 'configure) | |
124 | (replace 'install | |
125 | (lambda* (#:key outputs #:allow-other-keys) | |
126 | (let* ((out (assoc-ref outputs "out")) | |
127 | (lib (string-append out "/lib"))) | |
128 | (install-file "build/debug/libiqa.a" lib) | |
129 | #t)))))) | |
130 | (synopsis "Image Quality Assessment") | |
131 | (description "IQA is a C library for objectively measuring image/video | |
132 | quality. It implements many popular algorithms, such as MS-SSIM, MS-SSIM*, | |
133 | SIMM, MSE, and PSNR. It is designed to be fast, accurate, and reliable. All | |
134 | code is Valgrind-clean and unit tested.") | |
135 | (home-page "https://sourceforge.net/projects/iqa/") | |
136 | (license license:bsd-4))) | |
137 | ||
e55354b8 DT |
138 | (define-public libpng |
139 | (package | |
140 | (name "libpng") | |
002c7a4f | 141 | (version "1.6.37") ; Remember to also update libpng-apng if possible! |
e55354b8 DT |
142 | (source (origin |
143 | (method url-fetch) | |
a2f3c614 | 144 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" |
21ef9843 MW |
145 | version "/libpng-" version ".tar.xz") |
146 | (string-append | |
147 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
913059a1 EF |
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"))) | |
e55354b8 | 152 | (sha256 |
8fda37bc | 153 | (base32 |
8b5b3aca | 154 | "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh")))) |
e55354b8 | 155 | (build-system gnu-build-system) |
420b0137 MB |
156 | (arguments |
157 | `(#:configure-flags '("--disable-static"))) | |
e55354b8 DT |
158 | |
159 | ;; libpng.la says "-lz", so propagate it. | |
160 | (propagated-inputs `(("zlib" ,zlib))) | |
161 | ||
162 | (synopsis "Library for handling PNG files") | |
163 | (description | |
164 | "Libpng is the official PNG (Portable Network Graphics) reference | |
35b9e423 | 165 | library. It supports almost all PNG features and is extensible.") |
e55354b8 DT |
166 | (license license:zlib) |
167 | (home-page "http://www.libpng.org/pub/png/libpng.html"))) | |
168 | ||
e0958c2d | 169 | ;; libpng-apng should be updated when the APNG patch is released: |
170 | ;; <https://bugs.gnu.org/27556> | |
114a325e | 171 | (define-public libpng-apng |
172 | (package | |
114a325e | 173 | (name "libpng-apng") |
002c7a4f | 174 | (version "1.6.37") |
e0958c2d | 175 | (source |
176 | (origin | |
177 | (method url-fetch) | |
178 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" | |
179 | version "/libpng-" version ".tar.xz") | |
180 | (string-append | |
181 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
182 | "/libpng16/libpng-" version ".tar.xz") | |
183 | (string-append | |
184 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
185 | "/libpng16/libpng-" version ".tar.xz"))) | |
186 | (sha256 | |
187 | (base32 | |
002c7a4f | 188 | "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh")))) |
e0958c2d | 189 | (build-system gnu-build-system) |
114a325e | 190 | (arguments |
696f1d0f LF |
191 | `(#:modules ((guix build gnu-build-system) |
192 | (guix build utils) | |
193 | (srfi srfi-1)) | |
194 | #:phases | |
114a325e | 195 | (modify-phases %standard-phases |
196 | (add-after 'unpack 'patch-apng | |
197 | (lambda* (#:key inputs #:allow-other-keys) | |
198 | (define (apply-patch file) | |
fccacffb MW |
199 | (invoke "patch" "-p1" "--force" |
200 | "--input" file)) | |
114a325e | 201 | (let ((apng.gz (assoc-ref inputs "apng"))) |
202 | (format #t "Applying APNG patch '~a'...~%" | |
203 | apng.gz) | |
fccacffb MW |
204 | (invoke "sh" "-c" |
205 | (string-append "gunzip < " apng.gz " > the-patch")) | |
206 | (apply-patch "the-patch") | |
207 | #t))) | |
114a325e | 208 | (add-before 'configure 'no-checks |
209 | (lambda _ | |
210 | (substitute* "Makefile.in" | |
211 | (("^scripts/symbols.chk") "") | |
212 | (("check: scripts/symbols.chk") "")) | |
114a325e | 213 | #t))))) |
214 | (inputs | |
215 | `(("apng" ,(origin | |
216 | (method url-fetch) | |
217 | (uri | |
218 | (string-append "mirror://sourceforge/libpng-apng/libpng16/" | |
219 | version "/libpng-" version "-apng.patch.gz")) | |
220 | (sha256 | |
221 | (base32 | |
002c7a4f | 222 | "1dh0250mw9b2hx7cdmnb2blk7ddl49n6vx8zz7jdmiwxy38v4fw2")))))) |
114a325e | 223 | (native-inputs |
224 | `(("libtool" ,libtool))) | |
e0958c2d | 225 | ;; libpng.la says "-lz", so propagate it. |
226 | (propagated-inputs | |
227 | `(("zlib" ,zlib))) | |
114a325e | 228 | (synopsis "APNG patch for libpng") |
229 | (description | |
230 | "APNG (Animated Portable Network Graphics) is an unofficial | |
231 | extension of the APNG (Portable Network Graphics) format. | |
232 | APNG patch provides APNG support to libpng.") | |
e0958c2d | 233 | (home-page "https://sourceforge.net/projects/libpng-apng/") |
234 | (license license:zlib))) | |
114a325e | 235 | |
2df831a7 RW |
236 | (define-public libpng-1.2 |
237 | (package | |
238 | (inherit libpng) | |
6cdd8c97 | 239 | (version "1.2.59") |
2df831a7 RW |
240 | (source |
241 | (origin | |
242 | (method url-fetch) | |
2df831a7 RW |
243 | (uri (list (string-append "mirror://sourceforge/libpng/libpng12/" |
244 | version "/libpng-" version ".tar.xz") | |
245 | (string-append | |
246 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
913059a1 EF |
247 | "/libpng12/libpng-" version ".tar.xz") |
248 | (string-append | |
249 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
2df831a7 RW |
250 | "/libpng12/libpng-" version ".tar.xz"))) |
251 | (sha256 | |
6cdd8c97 LF |
252 | (base32 |
253 | "1izw9ybm27llk8531w6h4jp4rk2rxy2s9vil16nwik5dp0amyqxl")))))) | |
2df831a7 | 254 | |
1ee13e01 | 255 | (define-public pngcrush |
2f8b9c46 | 256 | (package |
1ee13e01 | 257 | (name "pngcrush") |
258 | (version "1.8.13") | |
2f8b9c46 HG |
259 | (source (origin |
260 | (method url-fetch) | |
261 | (uri (string-append "mirror://sourceforge/pmt/pngcrush/" | |
1ee13e01 | 262 | version "/pngcrush-" version "-nolib.tar.xz")) |
2f8b9c46 | 263 | (sha256 (base32 |
1ee13e01 | 264 | "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv")))) |
2f8b9c46 HG |
265 | (build-system gnu-build-system) |
266 | (arguments | |
1ee13e01 | 267 | '(#:tests? #f ; no check target |
2f8b9c46 HG |
268 | #:phases |
269 | (modify-phases %standard-phases | |
270 | (replace 'configure | |
271 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
1ee13e01 | 272 | (substitute* "Makefile" |
2f8b9c46 HG |
273 | (("^(PNG(INC|LIB) = )/usr/local/" line vardef) |
274 | (string-append vardef (assoc-ref inputs "libpng") "/")) | |
275 | (("^(Z(INC|LIB) = )/usr/local/" line vardef) | |
276 | (string-append vardef (assoc-ref inputs "zlib") "/")) | |
277 | ;; The Makefile is written by hand and not using $PREFIX | |
278 | (("\\$\\(DESTDIR\\)/usr/") | |
fccacffb MW |
279 | (string-append (assoc-ref outputs "out") "/"))) |
280 | #t))))) | |
2f8b9c46 HG |
281 | (inputs |
282 | `(("libpng" ,libpng) | |
283 | ("zlib" , zlib))) | |
1ee13e01 | 284 | (home-page "https://pmt.sourceforge.io/pngcrush") |
2f8b9c46 | 285 | (synopsis "Utility to compress PNG files") |
85a4531f AB |
286 | (description "Pngcrush optimizes @acronym{PNG, Portable Network Graphics} |
287 | images. It can further losslessly compress them by as much as 40%.") | |
2f8b9c46 HG |
288 | (license license:zlib))) |
289 | ||
6e35bad0 AV |
290 | (define-public pnglite |
291 | (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38") | |
292 | (revision "1")) | |
293 | (package | |
294 | (name "pnglite") | |
295 | ;; The project was moved from sourceforge to github. | |
296 | ;; The latest version in sourceforge was 0.1.17: | |
297 | ;; https://sourceforge.net/projects/pnglite/files/pnglite/ | |
298 | ;; No releases are made in github. | |
299 | (version (git-version "0.1.17" revision commit)) | |
300 | (source (origin | |
301 | (method git-fetch) | |
302 | (uri (git-reference | |
303 | (url "https://github.com/dankar/pnglite") | |
304 | (commit commit))) | |
305 | (sha256 | |
306 | (base32 | |
307 | "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby")) | |
308 | (file-name (git-file-name name version)))) | |
309 | (build-system gnu-build-system) | |
310 | (arguments | |
311 | `(#:tests? #f ; no tests | |
312 | #:phases | |
313 | (modify-phases %standard-phases | |
314 | (delete 'configure) | |
315 | (replace 'build | |
316 | (lambda _ | |
317 | ;; common build flags for building shared libraries | |
318 | (let ((cflags '("-O2" "-g" "-fPIC")) | |
319 | (ldflags '("-shared"))) | |
320 | (apply invoke | |
321 | `("gcc" | |
322 | "-o" "libpnglite.so" | |
323 | ,@cflags | |
324 | ,@ldflags | |
325 | "pnglite.c")) | |
326 | #t))) | |
327 | (replace 'install | |
328 | (lambda* (#:key outputs #:allow-other-keys) | |
329 | (let* ((out (assoc-ref outputs "out")) | |
330 | (lib (string-append out "/lib/")) | |
331 | (include (string-append out "/include/")) | |
332 | (doc (string-append out "/share/doc/" | |
333 | ,name "-" ,version "/"))) | |
334 | (install-file "libpnglite.so" lib) | |
335 | (install-file "pnglite.h" include) | |
336 | (install-file "README.md" doc) | |
337 | #t)))))) | |
338 | (inputs `(("zlib" ,zlib))) | |
339 | (home-page "https://github.com/dankar/pnglite") | |
340 | (synopsis "Pretty small png library") | |
341 | (description "A pretty small png library. | |
342 | Currently all documentation resides in @file{pnglite.h}.") | |
343 | (license license:zlib)))) | |
344 | ||
8db1bd18 HG |
345 | (define-public libimagequant |
346 | (package | |
347 | (name "libimagequant") | |
d6f1e813 | 348 | (version "2.12.6") |
8db1bd18 HG |
349 | (source |
350 | (origin | |
351 | (method git-fetch) | |
352 | (uri (git-reference | |
b0e7b699 | 353 | (url "https://github.com/ImageOptim/libimagequant") |
8db1bd18 HG |
354 | (commit version))) |
355 | (file-name (git-file-name name version)) | |
356 | (sha256 | |
d6f1e813 | 357 | (base32 "00w7fny3xf14cfyhbdnmqyh9ddqdh1irvgzxd35a2z65kp7vnvj0")))) |
8db1bd18 HG |
358 | (build-system gnu-build-system) |
359 | (arguments | |
ba362ec8 | 360 | '(#:tests? #f)) ; no check target |
8db1bd18 HG |
361 | (home-page "https://pngquant.org/lib/") |
362 | (synopsis "Image palette quantization library") | |
363 | (description "libimagequant is a small, portable C library for | |
364 | high-quality conversion of RGBA images to 8-bit indexed-color (palette) | |
365 | images. This library can significantly reduces file sizes and powers pngquant | |
366 | and other PNG optimizers.") | |
ba362ec8 | 367 | (license license:gpl3+))) |
8db1bd18 | 368 | |
6b61dea3 HG |
369 | (define-public pngquant |
370 | (package | |
371 | (name "pngquant") | |
3caef3bd | 372 | (version "2.12.6") |
6b61dea3 HG |
373 | (source |
374 | (origin | |
375 | (method git-fetch) | |
376 | (uri (git-reference | |
b0e7b699 | 377 | (url "https://github.com/kornelski/pngquant") |
6b61dea3 HG |
378 | (commit version))) |
379 | (file-name (git-file-name name version)) | |
380 | (sha256 | |
3caef3bd | 381 | (base32 "15hanshahxqs6s9fyc3aym02251dcys7bf78g3inp0y233amdbl3")))) |
6b61dea3 HG |
382 | (build-system gnu-build-system) |
383 | (arguments | |
384 | `(#:test-target "test" | |
385 | #:configure-flags | |
386 | '("--with-openmp" "--with-lcms2"))) | |
387 | (native-inputs | |
388 | `(("pkg-config" ,pkg-config))) | |
389 | (inputs | |
390 | `(("libpng" ,libpng) | |
391 | ("zlib" , zlib) | |
392 | ("lcms" ,lcms) | |
393 | ("libimagequant" ,libimagequant))) | |
394 | (home-page "https://pngquant.org/") | |
395 | (synopsis "Utility and library for lossy compressing PNG images") | |
396 | (description "pngquant is a PNG compressor that significantly reduces file | |
397 | sizes by converting images to a more efficient 8-bit PNG format with alpha | |
398 | channel (often 60-80% smaller than 24/32-bit PNG files). Compressed images | |
399 | are fully standards-compliant and are supported by all web browsers and | |
400 | operating systems. | |
401 | ||
402 | Features: | |
403 | @enumerate | |
404 | @item High-quality palette generation using a combination of vector | |
405 | quantization algorithms. | |
406 | @item Unique adaptive dithering algorithm that adds less noise to images | |
407 | than the standard Floyd-Steinberg. | |
408 | @item Easy to integrate with shell scripts, GUIs and server-side software. | |
409 | @item Fast mode for real-time processing/large numbers of images. | |
410 | @end enumerate") | |
411 | (license license:gpl3+))) | |
412 | ||
a1552f52 | 413 | (define-public ijg-libjpeg |
e55354b8 DT |
414 | (package |
415 | (name "libjpeg") | |
3883fad2 | 416 | (version "9d") |
e55354b8 DT |
417 | (source (origin |
418 | (method url-fetch) | |
60562ec2 | 419 | (uri (string-append "https://www.ijg.org/files/jpegsrc.v" |
e55354b8 DT |
420 | version ".tar.gz")) |
421 | (sha256 (base32 | |
3883fad2 | 422 | "0clwys9lcqlxqgcw8s1gwfm5ix2zjlqpklmd3mbvqmj5ibj51jwr")))) |
e55354b8 | 423 | (build-system gnu-build-system) |
35b9e423 | 424 | (synopsis "Library for handling JPEG files") |
e55354b8 DT |
425 | (description |
426 | "Libjpeg implements JPEG image encoding, decoding, and transcoding. | |
427 | JPEG is a standardized compression method for full-color and gray-scale | |
428 | images. | |
61853b74 MC |
429 | It also includes programs that provide conversion between the JPEG format and |
430 | image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats, as well as | |
431 | lossless JPEG manipulations such as rotation, scaling or cropping: | |
432 | @enumerate | |
433 | @item cjpeg | |
434 | @item djpeg | |
435 | @item jpegtran | |
436 | @item rdjpgcom | |
437 | @item wrjpgcom | |
438 | @end enumerate") | |
e55354b8 | 439 | (license license:ijg) |
60562ec2 | 440 | (home-page "https://www.ijg.org/"))) |
e55354b8 | 441 | |
b81245cc KK |
442 | (define-public libjxr |
443 | (package | |
444 | (name "libjxr") | |
445 | (version "1.1") | |
446 | (source (origin | |
447 | ;; We are using the Debian source because CodePlex does not | |
448 | ;; deliver an easily downloadable tarball. | |
449 | (method url-fetch) | |
450 | (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_" | |
451 | version ".orig.tar.gz")) | |
452 | (sha256 | |
453 | (base32 | |
454 | "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67")) | |
455 | (patch-flags '("-p1" "--binary")) | |
456 | (patches (search-patches "libjxr-fix-function-signature.patch" | |
457 | "libjxr-fix-typos.patch")))) | |
458 | (build-system gnu-build-system) | |
8b9570ad KK |
459 | (arguments |
460 | '(#:make-flags | |
461 | (list "CC=gcc" | |
462 | ;; A substitute* procedure call would be enough to add the -fPIC | |
463 | ;; flag if there was no file decoding error. | |
464 | ;; The makefile is a "Non-ISO extended-ASCII text, with CRLF line | |
465 | ;; terminators" according to the file(1) utility. | |
466 | (string-append "CFLAGS=-I. -Icommon/include -Iimage/sys -fPIC " | |
467 | "-D__ANSI__ -DDISABLE_PERF_MEASUREMENT -w -O ")) | |
468 | #:tests? #f ; no check target | |
469 | #:phases | |
470 | (modify-phases %standard-phases | |
471 | (delete 'configure) ; no configure script | |
472 | (add-after 'build 'build-shared-library | |
473 | (lambda _ | |
474 | ;; The Makefile uses optimization level 1, so the same | |
475 | ;; level is used here for consistency. | |
476 | (invoke "gcc" "-shared" "-fPIC" "-O" | |
477 | ;; Common files. | |
478 | "adapthuff.o" "image.o" "strcodec.o" "strPredQuant.o" | |
479 | "strTransform.o" "perfTimerANSI.o" | |
480 | ;; Decoding files. | |
481 | "decode.o" "postprocess.o" "segdec.o" "strdec.o" | |
482 | "strInvTransform.o" "strPredQuantDec.o" "JXRTranscode.o" | |
483 | ;; Encoding files. | |
484 | "encode.o" "segenc.o" "strenc.o" "strFwdTransform.o" | |
485 | "strPredQuantEnc.o" | |
486 | "-o" "libjpegxr.so") | |
487 | (invoke "gcc" "-shared" "-fPIC" "-O" | |
488 | ;; Glue files. | |
489 | "JXRGlue.o" "JXRMeta.o" "JXRGluePFC.o" "JXRGlueJxr.o" | |
490 | ;; Test files. | |
491 | "JXRTest.o" "JXRTestBmp.o" "JXRTestHdr.o" "JXRTestPnm.o" | |
492 | "JXRTestTif.o" "JXRTestYUV.o" | |
493 | "-o" "libjxrglue.so"))) | |
494 | ;; The upstream makefile does not include an install phase. | |
495 | (replace 'install | |
496 | (lambda* (#:key outputs #:allow-other-keys) | |
497 | (let* ((out (assoc-ref outputs "out")) | |
498 | (bin (string-append out "/bin")) | |
499 | (lib (string-append out "/lib")) | |
500 | (include (string-append out "/include/jxrlib"))) | |
501 | (for-each (lambda (file) | |
502 | (install-file file include) | |
503 | (delete-file file)) | |
504 | (append | |
505 | '("jxrgluelib/JXRGlue.h" | |
506 | "jxrgluelib/JXRMeta.h" | |
507 | "jxrtestlib/JXRTest.h" | |
508 | "image/sys/windowsmediaphoto.h") | |
509 | (find-files "common/include" "\\.h$"))) | |
510 | (for-each (lambda (file) | |
511 | (install-file file lib) | |
512 | (delete-file file)) | |
513 | (find-files "." "\\.(a|so)$")) | |
514 | (for-each (lambda (file) | |
515 | (install-file file bin) | |
516 | (delete-file file)) | |
517 | '("JxrDecApp" "JxrEncApp"))) | |
518 | #t))))) | |
b81245cc KK |
519 | (synopsis "Implementation of the JPEG XR standard") |
520 | (description "JPEG XR is an approved ISO/IEC International standard (its | |
521 | official designation is ISO/IEC 29199-2). This library is an implementation of that standard.") | |
522 | (license | |
523 | (license:non-copyleft | |
524 | "file://Makefile" | |
525 | "See the header of the Makefile in the distribution.")) | |
526 | (home-page "https://jxrlib.codeplex.com/"))) | |
527 | ||
fcc43c1f AB |
528 | (define-public jpegoptim |
529 | (package | |
530 | (name "jpegoptim") | |
b01a8790 | 531 | (version "1.4.6") |
fcc43c1f AB |
532 | (source (origin |
533 | (method url-fetch) | |
534 | (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-" | |
535 | version ".tar.gz")) | |
536 | (sha256 (base32 | |
b01a8790 | 537 | "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8")))) |
fcc43c1f | 538 | (build-system gnu-build-system) |
4bd428a7 | 539 | (inputs `(("libjpeg" ,libjpeg-turbo))) |
fcc43c1f | 540 | (arguments |
b01a8790 | 541 | '(#:tests? #f)) ; no tests |
fcc43c1f AB |
542 | (synopsis "Optimize JPEG images") |
543 | (description | |
544 | "jpegoptim provides lossless optimization (based on optimizing | |
545 | the Huffman tables) and \"lossy\" optimization based on setting | |
546 | maximum quality factor.") | |
547 | (license license:gpl2+) | |
ada3b94f | 548 | (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim"))) |
e55354b8 | 549 | |
f5e4229a BT |
550 | (define-public libicns |
551 | (package | |
552 | (name "libicns") | |
553 | (version "0.8.1") | |
554 | (source (origin | |
555 | (method url-fetch) | |
556 | (uri (string-append | |
557 | "mirror://sourceforge/icns/" | |
558 | "libicns-" version ".tar.gz")) | |
559 | (sha256 | |
560 | (base32 | |
561 | "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk")))) | |
562 | (build-system gnu-build-system) | |
563 | (inputs | |
564 | `(("libpng" ,libpng) | |
565 | ("jasper" ,jasper))) | |
566 | (arguments | |
567 | `(#:tests? #t)) ; No tests. | |
568 | (home-page "http://icns.sourceforge.net/") | |
569 | (synopsis "Library for handling Mac OS icns resource files") | |
570 | (description | |
571 | "Libicns is a library for the manipulation of Mac OS IconFamily resource | |
572 | type files (ICNS). @command{icns2png} and @command{png2icns} are provided to | |
573 | convert between PNG and ICNS. @command{icns2png} will extract image files from | |
574 | ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use | |
575 | with .desktop files. Additionally, @command{icontainer2png} is provided for | |
576 | extracting icontainer icon files.") | |
577 | (license (list license:lgpl2.1+ ; libicns | |
578 | license:lgpl2.0+ ; src/apidocs.* | |
579 | license:gpl2+)))) ; icns2png, png2icns, icontainer2png | |
580 | ||
e55354b8 DT |
581 | (define-public libtiff |
582 | (package | |
583 | (name "libtiff") | |
d9cd568a | 584 | (version "4.1.0") |
c8eb2b8c LF |
585 | (source |
586 | (origin | |
587 | (method url-fetch) | |
8a35ffd8 | 588 | (uri (string-append "https://download.osgeo.org/libtiff/tiff-" |
c8eb2b8c | 589 | version ".tar.gz")) |
c8eb2b8c LF |
590 | (sha256 |
591 | (base32 | |
d9cd568a | 592 | "0d46bdvxdiv59lxnb0xz9ywm8arsr6xsapi5s6y6vnys2wjz6aax")))) |
e55354b8 | 593 | (build-system gnu-build-system) |
6f6eb857 LC |
594 | (outputs '("out" |
595 | "doc")) ;1.3 MiB of HTML documentation | |
596 | (arguments | |
597 | ;; Instead of using --docdir, this package has its own --with-docdir. | |
598 | `(#:configure-flags (list (string-append "--with-docdir=" | |
599 | (assoc-ref %outputs "doc") | |
600 | "/share/doc/" | |
2874a33d MB |
601 | ,name "-" ,version) |
602 | "--disable-static"))) | |
e55354b8 | 603 | (inputs `(("zlib" ,zlib) |
4bd428a7 | 604 | ("libjpeg" ,libjpeg-turbo))) |
35b9e423 | 605 | (synopsis "Library for handling TIFF files") |
e55354b8 DT |
606 | (description |
607 | "Libtiff provides support for the Tag Image File Format (TIFF), a format | |
608 | used for storing image data. | |
609 | Included are a library, libtiff, for reading and writing TIFF and a small | |
610 | collection of tools for doing simple manipulations of TIFF images.") | |
166191b3 LC |
611 | (license (license:non-copyleft "file://COPYRIGHT" |
612 | "See COPYRIGHT in the distribution.")) | |
0bd1097c | 613 | (home-page "http://www.simplesystems.org/libtiff/"))) |
ed5940b6 | 614 | |
894e2cba TUBK |
615 | (define-public leptonica |
616 | (package | |
617 | (name "leptonica") | |
bd15cd59 | 618 | (version "1.80.0") |
894e2cba TUBK |
619 | (source |
620 | (origin | |
69f7d3f4 RW |
621 | (method git-fetch) |
622 | (uri (git-reference | |
b0e7b699 | 623 | (url "https://github.com/DanBloomberg/leptonica") |
69f7d3f4 RW |
624 | (commit version))) |
625 | (file-name (git-file-name name version)) | |
894e2cba | 626 | (sha256 |
bd15cd59 | 627 | (base32 "12ddln72z5l3icz0i9rpsfkg5xik8fcwcn8lb0cp3jigjxi8gvkg")))) |
894e2cba TUBK |
628 | (build-system gnu-build-system) |
629 | (native-inputs | |
d02fb7ce TUBK |
630 | `(("gnuplot" ,gnuplot) ;needed for test suite |
631 | ("autoconf" ,autoconf) | |
632 | ("automake" ,automake) | |
633 | ("libtool" ,libtool) | |
634 | ("pkg-config" ,pkg-config))) | |
894e2cba TUBK |
635 | (inputs |
636 | `(("giflib" ,giflib) | |
4bd428a7 | 637 | ("libjpeg" ,libjpeg-turbo) |
894e2cba TUBK |
638 | ("libpng" ,libpng) |
639 | ("libtiff" ,libtiff) | |
1c60bd32 MB |
640 | ("libwebp" ,libwebp) |
641 | ("openjpeg" ,openjpeg) | |
894e2cba TUBK |
642 | ("zlib" ,zlib))) |
643 | (arguments | |
d02fb7ce | 644 | '(#:phases |
894e2cba | 645 | (modify-phases %standard-phases |
d02fb7ce TUBK |
646 | (add-after 'unpack 'patch-reg-wrapper |
647 | (lambda _ | |
648 | (substitute* "prog/reg_wrapper.sh" | |
649 | ((" /bin/sh ") | |
650 | (string-append " " (which "sh") " ")) | |
651 | (("which gnuplot") | |
fccacffb | 652 | "true")) |
08dfff74 MB |
653 | #t)) |
654 | (add-after 'install 'provide-absolute-giflib-reference | |
655 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
656 | (let ((out (assoc-ref outputs "out")) | |
657 | (giflib (assoc-ref inputs "giflib"))) | |
658 | ;; Add an absolute reference to giflib to avoid propagation. | |
659 | (with-directory-excursion (string-append out "/lib") | |
660 | (substitute* '("liblept.la" "pkgconfig/lept.pc") | |
661 | (("-lgif") (string-append "-L" giflib "/lib -lgif")))) | |
662 | #t)))))) | |
894e2cba TUBK |
663 | (home-page "http://www.leptonica.com/") |
664 | (synopsis "Library and tools for image processing and analysis") | |
665 | (description | |
666 | "Leptonica is a C library and set of command-line tools for efficient | |
667 | image processing and image analysis operations. It supports rasterop, affine | |
668 | transformations, binary and grayscale morphology, rank order, and convolution, | |
669 | seedfill and connected components, image transformations combining changes in | |
670 | scale and pixel depth, and pixelwise masking, blending, enhancement, and | |
671 | arithmetic ops.") | |
672 | (license license:bsd-2))) | |
673 | ||
8d9872b5 MB |
674 | (define-public jbig2dec |
675 | (package | |
676 | (name "jbig2dec") | |
3fd74c45 | 677 | (version "0.18") |
fb94354a MB |
678 | (source (origin |
679 | (method url-fetch) | |
680 | (uri (string-append "https://github.com/ArtifexSoftware" | |
681 | "/ghostpdl-downloads/releases/download" | |
3fd74c45 | 682 | "/gs951/" name "-" version ".tar.gz")) |
fb94354a MB |
683 | (sha256 |
684 | (base32 | |
3fd74c45 | 685 | "0pigfw2v0ppvr0lbysm69gx0zsa5q2q92yrb8af2j3im6x97f6cy")))) |
8d9872b5 | 686 | (build-system gnu-build-system) |
3fd74c45 MB |
687 | (arguments '(#:configure-flags '("--disable-static") |
688 | #:phases (modify-phases %standard-phases | |
689 | (add-before 'bootstrap 'force-bootstrap | |
690 | (lambda _ | |
691 | ;; XXX: jbig2dec 0.18 was released with | |
692 | ;; a broken configure script, so we | |
693 | ;; recreate the build system here. | |
694 | ;; Remove the autoconf inputs below | |
695 | ;; when deleting this code. | |
696 | (delete-file "configure") | |
697 | (delete-file "autogen.sh") | |
698 | #t))))) | |
699 | (native-inputs | |
700 | `(("autoconf" ,autoconf) | |
701 | ("automake" ,automake) | |
702 | ("libtool" ,libtool) | |
703 | ("python" ,python-wrapper))) ;for tests | |
8d9872b5 MB |
704 | (synopsis "Decoder of the JBIG2 image compression format") |
705 | (description | |
36a4366d | 706 | "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit |
7c125ce0 AK |
707 | monochrome) images at moderately high resolution, and in particular scanned |
708 | paper documents. In this domain it is very efficient, offering compression | |
709 | ratios on the order of 100:1. | |
8d9872b5 MB |
710 | |
711 | This is a decoder only implementation, and currently is in the alpha | |
712 | stage, meaning it doesn't completely work yet. However, it is | |
713 | maintaining parity with available encoders, so it is useful for real | |
714 | work.") | |
6acc671b | 715 | (home-page "https://jbig2dec.com") |
8d9872b5 | 716 | (license license:gpl2+))) |
38c55e5c | 717 | |
8f685df2 TGR |
718 | (define-public jbigkit |
719 | (package | |
720 | (name "jbigkit") | |
721 | (version "2.1") | |
722 | (source | |
723 | (origin | |
724 | (method url-fetch) | |
725 | (uri (string-append "https://www.cl.cam.ac.uk/~mgk25/jbigkit/" | |
726 | "download/jbigkit-" version ".tar.gz")) | |
727 | (sha256 | |
728 | (base32 "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy")) | |
729 | (modules '((guix build utils))) | |
730 | (snippet | |
731 | '(begin | |
732 | ;; Remove files without clear licence information. | |
733 | (for-each delete-file-recursively | |
734 | (list "contrib" "examples")) | |
735 | #t)))) | |
736 | (build-system gnu-build-system) | |
737 | (outputs (list "out" "pbmtools")) | |
738 | (arguments | |
739 | `(#:modules ((srfi srfi-26) | |
740 | ,@%gnu-build-system-modules) | |
741 | #:phases | |
742 | (modify-phases %standard-phases | |
743 | (delete 'configure) ; no configure script | |
744 | (replace 'install ; no ‘make install’ target | |
745 | (lambda* (#:key outputs #:allow-other-keys) | |
746 | (let* ((out (assoc-ref outputs "out")) | |
747 | (lib (string-append out "/lib")) | |
748 | (include (string-append out "/include"))) | |
749 | (with-directory-excursion "libjbig" | |
750 | (for-each (cut install-file <> include) | |
751 | (find-files "." "\\.h$")) | |
752 | (for-each (cut install-file <> lib) | |
753 | (find-files "." "\\.a$"))) | |
754 | #t))) | |
755 | (add-after 'install 'install-pbmtools | |
756 | (lambda* (#:key outputs #:allow-other-keys) | |
757 | (let* ((out (assoc-ref outputs "pbmtools")) | |
758 | (bin (string-append out "/bin")) | |
759 | (man1 (string-append out "/share/man/man1")) | |
760 | (man5 (string-append out "/share/man/man5"))) | |
761 | (with-directory-excursion "pbmtools" | |
762 | (for-each (cut install-file <> bin) | |
763 | (list "jbgtopbm" "jbgtopbm85" | |
764 | "pbmtojbg" "pbmtojbg85")) | |
765 | ||
766 | (for-each (cut install-file <> man1) | |
767 | (find-files "." "\\.1$")) | |
768 | (for-each (cut install-file <> man5) | |
769 | (find-files "." "\\.5$")) | |
770 | #t))))) | |
771 | #:test-target "test" | |
772 | #:tests? #f)) ; tests depend on examples/ | |
773 | (home-page "https://www.cl.cam.ac.uk/~mgk25/jbigkit/") | |
774 | (synopsis "Lossless compression for bi-level high-resolution images") | |
775 | (description | |
776 | "JBIG-KIT implements the JBIG1 data compression standard (ITU-T T.82 and | |
777 | ISO/IEC 11544:1993), designed for bi-level (one bit per pixel) images such as | |
778 | black-and-white scanned documents. It is widely used in fax products, printer | |
779 | firmware and drivers, document management systems, and imaging software. | |
780 | ||
781 | This package provides a static C library of (de)compression functions and some | |
782 | simple command-line converters similar to those provided by netpbm. | |
783 | ||
784 | Two JBIG1 variants are available. One (@file{jbig.c}) implements nearly all | |
785 | options of the standard but has to keep the full uncompressed image in memory. | |
786 | The other (@file{jbig85.c}) implements just the ITU-T T.85 profile, with | |
787 | memory management optimized for embedded and fax applications. It buffers | |
788 | only a few lines of the uncompressed image in memory and is able to stream | |
789 | images of initially unknown height.") | |
790 | (license (list license:isc ; pbmtools/p?m.5 | |
791 | license:gpl2+)))) ; the rest | |
792 | ||
3f03bd37 RG |
793 | (define-public openjpeg-data |
794 | (package | |
795 | (name "openjpeg-data") | |
796 | (version "2020.05.19") | |
797 | (source | |
798 | (origin | |
799 | (method git-fetch) | |
800 | (uri | |
801 | (git-reference | |
8ed4c468 | 802 | (url "https://github.com/uclouvain/openjpeg-data") |
3f03bd37 RG |
803 | (commit "c5c4a8c"))) |
804 | (file-name (git-file-name name version)) | |
805 | (sha256 | |
806 | (base32 "1jp84gbhw8q5b8mhc322ql9410hjf32w9hg10x4isfa9j59mnncb")))) | |
807 | (build-system copy-build-system) | |
808 | (synopsis "Test files for OpenJPEG") | |
809 | (description "OpenJPEG-Data contains all files required to run the openjpeg | |
810 | test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC | |
811 | 15444-4 procedures), non-regression tests and unit tests.") | |
812 | (home-page "https://github.com/uclouvain/openjpeg-data") | |
813 | (license license:bsd-2))) | |
814 | ||
38c55e5c MB |
815 | (define-public openjpeg |
816 | (package | |
817 | (name "openjpeg") | |
de1b5e49 | 818 | (version "2.3.1") |
b96961c9 RG |
819 | (source |
820 | (origin | |
821 | (method git-fetch) | |
822 | (uri | |
823 | (git-reference | |
824 | (url "https://github.com/uclouvain/openjpeg") | |
825 | (commit | |
826 | (string-append "v" version)))) | |
827 | (file-name | |
828 | (git-file-name "openjpeg" version)) | |
829 | (sha256 | |
830 | (base32 "1dn98d2dfa1lqyxxmab6rrcv52dyhjr4g7i4xf2w54fqsx14ynrb")))) | |
38c55e5c MB |
831 | (build-system cmake-build-system) |
832 | (arguments | |
6af3045f MB |
833 | '(#:tests? #f ;TODO: requires a 1.1 GiB data repository |
834 | #:configure-flags '("-DBUILD_STATIC_LIBS=OFF"))) | |
38c55e5c | 835 | (inputs |
b96961c9 RG |
836 | `(("lcms" ,lcms) |
837 | ("libpng" ,libpng) | |
838 | ("libtiff" ,libtiff) | |
839 | ("zlib" ,zlib))) | |
27866b7c RG |
840 | (synopsis "OPENJPEG Library and Applications") |
841 | (description "OpenJPEG is an implementation of JPEG 2000 codec written in C | |
842 | language. It has been developed in order to promote the use of JPEG 2000, a | |
843 | still-image compression standard from the Joint Photographic Experts Group | |
844 | (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a | |
845 | JPEG 2000 Reference Software.") | |
b9270582 | 846 | (home-page "https://github.com/uclouvain/openjpeg") |
38c55e5c | 847 | (license license:bsd-2))) |
76d88cfa | 848 | |
6140b9d8 RW |
849 | (define-public openjpeg-1 |
850 | (package (inherit openjpeg) | |
851 | (name "openjpeg") | |
852 | (version "1.5.2") | |
853 | (source | |
854 | (origin | |
855 | (method url-fetch) | |
856 | (uri | |
de67e922 LF |
857 | (string-append "mirror://sourceforge/openjpeg.mirror/" version "/" |
858 | name "-" version ".tar.gz")) | |
6140b9d8 RW |
859 | (sha256 |
860 | (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm")))))) | |
861 | ||
e596ab0f AK |
862 | (define-public giflib |
863 | (package | |
864 | (name "giflib") | |
c9d4e14a | 865 | (version "5.2.1") |
e596ab0f AK |
866 | (source (origin |
867 | (method url-fetch) | |
868 | (uri (string-append "mirror://sourceforge/giflib/giflib-" | |
c9d4e14a | 869 | version ".tar.gz")) |
e596ab0f | 870 | (sha256 |
44c5f025 | 871 | (base32 |
c9d4e14a | 872 | "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii")))) |
e596ab0f AK |
873 | (build-system gnu-build-system) |
874 | (outputs '("bin" ; utility programs | |
875 | "out")) ; library | |
e596ab0f | 876 | (arguments |
c9d4e14a MB |
877 | '(#:make-flags (list "CC=gcc" |
878 | (string-append "PREFIX=" | |
879 | (assoc-ref %outputs "out")) | |
880 | (string-append "BINDIR=" | |
881 | (assoc-ref %outputs "bin") "/bin")) | |
882 | #:phases | |
44c5f025 EF |
883 | (modify-phases %standard-phases |
884 | (add-after 'unpack 'disable-html-doc-gen | |
885 | (lambda _ | |
c9d4e14a | 886 | (substitute* "doc/Makefile" |
4a3ee3fb MW |
887 | (("^all: allhtml manpages") "")) |
888 | #t)) | |
c9d4e14a | 889 | (delete 'configure) |
44c5f025 EF |
890 | (add-after 'install 'install-manpages |
891 | (lambda* (#:key outputs #:allow-other-keys) | |
892 | (let* ((bin (assoc-ref outputs "bin")) | |
893 | (man1dir (string-append bin "/share/man/man1"))) | |
894 | (mkdir-p man1dir) | |
895 | (for-each (lambda (file) | |
896 | (let ((base (basename file))) | |
897 | (format #t "installing `~a' to `~a'~%" | |
898 | base man1dir) | |
899 | (copy-file file | |
900 | (string-append | |
901 | man1dir "/" base)))) | |
4a3ee3fb MW |
902 | (find-files "doc" "\\.1")) |
903 | #t)))))) | |
e596ab0f AK |
904 | (synopsis "Tools and library for working with GIF images") |
905 | (description | |
35b9e423 | 906 | "GIFLIB is a library for reading and writing GIF images. It is API and |
e596ab0f AK |
907 | ABI compatible with libungif which was in wide use while the LZW compression |
908 | algorithm was patented. Tools are also included to convert, manipulate, | |
909 | compose, and analyze GIF images.") | |
910 | (home-page "http://giflib.sourceforge.net/") | |
911 | (license license:x11))) | |
912 | ||
3f1f98d9 MC |
913 | (define-public libuemf |
914 | (package | |
915 | (name "libuemf") | |
916 | (version "0.2.7") | |
917 | (source (origin | |
918 | (method url-fetch) | |
919 | (uri (string-append "mirror://sourceforge/libuemf/libUEMF-" | |
920 | version ".tar.gz")) | |
921 | (sha256 | |
922 | (base32 | |
923 | "05djs99vqf067x81xfpskh7a66y5x7b4mmjavybcy7swnm0swg7v")))) | |
924 | (build-system cmake-build-system) | |
925 | (arguments | |
926 | `(#:phases | |
927 | (modify-phases %standard-phases | |
928 | ;; Overriding CMAKE_INSTALL_PREFIX is not a good idea. | |
929 | (add-after 'unpack 'fix-CMakeLists.txt | |
930 | (lambda _ | |
931 | (substitute* "CMakeLists.txt" | |
932 | ((".*SET\\(CMAKE_INSTALL_PREFIX.*") "")) | |
933 | #t)) | |
934 | (delete 'check) | |
935 | (add-after 'install 'check | |
936 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
937 | (let* ((out (assoc-ref outputs "out")) | |
938 | (bin (string-append out "/bin")) | |
939 | (sources (string-append "../libUEMF-" ,version)) | |
940 | (drm-tools (assoc-ref inputs "drm-tools")) | |
941 | (extract (string-append drm-tools "/bin/extract")) | |
942 | (execinput (string-append drm-tools "/bin/execinput"))) | |
943 | (with-directory-excursion sources | |
944 | (substitute* "testit.sh" | |
945 | (("^EPATH=.*") | |
946 | (format #f "EPATH=~a~%" bin)) | |
947 | (("`which diff`") | |
948 | "diff") | |
949 | (("^EXTRACT=.*") | |
950 | (format #f "EXTRACT=~a~%" extract)) | |
951 | (("^EXECINPUT=.*") | |
952 | (format #f "EXECINPUT=~a~%" execinput))) | |
953 | (invoke "sh" "testit.sh")))))))) | |
954 | (native-inputs `(("drm-tools" ,drm-tools))) ;for tests | |
955 | (home-page "http://libuemf.sourceforge.net/") | |
956 | (synopsis "Library for working with WFM, EMF and EMF+ images") | |
957 | (description "The libUEMF library is a portable C99 implementation for | |
86a03090 TGR |
958 | reading and writing @acronym{WFM, Windows Metafile}, @acronym{EMF, Enhanced |
959 | Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.") | |
3f1f98d9 MC |
960 | (license license:gpl2+))) |
961 | ||
0731a47c TUBK |
962 | (define-public libungif |
963 | (package | |
964 | (name "libungif") | |
965 | (version "4.1.4") | |
966 | (source (origin | |
967 | (method url-fetch) | |
de67e922 LF |
968 | (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/" |
969 | "libungif-" version "/libungif-" | |
0731a47c TUBK |
970 | version ".tar.bz2")) |
971 | (sha256 | |
972 | (base32 | |
973 | "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh")))) | |
974 | (build-system gnu-build-system) | |
975 | (inputs `(("perl" ,perl))) ;package ships some perl tools | |
976 | (home-page "http://giflib.sourceforge.net/") | |
977 | (synopsis "GIF decompression library") | |
978 | (description | |
979 | "libungif is the old GIF decompression library by the GIFLIB project.") | |
980 | (license license:expat))) | |
981 | ||
76d88cfa AK |
982 | (define-public imlib2 |
983 | (package | |
984 | (name "imlib2") | |
bdfdb9d7 | 985 | (version "1.7.1") |
76d88cfa AK |
986 | (source (origin |
987 | (method url-fetch) | |
988 | (uri (string-append | |
de67e922 LF |
989 | "mirror://sourceforge/enlightenment/imlib2-src/" version |
990 | "/imlib2-" version ".tar.bz2")) | |
76d88cfa AK |
991 | (sha256 |
992 | (base32 | |
bdfdb9d7 | 993 | "01y45cdml2dr9cqgybrgxr86sd77d1qfa1gzclzy1j6bkminlfh3")))) |
76d88cfa | 994 | (build-system gnu-build-system) |
08683393 EF |
995 | (arguments |
996 | '(#:configure-flags (list "--disable-static"))) | |
76d88cfa AK |
997 | (native-inputs |
998 | `(("pkgconfig" ,pkg-config))) | |
999 | (inputs | |
e56d02a0 | 1000 | `(("bzip2" ,bzip2) |
76d88cfa | 1001 | ("freetype" ,freetype) |
e56d02a0 EF |
1002 | ("giflib" ,giflib) |
1003 | ("libid3tag" ,libid3tag) | |
4bd428a7 | 1004 | ("libjpeg" ,libjpeg-turbo) |
76d88cfa AK |
1005 | ("libpng" ,libpng) |
1006 | ("libtiff" ,libtiff) | |
e56d02a0 EF |
1007 | ("libx11" ,libx11) |
1008 | ("libxext" ,libxext) | |
1009 | ("libwebp" ,libwebp))) | |
3b3b60d0 | 1010 | (home-page "https://sourceforge.net/projects/enlightenment/") |
76d88cfa AK |
1011 | (synopsis |
1012 | "Loading, saving, rendering and manipulating image files") | |
1013 | (description | |
1014 | "Imlib2 is a library that does image file loading and saving as well as | |
1015 | rendering, manipulation, arbitrary polygon support, etc. | |
1016 | ||
1017 | It does ALL of these operations FAST. Imlib2 also tries to be highly | |
1018 | intelligent about doing them, so writing naive programs can be done easily, | |
1019 | without sacrificing speed. | |
1020 | ||
1021 | This is a complete rewrite over the Imlib 1.x series. The architecture is | |
1022 | more modular, simple, and flexible.") | |
8835aed4 | 1023 | (license license:imlib2))) |
f7d28082 AK |
1024 | |
1025 | (define-public giblib | |
1026 | (package | |
1027 | (name "giblib") | |
1028 | (version "1.2.4") | |
1029 | (source (origin | |
1030 | (method url-fetch) | |
bf512da1 EF |
1031 | (uri (list |
1032 | (string-append | |
1033 | "http://linuxbrit.co.uk/downloads/giblib-" | |
1034 | version ".tar.gz") | |
1035 | (string-append | |
1a045954 TGR |
1036 | "https://src.fedoraproject.org/repo/pkgs/giblib/giblib-" |
1037 | version ".tar.gz/c810ef5389baf24882a1caca2954385e/giblib-" | |
1038 | version ".tar.gz") | |
bf512da1 EF |
1039 | (string-append |
1040 | "https://sourceforge.net/projects/slackbuildsdirectlinks/" | |
1041 | "files/giblib/giblib-" version ".tar.gz"))) | |
f7d28082 AK |
1042 | (sha256 |
1043 | (base32 | |
1044 | "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp")))) | |
1045 | (build-system gnu-build-system) | |
1046 | (inputs | |
1047 | `(("libx11" ,libx11) | |
1048 | ("imlib2" ,imlib2))) | |
30e8cf5f TGR |
1049 | (home-page |
1050 | ;; This vanished page is universally accepted as giblib's home despite not | |
1051 | ;; mentioning the package once. | |
7077ac80 | 1052 | (string-append "https://web.archive.org/web/20140907071208/" |
30e8cf5f | 1053 | "https://linuxbrit.co.uk/software/")) |
f7d28082 AK |
1054 | (synopsis "Wrapper library for imlib2") |
1055 | (description | |
35b9e423 | 1056 | "Giblib is a simple library which wraps imlib2's context API, avoiding |
f7d28082 AK |
1057 | all the context_get/set calls, adds fontstyles to the truetype renderer and |
1058 | supplies a generic doubly-linked list and some string functions.") | |
1059 | ;; This license removes a clause about X Consortium from the original | |
1060 | ;; X11 license. | |
1061 | (license (license:x11-style "file://COPYING" | |
1062 | "See 'COPYING' in the distribution.")))) | |
43402c5c DT |
1063 | |
1064 | (define-public freeimage | |
1065 | (package | |
1066 | (name "freeimage") | |
8dc3c2a7 | 1067 | (version "3.18.0") |
43402c5c DT |
1068 | (source (origin |
1069 | (method url-fetch) | |
1070 | (uri (string-append | |
1071 | "mirror://sourceforge/freeimage/Source%20Distribution/" | |
1072 | version "/FreeImage" | |
bcc09d9a | 1073 | (string-concatenate (string-split version #\.)) |
43402c5c DT |
1074 | ".zip")) |
1075 | (sha256 | |
1076 | (base32 | |
8dc3c2a7 | 1077 | "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl")) |
a5d4c96b EF |
1078 | (modules '((guix build utils))) |
1079 | (snippet | |
1080 | '(begin | |
1081 | (for-each | |
1082 | (lambda (dir) | |
1083 | (delete-file-recursively (string-append "Source/" dir))) | |
f347c24a | 1084 | '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite" |
8dc3c2a7 | 1085 | "LibJXR" "LibWebP" "OpenEXR" "ZLib")))) |
271f2786 MB |
1086 | (patches |
1087 | (append | |
1088 | (search-patches "freeimage-unbundle.patch") | |
1089 | ;; Take one patch from Arch Linux that adds LibRaw 0.20 compatibility. | |
1090 | (list (origin | |
1091 | (method url-fetch) | |
1092 | (uri "https://raw.githubusercontent.com/archlinux\ | |
1093 | /svntogit-community/ca3e6a52f5a46dec87cbf85e9d84fe370e282c8c/trunk\ | |
1094 | /freeimage-libraw-0.20.patch") | |
1095 | (file-name "freeimage-libraw-compat.patch") | |
1096 | (sha256 | |
1097 | (base32 | |
1098 | "0cwjxjz0f4gs6igvwqg0p99mnrsrwzkal1l2n08yvz2xq9s5khki")))))))) | |
43402c5c DT |
1099 | (build-system gnu-build-system) |
1100 | (arguments | |
4a2798e0 EF |
1101 | '(#:phases |
1102 | (modify-phases %standard-phases | |
a5d4c96b EF |
1103 | ;; According to Fedora these files depend on private headers, but their |
1104 | ;; presence is required for building, so we replace them with empty files. | |
1105 | (add-after 'unpack 'delete-unbuildable-files | |
1106 | (lambda _ | |
1107 | (for-each (lambda (file) | |
1108 | (delete-file file) | |
1109 | (close (open file O_CREAT))) | |
1110 | '("Source/FreeImage/PluginG3.cpp" | |
1111 | "Source/FreeImageToolkit/JPEGTransform.cpp")) | |
1112 | #t)) | |
1113 | ;; These scripts generate the Makefiles. | |
1114 | (replace 'configure | |
1115 | (lambda _ | |
1116 | (invoke "sh" "gensrclist.sh") | |
1117 | (invoke "sh" "genfipsrclist.sh"))) | |
4a2798e0 EF |
1118 | (add-before 'build 'patch-makefile |
1119 | (lambda* (#:key outputs #:allow-other-keys) | |
1120 | (substitute* "Makefile.gnu" | |
1121 | (("/usr") (assoc-ref outputs "out")) | |
1122 | (("-o root -g root") "")) | |
1123 | #t))) | |
a5d4c96b EF |
1124 | #:make-flags |
1125 | (list "CC=gcc" | |
1126 | ;; We need '-fpermissive' for Source/FreeImage.h. | |
1127 | ;; libjxr doesn't have a pkg-config file. | |
1128 | (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive " | |
0fe041bd | 1129 | "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib")) |
43402c5c DT |
1130 | #:tests? #f)) ; no check target |
1131 | (native-inputs | |
a5d4c96b EF |
1132 | `(("pkg-config" ,pkg-config) |
1133 | ("unzip" ,unzip))) | |
1134 | (inputs | |
4bd428a7 | 1135 | `(("libjpeg" ,libjpeg-turbo) |
8dc3c2a7 | 1136 | ("libjxr" ,libjxr) |
a5d4c96b EF |
1137 | ("libpng" ,libpng) |
1138 | ("libraw" ,libraw) | |
1139 | ("libtiff" ,libtiff) | |
1140 | ("libwebp" ,libwebp) | |
1141 | ("openexr" ,openexr) | |
1142 | ("openjpeg" ,openjpeg) | |
1143 | ("zlib" ,zlib))) | |
43402c5c DT |
1144 | (synopsis "Library for handling popular graphics image formats") |
1145 | (description | |
1146 | "FreeImage is a library for developers who would like to support popular | |
1147 | graphics image formats like PNG, BMP, JPEG, TIFF and others.") | |
1148 | (license license:gpl2+) | |
1149 | (home-page "http://freeimage.sourceforge.net"))) | |
97039f6e AE |
1150 | |
1151 | (define-public vigra | |
019b3875 AE |
1152 | (package |
1153 | (name "vigra") | |
83273596 | 1154 | (version "1.11.1") |
019b3875 AE |
1155 | (source |
1156 | (origin | |
1157 | (method url-fetch) | |
1158 | (uri (string-append "https://github.com/ukoethe/vigra/releases/download/" | |
83273596 MB |
1159 | "Version-" (string-join (string-split version #\.) "-") |
1160 | "/vigra-" version "-src.tar.gz")) | |
a82e6faa | 1161 | (patches (search-patches "vigra-python-compat.patch")) |
019b3875 | 1162 | (sha256 (base32 |
83273596 | 1163 | "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5")))) |
019b3875 AE |
1164 | (build-system cmake-build-system) |
1165 | (inputs | |
1166 | `(("boost" ,boost) | |
1167 | ("fftw" ,fftw) | |
1168 | ("fftwf" ,fftwf) | |
1169 | ("hdf5" ,hdf5) | |
1170 | ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly | |
1171 | ; to create a configure-flag | |
4bd428a7 | 1172 | ("libjpeg" ,libjpeg-turbo) |
019b3875 AE |
1173 | ("libpng" ,libpng) |
1174 | ("libtiff" ,libtiff) | |
1175 | ("openexr" ,openexr) | |
691068f0 | 1176 | ("python" ,python-wrapper) |
a82e6faa | 1177 | ("python-numpy" ,python-numpy) |
019b3875 AE |
1178 | ("zlib" ,zlib))) |
1179 | (native-inputs | |
1180 | `(("doxygen" ,doxygen) | |
a82e6faa | 1181 | ("python-nose" ,python-nose) |
556530c9 | 1182 | ("sphinx" ,python-sphinx))) |
019b3875 AE |
1183 | (arguments |
1184 | `(#:test-target "check" | |
e32db0fa RW |
1185 | #:phases |
1186 | (modify-phases %standard-phases | |
43696990 | 1187 | (add-after 'unpack 'disable-broken-tests |
e32db0fa | 1188 | (lambda _ |
43696990 | 1189 | ;; See https://github.com/ukoethe/vigra/issues/432 |
e32db0fa RW |
1190 | (substitute* "test/fourier/CMakeLists.txt" |
1191 | (("VIGRA_ADD_TEST.*") "")) | |
43696990 MB |
1192 | ;; This test fails with Numpy 1.15: |
1193 | ;; <https://github.com/ukoethe/vigra/issues/436>. | |
1194 | (substitute* "vigranumpy/test/CMakeLists.txt" | |
1195 | (("test1\\.py") "")) | |
e32db0fa | 1196 | #t))) |
019b3875 AE |
1197 | #:configure-flags |
1198 | (list "-Wno-dev" ; suppress developer mode with lots of warnings | |
1199 | (string-append "-DVIGRANUMPY_INSTALL_DIR=" | |
1200 | (assoc-ref %outputs "out") | |
a82e6faa MB |
1201 | "/lib/python" |
1202 | ,(version-major+minor (package-version python)) | |
1203 | "/site-packages") | |
019b3875 AE |
1204 | ;; OpenEXR is not enabled by default. |
1205 | "-DWITH_OPENEXR=1" | |
f803f775 LF |
1206 | ;; Fix rounding error on 32-bit machines |
1207 | "-DCMAKE_C_FLAGS=-ffloat-store" | |
019b3875 AE |
1208 | ;; The header files of ilmbase are not found when included |
1209 | ;; by the header files of openexr, and an explicit flag | |
1210 | ;; needs to be set. | |
1211 | (string-append "-DCMAKE_CXX_FLAGS=-I" | |
1212 | (assoc-ref %build-inputs "ilmbase") | |
f803f775 LF |
1213 | "/include/OpenEXR" |
1214 | " -ffloat-store")))) | |
019b3875 AE |
1215 | (synopsis "Computer vision library") |
1216 | (description | |
1217 | "VIGRA stands for Vision with Generic Algorithms. It is an image | |
97039f6e AE |
1218 | processing and analysis library that puts its main emphasis on customizable |
1219 | algorithms and data structures. It is particularly strong for | |
1220 | multi-dimensional image processing.") | |
019b3875 | 1221 | (license license:expat) |
a25896bb MC |
1222 | (home-page "https://ukoethe.github.io/vigra/") |
1223 | (properties '((max-silent-time . 7200))))) ;2 hours, to avoid timing out | |
1224 | ||
060ad3de | 1225 | |
62813c10 | 1226 | (define-public vigra-c |
4526bd07 RW |
1227 | (let* ((commit "66ff4fa5a7d4a77415caa676a45c2c6ea16562e7") |
1228 | (revision "1")) | |
62813c10 FT |
1229 | (package |
1230 | (name "vigra-c") | |
4526bd07 | 1231 | (version (git-version "0.0.0" revision commit)) |
62813c10 FT |
1232 | (home-page "https://github.com/BSeppke/vigra_c") |
1233 | (source (origin | |
1234 | (method git-fetch) | |
1235 | (uri (git-reference | |
1236 | (url home-page) | |
1237 | (commit commit))) | |
1238 | (sha256 | |
1239 | (base32 | |
4526bd07 | 1240 | "1pnd92s284dvsg8zp6md7p8ck55bmcsryz58gzic7jh6m72hg689")) |
62813c10 FT |
1241 | (file-name (git-file-name name version)))) |
1242 | (build-system cmake-build-system) | |
1243 | (arguments | |
1244 | `(#:tests? #f)) ; No test target. | |
1245 | (native-inputs | |
1246 | `(("doxygen" ,doxygen))) | |
1247 | (inputs | |
1248 | `(("fftw" ,fftw) | |
1249 | ("fftwf" ,fftwf) | |
4526bd07 | 1250 | ("hdf5" ,hdf5) |
62813c10 FT |
1251 | ("vigra" ,vigra))) |
1252 | (synopsis "C interface to the VIGRA computer vision library") | |
1253 | (description | |
1254 | "This package provides a C interface to the VIGRA C++ computer vision | |
1255 | library. It is designed primarily to ease the implementation of higher-level | |
1256 | language bindings to VIGRA.") | |
1257 | (license license:expat)))) | |
1258 | ||
060ad3de TUBK |
1259 | (define-public libwebp |
1260 | (package | |
1261 | (name "libwebp") | |
ad7287b2 | 1262 | (version "1.1.0") |
060ad3de TUBK |
1263 | (source |
1264 | (origin | |
b981f777 MB |
1265 | ;; No tarballs are provided for >0.6.1. |
1266 | (method git-fetch) | |
1267 | (uri (git-reference | |
1268 | (url "https://chromium.googlesource.com/webm/libwebp") | |
1269 | (commit (string-append "v" version)))) | |
1270 | (file-name (git-file-name name version)) | |
060ad3de | 1271 | (sha256 |
b2ed5ca7 | 1272 | (base32 |
ad7287b2 | 1273 | "0r2yy9if0ndvpzadk39bigvsygyqnlv0xjb9w2aj6rs534mncazz")))) |
060ad3de TUBK |
1274 | (build-system gnu-build-system) |
1275 | (inputs | |
1276 | `(("freeglut" ,freeglut) | |
1277 | ("giflib" ,giflib) | |
4bd428a7 | 1278 | ("libjpeg" ,libjpeg-turbo) |
060ad3de TUBK |
1279 | ("libpng" ,libpng) |
1280 | ("libtiff" ,libtiff))) | |
b981f777 MB |
1281 | (native-inputs |
1282 | `(("autoconf" ,autoconf) | |
1283 | ("automake" ,automake) | |
1284 | ("libtool" ,libtool))) | |
060ad3de TUBK |
1285 | (arguments |
1286 | '(#:configure-flags '("--enable-libwebpmux" | |
1287 | "--enable-libwebpdemux" | |
371d95eb MB |
1288 | "--enable-libwebpdecoder" |
1289 | "--disable-static"))) | |
060ad3de TUBK |
1290 | (home-page "https://developers.google.com/speed/webp/") |
1291 | (synopsis "Lossless and lossy image compression") | |
1292 | (description | |
1293 | "WebP is a new image format that provides lossless and lossy compression | |
1eefe4a8 LC |
1294 | for images. WebP lossless images are 26% smaller in size compared to |
1295 | PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at | |
1296 | equivalent SSIM index. WebP supports lossless transparency (also known as | |
1297 | alpha channel) with just 22% additional bytes. Transparency is also supported | |
060ad3de TUBK |
1298 | with lossy compression and typically provides 3x smaller file sizes compared |
1299 | to PNG when lossy compression is acceptable for the red/green/blue color | |
1300 | channels.") | |
1301 | (license license:bsd-3))) | |
b9ecd5ae SB |
1302 | |
1303 | (define-public libmng | |
1304 | (package | |
1305 | (name "libmng") | |
1306 | (version "2.0.3") | |
1307 | (source (origin | |
1308 | (method url-fetch) | |
0f971a04 LF |
1309 | (uri (string-append "mirror://sourceforge/libmng/libmng-devel/" |
1310 | version "/" name "-" version ".tar.xz")) | |
b9ecd5ae SB |
1311 | (sha256 |
1312 | (base32 | |
1313 | "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija")))) | |
1314 | (build-system gnu-build-system) | |
1315 | (propagated-inputs | |
1316 | ;; These are all in the 'Libs.private' field of libmng.pc. | |
1317 | `(("lcms" ,lcms) | |
4bd428a7 | 1318 | ("libjpeg" ,libjpeg-turbo) |
b9ecd5ae | 1319 | ("zlib" ,zlib))) |
ce91eeac | 1320 | (home-page "https://www.libmng.com/") |
b9ecd5ae SB |
1321 | (synopsis "Library for handling MNG files") |
1322 | (description | |
1323 | "Libmng is the MNG (Multiple-image Network Graphics) reference library.") | |
1324 | (license license:bsd-3))) | |
3aab2c83 | 1325 | |
023f0fb0 AK |
1326 | (define-public exiv2 |
1327 | (package | |
1328 | (name "exiv2") | |
630b75f7 | 1329 | (version "0.27.3") |
0e1c5ccc TGR |
1330 | (source |
1331 | (origin | |
1332 | (method url-fetch) | |
1333 | (uri (string-append "https://www.exiv2.org/builds/exiv2-" version | |
1334 | "-Source.tar.gz")) | |
1335 | (sha256 | |
630b75f7 | 1336 | (base32 "0y77wfadjsrcxijdqgkr3q88b6mm9y3rg8kqsmaig8iah49md7x7")))) |
0e1c5ccc TGR |
1337 | (build-system cmake-build-system) |
1338 | (arguments '(#:tests? #f)) ; no test suite | |
023f0fb0 AK |
1339 | (propagated-inputs |
1340 | `(("expat" ,expat) | |
1341 | ("zlib" ,zlib))) | |
993d8164 | 1342 | (home-page "https://www.exiv2.org/") |
023f0fb0 AK |
1343 | (synopsis "Library and command-line utility to manage image metadata") |
1344 | (description | |
1345 | "Exiv2 is a C++ library and a command line utility to manage image | |
1346 | metadata. It provides fast and easy read and write access to the Exif, IPTC | |
1347 | and XMP metadata of images in various formats.") | |
1348 | ||
1349 | ;; Files under `xmpsdk' are a copy of Adobe's XMP SDK, licensed under the | |
1350 | ;; 3-clause BSD license: <http://www.adobe.com/devnet/xmp/sdk/eula.html>. | |
1351 | ;; The core is GPLv2+: | |
1352 | ;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>. | |
1353 | (license license:gpl2+))) | |
1354 | ||
eafd0390 LC |
1355 | (define-public exiv2-0.26 |
1356 | (package | |
1357 | (inherit exiv2) | |
1358 | (version "0.26") | |
1359 | (source (origin | |
1360 | (method url-fetch) | |
1361 | (uri (list (string-append "https://www.exiv2.org/builds/exiv2-" | |
1362 | version "-trunk.tar.gz") | |
1363 | (string-append "https://www.exiv2.org/exiv2-" | |
1364 | version ".tar.gz") | |
1365 | (string-append "https://fossies.org/linux/misc/exiv2-" | |
1366 | version ".tar.gz"))) | |
1367 | (patches (search-patches "exiv2-CVE-2017-14860.patch" | |
1368 | "exiv2-CVE-2017-14859-14862-14864.patch")) | |
1369 | (sha256 | |
1370 | (base32 | |
1371 | "1yza317qxd8yshvqnay164imm0ks7cvij8y8j86p1gqi1153qpn7")))) | |
1372 | (build-system gnu-build-system) | |
1373 | (arguments '(#:tests? #f)) ; no `check' target | |
1374 | (propagated-inputs | |
1375 | `(("expat" ,expat) | |
1376 | ("zlib" ,zlib))) | |
1377 | (native-inputs | |
1378 | `(("intltool" ,intltool))) | |
1379 | ||
1380 | ;; People should rely on the newer version, so don't expose it. | |
1381 | (properties `((hidden? . #t))))) | |
1382 | ||
3aab2c83 DT |
1383 | (define-public devil |
1384 | (package | |
1385 | (name "devil") | |
77ab6983 | 1386 | (version "1.8.0") |
3aab2c83 DT |
1387 | (source (origin |
1388 | (method url-fetch) | |
1389 | (uri (string-append "http://downloads.sourceforge.net/openil/" | |
1390 | "DevIL-" version ".tar.gz")) | |
1391 | (sha256 | |
1392 | (base32 | |
77ab6983 MB |
1393 | "02dpzvi493r09c9hfjnk54nladl3qw55iqkkg18g12fxwwz9fx80")))) |
1394 | (build-system cmake-build-system) | |
3aab2c83 | 1395 | (arguments |
77ab6983 MB |
1396 | '(;; XXX: Not supported in the released CMakeLists.txt. |
1397 | ;; Enable this for > 1.8.0. | |
1398 | #:tests? #f | |
3aab2c83 DT |
1399 | #:phases |
1400 | (modify-phases %standard-phases | |
77ab6983 MB |
1401 | (add-before 'configure 'change-directory |
1402 | (lambda _ (chdir "DevIL") #t))))) | |
3aab2c83 DT |
1403 | (native-inputs |
1404 | `(("pkg-config" ,pkg-config))) | |
1405 | (inputs | |
1406 | `(("lcms" ,lcms) | |
77ab6983 | 1407 | ("libjpeg" ,libjpeg-turbo) |
3aab2c83 DT |
1408 | ("libmng" ,libmng) |
1409 | ("libpng" ,libpng) | |
1410 | ("libtiff" ,libtiff) | |
1411 | ("openexr" ,openexr) | |
1412 | ("zlib" ,zlib))) | |
1413 | (synopsis "Library for manipulating many image formats") | |
1414 | (description "Developer's Image Library (DevIL) is a library to develop | |
1415 | applications with support for many types of images. DevIL can load, save, | |
1416 | convert, manipulate, filter and display a wide variety of image formats.") | |
1417 | (home-page "http://openil.sourceforge.net") | |
1418 | (license license:lgpl2.1+))) | |
b0b23e52 DT |
1419 | |
1420 | (define-public jasper | |
1421 | (package | |
1422 | (name "jasper") | |
038e3962 | 1423 | (version "2.0.23") |
b0b23e52 | 1424 | (source (origin |
d57b017c RW |
1425 | (method git-fetch) |
1426 | (uri (git-reference | |
b0e7b699 | 1427 | (url "https://github.com/mdadams/jasper") |
d57b017c RW |
1428 | (commit (string-append "version-" version)))) |
1429 | (file-name (git-file-name name version)) | |
b0b23e52 DT |
1430 | (sha256 |
1431 | (base32 | |
038e3962 | 1432 | "1fccpss5ii9rnsd2pkg6k7mkckwpfi8dgp64qzqv3zp1vs2nffw6")))) |
c7a70c33 | 1433 | (build-system cmake-build-system) |
bf476ea1 TGR |
1434 | (inputs |
1435 | `(("libjpeg" ,libjpeg-turbo))) | |
b0b23e52 DT |
1436 | (synopsis "JPEG-2000 library") |
1437 | (description "The JasPer Project is an initiative to provide a reference | |
1438 | implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e., | |
1439 | ISO/IEC 15444-1).") | |
1440 | (home-page "https://www.ece.uvic.ca/~frodo/jasper/") | |
1441 | (license (license:x11-style "file://LICENSE")))) | |
365a4a7f EF |
1442 | |
1443 | (define-public zimg | |
1444 | (package | |
1445 | (name "zimg") | |
fc103869 | 1446 | (version "2.9.3") |
365a4a7f EF |
1447 | (source |
1448 | (origin | |
ba185e2a RW |
1449 | (method git-fetch) |
1450 | (uri (git-reference | |
b0e7b699 | 1451 | (url "https://github.com/sekrit-twc/zimg") |
ba185e2a RW |
1452 | (commit (string-append "release-" version)))) |
1453 | (file-name (git-file-name name version)) | |
365a4a7f | 1454 | (sha256 |
b08c4f5f | 1455 | (base32 "1dqyrq3p8bkgvj4ci50ac342hjnhyz6xxvhiwp7wpi3v3nbj7s02")))) |
365a4a7f EF |
1456 | (build-system gnu-build-system) |
1457 | (native-inputs | |
1458 | `(("autoconf" ,autoconf) | |
1459 | ("automake" ,automake) | |
1460 | ("libtool" ,libtool))) | |
365a4a7f EF |
1461 | (synopsis "Scaling, colorspace conversion, and dithering library") |
1462 | (description "Zimg implements the commonly required image processing basics | |
1463 | of scaling, colorspace conversion, and depth conversion. A simple API enables | |
1464 | conversion between any supported formats to operate with minimal knowledge from | |
1465 | the programmer.") | |
1466 | (home-page "https://github.com/sekrit-twc/zimg") | |
8ee04627 | 1467 | ;; test/extra/ contains musl-libm, |
365a4a7f | 1468 | ;; which is MIT/expat licensed, but only used for tests |
f62e7ce4 | 1469 | (license license:wtfpl2))) |
af7aaaeb TGR |
1470 | |
1471 | (define-public perceptualdiff | |
1472 | (package | |
1473 | (name "perceptualdiff") | |
1474 | (version "1.3") | |
1475 | (source | |
1476 | (origin | |
be59c48d TGR |
1477 | (method git-fetch) |
1478 | (uri (git-reference | |
b0e7b699 | 1479 | (url "https://github.com/myint/perceptualdiff") |
be59c48d TGR |
1480 | (commit (string-append "v" version)))) |
1481 | (file-name (git-file-name name version)) | |
1482 | (sha256 | |
1483 | (base32 "0yys55f9i9g3wjjg0j2m0p0k21zwnid8520a8lrr30khm4k5gibp")))) | |
af7aaaeb TGR |
1484 | (build-system cmake-build-system) |
1485 | (inputs `(("freeimage" ,freeimage))) | |
1486 | (arguments | |
1487 | '(#:phases (modify-phases %standard-phases | |
1488 | (add-after 'unpack 'fix-tests | |
1489 | ;; cmake-build-system uses a build/ directory outside | |
1490 | ;; of the source tree, one level higher than expected | |
1491 | (lambda _ | |
1492 | (substitute* "test/run_tests.bash" | |
fccacffb MW |
1493 | (("../build") "../../build")) |
1494 | #t))))) | |
af7aaaeb TGR |
1495 | (home-page "https://github.com/myint/perceptualdiff") |
1496 | (synopsis "Perceptual image comparison utility") | |
1497 | (description "PerceptualDiff visually compares two images to determine | |
1498 | whether they look alike. It uses a computational model of the human visual | |
1499 | system to detect similarities. This allows it too see beyond irrelevant | |
1500 | differences in file encoding, image quality, and other small variations.") | |
1501 | (license license:gpl2+))) | |
1fa3e336 EB |
1502 | |
1503 | (define-public steghide | |
1504 | (package | |
1505 | (name "steghide") | |
1506 | (version "0.5.1") | |
1507 | (source (origin | |
1508 | (method url-fetch) | |
1509 | (uri (string-append "mirror://sourceforge/steghide/steghide/" | |
1510 | version "/steghide-" version ".tar.bz2")) | |
1511 | (sha256 | |
1512 | (base32 | |
1513 | "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2")) | |
1514 | (patches (list (search-patch "steghide-fixes.patch"))))) | |
1515 | (build-system gnu-build-system) | |
1516 | (native-inputs | |
7c90d0f4 | 1517 | `(("gettext" ,gettext-minimal) |
1fa3e336 EB |
1518 | ("libtool" ,libtool) |
1519 | ("perl" ,perl))) ;for tests | |
1520 | (inputs | |
1521 | `(("libmhash" ,libmhash) | |
1522 | ("libmcrypt" ,libmcrypt) | |
4bd428a7 | 1523 | ("libjpeg" ,libjpeg-turbo) |
1fa3e336 EB |
1524 | ("zlib" ,zlib))) |
1525 | (arguments | |
a56bf101 LC |
1526 | `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc |
1527 | ||
1528 | #:phases (modify-phases %standard-phases | |
1529 | (add-before 'configure 'set-perl-search-path | |
1530 | (lambda _ | |
1531 | ;; Work around "dotless @INC" build failure. | |
1532 | (setenv "PERL5LIB" | |
1533 | (string-append (getcwd) "/tests:" | |
1534 | (getenv "PERL5LIB"))) | |
1535 | #t))))) | |
1fa3e336 EB |
1536 | (home-page "http://steghide.sourceforge.net") |
1537 | (synopsis "Image and audio steganography") | |
1538 | (description | |
7832785d TGR |
1539 | "Steghide is a program to hide data in various kinds of image and audio |
1540 | files (known as @dfn{steganography}). Neither color nor sample frequencies are | |
1541 | changed, making the embedding resistant against first-order statistical tests.") | |
1fa3e336 | 1542 | (license license:gpl2+))) |
ac2a38a5 | 1543 | |
93117227 AI |
1544 | (define-public optipng |
1545 | (package | |
1546 | (name "optipng") | |
bbf8832f | 1547 | (version "0.7.7") |
93117227 AI |
1548 | (source |
1549 | (origin | |
1550 | (method url-fetch) | |
1551 | (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-" | |
1552 | version ".tar.gz")) | |
1553 | (sha256 | |
1554 | (base32 | |
64ed4b6a EF |
1555 | "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg")) |
1556 | (modules '((guix build utils))) | |
1557 | (snippet | |
1558 | '(begin | |
1559 | (delete-file-recursively "src/libpng") | |
1560 | (delete-file-recursively "src/zlib") | |
1561 | #t)))) | |
93117227 AI |
1562 | (build-system gnu-build-system) |
1563 | (inputs | |
64ed4b6a EF |
1564 | `(("libpng" ,libpng) |
1565 | ("zlib" ,zlib))) | |
93117227 AI |
1566 | (arguments |
1567 | '(#:phases | |
1568 | (modify-phases %standard-phases | |
93117227 AI |
1569 | (replace 'configure |
1570 | (lambda* (#:key outputs #:allow-other-keys) | |
bbf8832f TGR |
1571 | ;; configure script doesn't accept arguments CONFIG_SHELL and SHELL |
1572 | (invoke "sh" "configure" | |
64ed4b6a EF |
1573 | (string-append "--prefix=" (assoc-ref outputs "out")) |
1574 | "-with-system-libs") | |
bbf8832f TGR |
1575 | #t))))) |
1576 | (synopsis "Optimizer that recompresses PNG image files to a smaller size") | |
93117227 AI |
1577 | (description "OptiPNG is a PNG optimizer that recompresses image |
1578 | files to a smaller size, without losing any information. This program | |
1579 | also converts external formats (BMP, GIF, PNM and TIFF) to optimized | |
1580 | PNG, and performs PNG integrity checks and corrections.") | |
1581 | (home-page "http://optipng.sourceforge.net/") | |
1582 | (license license:zlib))) | |
37e05d64 | 1583 | |
68fea604 VC |
1584 | (define-public pngsuite |
1585 | (package | |
1586 | (name "pngsuite") | |
1587 | (version "2017jul19") | |
1588 | (source | |
1589 | (origin | |
1590 | (method url-fetch/tarbomb) | |
1591 | (uri (string-append "http://www.schaik.com/pngsuite2011/PngSuite-" | |
1592 | version ".tgz")) | |
1593 | (sha256 | |
1594 | (base32 | |
1595 | "1j7xgd9iffcnpphhzz9ld9ybrjmx9brhq0803g0450ssr52b5502")))) | |
1596 | (build-system gnu-build-system) | |
1597 | (arguments | |
1598 | '(#:tests? #f ; there is no test target | |
1599 | #:license-file-regexp "PngSuite.LICENSE" | |
1600 | #:phases | |
1601 | (modify-phases %standard-phases | |
1602 | (replace 'install | |
1603 | (lambda* (#:key outputs #:allow-other-keys) | |
1604 | (let ((out (assoc-ref outputs "out"))) | |
1605 | (copy-recursively "." (string-append out "/")) | |
1606 | #t))) | |
1607 | (delete 'build) | |
1608 | (delete 'configure)))) | |
1609 | (home-page "http://www.schaik.com/pngsuite2011/pngsuite.html") | |
1610 | (synopsis "Example PNGs for use in test suites") | |
1611 | (description "Collection of graphics images created to test PNG | |
1612 | applications like viewers, converters and editors. As far as that is | |
1613 | possible, all formats supported by the PNG standard are represented.") | |
1614 | (license (license:fsdg-compatible "file://PngSuite.LICENSE" "Permission to | |
1615 | use, copy, modify and distribute these images for any purpose and without fee | |
1616 | is hereby granted.")))) | |
1617 | ||
37e05d64 TGR |
1618 | (define-public libjpeg-turbo |
1619 | (package | |
1620 | (name "libjpeg-turbo") | |
e19810e0 | 1621 | (version "2.0.5") |
37e05d64 TGR |
1622 | (source (origin |
1623 | (method url-fetch) | |
ec92d786 MB |
1624 | (uri (string-append "mirror://sourceforge/libjpeg-turbo/" |
1625 | version "/libjpeg-turbo-" version ".tar.gz")) | |
37e05d64 TGR |
1626 | (sha256 |
1627 | (base32 | |
e19810e0 | 1628 | "0pbv6pc97kbj7ib31qcwi7lnmm9xg5y3b11aasmkhfjvf7rgdy0n")))) |
6871121b | 1629 | (build-system cmake-build-system) |
37e05d64 TGR |
1630 | (native-inputs |
1631 | `(("nasm" ,nasm))) | |
1632 | (arguments | |
ff5733d1 | 1633 | `(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib" |
f3418f58 | 1634 | "-DENABLE_STATIC=0" |
2f823fb4 EF |
1635 | ;; djpeg-shared-3x2-float-prog-cmp fails on 32-bit PPC. |
1636 | ,@(if (string=? "powerpc-linux" (%current-system)) | |
1637 | `("-DFLOATTEST=NO") | |
1638 | '()) | |
f3418f58 MB |
1639 | ;; The build system probes for the current CPU, but |
1640 | ;; that fails when cross-compiling. | |
1641 | ,@(let ((target (%current-target-system))) | |
1642 | (if target | |
1643 | (cond | |
1644 | ((string-prefix? "arm" target) | |
1645 | `("-DCMAKE_SYSTEM_PROCESSOR=arm")) | |
1646 | ((string-prefix? "aarch64" target) | |
1647 | `("-DCMAKE_SYSTEM_PROCESSOR=aarch64")) | |
1648 | ((string-prefix? "i686" target) | |
1649 | `("-DCMAKE_SYSTEM_PROCESSOR=x86")) | |
1650 | ((string-prefix? "x86_64" target) | |
1651 | `("-DCMAKE_SYSTEM_PROCESSOR=x86_64")) | |
2f823fb4 EF |
1652 | ;; 32-bit and 64-bit |
1653 | ((string-prefix? "powerpc" target) | |
1654 | `("-DCMAKE_SYSTEM_PROCESSOR=powerpc")) | |
f3418f58 MB |
1655 | (else '())) |
1656 | '()))) | |
ff5733d1 MB |
1657 | ,@(if (%current-target-system) |
1658 | '() | |
1659 | ;; Use a special "bootstrap" CMake for the native build to work | |
1660 | ;; around a circular dependency between CMake and this package. | |
7c1ea931 | 1661 | `(#:cmake ,cmake-bootstrap)))) |
a77de47a | 1662 | (home-page "https://libjpeg-turbo.org/") |
37e05d64 TGR |
1663 | (synopsis "SIMD-accelerated JPEG image handling library") |
1664 | (description "libjpeg-turbo is a JPEG image codec that accelerates baseline | |
1665 | JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on | |
1666 | x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems, | |
1667 | its highly-optimized Huffman coding routines allow it to outperform libjpeg by | |
1668 | a significant amount. | |
1669 | libjpeg-turbo implements both the traditional libjpeg API and the less powerful | |
1670 | but more straightforward TurboJPEG API, and provides a full-featured Java | |
1671 | interface. It supports color space extensions that allow it to compress from | |
1672 | and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).") | |
71de61c3 MB |
1673 | ;; libjpeg-turbo is covered by three different licenses; see LICENSE.md. |
1674 | (license (list license:bsd-3 ;the TurboJPEG API library and programs | |
1675 | license:ijg ;the libjpeg library and associated tools | |
1676 | license:zlib)))) ;the libjpeg-turbo SIMD extensions | |
21122bd7 | 1677 | |
a1552f52 | 1678 | (define-deprecated libjpeg libjpeg-turbo) |
3299d8ef | 1679 | (export libjpeg) |
a1552f52 | 1680 | |
21122bd7 JD |
1681 | (define-public niftilib |
1682 | (package | |
f729a4d8 RW |
1683 | (name "niftilib") |
1684 | (version "2.0.0") | |
1685 | (source (origin | |
1686 | (method url-fetch) | |
1687 | (uri (list (string-append "mirror://sourceforge/niftilib/" | |
1688 | "nifticlib/nifticlib_" | |
1689 | (string-join (string-split version #\.) "_") | |
1690 | "/nifticlib-" version ".tar.gz"))) | |
1691 | (sha256 | |
1692 | (base32 "123z9bwzgin5y8gi5ni8j217k7n683whjsvg0lrpii9flgk8isd3")))) | |
1693 | (build-system gnu-build-system) | |
1694 | (arguments | |
1695 | '(#:tests? #f ; there is no test target | |
1696 | #:parallel-build? #f ; not supported | |
1697 | #:make-flags | |
1698 | (list "SHELL=bash" | |
1699 | (string-append "ZLIB_INC=" | |
1700 | (assoc-ref %build-inputs "zlib") "/include") | |
1701 | ;; Append "-fPIC" to CFLAGS. | |
1702 | (string-append "CFLAGS=" | |
1703 | "-Wall -ansi -pedantic -fPIC")) | |
1704 | #:phases | |
1705 | (modify-phases %standard-phases | |
1706 | (replace 'install | |
1707 | (lambda* (#:key outputs #:allow-other-keys) | |
1708 | (let ((out (assoc-ref outputs "out"))) | |
1709 | (for-each | |
1710 | (lambda (dir) | |
1711 | (copy-recursively dir (string-append out "/" dir))) | |
1712 | '("bin" "lib" "include"))) | |
1713 | #t)) | |
1714 | (delete 'configure)))) | |
1715 | (inputs | |
1716 | `(("zlib" ,zlib))) | |
1717 | (synopsis "Library for reading and writing files in the nifti-1 format") | |
1718 | (description "Niftilib is a set of i/o libraries for reading and writing | |
21122bd7 JD |
1719 | files in the nifti-1 data format - a binary file format for storing |
1720 | medical image data, e.g. magnetic resonance image (MRI) and functional MRI | |
1721 | (fMRI) brain images.") | |
f729a4d8 RW |
1722 | (home-page "http://niftilib.sourceforge.net") |
1723 | (license license:public-domain))) | |
f2079849 JL |
1724 | |
1725 | (define-public gpick | |
1726 | (package | |
1727 | (name "gpick") | |
8933abaf | 1728 | (version "0.2.6") |
f2079849 | 1729 | (source (origin |
94be94cf RW |
1730 | (method git-fetch) |
1731 | (uri (git-reference | |
b0e7b699 | 1732 | (url "https://github.com/thezbyg/gpick") |
94be94cf RW |
1733 | (commit (string-append name "-" version)))) |
1734 | (file-name (git-file-name name version)) | |
f2079849 JL |
1735 | (sha256 |
1736 | (base32 | |
8933abaf | 1737 | "0nl89gca5nmbyycv5rl5bm6k7facapdk4pab9pl949aa3cjw9bk7")))) |
2235abb2 | 1738 | (build-system scons-build-system) |
f2079849 JL |
1739 | (native-inputs |
1740 | `(("boost" ,boost) | |
f2d97d57 | 1741 | ("gettext" ,gettext-minimal) |
8933abaf TGR |
1742 | ("pkg-config" ,pkg-config) |
1743 | ("ragel" ,ragel))) | |
f2079849 JL |
1744 | (inputs |
1745 | `(("expat" ,expat) | |
1746 | ("gtk2" ,gtk+-2) | |
1747 | ("lua" ,lua-5.2))) | |
1748 | (arguments | |
1749 | `(#:tests? #f | |
2235abb2 AI |
1750 | #:scons ,scons-python2 |
1751 | #:scons-flags (list (string-append "DESTDIR=" %output)) | |
f2079849 JL |
1752 | #:phases |
1753 | (modify-phases %standard-phases | |
1754 | (add-before 'build 'fix-lua-reference | |
1755 | (lambda _ | |
1756 | (substitute* "SConscript" | |
1757 | (("lua5.2") "lua-5.2")) | |
2235abb2 | 1758 | #t))))) |
f2079849 JL |
1759 | (home-page "http://www.gpick.org/") |
1760 | (synopsis "Color picker") | |
1761 | (description "Gpick is an advanced color picker and palette editing tool.") | |
1762 | (license license:bsd-3))) | |
bc806b0c LF |
1763 | |
1764 | (define-public libiptcdata | |
1765 | (package | |
1766 | (name "libiptcdata") | |
a42b6848 | 1767 | (version "1.0.5") |
bc806b0c LF |
1768 | (source (origin |
1769 | (method url-fetch) | |
a42b6848 TGR |
1770 | (uri (string-append "https://github.com/ianw/libiptcdata" |
1771 | "/releases/download/release_" | |
1772 | (string-join (string-split version #\.) "_") | |
1773 | "/" name "-" version ".tar.gz")) | |
bc806b0c LF |
1774 | (sha256 |
1775 | (base32 | |
a42b6848 | 1776 | "17m2bscc76r1bymjgb44fbbfrdsjfqyb2ivg9wchyllm8pgx1560")))) |
bc806b0c | 1777 | (build-system gnu-build-system) |
a42b6848 | 1778 | (home-page "https://github.com/ianw/libiptcdata") |
bc806b0c | 1779 | (synopsis "IPTC metadata manipulation library") |
a09a2119 TGR |
1780 | (description |
1781 | "Libiptcdata is a C library for manipulating the International Press | |
1782 | Telecommunications Council (@dfn{IPTC}) metadata stored within multimedia files | |
bc806b0c LF |
1783 | such as images. This metadata can include captions and keywords, often used by |
1784 | popular photo management applications. The library provides routines for | |
1785 | parsing, viewing, modifying, and saving this metadata.") | |
1786 | (license license:lgpl2.0+))) | |
84567657 OP |
1787 | |
1788 | (define-public flameshot | |
1789 | (package | |
1790 | (name "flameshot") | |
98f5548c | 1791 | (version "0.8.5") |
84567657 OP |
1792 | (source |
1793 | (origin | |
743600e9 RW |
1794 | (method git-fetch) |
1795 | (uri (git-reference | |
98f5548c | 1796 | (url "https://github.com/flameshot-org/flameshot") |
743600e9 RW |
1797 | (commit (string-append "v" version)))) |
1798 | (file-name (git-file-name name version)) | |
84567657 OP |
1799 | (sha256 |
1800 | (base32 | |
98f5548c ZZ |
1801 | "1z77igs60lz106vsf6wsayxjafxm3llf2lm4dpvsqyyrxybfq191")))) |
1802 | (build-system qt-build-system) | |
84567657 OP |
1803 | (native-inputs |
1804 | `(("qttools" ,qttools))) | |
1805 | (inputs | |
98f5548c ZZ |
1806 | `(("qtbase" ,qtbase) |
1807 | ("qtsvg" ,qtsvg))) | |
84567657 | 1808 | (arguments |
98f5548c ZZ |
1809 | `(#:tests? #f)) ;no tests |
1810 | (home-page "https://github.com/flameshot-org/flameshot") | |
84567657 OP |
1811 | (synopsis "Powerful yet simple to use screenshot software") |
1812 | (description "Flameshot is a screenshot program. | |
1813 | Features: | |
1814 | ||
1815 | @itemize | |
1816 | @item Customizable appearance. | |
1817 | @item Easy to use. | |
1818 | @item In-app screenshot edition. | |
1819 | @item DBus interface. | |
1820 | @item Upload to Imgur. | |
1821 | @end itemize\n") | |
1822 | (license license:gpl3+))) | |
da4dde61 | 1823 | |
bc7879cc SH |
1824 | (define-public swappy |
1825 | (package | |
1826 | (name "swappy") | |
1827 | (version "1.2.1") | |
1828 | (source | |
1829 | (origin | |
1830 | (method git-fetch) | |
1831 | (uri (git-reference | |
1832 | (url "https://github.com/jtheoof/swappy") | |
1833 | (commit (string-append "v" version)))) | |
1834 | (file-name (git-file-name name version)) | |
1835 | (sha256 | |
1836 | (base32 "14ac2jmnak7avcz0jhqjm30vk7pv3gq5aq5rdyh84k8c613kkicf")))) | |
1837 | (build-system meson-build-system) | |
1838 | (native-inputs | |
1839 | `(("pkg-config" ,pkg-config) | |
1840 | ("scdoc" ,scdoc) | |
1841 | ("glib" ,glib "bin"))) ; for 'glib-compile-resources' | |
1842 | (inputs | |
1843 | `(("gtk+" ,gtk+) | |
1844 | ("libnotify" ,libnotify))) | |
1845 | (home-page "https://github.com/jtheoof/swappy") | |
1846 | (synopsis "Grab and edit on the fly snapshots of a Wayland compositor") | |
1847 | (description | |
1848 | "@command{swappy} is a command-line utility to take and edit screenshots | |
1849 | of Wayland desktops. Works great with grim, slurp and sway. But can easily | |
1850 | work with other screen copy tools that can output a final PNG image to | |
1851 | stdout.") | |
1852 | (license license:expat))) | |
1853 | ||
0d529a7c PN |
1854 | (define-public gifsicle |
1855 | (package | |
1856 | (name "gifsicle") | |
5c46e1dd | 1857 | (version "1.92") |
0d529a7c PN |
1858 | (source |
1859 | (origin | |
1860 | (method url-fetch) | |
645b6c7f | 1861 | (uri (string-append "https://www.lcdf.org/gifsicle/gifsicle-" |
0d529a7c PN |
1862 | version ".tar.gz")) |
1863 | (sha256 | |
5c46e1dd | 1864 | (base32 "0rffpzxcak19k6cngpxn73khvm3z1gswrqs90ycdzzb53p05ddas")))) |
0d529a7c PN |
1865 | (build-system gnu-build-system) |
1866 | (arguments | |
1867 | '(#:phases | |
1868 | (modify-phases %standard-phases | |
1869 | (add-before 'check 'patch-tests | |
1870 | (lambda _ | |
1871 | (substitute* "test/testie" | |
1872 | (("/usr/bin/perl") | |
1873 | (which "perl")) | |
1874 | (("/bin/sh") | |
1875 | (which "sh")) | |
1876 | (("/bin/rm") | |
1877 | (which "rm"))) | |
1878 | #t))))) | |
5c46e1dd | 1879 | (native-inputs `(("perl" ,perl))) ; only for tests |
0d529a7c | 1880 | (inputs `(("libx11" ,libx11))) |
645b6c7f | 1881 | (home-page "https://www.lcdf.org/gifsicle/") |
0d529a7c PN |
1882 | (synopsis "Edit GIF images and animations") |
1883 | (description "Gifsicle is a command-line GIF image manipulation tool that: | |
1884 | ||
1885 | @itemize | |
1886 | @item Provides a batch mode for changing GIFs in place. | |
1887 | @item Prints detailed information about GIFs, including comments. | |
1888 | @item Control over interlacing, comments, looping, transparency, etc. | |
1889 | @item Creates well-behaved GIFs: removes redundant colors, only uses local color | |
1890 | tables, etc. | |
1891 | @item Shrinks colormaps and change images to use the Web-safe palette. | |
1892 | @item Optimizes GIF animations, or unoptimizes them for easier editing. | |
1893 | @end itemize | |
1894 | ||
1895 | Two other programs are included with Gifsicle: @command{gifview} is a | |
1896 | lightweight animated-GIF viewer, and @command{gifdiff} compares two GIFs for | |
1897 | identical visual appearance.") | |
1898 | (license license:gpl2+))) | |
3239dcd3 | 1899 | |
dc7e5783 | 1900 | ;; 1.0.7 is buggy and reverted in git repository. |
3239dcd3 PAR |
1901 | (define-public jp2a |
1902 | (package | |
1903 | (name "jp2a") | |
dc7e5783 | 1904 | (version "1.0.6") |
3239dcd3 PAR |
1905 | (source |
1906 | (origin | |
dc7e5783 EF |
1907 | (method url-fetch) |
1908 | (uri (string-append "mirror://debian/pool/main/j/jp2a/jp2a_" | |
1909 | version ".orig.tar.gz")) | |
1910 | (sha256 | |
1911 | (base32 | |
1912 | "076frk3pa16s4r1b10zgy81vdlz0385zh3ykbnkaij25jn5aqc09")))) | |
3239dcd3 PAR |
1913 | (build-system gnu-build-system) |
1914 | (inputs | |
dc7e5783 | 1915 | `(("curl" ,curl) |
4bd428a7 | 1916 | ("libjpeg" ,libjpeg-turbo) |
dc7e5783 | 1917 | ("ncurses" ,ncurses))) |
3239dcd3 PAR |
1918 | (home-page "https://csl.name/jp2a/") |
1919 | (synopsis "Convert JPEG images to ASCII") | |
1920 | (description | |
1921 | "Jp2a is a small utility that converts JPEG images to ASCII.") | |
1922 | (license license:gpl2))) | |
0290f533 RH |
1923 | |
1924 | (define-public grim | |
1925 | (package | |
444c4c08 | 1926 | (name "grim") |
caf4df50 | 1927 | (version "1.3.1") |
444c4c08 RH |
1928 | (source |
1929 | (origin | |
90c7ea44 TGR |
1930 | (method git-fetch) |
1931 | (uri (git-reference | |
b0e7b699 | 1932 | (url "https://github.com/emersion/grim") |
90c7ea44 TGR |
1933 | (commit (string-append "v" version)))) |
1934 | (file-name (git-file-name name version)) | |
444c4c08 | 1935 | (sha256 |
02b4b105 | 1936 | (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib")))) |
444c4c08 | 1937 | (build-system meson-build-system) |
355dd713 BT |
1938 | (native-inputs `(("pkg-config" ,pkg-config) |
1939 | ("scdoc" ,scdoc))) | |
444c4c08 RH |
1940 | (inputs `(("cairo" ,cairo) |
1941 | ("libjpeg-turbo" ,libjpeg-turbo) | |
444c4c08 RH |
1942 | ("wayland" ,wayland) |
1943 | ("wayland-protocols" ,wayland-protocols))) | |
1944 | (home-page "https://github.com/emersion/grim") | |
1945 | (synopsis "Create screenshots from a Wayland compositor") | |
1946 | (description "grim can create screenshots from a Wayland compositor.") | |
1947 | ;; MIT license. | |
1948 | (license license:expat))) | |
bd86a1be RH |
1949 | |
1950 | (define-public slurp | |
1951 | (package | |
1952 | (name "slurp") | |
8dc42916 | 1953 | (version "1.3.1") |
bd86a1be RH |
1954 | (source |
1955 | (origin | |
1956 | (method git-fetch) | |
1957 | (uri (git-reference | |
b0e7b699 | 1958 | (url "https://github.com/emersion/slurp") |
bd86a1be RH |
1959 | (commit (string-append "v" version)))) |
1960 | (file-name (git-file-name name version)) | |
1961 | (sha256 | |
8dc42916 | 1962 | (base32 "1fby2v2ylcadgclds05wpkl9xi2r9dfz49dqyqpn20rjv1wnz3jv")))) |
bd86a1be | 1963 | (build-system meson-build-system) |
007edfb7 MB |
1964 | (native-inputs |
1965 | `(("pkg-config" ,pkg-config) | |
1966 | ("scdoc" ,scdoc))) | |
1967 | (inputs | |
1968 | `(("cairo" ,cairo) | |
1969 | ("libxkbcommon" ,libxkbcommon) | |
1970 | ("wayland" ,wayland) | |
1971 | ("wayland-protocols" ,wayland-protocols))) | |
bd86a1be RH |
1972 | (home-page "https://github.com/emersion/slurp") |
1973 | (synopsis "Select a region in a Wayland compositor") | |
1974 | (description "Slurp can select a region in a Wayland compositor and print it | |
1975 | to the standard output. It works well together with grim.") | |
bd86a1be | 1976 | (license license:expat))) |
d54ca1cd VC |
1977 | |
1978 | (define-public sng | |
1979 | (package | |
1980 | (name "sng") | |
1981 | (version "1.1.0") | |
1982 | (source | |
1983 | (origin | |
1984 | (method url-fetch) | |
1985 | (uri (string-append "mirror://sourceforge/sng/sng-" | |
1986 | version ".tar.gz")) | |
1987 | (sha256 | |
1988 | (base32 "06a6ydvx9xb3vxvrzdrg3hq0rjwwj9ibr7fyyxjxq6qx1j3mb70i")))) | |
1989 | (build-system gnu-build-system) | |
1990 | (arguments | |
1991 | `(#:phases | |
1992 | (modify-phases %standard-phases | |
1993 | (add-before 'check 'link-pngsuite | |
1994 | ;; tests expect pngsuite in source dir | |
1995 | (lambda* (#:key inputs #:allow-other-keys) | |
1996 | (symlink (assoc-ref inputs "pngsuite") "pngsuite") | |
1997 | #t))) | |
1998 | #:configure-flags | |
1999 | (list (string-append "--with-rgbtxt=" | |
2000 | (assoc-ref %build-inputs "xorg-rgb") | |
2001 | "/share/X11/rgb.txt")))) | |
2002 | (inputs `(("xorg-rgb" ,xorg-rgb) | |
2003 | ("libpng" ,libpng))) | |
2004 | (native-inputs `(("pngsuite" ,pngsuite))) | |
2005 | (home-page "http://sng.sourceforge.net") | |
2006 | (synopsis "Markup language for representing PNG contents") | |
2007 | (description "SNG (Scriptable Network Graphics) is a minilanguage designed | |
2008 | specifically to represent the entire contents of a PNG (Portable Network | |
2009 | Graphics) file in an editable form. Thus, SNGs representing elaborate | |
2010 | graphics images and ancillary chunk data can be readily generated or modified | |
2011 | using only text tools. | |
2012 | ||
2013 | SNG is implemented by a compiler/decompiler called sng that | |
2014 | losslessly translates between SNG and PNG.") | |
2015 | (license license:zlib))) | |
7eed5845 GL |
2016 | |
2017 | (define-public lodepng | |
2018 | ;; There are no tags in the repository, so we take the version as defined in | |
2019 | ;; lodepng.cpp. | |
2020 | (let ((commit "48e5364ef48ec2408f44c727657ac1b6703185f8") | |
2021 | (revision "1") | |
2022 | (version "20200215")) | |
2023 | (package | |
2024 | (name "lodepng") | |
2025 | (version (git-version version revision commit)) | |
2026 | (source (origin | |
2027 | (method git-fetch) | |
2028 | (uri (git-reference | |
2029 | (url "https://github.com/lvandeve/lodepng") | |
2030 | (commit commit))) | |
2031 | (sha256 | |
2032 | (base32 | |
2033 | "1a1x8ag2scanzb2066jm9hg2y9kaa3wmpgmz10l1x9bkpik612lw")) | |
2034 | (file-name (git-file-name name version)))) | |
2035 | (build-system gnu-build-system) | |
2036 | (arguments | |
2037 | '(#:phases | |
2038 | (modify-phases %standard-phases | |
2039 | (delete 'configure) | |
2040 | (replace 'build | |
2041 | (lambda _ | |
2042 | (setenv "CXXFLAGS" "-fPIC") | |
2043 | (invoke "make" "lodepng.o") | |
2044 | (invoke "make" "lodepng_util.o") | |
2045 | (invoke "g++" "-fPIC" "-O3" | |
2046 | "-o" "liblodepng.so" | |
2047 | "-shared" "lodepng.o" "lodepng_util.o") | |
2048 | #t)) | |
2049 | (replace 'check | |
2050 | (lambda _ | |
2051 | (invoke "make" "unittest") | |
2052 | (invoke "./unittest") | |
2053 | #t)) | |
2054 | (replace 'install | |
2055 | (lambda* (#:key outputs #:allow-other-keys) | |
2056 | (let* ((out (assoc-ref outputs "out")) | |
2057 | (doc (string-append out "/share/doc")) | |
2058 | (lib (string-append out "/lib")) | |
2059 | (include (string-append out "/include"))) | |
2060 | (install-file "lodepng.h" include) | |
2061 | (install-file "lodepng_util.h" include) | |
2062 | (install-file "liblodepng.so" lib) | |
2063 | (install-file "README.md" doc) | |
2064 | #t)))))) | |
2065 | (home-page "https://lodev.org/lodepng/") | |
2066 | (synopsis "PNG encoder and decoder in C and C++, without dependencies") | |
2067 | (description "LodePNG is a PNG image decoder and encoder, all in one, | |
2068 | no dependency or linkage required. It's made for C (ISO C90), and has a C++ | |
2069 | wrapper with a more convenient interface on top.") | |
2070 | (license license:zlib)))) | |
14138912 HG |
2071 | |
2072 | (define-public icoutils | |
2073 | (package | |
2074 | (name "icoutils") | |
2075 | (version "0.32.3") | |
2076 | (source | |
2077 | (origin | |
2078 | (method url-fetch) | |
2079 | (uri (string-append | |
2080 | "mirror://savannah/icoutils/icoutils-" version ".tar.bz2")) | |
2081 | (sha256 | |
2082 | (base32 "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp")))) | |
2083 | (build-system gnu-build-system) | |
2084 | (inputs | |
2085 | `(("libpng" ,libpng) | |
2086 | ("perl" ,perl))) | |
2087 | (propagated-inputs | |
2088 | `(("perl-libwww" ,perl-libwww))) | |
2089 | (home-page "https://www.nongnu.org/icoutils/") | |
2090 | (synopsis "Extract and convert bitmaps from Windows icon and cursor files") | |
2091 | (description "Icoutils are a set of program for extracting and converting | |
2092 | bitmaps from Microsoft Windows icon and cursor files. These files usually | |
2093 | have the extension @code{.ico} or @code{.cur}, but they can also be embedded | |
2094 | in executables and libraries (@code{.dll}-files). (Such embedded files are | |
2095 | referred to as resources.) | |
2096 | ||
2097 | Conversion of these files to and from PNG images is done @command{icotool}. | |
2098 | @command{extresso} automates these tasks with the help of special resource | |
2099 | scripts. Resources such can be extracted from MS Windows executable and | |
2100 | library files with @command{wrestool}. | |
2101 | ||
2102 | This package can be used to create @code{favicon.ico} files for web sites.") | |
2103 | (license license:gpl3+))) | |
fecd608f LF |
2104 | |
2105 | (define-public libavif | |
2106 | (package | |
2107 | (name "libavif") | |
66f10906 | 2108 | (version "0.8.4") |
fecd608f LF |
2109 | (source (origin |
2110 | (method git-fetch) | |
2111 | (uri (git-reference | |
2112 | (url "https://github.com/AOMediaCodec/libavif") | |
2113 | (commit (string-append "v" version)))) | |
2114 | (file-name (git-file-name name version)) | |
2115 | (sha256 | |
2116 | (base32 | |
66f10906 | 2117 | "1qvjd3xi9r89pcblxdgz4c6hqp67ss53b1x9zkg7lrik7g3lwq8d")))) |
fecd608f LF |
2118 | (build-system cmake-build-system) |
2119 | (arguments | |
2120 | `(#:configure-flags '("-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON" | |
430c17c9 | 2121 | "-DAVIF_CODEC_RAV1E=ON" |
fecd608f LF |
2122 | "-DAVIF_BUILD_TESTS=ON") |
2123 | #:phases | |
2124 | (modify-phases %standard-phases | |
d7041a69 LF |
2125 | (replace 'check |
2126 | (lambda _ | |
2127 | (invoke "./aviftest" "../source/tests/data"))) | |
fecd608f LF |
2128 | (add-after 'install 'install-readme |
2129 | (lambda* (#:key outputs #:allow-other-keys) | |
2130 | (let* ((out (assoc-ref outputs "out")) | |
d7041a69 LF |
2131 | (doc (string-append out "/share/doc/libavif-" ,version))) |
2132 | (install-file "../source/README.md" doc) | |
2133 | #t)))))) | |
fecd608f | 2134 | (inputs |
430c17c9 VM |
2135 | `(("dav1d" ,dav1d) |
2136 | ("libaom" ,libaom) | |
2137 | ("rav1e" ,rav1e))) | |
fecd608f | 2138 | (synopsis "Encode and decode AVIF files") |
51b25847 TGR |
2139 | (description "Libavif is a C implementation of @acronym{AVIF, the AV1 Image |
2140 | File Format}. It can encode and decode all YUV formats and bit depths supported | |
2141 | by AOM, including with alpha.") | |
fecd608f LF |
2142 | (home-page "https://github.com/AOMediaCodec/libavif") |
2143 | (license (list license:bsd-2 ; libavif itself | |
2144 | license:expat)))) ; cJSON in the test suite | |
95b800e6 VK |
2145 | |
2146 | (define-public mtpaint | |
996b3f71 TGR |
2147 | (package |
2148 | (name "mtpaint") | |
2149 | ;; The author neither releases tarballs nor uses git version tags. | |
2150 | ;; Instead, author puts version in git commit title. | |
9314d825 | 2151 | (version "3.49.33") |
996b3f71 TGR |
2152 | (source |
2153 | (origin | |
2154 | (method git-fetch) | |
2155 | (uri (git-reference | |
2156 | (url "https://github.com/wjaguar/mtPaint") | |
9314d825 | 2157 | (commit "5272e2b1e773c8e02ac3506b2d3bde82ad946b21"))) |
996b3f71 TGR |
2158 | (file-name (git-file-name name version)) |
2159 | (sha256 | |
9314d825 | 2160 | (base32 "1bmq4m0dxczl18n1yiqb75g05a4c3pal1vdcyypkilx7ijsr0cmc")))) |
996b3f71 TGR |
2161 | (build-system gnu-build-system) |
2162 | (native-inputs | |
2163 | `(("gettext" ,gettext-minimal) | |
2164 | ("pkg-config" ,pkg-config) | |
2165 | ("which" ,which))) | |
2166 | (inputs | |
2167 | `(("imlib2" ,imlib2) | |
2168 | ("libtiff" ,libtiff) | |
2169 | ("libpng" ,libpng) | |
1628d57b EF |
2170 | ("libungif" ,libungif) |
2171 | ("libjpeg" ,libjpeg-turbo) | |
996b3f71 TGR |
2172 | ("libwebp" ,libwebp) |
2173 | ("openjpeg" ,openjpeg) | |
2174 | ("lcms" ,lcms) | |
1628d57b | 2175 | ("zlib" ,zlib) |
996b3f71 TGR |
2176 | ("glib" ,glib) |
2177 | ;; Support for gtk3 is in the testing stage. | |
2178 | ("gtk+" ,gtk+-2))) | |
2179 | (arguments | |
2180 | `(#:configure-flags | |
2181 | (list "intl" ; build internationalized version | |
2182 | "man") ; build the man page | |
2183 | #:tests? #f)) ; no test suite | |
2184 | (home-page "http://mtpaint.sourceforge.net/") | |
2185 | (synopsis "Create pixel art and manipulate digital images") | |
2186 | (description | |
2187 | "Mtpaint is a graphic editing program which uses the GTK+ toolkit. | |
95b800e6 VK |
2188 | It can create and edit indexed palette or 24bit RGB images, offers basic |
2189 | painting and palette manipulation tools. It also handles JPEG, JPEG2000, | |
2190 | GIF, TIFF, WEBP, BMP, PNG, XPM formats.") | |
996b3f71 | 2191 | (license license:gpl3+))) |
1367ee7a | 2192 | |
8a55a399 | 2193 | (define-public mypaint |
2194 | (package | |
2195 | (name "mypaint") | |
2196 | (version "2.0.1") | |
2197 | (source (origin | |
2198 | (method url-fetch) | |
2199 | (uri (string-append "https://github.com/mypaint/mypaint/" | |
2200 | "releases/download/v" version "/mypaint-" | |
2201 | version ".tar.xz")) | |
2202 | (sha256 | |
2203 | (base32 | |
2204 | "05mvay73vb9d2sh1ckv4vny45n059dmsps1jcppjizfmrpbkgr7k")))) | |
2205 | (build-system python-build-system) | |
2206 | (arguments | |
2207 | `(#:imported-modules ((guix build glib-or-gtk-build-system) | |
2208 | ,@%python-build-system-modules) | |
2209 | #:modules ((guix build python-build-system) | |
2210 | ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) | |
2211 | (guix build utils)) | |
2212 | #:phases | |
2213 | (modify-phases %standard-phases | |
2214 | (add-after 'install 'glib-or-gtk-wrap | |
2215 | (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)) | |
2216 | (add-after 'install 'wrap-program | |
2217 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
2218 | (let* ((out (assoc-ref outputs "out")) | |
2219 | (gdk-pixbuf (assoc-ref inputs "gdk-pixbuf")) | |
2220 | (gtk+ (assoc-ref inputs "gtk+"))) | |
2221 | (wrap-program (string-append out "/bin/mypaint") | |
2222 | `("GI_TYPELIB_PATH" ":" prefix | |
2223 | (,(getenv "GI_TYPELIB_PATH")))) | |
2224 | #t))) | |
2225 | (add-before 'check 'pre-check | |
2226 | (lambda _ | |
2227 | ;; Tests need writing access | |
2228 | (setenv "HOME" "/tmp") | |
2229 | #t))))) | |
2230 | (native-inputs | |
2231 | `(("pkg-config" ,pkg-config) | |
2232 | ("gobject-introspection" ,gobject-introspection) | |
2233 | ("swig" ,swig) | |
2234 | ("gettext" ,gettext-minimal))) | |
2235 | (inputs | |
2236 | `(("gtk+" ,gtk+) | |
2237 | ("gdk-pixbuf" ,gdk-pixbuf+svg) | |
2238 | ("hicolor-icon-theme" ,hicolor-icon-theme) | |
2239 | ("libmypaint" ,libmypaint) | |
2240 | ("mypaint-brushes" ,mypaint-brushes) | |
2241 | ("json-c" ,json-c) | |
2242 | ("lcms" ,lcms) | |
2243 | ("python-numpy" ,python-numpy) | |
2244 | ("python-pycairo" ,python-pycairo) | |
2245 | ("python-pygobject" ,python-pygobject))) | |
2246 | (home-page "http://mypaint.org/") | |
2247 | (synopsis "Fast and simple painting app for artists") | |
2248 | (description | |
2249 | "MyPaint is a simple drawing and painting program that works well with | |
2250 | Wacom-style graphics tablets.") | |
2251 | (license license:gpl2+))) | |
2252 | ||
1367ee7a AI |
2253 | (define-public phockup |
2254 | (package | |
2255 | (name "phockup") | |
2256 | (version "1.5.9") | |
2257 | (source | |
2258 | (origin | |
2259 | (method git-fetch) | |
2260 | (uri (git-reference | |
2261 | (url "https://github.com/ivandokov/phockup") | |
2262 | (commit version))) | |
2263 | (file-name (git-file-name name version)) | |
2264 | (sha256 | |
2265 | (base32 | |
2266 | "13ajj0xch7yfqaaxbw0awxs0fz17n1rxir4gqh2wcgxjysqk1j2y")))) | |
2267 | (build-system copy-build-system) | |
2268 | (arguments | |
2269 | `(#:install-plan '(("src" "share/phockup/") | |
2270 | ("phockup.py" "share/phockup/")) | |
2271 | #:phases | |
2272 | (modify-phases %standard-phases | |
2273 | (add-after 'unpack 'configure | |
2274 | (lambda* (#:key inputs #:allow-other-keys) | |
2275 | (substitute* (list "src/dependency.py" "src/exif.py") | |
2276 | (("exiftool") | |
2277 | (string-append (assoc-ref inputs "perl-image-exiftool") | |
2278 | "/bin/exiftool"))) | |
2279 | #t)) | |
2280 | (add-before 'install 'check | |
2281 | (lambda _ | |
2282 | (invoke "pytest"))) | |
2283 | (add-after 'install 'install-bin | |
2284 | (lambda* (#:key outputs #:allow-other-keys) | |
2285 | (let ((out (assoc-ref outputs "out"))) | |
2286 | (mkdir (string-append out "/bin")) | |
2287 | (symlink (string-append out "/share/phockup/phockup.py") | |
2288 | (string-append out "/bin/phockup"))) | |
2289 | #t))))) | |
2290 | (inputs | |
2291 | `(("perl-image-exiftool" ,perl-image-exiftool) | |
2292 | ("python" ,python))) | |
2293 | (native-inputs | |
2294 | `(("python-pytest" ,python-pytest) | |
2295 | ("python-pytest-mock" ,python-pytest-mock))) | |
2296 | (home-page "https://github.com/ivandokov/phockup") | |
2297 | (synopsis "Organize photos and videos in folders") | |
2298 | (description "Phockup is a media sorting tool that uses creation date and | |
2299 | time information in photos and videos to organize them into folders by year, | |
2300 | month and day. All files which are not images or videos or those which do not | |
2301 | have creation date information will be placed in a folder called | |
2302 | @file{unknown}.") | |
2303 | (license license:expat))) |