summaryrefslogtreecommitdiff
path: root/graphics/SDL_image/patches
diff options
context:
space:
mode:
authorhans <hans>2011-05-27 16:23:53 +0000
committerhans <hans>2011-05-27 16:23:53 +0000
commit417a7eddf73c106e41dfa2745cec128404585194 (patch)
tree03818e4541113db28db55332c2dbda573320972f /graphics/SDL_image/patches
parentbb9bd1c6824c2c5e23857096f2f2aab1151dde4b (diff)
downloadpkgsrc-417a7eddf73c106e41dfa2745cec128404585194.tar.gz
Add missing png_set_longjmp_fn assignment to fix some segfaults.
Diffstat (limited to 'graphics/SDL_image/patches')
-rw-r--r--graphics/SDL_image/patches/patch-aa24
1 files changed, 16 insertions, 8 deletions
diff --git a/graphics/SDL_image/patches/patch-aa b/graphics/SDL_image/patches/patch-aa
index 46b0f48fd9e..eddf4081731 100644
--- a/graphics/SDL_image/patches/patch-aa
+++ b/graphics/SDL_image/patches/patch-aa
@@ -1,9 +1,9 @@
-$NetBSD: patch-aa,v 1.4 2011/01/19 21:24:10 drochner Exp $
+$NetBSD: patch-aa,v 1.5 2011/05/27 16:23:53 hans Exp $
Fix build with png-1.5.
---- IMG_png.c.orig 2009-11-08 10:55:32.000000000 +0000
-+++ IMG_png.c
+--- IMG_png.c.orig 2009-11-08 11:55:32.000000000 +0100
++++ IMG_png.c 2011-05-27 19:00:27.419279003 +0200
@@ -80,6 +80,8 @@ static struct {
void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr);
png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method);
@@ -73,7 +73,15 @@ Fix build with png-1.5.
lib.png_get_tRNS = png_get_tRNS;
lib.png_get_valid = png_get_valid;
lib.png_read_image = png_read_image;
-@@ -347,7 +373,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
+@@ -248,6 +274,7 @@ int IMG_InitPNG()
+ lib.png_set_read_fn = png_set_read_fn;
+ lib.png_set_strip_16 = png_set_strip_16;
+ lib.png_sig_cmp = png_sig_cmp;
++ lib.png_set_longjmp_fn = png_set_longjmp_fn;
+ }
+ ++lib.loaded;
+
+@@ -347,7 +374,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
* the normal method of doing things with libpng). REQUIRED unless you
* set up your own error handlers in png_create_read_struct() earlier.
*/
@@ -82,7 +90,7 @@ Fix build with png-1.5.
error = "Error reading the PNG file.";
goto done;
}
-@@ -416,9 +442,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
+@@ -416,9 +443,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
Rmask = 0x000000FF;
Gmask = 0x0000FF00;
Bmask = 0x00FF0000;
@@ -94,7 +102,7 @@ Fix build with png-1.5.
Rmask = 0xFF000000 >> s;
Gmask = 0x00FF0000 >> s;
Bmask = 0x0000FF00 >> s;
-@@ -426,7 +452,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
+@@ -426,7 +453,7 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
}
}
surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
@@ -103,7 +111,7 @@ Fix build with png-1.5.
if ( surface == NULL ) {
error = "Out of memory";
goto done;
-@@ -467,6 +493,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
+@@ -467,6 +494,9 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
/* Load the palette, if any */
palette = surface->format->palette;
if ( palette ) {
@@ -113,7 +121,7 @@ Fix build with png-1.5.
if(color_type == PNG_COLOR_TYPE_GRAY) {
palette->ncolors = 256;
for(i = 0; i < 256; i++) {
-@@ -474,12 +503,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
+@@ -474,12 +504,12 @@ SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *s
palette->colors[i].g = i;
palette->colors[i].b = i;
}