Fri Apr 1 13:00:32 2011 UTC ()
Add patch that should fix build with png-1.5.


(wiz)
diff -r1.22 -r1.23 pkgsrc/editors/xemacs-current/distinfo
diff -r0 -r1.1 pkgsrc/editors/xemacs-current/patches/patch-src_glyphs-eimage.c

cvs diff -r1.22 -r1.23 pkgsrc/editors/xemacs-current/distinfo (expand / switch to unified diff)

--- pkgsrc/editors/xemacs-current/distinfo 2009/12/29 21:51:00 1.22
+++ pkgsrc/editors/xemacs-current/distinfo 2011/04/01 13:00:32 1.23
@@ -1,19 +1,20 @@ @@ -1,19 +1,20 @@
1$NetBSD: distinfo,v 1.22 2009/12/29 21:51:00 joerg Exp $ 1$NetBSD: distinfo,v 1.23 2011/04/01 13:00:32 wiz Exp $
2 2
3SHA1 (xemacs-21.5.27.tar.gz) = 55fc3e9c8fe3cac92791ffe1a0870aeae1baf0b8 3SHA1 (xemacs-21.5.27.tar.gz) = 55fc3e9c8fe3cac92791ffe1a0870aeae1baf0b8
4RMD160 (xemacs-21.5.27.tar.gz) = ee0caff8730c999d37aa3a19b19f23d5756837ad 4RMD160 (xemacs-21.5.27.tar.gz) = ee0caff8730c999d37aa3a19b19f23d5756837ad
5Size (xemacs-21.5.27.tar.gz) = 15042023 bytes 5Size (xemacs-21.5.27.tar.gz) = 15042023 bytes
6SHA1 (patch-aa) = 5e099de33676099916771080c606046ca9acdac6 6SHA1 (patch-aa) = 5e099de33676099916771080c606046ca9acdac6
7SHA1 (patch-ab) = c105e7333e5ed64eac1e99d49551e5bf75c0bc03 7SHA1 (patch-ab) = c105e7333e5ed64eac1e99d49551e5bf75c0bc03
8SHA1 (patch-ac) = 9a480bf587e1b7e3fb15724433ca706f1848182e 8SHA1 (patch-ac) = 9a480bf587e1b7e3fb15724433ca706f1848182e
9SHA1 (patch-ad) = 244ddfebb25ccca7b34b308cced61f256b50d0a7 9SHA1 (patch-ad) = 244ddfebb25ccca7b34b308cced61f256b50d0a7
10SHA1 (patch-ae) = 902a375f974e06eb5d67b69deadead98c625d97a 10SHA1 (patch-ae) = 902a375f974e06eb5d67b69deadead98c625d97a
11SHA1 (patch-af) = e71e89be5ce6070bca4b4ab8456f92cf52c50c6e 11SHA1 (patch-af) = e71e89be5ce6070bca4b4ab8456f92cf52c50c6e
12SHA1 (patch-ag) = f859010a113a9765819f92c79ce905cf4fd801dd 12SHA1 (patch-ag) = f859010a113a9765819f92c79ce905cf4fd801dd
13SHA1 (patch-ah) = 53d806344f2429d26ee8a10005d1087d84fb0321 13SHA1 (patch-ah) = 53d806344f2429d26ee8a10005d1087d84fb0321
14SHA1 (patch-ai) = ed24c7c0cc802386c0293c34842882d5ec770426 14SHA1 (patch-ai) = ed24c7c0cc802386c0293c34842882d5ec770426
15SHA1 (patch-aj) = aeebaec687a1ea2974d909404938fc060d5df75f 15SHA1 (patch-aj) = aeebaec687a1ea2974d909404938fc060d5df75f
16SHA1 (patch-ak) = c8a3369efdd4af32b1a65cdb3d798724d63b3ed5 16SHA1 (patch-ak) = c8a3369efdd4af32b1a65cdb3d798724d63b3ed5
17SHA1 (patch-al) = 33000a300de6358c0ba3260708d6d625dcd625a2 17SHA1 (patch-al) = 33000a300de6358c0ba3260708d6d625dcd625a2
18SHA1 (patch-am) = 0ccbead4be5da92e73a15432ff1b063da13cf0b4 18SHA1 (patch-am) = 0ccbead4be5da92e73a15432ff1b063da13cf0b4
19SHA1 (patch-an) = f382865087f011ea3806d707cbf784fac81ad746 19SHA1 (patch-an) = f382865087f011ea3806d707cbf784fac81ad746
 20SHA1 (patch-src_glyphs-eimage.c) = 9c5990cf2f806072aeb706bba8aba6133feb9509

File Added: pkgsrc/editors/xemacs-current/patches/Attic/patch-src_glyphs-eimage.c
$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