[SCM] juce/master: Fixed build with libpng16.
umlaeute at users.alioth.debian.org
umlaeute at users.alioth.debian.org
Thu Apr 7 21:03:13 UTC 2016
The following commit has been merged in the master branch:
commit f91127471307c221424297f2d863c5aaf52314ee
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date: Thu Apr 7 22:05:10 2016 +0200
Fixed build with libpng16.
Thanks: Gianfranco Costamagna <locutusofborg at debian.org>
Closes: 820347
diff --git a/debian/patches/fix-build-libpng16.patch b/debian/patches/fix-build-libpng16.patch
new file mode 100644
index 0000000..ff9881c
--- /dev/null
+++ b/debian/patches/fix-build-libpng16.patch
@@ -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 --git a/debian/patches/series b/debian/patches/series
index 29ef040..0764c5b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
no-ztypes.patch
+fix-build-libpng16.patch
#MANUAL#introjucer-makegenerator.patch
reproducible-date.patch
debian_apply-reproducible-date.patch
--
juce packaging
More information about the pkg-multimedia-commits
mailing list