diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-04-16 18:15:28 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-04-16 18:15:28 +0200 |
commit | 5d904d63f4d43e3f0e4be38c5f5404e029c00a22 (patch) | |
tree | b2893eceae99c967e0f49cdbfe084f6c7d4767c4 /gnu/packages/image.scm | |
parent | bab5f3a7f62150ae009e78d03c4b1f5b1646104c (diff) | |
parent | d0ee11b2f000c3c027fd8370bc2195266398444f (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r-- | gnu/packages/image.scm | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 044321d406..e27b9223dd 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -55,6 +55,7 @@ #:use-module (gnu packages maths) #:use-module (gnu packages mcrypt) #:use-module (gnu packages perl) + #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages xml) @@ -337,13 +338,13 @@ official designation is ISO/IEC 29199-2). This library is an implementation of t (define-public jpegoptim (package (name "jpegoptim") - (version "1.4.4") + (version "1.4.5") (source (origin (method url-fetch) (uri (string-append "http://www.kokkonen.net/tjko/src/jpegoptim-" version ".tar.gz")) (sha256 (base32 - "1cn1i0g1xjdwa12w0ifbnzgb1vqbpr8ji6h05vxksj79vyi3x849")))) + "1mngi8c4mhzwa7i4wqrqq6i80cqj4adbacblfvk6dy573wywyxmi")))) (build-system gnu-build-system) (inputs `(("libjpeg" ,libjpeg))) (arguments @@ -355,7 +356,7 @@ official designation is ISO/IEC 29199-2). This library is an implementation of t the Huffman tables) and \"lossy\" optimization based on setting maximum quality factor.") (license license:gpl2+) - (home-page "http://www.kokkonen.net/tjko/projects.html#jpegoptim"))) + (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim"))) (define-public libicns (package @@ -717,26 +718,63 @@ supplies a generic doubly-linked list and some string functions.") (sha256 (base32 "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v")) - (patches (search-patches "freeimage-CVE-2015-0852.patch" + (modules '((guix build utils))) + (snippet + '(begin + (for-each + (lambda (dir) + (delete-file-recursively (string-append "Source/" dir))) + '("LibJPEG" "LibJXR" "LibOpenJPEG" "LibPNG" "LibRawLite" + "LibWebP" "OpenEXR" "ZLib")))) + (patches (search-patches "freeimage-unbundle.patch" + "freeimage-CVE-2015-0852.patch" "freeimage-CVE-2016-5684.patch" "freeimage-fix-build-with-gcc-5.patch")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases - (delete 'configure) + ;; According to Fedora these files depend on private headers, but their + ;; presence is required for building, so we replace them with empty files. + (add-after 'unpack 'delete-unbuildable-files + (lambda _ + (for-each (lambda (file) + (delete-file file) + (close (open file O_CREAT))) + '("Source/FreeImage/PluginG3.cpp" + "Source/FreeImageToolkit/JPEGTransform.cpp")) + #t)) + ;; These scripts generate the Makefiles. + (replace 'configure + (lambda _ + (invoke "sh" "gensrclist.sh") + (invoke "sh" "genfipsrclist.sh"))) (add-before 'build 'patch-makefile (lambda* (#:key outputs #:allow-other-keys) (substitute* "Makefile.gnu" (("/usr") (assoc-ref outputs "out")) (("-o root -g root") "")) #t))) - #:make-flags '("CC=gcc") + #:make-flags + (list "CC=gcc" + ;; We need '-fpermissive' for Source/FreeImage.h. + ;; libjxr doesn't have a pkg-config file. + (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden -fpermissive " + "-I" (assoc-ref %build-inputs "libjxr") "/include/jxrlib")) #:tests? #f)) ; no check target (native-inputs - `(("unzip" ,unzip))) - ;; Fails to build on MIPS due to assembly code in the source. - (supported-systems (delete "mips64el-linux" %supported-systems)) + `(("pkg-config" ,pkg-config) + ("unzip" ,unzip))) + (inputs + `(("libjpeg" ,libjpeg) + ("libjxr" ,libjxr) + ("libpng" ,libpng) + ("libraw" ,libraw) + ("libtiff" ,libtiff) + ("libwebp" ,libwebp) + ("openexr" ,openexr) + ("openjpeg" ,openjpeg) + ("zlib" ,zlib))) (synopsis "Library for handling popular graphics image formats") (description "FreeImage is a library for developers who would like to support popular |