Subject: bug#26009: closed (Re: bug#26009: libpng-apng)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 23 Mar 2017 11:34:02 +0000

Your bug report

#26009: libpng-apng

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26009: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26009
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#26009: libpng-apng
From: ng0 <[email-masked]>
To: Kei Kebreau <[email-masked]>
Cc: Ludovic Courtès <[email-masked]>, [email-masked]
Date: Thu, 23 Mar 2017 11:36:05 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Kei Kebreau transcribed 3.1K bytes:
> ng0 <[email-masked]> writes:
> 
> > Kei Kebreau transcribed 1.3K bytes:
> >> [email-masked] (Ludovic Courtès) writes:
> >> 
> >> > Good morning!
> >> >
> >> 
> >> Howdy! :-)
> >> 
> >> > Kei Kebreau <[email-masked]> skribis:
> >> >
> >> >> From 76e4bec9f8313adc6a78d3ae571ccea489c97848 Mon Sep 17 00:00:00 2001
> >> >> From: ng0 <[email-masked]>
> >> >> Date: Tue, 10 Jan 2017 20:49:30 +0000
> >> >> Subject: [PATCH] gnu: Add libpng-apng.
> >> >> To: [email-masked]
> >> >>
> >> >> * gnu/packages/image.scm (libpng-apng): New variable.
> >> >>
> >> >> Signed-off-by: Kei Kebreau <[email-masked]>
> >> >
> >> > [...]
> >> >
> >> >> +         (add-before 'configure 'no-checks
> >> >> +           (lambda _
> >> >> +             (substitute* "Makefile.in"
> >> >> +               (("^scripts/symbols.chk") "")
> >> >> +               (("check: scripts/symbols.chk") ""))
> >> >> +             (zero? (system* "libtool"))
> >> >> +             #t)))))
> >> >
> >> > Do you really want to run ‘libtool’ here?  I think that doesn’t have any
> >> > effect:
> >> >
> >> > $ libtool
> >> > Usage: /home/ludo/.guix-profile/bin/libtool [OPTION]... [MODE-ARG]...
> >> > Try 'libtool --help' for more information.
> >> > libtool:   error: you must specify a MODE
> >> >
> >> 
> >> ng0 had some adjustments to make to the patch for sending it upstream,
> >> so I'm waiting for a response. Perhaps removing this libtool execution
> >> is one of them.
> >
> > On the one hand I wanted to check on this, but on the other hand it
> > looks like you have already solved most or all of the problems?
> > I decided to take an almost-vacation for 3 weeks, just plan and document
> > and maybe add some thoughts to patches which are open, minimal work.
> > If it looks good for you and it works, please gp ahead (and add the
> > Co-authored-by line).
> >
> > Thanks for your fixes on this :)
> >
> 
> You're welcome. Thanks to Ludovic as well for pointing out the
> replacement issue.
> 
> >> > If there’s nothing else blocking this patch, I think you can go ahead.
> >> >
> >> > Thanks,
> >> > Ludo’.
> >> 
> >> Thank you. I'll push it when I get the okay from ng0.
> 
> Pushed to master!

Thanks. closed

Subject: libpng-apng
From: ng0 <[email-masked]>
To: [email-masked]
Date: Tue, 7 Mar 2017 12:19:31 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

This adds `libpng-apng'. I had this in the dependency graph of palemoon,
a webbrowser I stopped to work on because of license/trademark/legal
insecurities.

libpng-apng can be used to unbundle it from icecat. Despite the comment
in gnu/packages/gnuzilla.scm: This is a real, maintained software which
bases on top of libpng and tracks its releases.

When libpng is updated, this package needs to be updated aswell as soon
as the updated release of the patch is out.

I have appended the last version I packaged as a git format-patch file.

In the description the 2 occurences of APGN (Animated Portable Network Graphics)
could be written with the @defn{} of texinfo I think,
and the synopsis could be changed to just "Animated Portable Network
Graphics library". I think back then I just copied upstrema in text.

Should anyone be interested to finish the work on the webbrowser, the
repository with the branch is available at request.
>From b25f8506b8183e5fb9cc5ce0e59384f4a61a83a2 Mon Sep 17 00:00:00 2001
From: ng0 <[email-masked]>
Date: Tue, 10 Jan 2017 20:49:30 +0000
Subject: [PATCH 1/2] gnu: Add libpng-apng.

* gnu/packages/image.scm (libpng-apng): New variable.
---
 gnu/packages/image.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 53ed69a84..89e843c75 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 Eric Bavier <[email-masked]>
 ;;; Copyright © 2016 Arun Isaac <[email-masked]>
 ;;; Copyright © 2016 Kei Kebreau <[email-masked]>
+;;; Copyright © 2017 ng0 <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -98,6 +99,52 @@ 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)
+    (name "libpng-apng")
+    (version (package-version libpng))
+    (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)
-- 
2.12.0