diff options
author | wiz <wiz@pkgsrc.org> | 2011-01-13 17:07:53 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-01-13 17:07:53 +0000 |
commit | 0361306d874d55f43f288a6653d60bcaa59f2208 (patch) | |
tree | d36d00d9715dd9e374b0e5a053d4ba6324c9ecbc /graphics | |
parent | a26cb2b5d5864289ab7628d25bd9eb7060c27686 (diff) | |
download | pkgsrc-0361306d874d55f43f288a6653d60bcaa59f2208.tar.gz |
Fix build with png-1.5.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/gdk-pixbuf2/distinfo | 3 | ||||
-rw-r--r-- | graphics/gdk-pixbuf2/patches/patch-af | 75 | ||||
-rw-r--r-- | graphics/gif2png/distinfo | 3 | ||||
-rw-r--r-- | graphics/gif2png/patches/patch-aa | 45 |
4 files changed, 124 insertions, 2 deletions
diff --git a/graphics/gdk-pixbuf2/distinfo b/graphics/gdk-pixbuf2/distinfo index dedfa1c1fd5..8690abc5014 100644 --- a/graphics/gdk-pixbuf2/distinfo +++ b/graphics/gdk-pixbuf2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2010/11/23 13:05:22 he Exp $ +$NetBSD: distinfo,v 1.5 2011/01/13 17:14:43 wiz Exp $ SHA1 (gdk-pixbuf-2.22.1.tar.bz2) = b452208963ddd84f7280865695b50255fcafaa2e RMD160 (gdk-pixbuf-2.22.1.tar.bz2) = d05d6642e147281b7dc1dd21657595333f13f6f1 @@ -8,3 +8,4 @@ SHA1 (patch-ab) = d18a235ce973ef132e9dc777b1cf029b064c02ef SHA1 (patch-ac) = f8c8ff3175cee6a88938a0aaa081d3bd832a050d SHA1 (patch-ad) = 00b9186e0d3513a518c263b6d2f8350fc977580d SHA1 (patch-ae) = d4ad340e16589c579ec964bf95fd951b334adf04 +SHA1 (patch-af) = ee6fdf4c2ef334873b56487dafe4e2a0d055318b diff --git a/graphics/gdk-pixbuf2/patches/patch-af b/graphics/gdk-pixbuf2/patches/patch-af new file mode 100644 index 00000000000..029d914235f --- /dev/null +++ b/graphics/gdk-pixbuf2/patches/patch-af @@ -0,0 +1,75 @@ +$NetBSD: patch-af,v 1.1 2011/01/13 17:14:43 wiz Exp $ + +Fix build with png-1.5. + +--- gdk-pixbuf/io-png.c.orig 2010-07-10 00:54:35.000000000 +0000 ++++ gdk-pixbuf/io-png.c +@@ -183,7 +183,11 @@ png_simple_error_callback(png_structp pn + error_msg); + } + ++#if (PNG_LIBPNG_VER < 10500) + longjmp (png_save_ptr->jmpbuf, 1); ++#else ++ png_longjmp (png_save_ptr, 1); ++#endif + } + + static void +@@ -287,7 +291,7 @@ gdk_pixbuf__png_image_load (FILE *f, GEr + return NULL; + } + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(png_ptr))) { + g_free (rows); + + if (pixbuf) +@@ -459,7 +463,7 @@ gdk_pixbuf__png_image_begin_load (GdkPix + return NULL; + } + +- if (setjmp (lc->png_read_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(lc->png_read_ptr))) { + if (lc->png_info_ptr) + png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL); + g_free(lc); +@@ -531,7 +535,7 @@ gdk_pixbuf__png_image_load_increment(gpo + lc->error = error; + + /* Invokes our callbacks as needed */ +- if (setjmp (lc->png_read_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(lc->png_read_ptr))) { + lc->error = NULL; + return FALSE; + } else { +@@ -654,7 +658,7 @@ png_info_callback (png_structp png_rea + GDK_PIXBUF_ERROR, + GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY, + _("Insufficient memory to store a %ld by %ld image; try exiting some applications to reduce memory usage"), +- width, height); ++ (long)width, (long)height); + } + return; + } +@@ -769,7 +773,11 @@ png_error_callback(png_structp png_read_ + error_msg); + } + ++#if (PNG_LIBPNG_VER < 10500) + longjmp (png_read_ptr->jmpbuf, 1); ++#else ++ png_longjmp (png_read_ptr, 1); ++#endif + } + + static void +@@ -978,7 +986,7 @@ static gboolean real_save_png (GdkPixbuf + success = FALSE; + goto cleanup; + } +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(png_ptr))) { + success = FALSE; + goto cleanup; + } diff --git a/graphics/gif2png/distinfo b/graphics/gif2png/distinfo index 7fc087b6158..c8f3542c5ec 100644 --- a/graphics/gif2png/distinfo +++ b/graphics/gif2png/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.9 2010/01/20 14:30:28 wiz Exp $ +$NetBSD: distinfo,v 1.10 2011/01/13 17:07:53 wiz Exp $ SHA1 (gif2png-2.5.2.tar.gz) = 0e9e66d6728fe7e2dcde61ad0e398a60894946b3 RMD160 (gif2png-2.5.2.tar.gz) = a361b18af23e59b73121ae25a155b54fb62eb14a Size (gif2png-2.5.2.tar.gz) = 171740 bytes +SHA1 (patch-aa) = ae26b928890c0d7577a0889ae21f6f836faa71b1 diff --git a/graphics/gif2png/patches/patch-aa b/graphics/gif2png/patches/patch-aa new file mode 100644 index 00000000000..2c37ecce01b --- /dev/null +++ b/graphics/gif2png/patches/patch-aa @@ -0,0 +1,45 @@ +$NetBSD: patch-aa,v 1.5 2011/01/13 17:07:53 wiz Exp $ + +Fix build with png-1.5. + +--- gif2png.c.orig 2009-11-11 20:28:02.000000000 +0000 ++++ gif2png.c +@@ -10,6 +10,7 @@ + #include <string.h> + #include <stdlib.h> + #include <unistd.h> /* for isatty() */ ++#include <zlib.h> + + #if !defined(TRUE) + #define FALSE 0 +@@ -120,8 +121,8 @@ int writefile(struct GIFelement *s,struc + int colors_used = 0; + byte remap[MAXCMSIZE]; + int low_prec; +- png_struct *png_ptr = xalloc(sizeof (png_struct)); +- png_info *info_ptr = xalloc(sizeof (png_info)); ++ png_struct *png_ptr; ++ png_info *info_ptr; + int p; + int gray_bitdepth; + png_color pal_rgb[MAXCMSIZE], *pltep; +@@ -136,6 +137,19 @@ int writefile(struct GIFelement *s,struc + png_text software; + png_text comment; + ++ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); ++ if (png_ptr == NULL) { ++ fprintf(stderr, "gif2png: fatal error, out of memory\n"); ++ fprintf(stderr, "gif2png: exiting ungracefully\n"); ++ exit(1); ++ } ++ info_ptr = png_create_info_struct(png_ptr); ++ if (info_ptr == NULL) { ++ fprintf(stderr, "gif2png: fatal error, out of memory\n"); ++ fprintf(stderr, "gif2png: exiting ungracefully\n"); ++ exit(1); ++ } ++ + /* these volatile declarations prevent gcc warnings ("variable might be + * clobbered by `longjmp' or `vfork'") */ + volatile int gray = TRUE; |