summaryrefslogtreecommitdiff
path: root/graphics/xpaint
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-02-05 11:43:15 +0000
committeragc <agc@pkgsrc.org>1998-02-05 11:43:15 +0000
commit8b403407fbec104a722845a0fb1180faab57ef2b (patch)
tree801f294d5306f8f62d7c2b84beb74456013028d6 /graphics/xpaint
parent2ddf8f3af7b592c00790eac6c7f7ff3028b0ec2c (diff)
downloadpkgsrc-8b403407fbec104a722845a0fb1180faab57ef2b.tar.gz
Use mkstemp(), rather than a combination of mktemp() and open()
Generalise Local.config to use LOCALBASE and X11BASE definitions, rather than using hard-coded paths. Add PNG definitions to the *BSDArchitecture definitions in Local.config
Diffstat (limited to 'graphics/xpaint')
-rw-r--r--graphics/xpaint/patches/patch-ad52
1 files changed, 52 insertions, 0 deletions
diff --git a/graphics/xpaint/patches/patch-ad b/graphics/xpaint/patches/patch-ad
index 01365468594..7e33de90d73 100644
--- a/graphics/xpaint/patches/patch-ad
+++ b/graphics/xpaint/patches/patch-ad
@@ -12,3 +12,55 @@
#define XTIMEOUT ((unsigned long)(1.5*1000/HZ)) /* ms, should be larger than 1000/HZ */
typedef struct {
+--- readRC.c 1998/02/04 16:36:16 1.1
++++ readRC.c 1998/02/04 16:41:52
+@@ -64,6 +64,9 @@
+ static FILE *
+ openTemp(char **np)
+ {
++#ifdef __NetBSD__
++ int fd;
++#endif
+ char *n;
+ char xx[256];
+
+@@ -72,11 +75,20 @@
+
+ strcpy(xx, n);
+ strcat(xx, "/XPaintXXXXXXX");
++#ifdef __NetBSD__
++ if ((fd = mkstemp(xx)) < 0)
++ return (FILE *) NULL;
++ tempName[++tempIndex] = XtNewString(xx);
++ if (np != NULL)
++ *np = tempName[tempIndex];
++ return fdopen(fd, "w");
++#else
+ n = mktemp(xx);
+ tempName[++tempIndex] = XtNewString(n);
+ if (np != NULL)
+ *np = tempName[tempIndex];
+ return fopen(tempName[tempIndex], "w");
++#endif
+ }
+
+ static void
+--- Local.config.orig Wed Aug 13 19:36:11 1997
++++ Local.config Wed Feb 4 17:44:44 1998
+@@ -130,9 +130,11 @@
+ #if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) || \
+ defined(BSD386Architecture)
+ ARCH_DEFINES = -DHAVE_PARAM_H
+-TIFF_INCLUDE = -I/usr/local/include
+-TIFF_LIB = -L/usr/local/lib -ltiff
+-JPEG_INCLUDE = -I/usr/local/include
+-JPEG_LIB = -L/usr/local/lib -ljpeg
+-XPM_INCLUDE = -I/usr/X11R6/include/X11
++TIFF_INCLUDE = -I${LOCALBASE}/include
++TIFF_LIB = -L${LOCALBASE}/lib -ltiff
++JPEG_INCLUDE = -I${LOCALBASE}/include
++JPEG_LIB = -L${LOCALBASE}/lib -ljpeg
++PNG_INCLUDE = -I${LOCALBASE}/include/png
++PNG_LIB = -L${LOCALBASE}/lib -lpng -lz
++XPM_INCLUDE = -I${X11BASE}/include/X11
+ #endif