diff options
author | wiz <wiz> | 2011-04-01 13:00:32 +0000 |
---|---|---|
committer | wiz <wiz> | 2011-04-01 13:00:32 +0000 |
commit | 635c8e099c785c628b6de99562792c678725da31 (patch) | |
tree | 86d5a6fca15317c3de9256123e59c04322865bdd /editors | |
parent | 4af5ec977ba214b373ec4c42993d9132e824862f (diff) | |
download | pkgsrc-635c8e099c785c628b6de99562792c678725da31.tar.gz |
Add patch that should fix build with png-1.5.
Diffstat (limited to 'editors')
-rw-r--r-- | editors/xemacs-current/distinfo | 3 | ||||
-rw-r--r-- | editors/xemacs-current/patches/patch-src_glyphs-eimage.c | 72 |
2 files changed, 74 insertions, 1 deletions
diff --git a/editors/xemacs-current/distinfo b/editors/xemacs-current/distinfo index eeebcbf6c1f..3a034269b54 100644 --- a/editors/xemacs-current/distinfo +++ b/editors/xemacs-current/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.22 2009/12/29 21:51:00 joerg Exp $ +$NetBSD: distinfo,v 1.23 2011/04/01 13:00:32 wiz Exp $ SHA1 (xemacs-21.5.27.tar.gz) = 55fc3e9c8fe3cac92791ffe1a0870aeae1baf0b8 RMD160 (xemacs-21.5.27.tar.gz) = ee0caff8730c999d37aa3a19b19f23d5756837ad @@ -17,3 +17,4 @@ SHA1 (patch-ak) = c8a3369efdd4af32b1a65cdb3d798724d63b3ed5 SHA1 (patch-al) = 33000a300de6358c0ba3260708d6d625dcd625a2 SHA1 (patch-am) = 0ccbead4be5da92e73a15432ff1b063da13cf0b4 SHA1 (patch-an) = f382865087f011ea3806d707cbf784fac81ad746 +SHA1 (patch-src_glyphs-eimage.c) = 9c5990cf2f806072aeb706bba8aba6133feb9509 diff --git a/editors/xemacs-current/patches/patch-src_glyphs-eimage.c b/editors/xemacs-current/patches/patch-src_glyphs-eimage.c new file mode 100644 index 00000000000..f82fcc2e97a --- /dev/null +++ b/editors/xemacs-current/patches/patch-src_glyphs-eimage.c @@ -0,0 +1,72 @@ +$NetBSD: patch-src_glyphs-eimage.c,v 1.1 2011/04/01 13:00:32 wiz Exp $ + +Fix build with png-1.5. + +--- src/glyphs-eimage.c.orig 2005-11-26 11:46:08.000000000 +0000 ++++ src/glyphs-eimage.c +@@ -929,8 +929,8 @@ png_instantiate (Lisp_Object image_insta + { + int y; + Binbyte **row_pointers; +- height = info_ptr->height; +- width = info_ptr->width; ++ height = png_get_image_height(png_ptr, info_ptr); ++ width = png_get_image_width(png_ptr, info_ptr); + + /* Wow, allocate all the memory. Truly, exciting. */ + unwind.eimage = xnew_array_and_zero (Binbyte, width * height * 3); +@@ -982,22 +982,22 @@ png_instantiate (Lisp_Object image_insta + /* Now that we're using EImage, ask for 8bit RGB triples for any type + of image*/ + /* convert palette images to full RGB */ +- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) + png_set_expand (png_ptr); + /* send grayscale images to RGB too */ +- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY || +- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY || ++ png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA) + png_set_gray_to_rgb (png_ptr); + /* we can't handle alpha values */ +- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA) ++ if (png_get_color_type(png_ptr, info_ptr) & PNG_COLOR_MASK_ALPHA) + png_set_strip_alpha (png_ptr); + /* tell libpng to strip 16 bit depth files down to 8 bits */ +- if (info_ptr->bit_depth == 16) ++ if (png_get_bit_depth(png_ptr, info_ptr) == 16) + png_set_strip_16 (png_ptr); + /* if the image is < 8 bits, pad it out */ +- if (info_ptr->bit_depth < 8) ++ if (png_get_bit_depth(png_ptr, info_ptr) < 8) + { +- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) + png_set_expand (png_ptr); + else + png_set_packing (png_ptr); +@@ -1018,16 +1018,20 @@ png_instantiate (Lisp_Object image_insta + unobtrusive. */ + { + int i; ++ png_textp text_ptr; ++ int num_text; + +- for (i = 0 ; i < info_ptr->num_text ; i++) ++ png_get_text(png_ptr, info_ptr, &text_ptr, &num_text); ++ ++ for (i = 0 ; i < num_text ; i++) + { + /* How paranoid do I have to be about no trailing NULLs, and +- using (int)info_ptr->text[i].text_length, and strncpy and a temp ++ using (int)text_ptr[i].text_length, and strncpy and a temp + string somewhere? */ + + warn_when_safe (Qpng, Qinfo, "%s - %s", +- info_ptr->text[i].key, +- info_ptr->text[i].text); ++ text_ptr[i].key, ++ text_ptr[i].text); + } + } + #endif |