Hi,
On Mon, Jan 18, 2016 at 08:17:16AM +0100, Christian T. Steigies wrote:
> > only in patch2:
> > unchanged:
> > --- hp2xx-3.4.4.orig/debian/patches/007_libpng.patch
> > +++ hp2xx-3.4.4/debian/patches/007_libpng.patch
> > @@ -0,0 +1,25 @@
> > +Description: Fix for libpng 1.6 new API
> > +Author: Tobias Frost <t...@debian.org>
> > +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809837
> > +Last-Update: 2016-01-18
> > +---
> > +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
> > +--- a/sources/png.c
> > ++++ b/sources/png.c
> > +@@ -5,6 +5,7 @@
> > + #include <stdio.h>
> > + #include <stdlib.h>
> > + #include "to_png.h"
> > ++#include <zlib.h>
> 
> This fixes a different problem, doesn't it?

Is this really needed?
In png.h I see this:

#ifndef PNG_VERSION_INFO_ONLY
/* Include the compression library's header */
#include "zlib.h"
#endif

It seems to build without this. I also wonder if we need zlib at all since I
get this warning during the build:

dpkg-shlibdeps: warning: package could avoid a useless dependency if 
debian/hp2xx/usr/bin/hp2xx was not linked against libz.so.1 (it uses none of 
the library's symbols)
 
> > + #include <png.h>
> > + 
> > + #define PDNCOL 256
> > +@@ -36,7 +37,7 @@
> > +   }
> > + 
> > +   /* set up error handlimg for libpng */
> > +-  if (setjmp(png_ptr->jmpbuf)) {
> > ++  if (setjmp(png_jmpbuf(png_ptr))) {
> > +           png_destroy_write_struct(&png_ptr, &info_ptr);
> > +           return;
> > +   }

upstream has a slightly different solution for this in the alpha version:

-       if (setjmp(png_ptr->jmpbuf)) {
+       jmp_context = (jmp_buf*) png_get_error_ptr(png_ptr);
+       if (jmp_context) {
                png_destroy_write_struct(&png_ptr, &info_ptr);
und entsprechend weiter oben:
        png_bytep *row_pointers;
+       jmp_buf* jmp_context;


I am not a PNG expert like you guys, but I think I would prefer to use the
upstream version of the fix. What do you say?

Christian

Reply via email to