Mon Dec 5 22:48:59 2011 UTC ()
Fix build with newer GCC


(joerg)
diff -r1.14 -r1.15 pkgsrc/graphics/xart/distinfo
diff -r1.2 -r1.3 pkgsrc/graphics/xart/patches/patch-ad
diff -r1.1 -r1.2 pkgsrc/graphics/xart/patches/patch-ak
diff -r0 -r1.1 pkgsrc/graphics/xart/patches/patch-image.h
diff -r0 -r1.1 pkgsrc/graphics/xart/patches/patch-main.c
diff -r0 -r1.1 pkgsrc/graphics/xart/patches/patch-protocol.c
diff -r0 -r1.1 pkgsrc/graphics/xart/patches/patch-rw_readGIF.c
diff -r0 -r1.1 pkgsrc/graphics/xart/patches/patch-rw_readWriteXBM.c
diff -r0 -r1.1 pkgsrc/graphics/xart/patches/patch-rw_readWriteXWD.c

cvs diff -r1.14 -r1.15 pkgsrc/graphics/xart/distinfo (expand / switch to unified diff)

--- pkgsrc/graphics/xart/distinfo 2011/02/07 21:28:56 1.14
+++ pkgsrc/graphics/xart/distinfo 2011/12/05 22:48:58 1.15
@@ -1,16 +1,22 @@ @@ -1,16 +1,22 @@
1$NetBSD: distinfo,v 1.14 2011/02/07 21:28:56 wiz Exp $ 1$NetBSD: distinfo,v 1.15 2011/12/05 22:48:58 joerg Exp $
2 2
3SHA1 (xart19980415.tgz) = d4445392e33a5dcf5ae951babac82394e7cdd65c 3SHA1 (xart19980415.tgz) = d4445392e33a5dcf5ae951babac82394e7cdd65c
4RMD160 (xart19980415.tgz) = 99077c23a798d8c0026bd53450052b1a8cf6ff6f 4RMD160 (xart19980415.tgz) = 99077c23a798d8c0026bd53450052b1a8cf6ff6f
5Size (xart19980415.tgz) = 343909 bytes 5Size (xart19980415.tgz) = 343909 bytes
6SHA1 (patch-aa) = 7d8ae61d9a624cc537396f406b496f28376cf7b5 6SHA1 (patch-aa) = 7d8ae61d9a624cc537396f406b496f28376cf7b5
7SHA1 (patch-ab) = b0f00e29560ce786e37a8ba62fef82dae80c4ee9 7SHA1 (patch-ab) = b0f00e29560ce786e37a8ba62fef82dae80c4ee9
8SHA1 (patch-ac) = 618003b6d192e85a1aa5f64b0f8eccfec991012e 8SHA1 (patch-ac) = 618003b6d192e85a1aa5f64b0f8eccfec991012e
9SHA1 (patch-ad) = 08059ca068d156be0e31283180c5deaebb99f7bd 9SHA1 (patch-ad) = 9bea96736f23880863f1aa2ccb5499d64f5e781c
10SHA1 (patch-ae) = d0d87fe957cbec5979e635270d2ad05b294f7530 10SHA1 (patch-ae) = d0d87fe957cbec5979e635270d2ad05b294f7530
11SHA1 (patch-af) = 7253489721eead898cd3a67878584d86b7719e3f 11SHA1 (patch-af) = 7253489721eead898cd3a67878584d86b7719e3f
12SHA1 (patch-ag) = 58bf357debce54707378b6598ca813af6a632e3b 12SHA1 (patch-ag) = 58bf357debce54707378b6598ca813af6a632e3b
13SHA1 (patch-ah) = f888c5167cd8a6111e2064d586ff50984320b210 13SHA1 (patch-ah) = f888c5167cd8a6111e2064d586ff50984320b210
14SHA1 (patch-ai) = 349170a16199734f35dc56de12e77dd289db412b 14SHA1 (patch-ai) = 349170a16199734f35dc56de12e77dd289db412b
15SHA1 (patch-aj) = 7139b114301de5becf1449bd2b346223b205a908 15SHA1 (patch-aj) = 7139b114301de5becf1449bd2b346223b205a908
16SHA1 (patch-ak) = a7778776ec8251a51477f3548f28ed30a1ef9770 16SHA1 (patch-ak) = fb0de4cead898e3d41bdd7380020e8058031556f
 17SHA1 (patch-image.h) = ccc9233baac771801028ddfcc9b4863456f0bfda
 18SHA1 (patch-main.c) = 145840a9baf90164cda10656eac8f8f6f31a400d
 19SHA1 (patch-protocol.c) = 4ddc5530adfe85b7b282545b7c067c3f8cc38d0b
 20SHA1 (patch-rw_readGIF.c) = 444483ad98c0edb9c1bde596e73baa904781a81c
 21SHA1 (patch-rw_readWriteXBM.c) = 8e3fc7546d98ffd37eafc747a7d724a56bccb765
 22SHA1 (patch-rw_readWriteXWD.c) = 78065d0137e339f45bea6333a73d2e1945b9ef27

