Commit | Line | Data |
---|---|---|
e55354b8 | 1 | ;;; GNU Guix --- Functional package management for GNU |
97039f6e | 2 | ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> |
73161579 | 3 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
85a02905 | 4 | ;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com> |
4100fe9d | 5 | ;;; Copyright © 2014 Ricardo Wurmus <rekado@elephly.net> |
0731a47c | 6 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> |
97039f6e | 7 | ;;; Copyright © 2014 John Darrington <jmd@gnu.org> |
e55354b8 DT |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages image) | |
25 | #:use-module (gnu packages) | |
97039f6e | 26 | #:use-module (gnu packages algebra) |
894e2cba | 27 | #:use-module (gnu packages autotools) |
97039f6e | 28 | #:use-module (gnu packages boost) |
e55354b8 | 29 | #:use-module (gnu packages compression) |
97039f6e | 30 | #:use-module (gnu packages doxygen) |
efa77baf | 31 | #:use-module (gnu packages fontutils) |
97039f6e | 32 | #:use-module (gnu packages ghostscript) |
060ad3de | 33 | #:use-module (gnu packages gl) |
97039f6e AE |
34 | #:use-module (gnu packages maths) |
35 | #:use-module (gnu packages perl) | |
efa77baf | 36 | #:use-module (gnu packages pkg-config) |
97039f6e | 37 | #:use-module (gnu packages python) |
efa77baf | 38 | #:use-module (gnu packages xml) |
76d88cfa | 39 | #:use-module (gnu packages xorg) |
43402c5c | 40 | #:use-module (gnu packages zip) |
b5b73a82 | 41 | #:use-module ((guix licenses) #:prefix license:) |
e55354b8 DT |
42 | #:use-module (guix packages) |
43 | #:use-module (guix download) | |
38c55e5c | 44 | #:use-module (guix build-system gnu) |
e596ab0f AK |
45 | #:use-module (guix build-system cmake) |
46 | #:use-module (srfi srfi-1)) | |
e55354b8 DT |
47 | |
48 | (define-public libpng | |
49 | (package | |
50 | (name "libpng") | |
73161579 | 51 | (version "1.5.21") |
e55354b8 DT |
52 | (source (origin |
53 | (method url-fetch) | |
54 | ||
55 | ;; Note: upstream removes older tarballs. | |
56 | (uri (list (string-append "mirror://sourceforge/libpng/libpng15/" | |
57 | version "/libpng-" version ".tar.xz") | |
58 | (string-append | |
59 | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
60 | "/libpng15/libpng-" version ".tar.xz"))) | |
61 | (sha256 | |
73161579 | 62 | (base32 "19yvzw6sf9gf7v25ha9bla8bw1nijh82wj8ag6brjj3hpij1q5dm")))) |
e55354b8 DT |
63 | (build-system gnu-build-system) |
64 | ||
65 | ;; libpng.la says "-lz", so propagate it. | |
66 | (propagated-inputs `(("zlib" ,zlib))) | |
67 | ||
68 | (synopsis "Library for handling PNG files") | |
69 | (description | |
70 | "Libpng is the official PNG (Portable Network Graphics) reference | |
35b9e423 | 71 | library. It supports almost all PNG features and is extensible.") |
e55354b8 DT |
72 | (license license:zlib) |
73 | (home-page "http://www.libpng.org/pub/png/libpng.html"))) | |
74 | ||
75 | (define-public libjpeg | |
76 | (package | |
77 | (name "libjpeg") | |
a0e9b72e | 78 | (version "9a") |
e55354b8 DT |
79 | (source (origin |
80 | (method url-fetch) | |
81 | (uri (string-append "http://www.ijg.org/files/jpegsrc.v" | |
82 | version ".tar.gz")) | |
83 | (sha256 (base32 | |
a0e9b72e | 84 | "19q5zr4n60sjcvfbyv06n4pcl1mai3ipvnd2akflayciinj3wx9s")))) |
e55354b8 | 85 | (build-system gnu-build-system) |
35b9e423 | 86 | (synopsis "Library for handling JPEG files") |
e55354b8 DT |
87 | (description |
88 | "Libjpeg implements JPEG image encoding, decoding, and transcoding. | |
89 | JPEG is a standardized compression method for full-color and gray-scale | |
90 | images. | |
91 | The included programs provide conversion between the JPEG format and | |
92 | image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.") | |
93 | (license license:ijg) | |
94 | (home-page "http://www.ijg.org/"))) | |
95 | ||
96 | (define-public libjpeg-8 | |
97 | (package (inherit libjpeg) | |
98 | (version "8d") | |
99 | (source (origin | |
100 | (method url-fetch) | |
101 | (uri (string-append "http://www.ijg.org/files/jpegsrc.v" | |
102 | version ".tar.gz")) | |
103 | (sha256 (base32 | |
104 | "1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0")))))) | |
105 | ||
106 | (define-public libtiff | |
107 | (package | |
108 | (name "libtiff") | |
109 | (version "4.0.3") | |
110 | (source (origin | |
111 | (method url-fetch) | |
112 | (uri (string-append "ftp://ftp.remotesensing.org/pub/libtiff/tiff-" | |
113 | version ".tar.gz")) | |
114 | (sha256 (base32 | |
8e28d22c MW |
115 | "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa")) |
116 | (patches (map search-patch '("libtiff-CVE-2012-4564.patch" | |
117 | "libtiff-CVE-2013-1960.patch" | |
118 | "libtiff-CVE-2013-1961.patch" | |
119 | "libtiff-CVE-2013-4231.patch" | |
120 | "libtiff-CVE-2013-4232.patch" | |
121 | "libtiff-CVE-2013-4244.patch" | |
122 | "libtiff-CVE-2013-4243.patch" | |
123 | "libtiff-CVE-2014-9330.patch" | |
124 | "libtiff-CVE-2014-8127-pt1.patch" | |
125 | "libtiff-CVE-2014-8127-pt2.patch" | |
126 | "libtiff-CVE-2014-8127-pt3.patch" | |
127 | "libtiff-CVE-2014-8127-pt4.patch" | |
128 | "libtiff-CVE-2014-8128-pt1.patch" | |
129 | "libtiff-CVE-2014-8128-pt2.patch" | |
130 | "libtiff-CVE-2014-8128-pt3.patch" | |
131 | "libtiff-CVE-2014-8129.patch" | |
132 | "libtiff-CVE-2014-9655.patch" | |
133 | "libtiff-CVE-2014-8128-pt4.patch" | |
134 | "libtiff-CVE-2014-8128-pt5.patch"))))) | |
e55354b8 DT |
135 | (build-system gnu-build-system) |
136 | (inputs `(("zlib" ,zlib) | |
137 | ("libjpeg-8" ,libjpeg-8))) | |
138 | ;; currently does not compile with libjpeg version 9 | |
e55354b8 DT |
139 | (arguments |
140 | `(#:configure-flags | |
141 | (list (string-append "--with-jpeg-include-dir=" | |
142 | (assoc-ref %build-inputs "libjpeg-8") | |
c198872b | 143 | "/include")))) |
35b9e423 | 144 | (synopsis "Library for handling TIFF files") |
e55354b8 DT |
145 | (description |
146 | "Libtiff provides support for the Tag Image File Format (TIFF), a format | |
147 | used for storing image data. | |
148 | Included are a library, libtiff, for reading and writing TIFF and a small | |
149 | collection of tools for doing simple manipulations of TIFF images.") | |
166191b3 LC |
150 | (license (license:non-copyleft "file://COPYRIGHT" |
151 | "See COPYRIGHT in the distribution.")) | |
e55354b8 | 152 | (home-page "http://www.libtiff.org/"))) |
efa77baf MB |
153 | |
154 | (define-public libwmf | |
155 | (package | |
156 | (name "libwmf") | |
157 | (version "0.2.8.4") | |
158 | (source | |
159 | (origin | |
160 | (method url-fetch) | |
757d5ff3 LC |
161 | (uri (string-append "mirror://sourceforge/wvware/" |
162 | name "/" version | |
163 | "/" name "-" version ".tar.gz")) | |
efa77baf | 164 | (sha256 |
9ed54864 MW |
165 | (base32 "1y3wba4q8pl7kr51212jwrsz1x6nslsx1gsjml1x0i8549lmqd2v")) |
166 | (patches | |
167 | (map search-patch '("libwmf-CVE-2006-3376.patch" | |
168 | "libwmf-CVE-2009-1364.patch" | |
169 | "libwmf-CVE-2015-0848+4588+4695+4696.patch"))))) | |
efa77baf MB |
170 | |
171 | (build-system gnu-build-system) | |
172 | (inputs | |
173 | `(("freetype" ,freetype) | |
174 | ("libjpeg" ,libjpeg) | |
175 | ("libpng",libpng) | |
176 | ("libxml2" ,libxml2) | |
177 | ("zlib" ,zlib))) | |
178 | (native-inputs | |
179 | `(("pkg-config" ,pkg-config))) | |
180 | (synopsis "Library for reading images in the Microsoft WMF format") | |
181 | (description | |
182 | "libwmf is a library for reading vector images in Microsoft's native | |
183 | Windows Metafile Format (WMF) and for either (a) displaying them in, e.g., an X | |
184 | window; or (b) converting them to more standard/free file formats such as, e.g., | |
185 | the W3C's XML-based Scaleable Vector Graphic (SVG) format.") | |
186 | (home-page "http://wvware.sourceforge.net/libwmf.html") | |
187 | ||
188 | ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+. | |
189 | (license license:lgpl2.0+))) | |
8d9872b5 | 190 | |
894e2cba TUBK |
191 | (define-public leptonica |
192 | (package | |
193 | (name "leptonica") | |
194 | (version "1.71") | |
195 | (source | |
196 | (origin | |
197 | (method url-fetch) | |
198 | (uri (string-append "http://www.leptonica.com/source/leptonica-" | |
199 | version ".tar.gz")) | |
200 | (sha256 | |
201 | (base32 "0j5qgrff6im5n9waflbi7w643q1p6mahyf2z35gb4vj9h5p76pfc")) | |
202 | (modules '((guix build utils))) | |
203 | ;; zlib and openjpg should be under Libs, not Libs.private. See: | |
204 | ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436 | |
205 | (snippet | |
206 | '(substitute* "lept.pc.in" | |
207 | (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post) | |
208 | (string-append pre post)) | |
209 | (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post) | |
210 | (string-append pre post)) | |
211 | (("^Libs: .*" all) | |
212 | (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@")))))) | |
213 | (build-system gnu-build-system) | |
214 | (native-inputs | |
215 | `(("gnuplot" ,gnuplot))) ;needed for test suite | |
216 | (inputs | |
217 | `(("giflib" ,giflib) | |
218 | ("libjpeg" ,libjpeg) | |
219 | ("libpng" ,libpng) | |
220 | ("libtiff" ,libtiff) | |
221 | ("libwebp" ,libwebp))) | |
222 | (propagated-inputs | |
223 | `(("openjpeg" ,openjpeg) | |
224 | ("zlib" ,zlib))) | |
225 | (arguments | |
226 | '(#:phases | |
227 | (modify-phases %standard-phases | |
228 | ;; Prevent make from trying to regenerate config.h.in. | |
229 | (add-after | |
f8503e2b | 230 | 'unpack 'set-config-h-in-file-time |
894e2cba TUBK |
231 | (lambda _ |
232 | (set-file-time "config/config.h.in" (stat "configure")))) | |
233 | (add-after | |
f8503e2b | 234 | 'unpack 'patch-reg-wrapper |
894e2cba TUBK |
235 | (lambda _ |
236 | (substitute* "prog/reg_wrapper.sh" | |
237 | ((" /bin/sh ") | |
238 | (string-append " " (which "sh") " ")))))))) | |
239 | (home-page "http://www.leptonica.com/") | |
240 | (synopsis "Library and tools for image processing and analysis") | |
241 | (description | |
242 | "Leptonica is a C library and set of command-line tools for efficient | |
243 | image processing and image analysis operations. It supports rasterop, affine | |
244 | transformations, binary and grayscale morphology, rank order, and convolution, | |
245 | seedfill and connected components, image transformations combining changes in | |
246 | scale and pixel depth, and pixelwise masking, blending, enhancement, and | |
247 | arithmetic ops.") | |
248 | (license license:bsd-2))) | |
249 | ||
8d9872b5 MB |
250 | (define-public jbig2dec |
251 | (package | |
252 | (name "jbig2dec") | |
253 | (version "0.11") | |
254 | (source | |
255 | (origin | |
256 | (method url-fetch) | |
257 | (uri ;; The link on the homepage is dead. | |
258 | (string-append "http://distfiles.gentoo.org/distfiles/" name "-" | |
259 | version ".tar.gz")) | |
260 | (sha256 | |
261 | (base32 "1ffhgmf2fqzk0h4k736pp06z7q5y4x41fg844bd6a9vgncq86bby")) | |
262 | (patches (list (search-patch "jbig2dec-ignore-testtest.patch"))))) | |
263 | ||
264 | (build-system gnu-build-system) | |
265 | (synopsis "Decoder of the JBIG2 image compression format") | |
266 | (description | |
7c125ce0 AK |
267 | "JBIG2 is designed for lossy or lossless encoding of 'bilevel' (1-bit |
268 | monochrome) images at moderately high resolution, and in particular scanned | |
269 | paper documents. In this domain it is very efficient, offering compression | |
270 | ratios on the order of 100:1. | |
8d9872b5 MB |
271 | |
272 | This is a decoder only implementation, and currently is in the alpha | |
273 | stage, meaning it doesn't completely work yet. However, it is | |
274 | maintaining parity with available encoders, so it is useful for real | |
275 | work.") | |
276 | (home-page "http://jbig2dec.sourceforge.net/") | |
277 | (license license:gpl2+))) | |
38c55e5c MB |
278 | |
279 | (define-public openjpeg | |
280 | (package | |
281 | (name "openjpeg") | |
ca407756 | 282 | (version "2.1.0") |
38c55e5c MB |
283 | (source |
284 | (origin | |
285 | (method url-fetch) | |
286 | (uri | |
da2021bc RW |
287 | (string-append "mirror://sourceforge/openjpeg.mirror/" name "-" |
288 | version ".tar.gz")) | |
38c55e5c | 289 | (sha256 |
ca407756 | 290 | (base32 "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj")))) |
38c55e5c MB |
291 | (build-system cmake-build-system) |
292 | (arguments | |
293 | ;; Trying to run `$ make check' results in a no rule fault. | |
294 | '(#:tests? #f)) | |
295 | (inputs | |
296 | `(("lcms" ,lcms) | |
297 | ("libpng" ,libpng) | |
298 | ("libtiff" ,libtiff) | |
299 | ("zlib" ,zlib))) | |
300 | (synopsis "JPEG 2000 codec") | |
301 | (description | |
302 | "The OpenJPEG library is a JPEG 2000 codec written in C. It has | |
303 | been developed in order to promote the use of JPEG 2000, the new | |
304 | still-image compression standard from the Joint Photographic Experts | |
305 | Group (JPEG). | |
306 | ||
307 | In addition to the basic codec, various other features are under | |
308 | development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats, | |
309 | an indexing tool useful for the JPIP protocol, JPWL-tools for | |
310 | error-resilience, a Java-viewer for j2k-images, ...") | |
4100fe9d | 311 | (home-page "https://code.google.com/p/openjpeg/") |
38c55e5c | 312 | (license license:bsd-2))) |
76d88cfa | 313 | |
ca407756 EB |
314 | (define-public openjpeg-2.0 |
315 | (package (inherit openjpeg) | |
316 | (name "openjpeg") | |
317 | (version "2.0.1") | |
318 | (source | |
319 | (origin | |
320 | (method url-fetch) | |
321 | (uri | |
322 | (string-append "mirror://sourceforge/openjpeg.mirror/" name "-" | |
323 | version ".tar.gz")) | |
324 | (sha256 | |
325 | (base32 "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z")))))) | |
326 | ||
6140b9d8 RW |
327 | (define-public openjpeg-1 |
328 | (package (inherit openjpeg) | |
329 | (name "openjpeg") | |
330 | (version "1.5.2") | |
331 | (source | |
332 | (origin | |
333 | (method url-fetch) | |
334 | (uri | |
335 | (string-append "mirror://sourceforge/openjpeg.mirror/" name "-" | |
336 | version ".tar.gz")) | |
337 | (sha256 | |
338 | (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm")))))) | |
339 | ||
e596ab0f AK |
340 | (define-public giflib |
341 | (package | |
342 | (name "giflib") | |
343 | (version "4.2.3") | |
344 | (source (origin | |
345 | (method url-fetch) | |
346 | (uri (string-append "mirror://sourceforge/giflib/giflib-" | |
347 | (first (string-split version #\.)) | |
348 | ".x/giflib-" version ".tar.bz2")) | |
349 | (sha256 | |
350 | (base32 "0rmp7ipzk42r841bggd7bfqk4p8qsssbp4wcck4qnz7p4rkxbj0a")))) | |
351 | (build-system gnu-build-system) | |
352 | (outputs '("bin" ; utility programs | |
353 | "out")) ; library | |
354 | (inputs `(("libx11" ,libx11) | |
355 | ("libice" ,libice) | |
356 | ("libsm" ,libsm) | |
357 | ("perl" ,perl))) | |
358 | (arguments | |
359 | `(#:phases (alist-cons-after | |
360 | 'unpack 'disable-html-doc-gen | |
361 | (lambda _ | |
362 | (substitute* "doc/Makefile.in" | |
363 | (("^all: allhtml manpages") ""))) | |
364 | (alist-cons-after | |
365 | 'install 'install-manpages | |
366 | (lambda* (#:key outputs #:allow-other-keys) | |
367 | (let* ((bin (assoc-ref outputs "bin")) | |
368 | (man1dir (string-append bin "/share/man/man1"))) | |
369 | (mkdir-p man1dir) | |
370 | (for-each (lambda (file) | |
371 | (let ((base (basename file))) | |
372 | (format #t "installing `~a' to `~a'~%" | |
373 | base man1dir) | |
374 | (copy-file file | |
375 | (string-append | |
376 | man1dir "/" base)))) | |
377 | (find-files "doc" "\\.1")))) | |
378 | %standard-phases)))) | |
379 | (synopsis "Tools and library for working with GIF images") | |
380 | (description | |
35b9e423 | 381 | "GIFLIB is a library for reading and writing GIF images. It is API and |
e596ab0f AK |
382 | ABI compatible with libungif which was in wide use while the LZW compression |
383 | algorithm was patented. Tools are also included to convert, manipulate, | |
384 | compose, and analyze GIF images.") | |
385 | (home-page "http://giflib.sourceforge.net/") | |
386 | (license license:x11))) | |
387 | ||
0731a47c TUBK |
388 | (define-public libungif |
389 | (package | |
390 | (name "libungif") | |
391 | (version "4.1.4") | |
392 | (source (origin | |
393 | (method url-fetch) | |
394 | (uri (string-append "mirror://sourceforge/giflib/libungif-" | |
395 | version ".tar.bz2")) | |
396 | (sha256 | |
397 | (base32 | |
398 | "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh")))) | |
399 | (build-system gnu-build-system) | |
400 | (inputs `(("perl" ,perl))) ;package ships some perl tools | |
401 | (home-page "http://giflib.sourceforge.net/") | |
402 | (synopsis "GIF decompression library") | |
403 | (description | |
404 | "libungif is the old GIF decompression library by the GIFLIB project.") | |
405 | (license license:expat))) | |
406 | ||
76d88cfa AK |
407 | (define-public imlib2 |
408 | (package | |
409 | (name "imlib2") | |
85a02905 | 410 | (version "1.4.7") |
76d88cfa AK |
411 | (source (origin |
412 | (method url-fetch) | |
413 | (uri (string-append | |
414 | "mirror://sourceforge/enlightenment/imlib2-" | |
85a02905 | 415 | version ".tar.bz2")) |
76d88cfa AK |
416 | (sha256 |
417 | (base32 | |
85a02905 | 418 | "00a7jbwj10x3jcvxa5rplnkvhv35gv9rb400zy636zdd4g737mrm")))) |
76d88cfa | 419 | (build-system gnu-build-system) |
76d88cfa AK |
420 | (native-inputs |
421 | `(("pkgconfig" ,pkg-config))) | |
422 | (inputs | |
423 | `(("libx11" ,libx11) | |
424 | ("libxext" ,libxext) | |
425 | ("freetype" ,freetype) | |
426 | ("libjpeg" ,libjpeg) | |
427 | ("libpng" ,libpng) | |
428 | ("libtiff" ,libtiff) | |
429 | ("giflib" ,giflib) | |
430 | ("bzip2" ,bzip2))) | |
431 | (home-page "http://sourceforge.net/projects/enlightenment/") | |
432 | (synopsis | |
433 | "Loading, saving, rendering and manipulating image files") | |
434 | (description | |
435 | "Imlib2 is a library that does image file loading and saving as well as | |
436 | rendering, manipulation, arbitrary polygon support, etc. | |
437 | ||
438 | It does ALL of these operations FAST. Imlib2 also tries to be highly | |
439 | intelligent about doing them, so writing naive programs can be done easily, | |
440 | without sacrificing speed. | |
441 | ||
442 | This is a complete rewrite over the Imlib 1.x series. The architecture is | |
443 | more modular, simple, and flexible.") | |
8835aed4 | 444 | (license license:imlib2))) |
f7d28082 AK |
445 | |
446 | (define-public giblib | |
447 | (package | |
448 | (name "giblib") | |
449 | (version "1.2.4") | |
450 | (source (origin | |
451 | (method url-fetch) | |
452 | (uri (string-append | |
453 | "http://linuxbrit.co.uk/downloads/giblib-" | |
454 | version ".tar.gz")) | |
455 | (sha256 | |
456 | (base32 | |
457 | "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp")))) | |
458 | (build-system gnu-build-system) | |
459 | (inputs | |
460 | `(("libx11" ,libx11) | |
461 | ("imlib2" ,imlib2))) | |
462 | (home-page "http://linuxbrit.co.uk/software/") ; no real home-page | |
463 | (synopsis "Wrapper library for imlib2") | |
464 | (description | |
35b9e423 | 465 | "Giblib is a simple library which wraps imlib2's context API, avoiding |
f7d28082 AK |
466 | all the context_get/set calls, adds fontstyles to the truetype renderer and |
467 | supplies a generic doubly-linked list and some string functions.") | |
468 | ;; This license removes a clause about X Consortium from the original | |
469 | ;; X11 license. | |
470 | (license (license:x11-style "file://COPYING" | |
471 | "See 'COPYING' in the distribution.")))) | |
43402c5c DT |
472 | |
473 | (define-public freeimage | |
474 | (package | |
475 | (name "freeimage") | |
476 | (version "3.16.0") | |
477 | (source (origin | |
478 | (method url-fetch) | |
479 | (uri (string-append | |
480 | "mirror://sourceforge/freeimage/Source%20Distribution/" | |
481 | version "/FreeImage" | |
482 | (string-join (string-split version #\.) "") | |
483 | ".zip")) | |
484 | (sha256 | |
485 | (base32 | |
486 | "0q1gnjnxgphsh4l8i9rfly4bi8xsczsb9ryzbm8hf38lc3fk5bq3")))) | |
487 | (build-system gnu-build-system) | |
488 | (arguments | |
da6dd842 LC |
489 | '(#:phases (alist-delete |
490 | 'configure | |
491 | (alist-cons-before | |
492 | 'build 'patch-makefile | |
493 | (lambda* (#:key outputs #:allow-other-keys) | |
494 | (substitute* "Makefile.gnu" | |
495 | (("/usr") (assoc-ref outputs "out")) | |
496 | (("-o root -g root") ""))) | |
497 | %standard-phases)) | |
43402c5c DT |
498 | #:make-flags '("CC=gcc") |
499 | #:tests? #f)) ; no check target | |
500 | (native-inputs | |
501 | `(("unzip" ,unzip))) | |
f9664de7 DT |
502 | ;; Fails to build on MIPS due to assembly code in the source. |
503 | (supported-systems (delete "mips64el-linux" %supported-systems)) | |
43402c5c DT |
504 | (synopsis "Library for handling popular graphics image formats") |
505 | (description | |
506 | "FreeImage is a library for developers who would like to support popular | |
507 | graphics image formats like PNG, BMP, JPEG, TIFF and others.") | |
508 | (license license:gpl2+) | |
509 | (home-page "http://freeimage.sourceforge.net"))) | |
97039f6e AE |
510 | |
511 | (define-public vigra | |
512 | (package | |
513 | (name "vigra") | |
514 | (version "1.10.0") | |
515 | (source | |
516 | (origin | |
517 | (method url-fetch) | |
518 | (uri (string-append "https://hci.iwr.uni-heidelberg.de/vigra/vigra-" | |
519 | version "-src.tar.gz")) | |
520 | (sha256 (base32 | |
521 | "16d0jvz3k49niljg9qvvlyxxl15yk0300xkymvyznlmvn1hs7m22")))) | |
522 | (build-system cmake-build-system) | |
523 | (inputs | |
524 | `(("boost" ,boost) | |
525 | ("fftw" ,fftw) | |
526 | ("fftwf" ,fftwf) | |
527 | ("hdf5" ,hdf5) | |
528 | ("libjpeg" ,libjpeg) | |
529 | ("libpng" ,libpng) | |
530 | ("libtiff" ,libtiff) | |
531 | ("python" ,python-2) ; print syntax | |
532 | ("python2-numpy" ,python2-numpy) | |
533 | ("zlib" ,zlib))) | |
534 | (native-inputs | |
535 | `(("doxygen" ,doxygen) | |
536 | ("python2-nose" ,python2-nose) | |
537 | ("python2-sphinx" ,python2-sphinx))) | |
538 | (arguments | |
539 | `(#:test-target "check" | |
540 | #:configure-flags | |
541 | (list "-Wno-dev" ; suppress developer mode with lots of warnings | |
542 | (string-append "-DVIGRANUMPY_INSTALL_DIR=" | |
543 | (assoc-ref %outputs "out") | |
544 | "/lib/python2.7/site-packages")))) | |
545 | (synopsis "Computer vision library") | |
546 | (description | |
547 | "VIGRA stands for Vision with Generic Algorithms. It is an image | |
548 | processing and analysis library that puts its main emphasis on customizable | |
549 | algorithms and data structures. It is particularly strong for | |
550 | multi-dimensional image processing.") | |
551 | (license license:expat) | |
552 | (home-page "https://hci.iwr.uni-heidelberg.de/vigra"))) | |
060ad3de TUBK |
553 | |
554 | (define-public libwebp | |
555 | (package | |
556 | (name "libwebp") | |
557 | (version "0.4.3") | |
558 | (source | |
559 | (origin | |
560 | (method url-fetch) | |
561 | (uri (string-append | |
562 | "http://downloads.webmproject.org/releases/webp/libwebp-" version | |
563 | ".tar.gz")) | |
564 | (sha256 | |
565 | (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg")))) | |
566 | (build-system gnu-build-system) | |
567 | (inputs | |
568 | `(("freeglut" ,freeglut) | |
569 | ("giflib" ,giflib) | |
570 | ("libjpeg" ,libjpeg) | |
571 | ("libpng" ,libpng) | |
572 | ("libtiff" ,libtiff))) | |
573 | (arguments | |
574 | '(#:configure-flags '("--enable-libwebpmux" | |
575 | "--enable-libwebpdemux" | |
576 | "--enable-libwebpdecoder"))) | |
577 | (home-page "https://developers.google.com/speed/webp/") | |
578 | (synopsis "Lossless and lossy image compression") | |
579 | (description | |
580 | "WebP is a new image format that provides lossless and lossy compression | |
1eefe4a8 LC |
581 | for images. WebP lossless images are 26% smaller in size compared to |
582 | PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at | |
583 | equivalent SSIM index. WebP supports lossless transparency (also known as | |
584 | alpha channel) with just 22% additional bytes. Transparency is also supported | |
060ad3de TUBK |
585 | with lossy compression and typically provides 3x smaller file sizes compared |
586 | to PNG when lossy compression is acceptable for the red/green/blue color | |
587 | channels.") | |
588 | (license license:bsd-3))) | |
b9ecd5ae SB |
589 | |
590 | (define-public libmng | |
591 | (package | |
592 | (name "libmng") | |
593 | (version "2.0.3") | |
594 | (source (origin | |
595 | (method url-fetch) | |
596 | (uri (string-append "mirror://sourceforge/libmng/" | |
597 | name "-" version ".tar.xz")) | |
598 | (sha256 | |
599 | (base32 | |
600 | "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija")))) | |
601 | (build-system gnu-build-system) | |
602 | (propagated-inputs | |
603 | ;; These are all in the 'Libs.private' field of libmng.pc. | |
604 | `(("lcms" ,lcms) | |
605 | ("libjpeg" ,libjpeg) | |
606 | ("zlib" ,zlib))) | |
607 | (home-page "http://www.libmng.com/") | |
608 | (synopsis "Library for handling MNG files") | |
609 | (description | |
610 | "Libmng is the MNG (Multiple-image Network Graphics) reference library.") | |
611 | (license license:bsd-3))) |