aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorsf <sf@FreeBSD.org>2001-03-09 03:39:07 +0800
committersf <sf@FreeBSD.org>2001-03-09 03:39:07 +0800
commita58f35c1dfaf15ffaaa40201d8bf006ad349f694 (patch)
treef8b715ddf699888fbcfe028cb8be7924fe014c88 /graphics
parent1e607deb8d206b084f1edfd1be792af6d65ddbe3 (diff)
downloadfreebsd-ports-gnome-a58f35c1dfaf15ffaaa40201d8bf006ad349f694.tar.gz
freebsd-ports-gnome-a58f35c1dfaf15ffaaa40201d8bf006ad349f694.tar.zst
freebsd-ports-gnome-a58f35c1dfaf15ffaaa40201d8bf006ad349f694.zip
fix usage of mkstemp().
PR: 25616 Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/xpaint/Makefile1
-rw-r--r--graphics/xpaint/files/patch-aa10
-rw-r--r--graphics/xpaint/files/patch-ae30
3 files changed, 23 insertions, 18 deletions
diff --git a/graphics/xpaint/Makefile b/graphics/xpaint/Makefile
index 33dc5cd02d91..70b9ae773440 100644
--- a/graphics/xpaint/Makefile
+++ b/graphics/xpaint/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xpaint
PORTVERSION= 2.6.1
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= http://home.worldonline.dk/~torsten/xpaint/ \
ftp://ftp.win.ne.jp/pub/graphics/
diff --git a/graphics/xpaint/files/patch-aa b/graphics/xpaint/files/patch-aa
index c27443ad25ad..05858b79afcf 100644
--- a/graphics/xpaint/files/patch-aa
+++ b/graphics/xpaint/files/patch-aa
@@ -1,14 +1,16 @@
---- Local.config.orig Sun Jun 28 03:43:56 1998
-+++ Local.config Fri Mar 17 00:32:44 2000
-@@ -142,9 +142,11 @@
+--- Local.config.orig Sun Sep 3 07:02:09 2000
++++ Local.config Fri Mar 9 03:26:06 2001
+@@ -141,10 +141,12 @@
+ #endif
#if defined(FreeBSDArchitecture)
- ARCH_DEFINES = -DHAVE_PARAM_H
+-ARCH_DEFINES = -DHAVE_PARAM_H
-TIFF_INCLUDE = -I/usr/local/include/tiff34
-TIFF_LIB = -L/usr/local/lib -ltiff34
-JPEG_INCLUDE = -I/usr/local/include
-JPEG_LIB = -L/usr/local/lib -ljpeg
-XPM_INCLUDE = -I/usr/X11R6/include/X11
++ARCH_DEFINES = -DHAVE_PARAM_H -DHAVE_MKSTEMP
+TIFF_INCLUDE = -I${LOCALBASE}/include
+TIFF_LIB = -L${LOCALBASE}/lib -Wl,-rpath,${LOCALBASE}/lib -ltiff
+JPEG_INCLUDE = -I${LOCALBASE}/include
diff --git a/graphics/xpaint/files/patch-ae b/graphics/xpaint/files/patch-ae
index 332b942a8c28..7e524c66b6a5 100644
--- a/graphics/xpaint/files/patch-ae
+++ b/graphics/xpaint/files/patch-ae
@@ -1,10 +1,10 @@
---- readRC.c.orig Tue Jun 25 17:50:39 1996
-+++ readRC.c Fri Mar 17 01:27:49 2000
+--- readRC.c.orig Sun Sep 3 07:07:09 2000
++++ readRC.c Fri Mar 9 03:31:53 2001
@@ -30,11 +30,13 @@
#include <unistd.h>
#endif
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
++#ifndef HAVE_MKSTEMP
#ifdef __STDC__
extern char *mktemp(char *);
#else
@@ -14,32 +14,34 @@
#define RC_FILENAME ".XPaintrc"
-@@ -64,6 +66,9 @@
+@@ -64,19 +66,32 @@
static FILE *
openTemp(char **np)
{
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++#ifdef HAVE_MKSTEMP
+ int fd;
+#endif
char *n;
char xx[256];
-@@ -72,11 +77,20 @@
+ if ((n = getenv("TMPDIR")) == NULL)
+ n = "/tmp";
++#ifdef HAVE_MKSTEMP
++ snprintf(xx, 256, "%s/%s", n, "/XPaintXXXXXXX");
++ fd = mkstemp(xx);
++ n = xx;
++#else
strcpy(xx, n);
strcat(xx, "/XPaintXXXXXXX");
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
-+ if ((fd = mkstemp(xx) < 0))
-+ return (FILE *) NULL;
-+ tempName[++tempIndex] = XtNewString(n);
-+ if (np != NULL)
-+ *np = tempName[tempIndex];
-+ return fdopen(fd, "w");
-+#else
n = mktemp(xx);
++#endif
tempName[++tempIndex] = XtNewString(n);
if (np != NULL)
*np = tempName[tempIndex];
++#ifdef HAVE_MKSTEMP
++ return fdopen(fd, "w");
++#else
return fopen(tempName[tempIndex], "w");
+#endif
}