Package: libgpiv
Version: 0.6.1-4.2
Severity: normal
Tags: patch pending

Dear maintainer,

I've prepared an NMU for libgpiv (versioned as 0.6.1-4.3) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should delay it longer.

Regards.
diff -u libgpiv-0.6.1/debian/changelog libgpiv-0.6.1/debian/changelog
--- libgpiv-0.6.1/debian/changelog
+++ libgpiv-0.6.1/debian/changelog
@@ -1,3 +1,11 @@
+libgpiv (0.6.1-4.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS with libpng16, using patch from Nobuhiro (Closes: #650489)
+  * Update build dependencies for GSL 2.x", patch from Bas (Closes: #807207)
+
+ -- Tobias Frost <[email protected]>  Thu, 07 Jan 2016 22:20:50 +0100
+
 libgpiv (0.6.1-4.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -u libgpiv-0.6.1/debian/control libgpiv-0.6.1/debian/control
--- libgpiv-0.6.1/debian/control
+++ libgpiv-0.6.1/debian/control
@@ -5,7 +5,7 @@
 Maintainer: Gerber van der Graaf <[email protected]>
 Homepage: http://libgpiv.sourceforge.net/
 Build-Depends: debhelper (>= 5.0.24), quilt (>= 0.40), autotools-dev, 
libfftw3-dev, 
- libgsl0-dev, libhdf5-dev (>= 1.8.8), libglib2.0-dev, libpng-dev, netpbm, 
libgomp1,
+ libgsl-dev, libhdf5-dev (>= 1.8.8), libglib2.0-dev, libpng-dev, netpbm, 
libgomp1,
  doxygen, mpi-default-dev 
 
 Package: libgpiv3-common
diff -u libgpiv-0.6.1/debian/patches/series libgpiv-0.6.1/debian/patches/series
--- libgpiv-0.6.1/debian/patches/series
+++ libgpiv-0.6.1/debian/patches/series
@@ -1,2 +1,3 @@
+03_lipng16.patch
 01_omp-pragma.diff
 02_hdf5.diff
only in patch2:
unchanged:
--- libgpiv-0.6.1.orig/debian/patches/03_lipng16.patch
+++ libgpiv-0.6.1/debian/patches/03_lipng16.patch
@@ -0,0 +1,95 @@
+Description: Fix for libpng16 API change
+Author: Nobuhiro Iwamatsu <[email protected]>
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=650489
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=650489
+Last-Update: 2016-01-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/include/gpiv.h
++++ b/include/gpiv.h
+@@ -200,6 +200,7 @@
+ #include <fftw3.h>
+ #include <hdf5.h>
+ #include <glib-2.0/glib.h>
++#include <zlib.h>
+ #include <png.h>
+ 
+ #ifdef ENABLE_CAM
+--- a/lib/io_png.c
++++ b/lib/io_png.c
+@@ -167,8 +167,12 @@
+     }
+     
+     png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING,
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++                                                                      NULL, 
NULL, NULL);
++#else
+                                       png_voidp_NULL, png_error_ptr_NULL, 
+                                       png_error_ptr_NULL);
++#endif
+     if (png_ptr == NULL) {
+         g_warning ("gpiv_read_png_image: failing png_create_read_struct()");
+         return NULL;
+@@ -177,7 +181,11 @@
+     info_ptr = png_create_info_struct (png_ptr);
+     if (info_ptr == NULL) {
+         fclose (fp);
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++        png_destroy_read_struct (&png_ptr, NULL, NULL);
++#else
+         png_destroy_read_struct (&png_ptr, png_infopp_NULL, png_infopp_NULL);
++#endif
+         g_warning ("gpiv_read_png_image: failing png_create_info_struct 
(png_ptr)");
+         return NULL;
+     }
+@@ -201,7 +209,11 @@
+     }
+     
+ #ifdef HILEVEL
+-    png_read_png (png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, png_voidp_NULL);
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++    png_read_png (png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
++#else
++      png_read_png (png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, 
png_voidp_NULL);
++#endif
+ #else
+     png_read_info (png_ptr, info_ptr);
+ #endif /* HILEVEL */
+@@ -317,8 +329,11 @@
+         g_warning ("gpiv_read_png_image: image is not PNG_INTERLACE_NONE");
+         return NULL;
+     }
+-
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++      if(png_get_bit_depth(png_ptr, info_ptr) == 16) {
++#else
+     if (info_ptr->bit_depth == 16) {
++#endif
+         linesize = 2 * width;
+     } else {
+         linesize = width;
+@@ -472,8 +487,12 @@
+      * Allocate png_ structures
+      */
+     png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING,
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++                                       NULL, NULL, NULL);
++#else
+                                        png_voidp_NULL, png_error_ptr_NULL, 
+                                        png_error_ptr_NULL);
++#endif
+     if (png_ptr == NULL) {
+         err_msg = "gpiv_write_png_image: failing png_create_write_struct()";
+         return err_msg;
+@@ -546,7 +565,11 @@
+     /* 
+      * Write image to png struct
+      */
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++      if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) {
++#else
+     if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) {
++#endif
+ #ifdef WRITE_IMAGEDATA_LINE
+         png_byte *line;
+ #else

Reply via email to