aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm122
1 files changed, 68 insertions, 54 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index a79d63fb5d..ecd1867af6 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -19,7 +19,7 @@
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
@@ -46,6 +46,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
+ #:use-module (gnu packages cmake)
#:use-module (gnu packages curl)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
@@ -76,11 +77,13 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system scons)
+ #:use-module (guix deprecation)
#:use-module (srfi srfi-1))
(define-public libpng
@@ -362,7 +365,7 @@ Features:
@end enumerate")
(license license:gpl3+)))
-(define-public libjpeg
+(define-public ijg-libjpeg
(package
(name "libjpeg")
(version "9c")
@@ -391,8 +394,8 @@ lossless JPEG manipulations such as rotation, scaling or cropping:
(license license:ijg)
(home-page "https://www.ijg.org/")))
-(define-public libjpeg-8
- (package (inherit libjpeg)
+(define-public ijg-libjpeg-8
+ (package (inherit ijg-libjpeg)
(version "8d")
(source (origin
(method url-fetch)
@@ -498,7 +501,7 @@ official designation is ISO/IEC 29199-2). This library is an implementation of t
(sha256 (base32
"1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8"))))
(build-system gnu-build-system)
- (inputs `(("libjpeg" ,libjpeg)))
+ (inputs `(("libjpeg" ,libjpeg-turbo)))
(arguments
'(#:tests? #f)) ; no tests
(synopsis "Optimize JPEG images")
@@ -543,7 +546,7 @@ extracting icontainer icon files.")
(define-public libtiff
(package
(name "libtiff")
- (version "4.0.10")
+ (version "4.1.0")
(source
(origin
(method url-fetch)
@@ -551,7 +554,7 @@ extracting icontainer icon files.")
version ".tar.gz"))
(sha256
(base32
- "1r4np635gr6zlc0bic38dzvxia6iqzcrary4n1ylarzpr8fd2lic"))))
+ "0d46bdvxdiv59lxnb0xz9ywm8arsr6xsapi5s6y6vnys2wjz6aax"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;1.3 MiB of HTML documentation
@@ -560,9 +563,10 @@ extracting icontainer icon files.")
`(#:configure-flags (list (string-append "--with-docdir="
(assoc-ref %outputs "doc")
"/share/doc/"
- ,name "-" ,version))))
+ ,name "-" ,version)
+ "--disable-static")))
(inputs `(("zlib" ,zlib)
- ("libjpeg" ,libjpeg)))
+ ("libjpeg" ,libjpeg-turbo)))
(synopsis "Library for handling TIFF files")
(description
"Libtiff provides support for the Tag Image File Format (TIFF), a format
@@ -595,7 +599,7 @@ collection of tools for doing simple manipulations of TIFF images.")
("pkg-config" ,pkg-config)))
(inputs
`(("giflib" ,giflib)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libtiff" ,libtiff)
("libwebp" ,libwebp)))
@@ -628,15 +632,15 @@ arithmetic ops.")
(define-public jbig2dec
(package
(name "jbig2dec")
- (version "0.16")
+ (version "0.17")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ArtifexSoftware"
"/ghostpdl-downloads/releases/download"
- "/gs927/" name "-" version ".tar.gz"))
+ "/gs950/" name "-" version ".tar.gz"))
(sha256
(base32
- "00h61y7bh3z6mqfzxyb318gyh0f8jwarg4hvlrm83rqps8avzxm4"))
+ "0wpvslmwazia3z8gyk343kbq6yj47pxr4x5yjvx332v309qssazp"))
(patches (search-patches "jbig2dec-ignore-testtest.patch"))))
(build-system gnu-build-system)
(arguments '(#:configure-flags '("--disable-static")))
@@ -781,31 +785,31 @@ error-resilience, a Java-viewer for j2k-images, ...")
(define-public giflib
(package
(name "giflib")
- (version "5.1.4")
+ (version "5.2.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/giflib/giflib-"
- version ".tar.bz2"))
+ version ".tar.gz"))
(sha256
(base32
- "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))
- (patches (search-patches
- "giflib-make-reallocarray-private.patch"))))
+ "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii"))))
(build-system gnu-build-system)
(outputs '("bin" ; utility programs
"out")) ; library
- (inputs `(("libx11" ,libx11)
- ("libice" ,libice)
- ("libsm" ,libsm)
- ("perl" ,perl)))
(arguments
- `(#:phases
+ '(#:make-flags (list "CC=gcc"
+ (string-append "PREFIX="
+ (assoc-ref %outputs "out"))
+ (string-append "BINDIR="
+ (assoc-ref %outputs "bin") "/bin"))
+ #:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-html-doc-gen
(lambda _
- (substitute* "doc/Makefile.in"
+ (substitute* "doc/Makefile"
(("^all: allhtml manpages") ""))
#t))
+ (delete 'configure)
(add-after 'install 'install-manpages
(lambda* (#:key outputs #:allow-other-keys)
(let* ((bin (assoc-ref outputs "bin"))
@@ -869,7 +873,7 @@ compose, and analyze GIF images.")
("freetype" ,freetype)
("giflib" ,giflib)
("libid3tag" ,libid3tag)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libtiff" ,libtiff)
("libx11" ,libx11)
@@ -980,7 +984,7 @@ supplies a generic doubly-linked list and some string functions.")
`(("pkg-config" ,pkg-config)
("unzip" ,unzip)))
(inputs
- `(("libjpeg" ,libjpeg)
+ `(("libjpeg" ,libjpeg-turbo)
("libjxr" ,libjxr)
("libpng" ,libpng)
("libraw" ,libraw)
@@ -1006,6 +1010,7 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(uri (string-append "https://github.com/ukoethe/vigra/releases/download/"
"Version-" (string-join (string-split version #\.) "-")
"/vigra-" version "-src.tar.gz"))
+ (patches (search-patches "vigra-python-compat.patch"))
(sha256 (base32
"1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5"))))
(build-system cmake-build-system)
@@ -1016,16 +1021,16 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
("hdf5" ,hdf5)
("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly
; to create a configure-flag
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libtiff" ,libtiff)
("openexr" ,openexr)
- ("python" ,python-2) ; print syntax
- ("python2-numpy" ,python2-numpy)
+ ("python" ,python-wrapper)
+ ("python-numpy" ,python-numpy)
("zlib" ,zlib)))
(native-inputs
`(("doxygen" ,doxygen)
- ("python2-nose" ,python2-nose)
+ ("python-nose" ,python-nose)
("sphinx" ,python-sphinx)))
(arguments
`(#:test-target "check"
@@ -1045,7 +1050,9 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(list "-Wno-dev" ; suppress developer mode with lots of warnings
(string-append "-DVIGRANUMPY_INSTALL_DIR="
(assoc-ref %outputs "out")
- "/lib/python2.7/site-packages")
+ "/lib/python"
+ ,(version-major+minor (package-version python))
+ "/site-packages")
;; OpenEXR is not enabled by default.
"-DWITH_OPENEXR=1"
;; Fix rounding error on 32-bit machines
@@ -1118,7 +1125,7 @@ language bindings to VIGRA.")
(inputs
`(("freeglut" ,freeglut)
("giflib" ,giflib)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("libpng" ,libpng)
("libtiff" ,libtiff)))
(native-inputs
@@ -1158,7 +1165,7 @@ channels.")
(propagated-inputs
;; These are all in the 'Libs.private' field of libmng.pc.
`(("lcms" ,lcms)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("zlib" ,zlib)))
(home-page "http://www.libmng.com/")
(synopsis "Library for handling MNG files")
@@ -1274,7 +1281,7 @@ convert, manipulate, filter and display a wide variety of image formats.")
(base32
"05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6"))))
(build-system cmake-build-system)
- (inputs `(("libjpeg" ,libjpeg)))
+ (inputs `(("libjpeg" ,libjpeg-turbo)))
(synopsis "JPEG-2000 library")
(description "The JasPer Project is an initiative to provide a reference
implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
@@ -1362,7 +1369,7 @@ differences in file encoding, image quality, and other small variations.")
(inputs
`(("libmhash" ,libmhash)
("libmcrypt" ,libmcrypt)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("zlib" ,zlib)))
(arguments
`(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc
@@ -1487,21 +1494,40 @@ is hereby granted."))))
(define-public libjpeg-turbo
(package
(name "libjpeg-turbo")
- (version "2.0.2")
- (replacement libjpeg-turbo/fixed)
+ (version "2.0.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/libjpeg-turbo/"
version "/libjpeg-turbo-" version ".tar.gz"))
(sha256
(base32
- "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c"))))
+ "01ill8bgjyk582wipx7sh7gj2nidylpbzvwhx0wkcm6mxx3qbp9k"))))
(build-system cmake-build-system)
(native-inputs
`(("nasm" ,nasm)))
(arguments
- '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
- "-DENABLE_STATIC=0")))
+ `(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
+ "-DENABLE_STATIC=0"
+ ;; The build system probes for the current CPU, but
+ ;; that fails when cross-compiling.
+ ,@(let ((target (%current-target-system)))
+ (if target
+ (cond
+ ((string-prefix? "arm" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=arm"))
+ ((string-prefix? "aarch64" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=aarch64"))
+ ((string-prefix? "i686" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=x86"))
+ ((string-prefix? "x86_64" target)
+ `("-DCMAKE_SYSTEM_PROCESSOR=x86_64"))
+ (else '()))
+ '())))
+ ,@(if (%current-target-system)
+ '()
+ ;; Use a special "bootstrap" CMake for the native build to work
+ ;; around a circular dependency between CMake and this package.
+ `(#:cmake ,cmake-bootstrap))))
(home-page "https://libjpeg-turbo.org/")
(synopsis "SIMD-accelerated JPEG image handling library")
(description "libjpeg-turbo is a JPEG image codec that accelerates baseline
@@ -1518,19 +1544,7 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
license:ijg ;the libjpeg library and associated tools
license:zlib)))) ;the libjpeg-turbo SIMD extensions
-;; Replacement package to fix CVE-2019-13960 and CVE-2019-2201.
-(define libjpeg-turbo/fixed
- (package
- (inherit libjpeg-turbo)
- (version "2.0.3")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
- version "/libjpeg-turbo-" version ".tar.gz"))
- (sha256
- (base32
- "1ds16bnj17v6hzd43w8pzijz3imd9am4hw75ir0fxm240m8dwij2"))
- (patches (search-patches "libjpeg-turbo-CVE-2019-2201.patch"))))))
+(define-deprecated libjpeg libjpeg-turbo)
(define-public niftilib
(package
@@ -1743,7 +1757,7 @@ identical visual appearance.")
(build-system gnu-build-system)
(inputs
`(("curl" ,curl)
- ("libjpeg" ,libjpeg)
+ ("libjpeg" ,libjpeg-turbo)
("ncurses" ,ncurses)))
(home-page "https://csl.name/jp2a/")
(synopsis "Convert JPEG images to ASCII")