Package: juce
Version: 4.1.0+repack-4
Severity: normal
Tags: patch pending

Dear maintainer,

I've prepared an NMU for juce (versioned as 4.1.0+repack-4.1) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru juce-4.1.0+repack/debian/changelog juce-4.1.0+repack/debian/changelog
--- juce-4.1.0+repack/debian/changelog  2016-03-28 21:17:30.000000000 +0200
+++ juce-4.1.0+repack/debian/changelog  2016-04-07 20:40:32.000000000 +0200
@@ -1,3 +1,14 @@
+juce (4.1.0+repack-4.1) unstable; urgency=medium
+
+  [ Gianfranco Costamagna ]
+  * Non-maintainer upload.
+  * fix build with libpng16.
+
+  [ Tobias Frost ]
+  * Uploading the fix from Gianfranco
+
+ -- Tobias Frost <t...@debian.org>  Thu, 07 Apr 2016 20:39:43 +0200
+
 juce (4.1.0+repack-4) unstable; urgency=medium
 
   * Updated B-D from libpng12-dev to libpng-dev.
diff -Nru juce-4.1.0+repack/debian/patches/fix-build-libpng16.patch 
juce-4.1.0+repack/debian/patches/fix-build-libpng16.patch
--- juce-4.1.0+repack/debian/patches/fix-build-libpng16.patch   1970-01-01 
01:00:00.000000000 +0100
+++ juce-4.1.0+repack/debian/patches/fix-build-libpng16.patch   2016-04-07 
20:39:31.000000000 +0200
@@ -0,0 +1,29 @@
+Description: Fix build with libpng16
+ This patch is inspired with the patch available at 
https://gist.github.com/balr0g/3004353
+Author: Gianfranco Costamagna <locutusofb...@debian.org>
+
+--- 
juce-4.1.0+repack.orig/modules/juce_graphics/image_formats/juce_PNGLoader.cpp
++++ juce-4.1.0+repack/modules/juce_graphics/image_formats/juce_PNGLoader.cpp
+@@ -320,7 +320,7 @@ namespace PNGHelpers
+ 
+     static void JUCE_CDECL errorCallback (png_structp p, png_const_charp)
+     {
+-        longjmp (*(jmp_buf*) p->error_ptr, 1);
++        setjmp(png_jmpbuf(p));
+     }
+ 
+     static void JUCE_CDECL warningCallback (png_structp, png_const_charp) {}
+@@ -442,8 +443,12 @@ namespace PNGHelpers
+             for (size_t y = 0; y < height; ++y)
+                 rows[y] = (png_bytep) (tempBuffer + lineStride * y);
+ 
++            png_bytep trans_alpha;
++            int num_trans;
++            png_color_16p trans_color;
++            png_get_tRNS(pngReadStruct, pngInfoStruct,  &trans_alpha, 
&num_trans, &trans_color);
+             if (readImageData (pngReadStruct, pngInfoStruct, errorJumpBuf, 
rows))
+-                return createImageFromData ((colorType & 
PNG_COLOR_MASK_ALPHA) != 0 || pngInfoStruct->num_trans > 0,
++                return createImageFromData ((colorType & 
PNG_COLOR_MASK_ALPHA) != 0 || num_trans,
+                                             (int) width, (int) height, rows);
+         }
+ 
diff -Nru juce-4.1.0+repack/debian/patches/series 
juce-4.1.0+repack/debian/patches/series
--- juce-4.1.0+repack/debian/patches/series     2016-02-11 12:42:47.000000000 
+0100
+++ juce-4.1.0+repack/debian/patches/series     2016-04-07 20:39:31.000000000 
+0200
@@ -6,3 +6,4 @@
 debian_introjucer-modulepath.patch
 debian_make-introjucer.patch
 debian_do-not-track.patch
+fix-build-libpng16.patch

Reply via email to