aboutsummaryrefslogtreecommitdiff
path: root/libraries/libglpng/libglpng-1.45-libpng15.patch
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2016-01-13 18:23:02 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-17 09:40:16 +0700
commitfb9fb8a5e186fb70cdcae50f98d71973b7303c33 (patch)
tree4fe9693835311b9abd8a1294bef99e03e528767e /libraries/libglpng/libglpng-1.45-libpng15.patch
parentddd61de957ffddadf6b9928c384096ea3b74be2f (diff)
libraries/libglpng: Rearrange patches.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/libglpng/libglpng-1.45-libpng15.patch')
-rw-r--r--libraries/libglpng/libglpng-1.45-libpng15.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/libraries/libglpng/libglpng-1.45-libpng15.patch b/libraries/libglpng/libglpng-1.45-libpng15.patch
new file mode 100644
index 000000000000..9308633536e9
--- /dev/null
+++ b/libraries/libglpng/libglpng-1.45-libpng15.patch
@@ -0,0 +1,48 @@
+diff -up libglpng-1.45.orig/include/GL/glpng.h~ libglpng-1.45.orig/include/GL/glpng.h
+--- libglpng-1.45.orig/include/GL/glpng.h~ 2011-12-06 22:14:59.000000000 +0100
++++ libglpng-1.45.orig/include/GL/glpng.h 2011-12-06 22:15:48.900673919 +0100
+@@ -57,7 +57,7 @@ extern "C" {
+ #define PNG_SIMPLEMIPMAP PNG_SIMPLEMIPMAPS
+
+ /* Transparency parameters */
+-#define PNG_CALLBACK -3 /* Call the callback function to generate alpha */
++#define PNG_CALLBACK_FUNC -3 /* Call the callback function to generate alpha */
+ #define PNG_ALPHA -2 /* Use alpha channel in PNG file, if there is one */
+ #define PNG_SOLID -1 /* No transparency */
+ #define PNG_STENCIL 0 /* Sets alpha to 0 for r=g=b=0, 1 otherwise */
+diff -up libglpng-1.45.orig/src/glpng.c~ libglpng-1.45.orig/src/glpng.c
+--- libglpng-1.45.orig/src/glpng.c~ 2011-12-06 19:38:53.000000000 +0100
++++ libglpng-1.45.orig/src/glpng.c 2011-12-06 22:13:34.501354149 +0100
+@@ -282,7 +282,11 @@ int APIENTRY pngLoadRawF(FILE *fp, pngRa
+ if (!endinfo) return 0;
+
+ // DH: added following lines
++#if PNG_LIBPNG_VER >= 10400
++ if (setjmp(png_jmpbuf(png)))
++#else
+ if (setjmp(png->jmpbuf))
++#endif
+ {
+ error:
+ png_destroy_read_struct(&png, &info, &endinfo);
+@@ -402,7 +406,11 @@ int APIENTRY pngLoadF(FILE *fp, int mipm
+ if (!endinfo) return 0;
+
+ // DH: added following lines
++#if PNG_LIBPNG_VER >= 10400
++ if (setjmp(png_jmpbuf(png)))
++#else
+ if (setjmp(png->jmpbuf))
++#endif
+ {
+ error:
+ png_destroy_read_struct(&png, &info, &endinfo);
+@@ -603,7 +611,7 @@ error:
+ #define ALPHA *q
+
+ switch (trans) {
+- case PNG_CALLBACK:
++ case PNG_CALLBACK_FUNC:
+ FORSTART
+ ALPHA = AlphaCallback((unsigned char) r, (unsigned char) g, (unsigned char) b);
+ FOREND