diff options
author | wiz <wiz> | 2011-04-03 16:38:41 +0000 |
---|---|---|
committer | wiz <wiz> | 2011-04-03 16:38:41 +0000 |
commit | 6b638ecb76b84367b72fc8709d6eb92fe71cb29c (patch) | |
tree | 7a52275f6790ebe7f603f3023e89ea20acdad7a7 /graphics | |
parent | e1fea243a9edb68c05977fde38386676d7fd5fd8 (diff) | |
download | pkgsrc-6b638ecb76b84367b72fc8709d6eb92fe71cb29c.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/glpng/distinfo | 4 | ||||
-rw-r--r-- | graphics/glpng/patches/patch-include_GL_glpng.h | 15 | ||||
-rw-r--r-- | graphics/glpng/patches/patch-src_glpng.c | 33 |
3 files changed, 51 insertions, 1 deletions
diff --git a/graphics/glpng/distinfo b/graphics/glpng/distinfo index d0aef1617ad..ee2797a9288 100644 --- a/graphics/glpng/distinfo +++ b/graphics/glpng/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.2 2009/09/11 06:19:20 dsainty Exp $ +$NetBSD: distinfo,v 1.3 2011/04/03 16:38:41 wiz Exp $ SHA1 (glpng-1.45.20081203.tar.gz) = c2515ab3395f84cbedf49a246c091ad4078ef43b RMD160 (glpng-1.45.20081203.tar.gz) = 14753b471d7b3192a06559a178807db30414cebd Size (glpng-1.45.20081203.tar.gz) = 40141 bytes SHA1 (patch-aa) = d9c7353907ac15b305292e167107ed64d1c6f54c +SHA1 (patch-include_GL_glpng.h) = 3510c6b290e48d87040a126a900acfd6801a8c4c +SHA1 (patch-src_glpng.c) = a1226af2ebe3d93168eb9a91f98c65b674a9931c diff --git a/graphics/glpng/patches/patch-include_GL_glpng.h b/graphics/glpng/patches/patch-include_GL_glpng.h new file mode 100644 index 00000000000..78cf8fdb5ad --- /dev/null +++ b/graphics/glpng/patches/patch-include_GL_glpng.h @@ -0,0 +1,15 @@ +$NetBSD: patch-include_GL_glpng.h,v 1.1 2011/04/03 16:38:41 wiz Exp $ + +Fix build with png-1.5. + +--- include/GL/glpng.h.orig 2009-05-04 18:51:48.000000000 +0000 ++++ include/GL/glpng.h +@@ -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_CALLBACKT -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 --git a/graphics/glpng/patches/patch-src_glpng.c b/graphics/glpng/patches/patch-src_glpng.c new file mode 100644 index 00000000000..19a403d8fff --- /dev/null +++ b/graphics/glpng/patches/patch-src_glpng.c @@ -0,0 +1,33 @@ +$NetBSD: patch-src_glpng.c,v 1.1 2011/04/03 16:38:41 wiz Exp $ + +Fix build with png-1.5. + +--- src/glpng.c.orig 2009-05-04 18:51:48.000000000 +0000 ++++ src/glpng.c +@@ -278,7 +278,7 @@ int APIENTRY pngLoadRawF(FILE *fp, pngRa + endinfo = png_create_info_struct(png); + + // DH: added following lines +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + { + png_destroy_read_struct(&png, &info, &endinfo); + return 0; +@@ -382,7 +382,7 @@ int APIENTRY pngLoadF(FILE *fp, int mipm + endinfo = png_create_info_struct(png); + + // DH: added following lines +- if (setjmp(png->jmpbuf)) ++ if (setjmp(png_jmpbuf(png))) + { + png_destroy_read_struct(&png, &info, &endinfo); + return 0; +@@ -561,7 +561,7 @@ int APIENTRY pngLoadF(FILE *fp, int mipm + #define ALPHA *q + + switch (trans) { +- case PNG_CALLBACK: ++ case PNG_CALLBACKT: + FORSTART + ALPHA = AlphaCallback((unsigned char) r, (unsigned char) g, (unsigned char) b); + FOREND |