aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
authorng0 <ng0@libertad.pw>2017-01-10 20:49:30 +0000
committerKei Kebreau <kei@openmailbox.org>2017-03-17 11:25:15 -0400
commit114a325e8f86c820484c9f64fde6bbadca41eed4 (patch)
treef816cb565115d936e9c58919eabce5c14ed50a2b /gnu/packages/image.scm
parent0a3063d64077f164670b8e7d0bc58b5f40ffeb12 (diff)
downloadpatches-114a325e8f86c820484c9f64fde6bbadca41eed4.tar
patches-114a325e8f86c820484c9f64fde6bbadca41eed4.tar.gz
gnu: Add libpng-apng.
* gnu/packages/image.scm (libpng-apng): New variable. Co-authored-by: Kei Kebreau <kei@openmailbox.org>
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 53ed69a84e..f348a61c9b 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
+;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,6 +99,57 @@ library. It supports almost all PNG features and is extensible.")
(inherit (package-source libpng))
(patches (search-patches "libpng-CVE-2016-10087.patch"))))))
+(define-public libpng-apng
+ (package
+ (inherit libpng)
+ (replacement #f) ;libpng's replacement doesn't apply here
+ (name "libpng-apng")
+ (version (package-version libpng))
+ (source
+ (origin
+ (inherit (package-source libpng))
+ (patches (search-patches "libpng-CVE-2016-10087.patch"))))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-apng
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (apply-patch file)
+ (zero? (system* "patch" "-p1" "--force"
+ "--input" file)))
+ (let ((apng.gz (assoc-ref inputs "apng")))
+ (format #t "Applying APNG patch '~a'...~%"
+ apng.gz)
+ (system (string-append "gunzip < " apng.gz " > the-patch"))
+ (and (apply-patch "the-patch")
+ (for-each apply-patch
+ (find-files "\\.patch"))))
+ #t))
+ (add-before 'configure 'no-checks
+ (lambda _
+ (substitute* "Makefile.in"
+ (("^scripts/symbols.chk") "")
+ (("check: scripts/symbols.chk") ""))
+ (zero? (system* "libtool"))
+ #t)))))
+ (inputs
+ `(("apng" ,(origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://sourceforge/libpng-apng/libpng16/"
+ version "/libpng-" version "-apng.patch.gz"))
+ (sha256
+ (base32
+ "026r0gbkf6d6v54wca02cdxln8sj4m2c1yk62sj2aasv2ki2ffh5"))))))
+ (native-inputs
+ `(("libtool" ,libtool)))
+ (synopsis "APNG patch for libpng")
+ (description
+ "APNG (Animated Portable Network Graphics) is an unofficial
+extension of the APNG (Portable Network Graphics) format.
+APNG patch provides APNG support to libpng.")
+ (home-page "https://sourceforge.net/projects/libpng-apng/")))
+
(define-public libpng-1.2
(package
(inherit libpng)