diff options
author | wiz <wiz@pkgsrc.org> | 2011-01-23 16:16:39 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2011-01-23 16:16:39 +0000 |
commit | 7299da97fb3edd29f6cb61fbdb239acfb89dde4a (patch) | |
tree | 42b8d66de2747bac1c5d9b70bf3e90a6521e654e /graphics/imlib | |
parent | 92e1045b9b8180c51d3a83e64d4bb6253304a142 (diff) | |
download | pkgsrc-7299da97fb3edd29f6cb61fbdb239acfb89dde4a.tar.gz |
Fix build with png-1.5. From Marko Schuetz Schmuck in PR 44419.
Diffstat (limited to 'graphics/imlib')
-rw-r--r-- | graphics/imlib/distinfo | 9 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-aa | 65 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-ab | 48 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-ad | 15 | ||||
-rw-r--r-- | graphics/imlib/patches/patch-aj | 33 |
5 files changed, 141 insertions, 29 deletions
diff --git a/graphics/imlib/distinfo b/graphics/imlib/distinfo index 558b863842c..5a45ac05bd7 100644 --- a/graphics/imlib/distinfo +++ b/graphics/imlib/distinfo @@ -1,16 +1,17 @@ -$NetBSD: distinfo,v 1.19 2005/11/08 10:58:00 joerg Exp $ +$NetBSD: distinfo,v 1.20 2011/01/23 16:16:39 wiz Exp $ SHA1 (imlib-1.9.15.tar.bz2) = c9a732a354fbb3c7e1a426e5d19fc92d73f8f720 RMD160 (imlib-1.9.15.tar.bz2) = 195b80833167134ba2d9a9574d420279f9cf55f4 Size (imlib-1.9.15.tar.bz2) = 683242 bytes -SHA1 (patch-aa) = 185a5229af781d3dbc57978a3f4acd8308ca4c14 -SHA1 (patch-ab) = d1daff101bec77680f3e17cb776285976a7b5c7a +SHA1 (patch-aa) = fc990bb2278e6a848034f9c7be0170e1843b67b2 +SHA1 (patch-ab) = ff9fe1b56fe42030b8e1520c4f7f0ec8862fce92 SHA1 (patch-ac) = 7dd08bde4e97614777bf4327db2e6045db04692d +SHA1 (patch-ad) = 1fc310d57c12337cc8ccddb7dd907330127b7112 SHA1 (patch-ae) = 3ed6fff2e73f04ec83c27dc6e3f2db2fa446abbb SHA1 (patch-ag) = 7ef3980a6a3eccba41895ef86eae727cd7dfb1e2 SHA1 (patch-ah) = edee5311a47d552f9d1b9dcb96f256518040c538 SHA1 (patch-ai) = df13b72272f754375348437b99d962cb17732619 -SHA1 (patch-aj) = 2769e304deb93dd413fa3c44d53d1d67e92d5d00 +SHA1 (patch-aj) = 60171b7341c65fb6eb0a93738fef4b2c31692bdf SHA1 (patch-ak) = 4d7ae79f23bf0c64fd85ffebc086b7bb43207718 SHA1 (patch-al) = 4ad51c7128f7d6a5ecc67f51c745caf53a4def06 SHA1 (patch-am) = 73c62e11f5b6ac6774e51f8183987b2b4db01465 diff --git a/graphics/imlib/patches/patch-aa b/graphics/imlib/patches/patch-aa index 59761c37111..215cab42a3a 100644 --- a/graphics/imlib/patches/patch-aa +++ b/graphics/imlib/patches/patch-aa @@ -1,8 +1,42 @@ -$NetBSD: patch-aa,v 1.13 2002/03/19 16:16:08 wiz Exp $ +$NetBSD: patch-aa,v 1.14 2011/01/23 16:16:39 wiz Exp $ ---- gdk_imlib/io-png.c.orig Mon Mar 4 17:26:51 2002 +Fix build with png-1.5. + +--- gdk_imlib/io-png.c.orig 2002-03-04 17:06:29.000000000 +0000 +++ gdk_imlib/io-png.c -@@ -301,6 +301,9 @@ +@@ -40,13 +40,13 @@ loader_png (FILE * f, int *w, int *h, in + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -275,13 +275,13 @@ inline_png(unsigned char *data, int data + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -301,6 +301,9 @@ inline_png(unsigned char *data, int data /* Setup Translators */ if (color_type == PNG_COLOR_TYPE_PALETTE) png_set_expand(png_ptr); @@ -12,3 +46,28 @@ $NetBSD: patch-aa,v 1.13 2002/03/19 16:16:08 wiz Exp $ png_set_strip_16(png_ptr); png_set_packing(png_ptr); if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) +@@ -440,13 +443,13 @@ _loader_alpha_png (FILE * f, int *w, int + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -635,7 +638,7 @@ saver_png (GdkImlibImage *im, char *file + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); diff --git a/graphics/imlib/patches/patch-ab b/graphics/imlib/patches/patch-ab index 267d4f44789..956313aaf42 100644 --- a/graphics/imlib/patches/patch-ab +++ b/graphics/imlib/patches/patch-ab @@ -1,7 +1,10 @@ -$NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ +$NetBSD: patch-ab,v 1.7 2011/01/23 16:16:39 wiz Exp $ ---- Imlib/load.c.orig 2004-09-21 02:23:20.000000000 +0200 -+++ Imlib/load.c 2004-12-10 09:58:18.000000000 +0100 +Middle chunks: Fix build with png-1.5. +Others: ??? + +--- Imlib/load.c.orig 2004-09-21 00:23:20.000000000 +0000 ++++ Imlib/load.c @@ -4,6 +4,8 @@ #include "Imlib_private.h" #include <setjmp.h> @@ -11,7 +14,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ /* Split the ID - damages input */ static char * -@@ -41,13 +43,17 @@ +@@ -41,13 +43,17 @@ _GetExtension(char *file) /* * Make sure we don't wrap on our memory allocations @@ -31,7 +34,22 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ } #ifdef HAVE_LIBJPEG -@@ -254,7 +260,8 @@ +@@ -191,12 +197,12 @@ _LoadPNG(ImlibData * id, FILE * f, int * + png_destroy_read_struct(&png_ptr, NULL, NULL); + return NULL; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; +@@ -254,7 +260,8 @@ _LoadPNG(ImlibData * id, FILE * f, int * png_read_image(png_ptr, lines); png_destroy_read_struct(&png_ptr, &info_ptr, NULL); ptr = data; @@ -41,7 +59,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ { for (y = 0; y < *h; y++) { -@@ -279,6 +286,7 @@ +@@ -279,6 +286,7 @@ _LoadPNG(ImlibData * id, FILE * f, int * } } } @@ -49,7 +67,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ else if (color_type == PNG_COLOR_TYPE_GRAY) { for (y = 0; y < *h; y++) -@@ -294,6 +302,7 @@ +@@ -294,6 +302,7 @@ _LoadPNG(ImlibData * id, FILE * f, int * } } } @@ -57,7 +75,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ else { for (y = 0; y < *h; y++) -@@ -360,7 +369,9 @@ +@@ -360,7 +369,9 @@ _LoadTIFF(ImlibData * id, FILE *f, char npix = ww * hh; *w = (int)ww; *h = (int)hh; @@ -68,7 +86,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ { TIFFClose(tif); return NULL; -@@ -463,7 +474,7 @@ +@@ -463,7 +474,7 @@ _LoadGIF(ImlibData * id, FILE *f, int *w } *w = gif->Image.Width; *h = gif->Image.Height; @@ -77,7 +95,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ { return NULL; } -@@ -1000,7 +1011,12 @@ +@@ -1000,7 +1011,12 @@ _LoadXPM(ImlibData * id, FILE *file, int comment = 0; quote = 0; context = 0; @@ -90,7 +108,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ while (!done) { pc = c; -@@ -1029,25 +1045,25 @@ +@@ -1029,25 +1045,25 @@ _LoadXPM(ImlibData * id, FILE *file, int { /* Header */ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp); @@ -120,7 +138,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ { fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n"); free(line); -@@ -1080,11 +1096,13 @@ +@@ -1080,11 +1096,13 @@ _LoadXPM(ImlibData * id, FILE *file, int { int slen; int hascolor, iscolor; @@ -134,7 +152,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ s[0] = 0; len = strlen(line); strncpy(cmap[j].str, line, cpp); -@@ -1107,10 +1125,10 @@ +@@ -1107,10 +1125,10 @@ _LoadXPM(ImlibData * id, FILE *file, int { if (k >= len) { @@ -149,7 +167,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ } if (col[0]) { -@@ -1140,14 +1158,17 @@ +@@ -1140,14 +1158,17 @@ _LoadXPM(ImlibData * id, FILE *file, int } } } @@ -170,7 +188,7 @@ $NetBSD: patch-ab,v 1.6 2004/12/10 09:30:42 salo Exp $ } } } -@@ -1376,12 +1397,12 @@ +@@ -1376,12 +1397,12 @@ _LoadPPM(ImlibData * id, FILE * f, int * sscanf(s, "%i %i", w, h); a = *w; b = *h; diff --git a/graphics/imlib/patches/patch-ad b/graphics/imlib/patches/patch-ad new file mode 100644 index 00000000000..a0088e4b80c --- /dev/null +++ b/graphics/imlib/patches/patch-ad @@ -0,0 +1,15 @@ +$NetBSD: patch-ad,v 1.9 2011/01/23 16:16:39 wiz Exp $ + +Fix build with png-1.5. + +--- Imlib/save.c.orig 2004-09-21 00:22:59.000000000 +0000 ++++ Imlib/save.c +@@ -342,7 +342,7 @@ Imlib_save_image(ImlibData * id, ImlibIm + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + fclose(f); + png_destroy_write_struct(&png_ptr, (png_infopp) NULL); diff --git a/graphics/imlib/patches/patch-aj b/graphics/imlib/patches/patch-aj index 36ac62c6873..006de161abb 100644 --- a/graphics/imlib/patches/patch-aj +++ b/graphics/imlib/patches/patch-aj @@ -1,8 +1,11 @@ -$NetBSD: patch-aj,v 1.1 2004/12/10 09:30:42 salo Exp $ +$NetBSD: patch-aj,v 1.2 2011/01/23 16:16:39 wiz Exp $ ---- Imlib/utils.c.orig 2004-09-21 02:22:59.000000000 +0200 -+++ Imlib/utils.c 2004-12-10 09:58:18.000000000 +0100 -@@ -1496,36 +1496,56 @@ +First chunks: ??? +Last 2 chunks: Fix build with png-1.5. + +--- Imlib/utils.c.orig 2004-09-21 00:22:59.000000000 +0000 ++++ Imlib/utils.c +@@ -1496,36 +1496,56 @@ Imlib_create_image_from_xpm_data(ImlibDa context = 0; ptr = NULL; end = NULL; @@ -63,7 +66,7 @@ $NetBSD: patch-aj,v 1.1 2004/12/10 09:30:42 salo Exp $ return NULL; } cmap = malloc(sizeof(struct _cmap) * ncolors); -@@ -1533,6 +1553,7 @@ +@@ -1533,6 +1553,7 @@ Imlib_create_image_from_xpm_data(ImlibDa if (!cmap) { free(im); @@ -71,7 +74,7 @@ $NetBSD: patch-aj,v 1.1 2004/12/10 09:30:42 salo Exp $ return NULL; } im->rgb_width = w; -@@ -1542,6 +1563,7 @@ +@@ -1542,6 +1563,7 @@ Imlib_create_image_from_xpm_data(ImlibDa { free(cmap); free(im); @@ -79,7 +82,7 @@ $NetBSD: patch-aj,v 1.1 2004/12/10 09:30:42 salo Exp $ return NULL; } im->alpha_data = NULL; -@@ -1817,6 +1839,7 @@ +@@ -1817,6 +1839,7 @@ Imlib_create_image_from_xpm_data(ImlibDa } if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3)) done = 1; @@ -87,3 +90,19 @@ $NetBSD: patch-aj,v 1.1 2004/12/10 09:30:42 salo Exp $ } if (!transp) { +@@ -1959,13 +1982,13 @@ Imlib_inlined_png_to_image(ImlibData *id + return NULL; + } + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; + } + +- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); + return NULL; |