cvs diff -r1.2 -r1.3 pkgsrc/graphics/xart/patches/patch-ad (expand / switch to unified diff)

--- pkgsrc/graphics/xart/patches/patch-ad 1998/08/07 10:40:54 1.2
+++ pkgsrc/graphics/xart/patches/patch-ad 2011/12/05 22:48:59 1.3
@@ -1,15 +1,23 @@ @@ -1,15 +1,23 @@
1$NetBSD: patch-ad,v 1.2 1998/08/07 10:40:54 agc Exp $ 1$NetBSD: patch-ad,v 1.3 2011/12/05 22:48:59 joerg Exp $
2 2
3Fix PR 5746 by Benjamin Lorenz <lorenz@ps.uni-sb.de>. 3Fix PR 5746 by Benjamin Lorenz <lorenz@ps.uni-sb.de>.
4 4
5--- misc.h.BAK Sun Jul 12 17:00:39 1998 5--- misc.h.orig 1998-03-07 21:36:05.000000000 +0000
6+++ misc.h Sun Jul 12 17:00:53 1998 6+++ misc.h
7@@ -24,7 +24,7 @@ 7@@ -24,7 +24,7 @@ long random(void);
8  8
9 #ifndef linux 9 #ifndef linux
10 #if defined(BSD4_4) || defined(HPArchitecture) || defined(SGIArchitecture) || defined(_AIX) 10 #if defined(BSD4_4) || defined(HPArchitecture) || defined(SGIArchitecture) || defined(_AIX)
11-void srandom(unsigned int); 11-void srandom(unsigned int);
12+/* void srandom(unsigned int); */ 12+/* void srandom(unsigned int); */
13 #else 13 #else
14 int srandom(unsigned int); 14 int srandom(unsigned int);
15 #endif /* BSD4_4 */ 15 #endif /* BSD4_4 */
 16@@ -97,7 +97,6 @@ void HelpInit(Widget top);
 17 void GetDefaultWH(int *w, int *h);
 18 char *GetDefaultRC(void);
 19 void SetIconImage(Widget w);
 20-void main(int argc, char *argv[]);
 21
 22 /* misc.c */
 23 Widget GetToplevel(Widget w);

cvs diff -r1.1 -r1.2 pkgsrc/graphics/xart/patches/patch-ak (expand / switch to unified diff)

--- pkgsrc/graphics/xart/patches/patch-ak 2006/08/09 17:13:58 1.1
+++ pkgsrc/graphics/xart/patches/patch-ak 2011/12/05 22:48:59 1.2
@@ -1,13 +1,22 @@ @@ -1,13 +1,22 @@
1$NetBSD: patch-ak,v 1.1 2006/08/09 17:13:58 darcy Exp $ 1$NetBSD: patch-ak,v 1.2 2011/12/05 22:48:59 joerg Exp $
2 2
3--- xpaint.h.orig 1998-04-13 00:27:17.000000000 -0400 3--- xpaint.h.orig 1998-04-13 04:27:17.000000000 +0000
4+++ xpaint.h 4+++ xpaint.h
5@@ -45,8 +45,6 @@ 5@@ -19,6 +19,8 @@
 6 #include <sys/param.h>
 7 #endif
 8
 9+#include <stdio.h>
 10+
 11 #ifndef MIN
 12 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
 13 #endif
 14@@ -45,8 +47,6 @@
