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