Bug#820347: juce: diff for NMU version 4.1.0+repack-4.1
Gianfranco Costamagna
locutusofborg at debian.org
Thu Apr 7 16:40:41 UTC 2016
Package: juce
Version: 4.1.0+repack-4
Severity: serious
Tags: patch
Dear maintainer,
I have prepared a patch for juce, but I don't feel confident with it, so I didn't upload as NMU.
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 18:36:40.000000000 +0200
@@ -1,3 +1,10 @@
+juce (4.1.0+repack-4.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * fix build with libpng16.
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org> Thu, 07 Apr 2016 18:36:34 +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 18:38:04.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 <locutusofborg at 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
+ ^M
+ static void JUCE_CDECL errorCallback (png_structp p, png_const_charp)^M
+ {^M
+- longjmp (*(jmp_buf*) p->error_ptr, 1);^M
++ setjmp(png_jmpbuf(p));^M
+ }^M
+ ^M
+ static void JUCE_CDECL warningCallback (png_structp, png_const_charp) {}^M
-------------- next part --------------
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 18:36:40.000000000 +0200
@@ -1,3 +1,10 @@
+juce (4.1.0+repack-4.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * fix build with libpng16.
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org> Thu, 07 Apr 2016 18:36:34 +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 18:38:04.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 <locutusofborg at 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 18:37:18.000000000 +0200
@@ -6,3 +6,4 @@
debian_introjucer-modulepath.patch
debian_make-introjucer.patch
debian_do-not-track.patch
+fix-build-libpng16.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20160407/a9aa1e51/attachment.sig>
More information about the pkg-multimedia-maintainers
mailing list