6 #define NULL 0 15 #define NULL 0
7 #endif /* AIXV3 */ 16 #endif /* AIXV3 */
8  17
9-extern int nib; 18-extern int nib;
10- 19-
11 extern struct Global_s { 20 extern struct Global_s {
12 struct { 21 struct {
13 void *image; 22 void *image;

File Added: pkgsrc/graphics/xart/patches/patch-image.h
$NetBSD: patch-image.h,v 1.1 2011/12/05 22:48:59 joerg Exp $

--- image.h.orig	1998-03-10 07:33:31.000000000 +0000
+++ image.h
@@ -1,6 +1,8 @@
 #ifndef __IMAGE_H__
 #define __IMAGE_H__
 
+#include <X11/Xlib.h>
+
 /* +-------------------------------------------------------------------+ */
 /* | Copyright (C) 1993, David Koblas (koblas@netcom.com)              | */
 /* | Copyright 1995, 1996 Torsten Martinsen (bullestock@dk-online.dk)  | */
@@ -64,7 +66,6 @@ typedef struct {
     unsigned long sourceMask;
 } Image;
 
-#ifdef _XLIB_H_
 /* Used to transfer information to routines in iprocess.c */
 struct imageprocessinfo {
     int oilArea;
@@ -86,8 +87,6 @@ struct imageprocessinfo {
     XColor *background;
 };
 
-#endif
-
 #define ImagePixel(image, x, y)						\
 	(((image)->cmapSize == 0)					\
 	  ? &((image)->data[((y) * (image)->width + (x)) * 3])		\

File Added: pkgsrc/graphics/xart/patches/patch-main.c
$NetBSD: patch-main.c,v 1.1 2011/12/05 22:48:59 joerg Exp $

--- main.c.orig	1998-04-16 01:17:10.000000000 +0000
+++ main.c
@@ -18,6 +18,7 @@
 #include <X11/Intrinsic.h>
 #include <X11/Shell.h>
 #include <X11/StringDefs.h>
+#include <ctype.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <time.h>
@@ -47,7 +48,7 @@ static char *appDefaults[] =
     NULL
 };
 
-gcFunction = 3;
+int gcFunction = 3;
 
 typedef struct {
     String visualType;
@@ -272,7 +273,7 @@ GetFutureVisual(Widget *toplevel, int de
 }
 
 
-void 
+int
 main(int argc, char *argv[])
 {
     Display *dpy;

File Added: pkgsrc/graphics/xart/patches/patch-protocol.c
$NetBSD: patch-protocol.c,v 1.1 2011/12/05 22:48:59 joerg Exp $

--- protocol.c.orig	2011-12-05 20:27:50.000000000 +0000
+++ protocol.c
@@ -21,6 +21,7 @@
 #include <X11/cursorfont.h>
 #include <sys/time.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 #include "xpaint.h"
 #include "misc.h"

File Added: pkgsrc/graphics/xart/patches/patch-rw_readGIF.c
$NetBSD: patch-rw_readGIF.c,v 1.1 2011/12/05 22:48:59 joerg Exp $

--- rw/readGIF.c.orig	2011-12-05 20:25:31.000000000 +0000
+++ rw/readGIF.c
@@ -43,7 +43,7 @@ struct {
     unsigned int ColorResolution;
     unsigned int Background;
     unsigned int AspectRatio;
-    int GrayScale;
+    int GrayScale2;
 } GifScreen;
 
 static struct {
@@ -137,7 +137,7 @@ ReadGIF(char *file)
 
     if (BitSet(buf[4], LOCALCOLORMAP)) {	/* Global Colormap */
 	if (ReadColorMap(fd, GifScreen.BitPixel, GifScreen.ColorMap,
-			 &GifScreen.GrayScale)) {
+			 &GifScreen.GrayScale2)) {
 	    RWSetMsg("error reading global colormap");
 	    fclose(fd);
 	    return image;
@@ -193,7 +193,7 @@ ReadGIF(char *file)
 	    image = ReadImage(fd, LM_to_uint(buf[4], buf[5]),
 			      LM_to_uint(buf[6], buf[7]),
 			      GifScreen.BitPixel, GifScreen.ColorMap,
-			      GifScreen.GrayScale, BitSet(buf[8], INTERLACE),
+			      GifScreen.GrayScale2, BitSet(buf[8], INTERLACE),
 			      imageCount != imageNumber);
 	}
     }

File Added: pkgsrc/graphics/xart/patches/patch-rw_readWriteXBM.c
$NetBSD: patch-rw_readWriteXBM.c,v 1.1 2011/12/05 22:48:59 joerg Exp $

--- rw/readWriteXBM.c.orig	2011-12-05 20:26:00.000000000 +0000
+++ rw/readWriteXBM.c
@@ -16,8 +16,7 @@
 
 #include <stdio.h>
+#include <string.h>
 #include "image.h"
 
-int strncmp(char *, char *, int);
-
 #define TRUE 1
 #define FALSE 0
@@ -57,7 +56,4 @@ int strncmp(char *, char *, int);
 #include <ctype.h>
 
-extern char *strrchr(char *, char);
-
-
 #define MAX_SIZE 255
 #define True 1

File Added: pkgsrc/graphics/xart/patches/patch-rw_readWriteXWD.c
$NetBSD: patch-rw_readWriteXWD.c,v 1.1 2011/12/05 22:48:59 joerg Exp $

--- rw/readWriteXWD.c.orig	2011-12-05 20:25:22.000000000 +0000
+++ rw/readWriteXWD.c
@@ -27,6 +27,7 @@
 
 #include "image.h"
 #include <stdio.h>
+#include <string.h>
 
 #include <X11/XWDFile.h>
 
@@ -59,7 +60,7 @@ void *calloc(int, int);
 #define ZPixmap		2
 
 #define StaticGray	0
-#define GrayScale	1
+#define GrayScale2	1
 #define StaticColor	2
 #define PseudoColor	3
 #define TrueColor	4
@@ -559,7 +560,7 @@ Image *
 	    scale = 256 / (1 << hdr.bits_per_pixel) - 1;
 	}
 	break;
-    default:			/* StaticColor, PseudoColor, GrayScale */
+    default:			/* StaticColor, PseudoColor, GrayScale2 */
 	if (image != NULL)
 	    break;
 	image = ImageNew(hdr.pixmap_width, hdr.pixmap_height);
@@ -586,7 +587,7 @@ Image *
     for (y = 0; y < image->height; y++) {
 	switch (hdr.visual_class) {
 	case StaticGray:
-	case GrayScale:
+	case GrayScale2:
 	case StaticColor:
 	case PseudoColor:
 	    for (x = 0; x < image->width; x++) {