Upgrade to xpaint-2.5.7

Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
PR:		ports/17464
This commit is contained in:
Justin M. Seger 2000-03-21 15:45:59 +00:00
parent 82562dd107
commit 17fa90d0d0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=26916
9 changed files with 167 additions and 19 deletions

View File

@ -1,25 +1,24 @@
# New ports collection makefile for: xpaint
# Version required: 2.5.6
# Date created: 2 Jan 1995
# Whom: swallace
# New ports collection makefile for: xpaint
# Version required: 2.5.7
# Date created: 2 Jan 1995
# Whom: swallace
#
# $FreeBSD$
#
DISTNAME= xpaint-2.5.6
DISTNAME= xpaint-2.5.7
CATEGORIES= graphics
MASTER_SITES= http://www.image.dk/~torsten/xpaint/ \
ftp://ftp.win.or.jp/pub/graphics/
MASTER_SITES= http://home.worldonline.dk/~torsten/xpaint/ \
ftp://ftp.win.ne.jp/pub/graphics/
MAINTAINER= jseger@FreeBSD.org
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
tiff.4:${PORTSDIR}/graphics/tiff \
LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff \
Xpm.4:${PORTSDIR}/graphics/xpm \
png.3:${PORTSDIR}/graphics/png
WRKSRC= ${WRKDIR}/xpaint
USE_IMAKE= yes
USE_IMAKE= yes
MAN1= xpaint.1
.include <bsd.port.mk>

View File

@ -1 +1 @@
MD5 (xpaint-2.5.6.tar.gz) = 16ca24ab07a59ed1a69ef59b7a541f2c
MD5 (xpaint-2.5.7.tar.gz) = 878f6773a46ad2354772b17b1a9f3963

View File

@ -1,13 +1,19 @@
--- Local.config.orig Mon Nov 23 23:09:51 1998
+++ Local.config Mon Nov 23 23:10:04 1998
@@ -142,8 +142,8 @@
--- Local.config.orig Sun Jun 28 03:43:56 1998
+++ Local.config Fri Mar 17 00:32:44 2000
@@ -142,9 +142,11 @@
#if defined(FreeBSDArchitecture)
ARCH_DEFINES = -DHAVE_PARAM_H
-TIFF_INCLUDE = -I/usr/local/include/tiff34
-TIFF_LIB = -L/usr/local/lib -ltiff34
+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
-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 -Wl,-rpath,${LOCALBASE}/lib -ltiff
+JPEG_INCLUDE = -I${LOCALBASE}/include
+JPEG_LIB = -L${LOCALBASE}/lib -Wl,-rpath,${LOCALBASE}/lib -ljpeg
+PNG_INCLUDE = -I${LOCALBASE}/include
+PNG_LIB = -L${LOCALBASE}/lib -Wl,-rpath,${LOCALBASE}/lib -lpng -lz
+XPM_INCLUDE = -I$(INCDIR)/X11
#endif

View File

@ -0,0 +1,20 @@
--- fileName.c.orig Wed Feb 25 05:38:43 1998
+++ fileName.c Fri Mar 17 00:46:02 2000
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
-#if defined(SYSV) || defined(SVR4) || defined(__CYGWIN32__)
+#if defined(SYSV) || defined(SVR4) || defined(__CYGWIN32__) || defined(__FreeBSD__)
#include <dirent.h>
#else
#include <sys/dir.h>
@@ -375,7 +375,7 @@
setCWD(arg_t * arg, char *dir)
{
DIR *dirp;
-#if defined(SYSV) || defined(SVR4) || defined(__alpha) || defined(__CYGWIN32__)
+#if defined(SYSV) || defined(SVR4) || defined(__alpha) || defined(__CYGWIN32__) || defined(__FreeBSD__)
struct dirent *e;
#else
struct direct *e;

View File

@ -0,0 +1,11 @@
--- main.c.orig Wed Jun 10 06:14:27 1998
+++ main.c Fri Mar 17 01:18:33 2000
@@ -275,7 +275,7 @@
}
-void
+int
main(int argc, char *argv[])
{
Display *dpy;

View File

@ -0,0 +1,20 @@
--- misc.h.orig Wed Jun 10 06:07:47 1998
+++ misc.h Fri Mar 17 01:34:25 2000
@@ -23,7 +23,7 @@
long random(void);
#endif
-#if !defined(linux) & !defined(__EMX__) & !defined(__FreeBSD__)
+#if !defined(linux) & !defined(__EMX__) & !defined(__FreeBSD__) & !defined(__OpenBSD__)
#if defined(BSD4_4) || defined(HPArchitecture) || defined(SGIArchitecture) || defined(_AIX) || defined(_SCO_DS)
void srandom(unsigned int);
#else
@@ -102,7 +102,7 @@
void GetDefaultWH(int *w, int *h);
char *GetDefaultRC(void);
void SetIconImage(Widget w);
-void main(int argc, char *argv[]);
+int main(int argc, char *argv[]);
/* misc.c */
Widget GetToplevel(Widget w);

View File

@ -0,0 +1,47 @@
--- readRC.c.orig Tue Jun 25 17:50:39 1996
+++ readRC.c Fri Mar 17 01:27:49 2000
@@ -30,11 +30,13 @@
#include <unistd.h>
#endif
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
#ifdef __STDC__
extern char *mktemp(char *);
#else
extern char *mktemp();
#endif /* __STDC__ */
+#endif
#define RC_FILENAME ".XPaintrc"
@@ -64,6 +66,9 @@
static FILE *
openTemp(char **np)
{
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ int fd;
+#endif
char *n;
char xx[256];
@@ -72,11 +77,20 @@
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);
tempName[++tempIndex] = XtNewString(n);
if (np != NULL)
*np = tempName[tempIndex];
return fopen(tempName[tempIndex], "w");
+#endif
}
static void

View File

@ -0,0 +1,27 @@
--- rw/libpnmrw.c.orig Wed Jun 10 06:08:57 1998
+++ rw/libpnmrw.c Fri Mar 17 01:40:21 2000
@@ -46,7 +46,7 @@
void *malloc(int);
void free(void *);
-#if defined(__EMX__) || defined(__CYGWIN32__)
+#if defined(__EMX__) || defined(__CYGWIN32__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <errno.h>
#endif
@@ -131,6 +131,7 @@
static void
pm_perror(char *reason)
{
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
#if defined(BSD4_4)
__const extern char *__const sys_errlist[];
#else
@@ -140,6 +141,7 @@
#endif
#if !defined(__EMX__) || defined(__CYGWIN32__)
extern int errno;
+#endif
#endif
char *e;

View File

@ -0,0 +1,18 @@
--- rw/rwTable.c.orig Wed Jun 10 06:09:32 1998
+++ rw/rwTable.c Fri Mar 17 01:20:54 2000
@@ -231,6 +231,7 @@
char *
RWGetMsg()
{
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
#if defined(BSD4_4)
__const extern char *__const sys_errlist[];
#else
@@ -239,6 +240,7 @@
#endif
#endif
extern int errno;
+#endif
if (RWtableMsg[0] == '\0') {
if (errno == 0)