diff --git a/chinese/celvis/Makefile b/chinese/celvis/Makefile index f792123e4feb..09b852c43f12 100644 --- a/chinese/celvis/Makefile +++ b/chinese/celvis/Makefile @@ -1,28 +1,31 @@ PORTNAME= celvis PORTVERSION= 1.3 CATEGORIES= chinese editors MASTER_SITES= http://ftp.ist.utl.pt/pub/ctan/language/chinese/chtex/ DISTNAME= ${PORTNAME} MAINTAINER= ports@FreeBSD.org COMMENT= Vi/ex clone that speaks Chinese +DEPRECATED= Last upstream release was in 2001 +EXPIRATION_DATE= 2024-01-16 + USES= ncurses MAKE_ARGS= LIBS="${LDFLAGS} -lncurses" CFLAGS+= -Wno-error=return-type .include .if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 )) CFLAGS+= -Wno-error=incompatible-function-pointer-types .endif do-install: @# install target in celvis Makefile is not too good -- this is easier ${INSTALL_PROGRAM} ${WRKSRC}/celvis ${WRKSRC}/virec ${STAGEDIR}${PREFIX}/bin ${LN} -s celvis ${STAGEDIR}${PREFIX}/bin/cvi ${INSTALL_MAN} ${FILESDIR}/celvis.1 ${STAGEDIR}${MANPREFIX}/man/man1 .include diff --git a/chinese/celvis/files/patch-Makefile b/chinese/celvis/files/patch-Makefile index 7523bb055ad3..66900b345498 100644 --- a/chinese/celvis/files/patch-Makefile +++ b/chinese/celvis/files/patch-Makefile @@ -1,11 +1,11 @@ ---- Makefile.orig Thu May 16 03:09:50 1991 -+++ Makefile Sun Apr 2 11:44:47 2000 -@@ -22,7 +22,7 @@ +--- Makefile.orig 1991-05-15 19:09:50 UTC ++++ Makefile +@@ -22,7 +22,7 @@ EXTRA= SRC5= regexp.c regexp.h regsub.c sysdos.c system.c tinytcap.c tio.c tmp.c SRC6= vars.c vcmd.c vi.c vi.h ctags.c ref.c virec.c wildcard.c shell.c EXTRA= -CFLAGS= -O +CFLAGS+= -D_HAVE_PARAM_H LIBS= -ltermcap all: $(PROGS) diff --git a/chinese/celvis/files/patch-blk.c b/chinese/celvis/files/patch-blk.c index 922b0d371270..b9dbf5296145 100644 --- a/chinese/celvis/files/patch-blk.c +++ b/chinese/celvis/files/patch-blk.c @@ -1,12 +1,12 @@ ---- blk.c.orig Tue Nov 6 11:53:55 1990 -+++ blk.c Thu Aug 15 04:47:18 1996 +--- blk.c.orig 1990-11-06 19:53:55 UTC ++++ blk.c @@ -19,7 +19,9 @@ # define NBUFS 5 /* must be at least 3 -- more is better */ #endif +#if !(defined(BSD) && (BSD >= 199103)) extern long lseek(); +#endif /*------------------------------------------------------------------------*/ diff --git a/chinese/celvis/files/patch-cmd1.c b/chinese/celvis/files/patch-cmd1.c index 6badcd280f92..16ff82e492b7 100644 --- a/chinese/celvis/files/patch-cmd1.c +++ b/chinese/celvis/files/patch-cmd1.c @@ -1,22 +1,22 @@ ---- cmd1.c.orig Tue Nov 6 11:53:55 1990 -+++ cmd1.c Sat Aug 17 15:18:01 1996 -@@ -882,9 +882,6 @@ +--- cmd1.c.orig 1990-11-06 19:53:55 UTC ++++ cmd1.c +@@ -882,9 +882,6 @@ void cmd_version(frommark, tomark, cmd, bang, extra) #else msg("%s (%s)", VERSION, DATE); #endif -#ifdef COMPILED_BY - msg("Compiled by %s", COMPILED_BY); -#endif #ifdef CREDIT msg("%s", CREDIT); #endif -@@ -893,6 +890,9 @@ +@@ -893,6 +890,9 @@ void cmd_version(frommark, tomark, cmd, bang, extra) #endif #ifdef CVERSION msg("%s", CVERSION); +#endif +#ifdef COMPILED_BY + msg("Compiled by %s", COMPILED_BY); #endif #ifdef COPYING msg("%s", COPYING); diff --git a/chinese/celvis/files/patch-config.h b/chinese/celvis/files/patch-config.h index ca841f2f5c76..28e2520f820f 100644 --- a/chinese/celvis/files/patch-config.h +++ b/chinese/celvis/files/patch-config.h @@ -1,30 +1,30 @@ ---- config.h.orig Tue Nov 6 11:53:55 1990 -+++ config.h Thu Aug 15 05:42:16 1996 +--- config.h.orig 1990-11-06 19:53:55 UTC ++++ config.h @@ -5,6 +5,10 @@ */ /*************************** autoconf section ************************/ +/* Can we tell a little more about this system? */ +#ifdef _HAVE_PARAM_H +# include +#endif /* standard unix V (?) */ #ifdef M_SYSV -@@ -175,9 +179,15 @@ +@@ -175,9 +179,15 @@ extern char *malloc(); #endif /******************* Names of files and environment vars **********************/ +#if (defined(BSD) && (BSD >= 199103)) +# define TMPDIR "/var/tmp" /* directory where temp files live */ +# define COMPILED_BY "{Free,Net,Open,4.4,4.3/Reno}BSD (ported by David O'Brien)" +#endif #if ANY_UNIX -# define TMPDIR "/usr/tmp" /* directory where temp files live */ +# ifndef TMPDIR +# define TMPDIR "/usr/tmp" /* directory where temp files live */ +# endif # define TMPNAME "%s/elvt%04x%03x" /* temp file */ # define CUTNAME "%s/elvc%04x%03x" /* cut buffer's temp file */ # define EXRC ".exrc" /* init file in current directory */ diff --git a/chinese/celvis/files/patch-curses.c b/chinese/celvis/files/patch-curses.c index 35a4d1e02cf7..abc2f3d774b5 100644 --- a/chinese/celvis/files/patch-curses.c +++ b/chinese/celvis/files/patch-curses.c @@ -1,67 +1,67 @@ The following patch seems to fix celvis on my machine. Just place it in the files/ directory. ---- curses.c 1991-09-21 23:42:07.000000000 +0200 -+++ curses.c 2007-12-31 15:40:30.000000000 +0100 +--- curses.c.orig 1991-09-21 21:42:07 UTC ++++ curses.c @@ -17,8 +17,13 @@ #include "config.h" #include "vi.h" +#undef BSD +#undef UNIXV +#define BSD 0 +#define UNIXV 1 + #if UNIXV -# include +# include #endif #if BSD || UNIX7 || MINIX -@@ -86,8 +91,8 @@ +@@ -86,8 +91,8 @@ char ERASEKEY; /* backspace key taken from ioctl struc char ERASEKEY; /* backspace key taken from ioctl structure */ #if UNIXV -static struct termio oldtermio; /* original tty mode */ -static struct termio newtermio; /* raw/noecho tty mode */ +static struct termios oldtermio; /* original tty mode */ +static struct termios newtermio; /* raw/noecho tty mode */ #endif #if BSD || UNIX7 || MINIX -@@ -133,7 +138,7 @@ +@@ -133,7 +138,7 @@ initscr() /* change the terminal mode to raw/noecho */ #if UNIXV - ioctl(2, TCGETA, &oldtermio); + tcgetattr(2, &oldtermio); #endif #if BSD || UNIX7 || MINIX -@@ -170,7 +175,7 @@ +@@ -170,7 +175,7 @@ suspend_curses() /* change the terminal mode back the way it was */ #if UNIXV - ioctl(2, TCSETAW, &oldtermio); + tcsetattr(2, TCSADRAIN, &oldtermio); #endif #if BSD || UNIX7 || MINIX ioctl(2, TIOCSETP, &oldsgttyb); -@@ -190,7 +195,7 @@ +@@ -190,7 +195,7 @@ resume_curses(quietly) { /* change the terminal mode to raw/noecho */ #if UNIXV - ospeed = (oldtermio.c_cflag & CBAUD); + ospeed = cfgetospeed(&oldtermio); ERASEKEY = oldtermio.c_cc[VERASE]; newtermio = oldtermio; newtermio.c_iflag &= (IXON|IXOFF|IXANY|ISTRIP|IGNBRK); -@@ -199,7 +204,7 @@ +@@ -199,7 +204,7 @@ resume_curses(quietly) newtermio.c_cc[VINTR] = ctrl('C'); /* always use ^C for interrupts */ newtermio.c_cc[VEOF] = 1; /* minimum # characters to read */ newtermio.c_cc[VEOL] = 2; /* allow at least 0.2 seconds */ - ioctl(2, TCSETAW, &newtermio); + tcsetattr(2, TCSADRAIN, &newtermio); #endif #if BSD || UNIX7 || MINIX struct tchars tbuf; diff --git a/chinese/celvis/files/patch-cut.c b/chinese/celvis/files/patch-cut.c index b8ac3779f5ce..8c695c1593d0 100644 --- a/chinese/celvis/files/patch-cut.c +++ b/chinese/celvis/files/patch-cut.c @@ -1,10 +1,10 @@ ---- cut.c.orig Wed May 30 19:50:50 2007 -+++ cut.c Wed May 30 19:51:41 2007 -@@ -36,6 +36,7 @@ +--- cut.c.orig 1991-04-03 20:41:47 UTC ++++ cut.c +@@ -36,6 +36,7 @@ static char cbname; /* name chosen for next cut/paste static char cbname; /* name chosen for next cut/paste operation */ +static cutfree(struct cutbuf *buf); #ifndef NO_RECYCLE /* This function builds a list of all blocks needed in the current tmp file diff --git a/chinese/celvis/files/patch-recycle.c b/chinese/celvis/files/patch-recycle.c index 19c7eead9320..72aa0eac06c8 100644 --- a/chinese/celvis/files/patch-recycle.c +++ b/chinese/celvis/files/patch-recycle.c @@ -1,12 +1,12 @@ ---- recycle.c.orig Tue Nov 6 11:53:56 1990 -+++ recycle.c Thu Aug 15 04:51:43 1996 +--- recycle.c.orig 1990-11-06 19:53:56 UTC ++++ recycle.c @@ -18,7 +18,9 @@ #ifndef NO_RECYCLE /* this whole file would have be skipped if NO_RECYCLE is defined */ +#if !(defined(BSD) && (BSD >= 199103)) extern long lseek(); +#endif #define BTST(bitno, byte) ((byte) & (1 << (bitno))) #define BSET(bitno, byte) ((byte) |= (1 << (bitno))) diff --git a/chinese/celvis/files/patch-tmp.c b/chinese/celvis/files/patch-tmp.c index 45c094e69013..a27346bf7e90 100644 --- a/chinese/celvis/files/patch-tmp.c +++ b/chinese/celvis/files/patch-tmp.c @@ -1,28 +1,28 @@ ---- tmp.c.orig Thu Aug 15 04:45:57 1996 -+++ tmp.c Thu Aug 15 05:14:50 1996 +--- tmp.c.orig 1991-09-21 21:42:17 UTC ++++ tmp.c @@ -21,6 +21,7 @@ /* The FAIL() macro prints an error message and then exits. */ #define FAIL(why,arg) mode = MODE_EX; msg(why, arg); endwin(); HZ_abort(9) +#define FAIL2(why,arg1,arg2) mode = MODE_EX; msg(why, arg1, arg2); endwin(); HZ_abort(9) /* This is the name of the temp file */ static char tmpname[80]; -@@ -91,7 +92,7 @@ +@@ -91,7 +92,7 @@ int tmpstart(filename) if (*o_readonly || (statb.st_mode & S_IJRON)) #endif #if OS9 - if we don't have write permission... + /* if we don't have write permission... */ #endif #if ANY_UNIX if (*o_readonly || !(statb.st_mode & -@@ -149,7 +150,7 @@ +@@ -149,7 +150,7 @@ int tmpstart(filename) tmpfd = open(tmpname, O_RDWR | O_BINARY); if (tmpfd < 0) { - FAIL("Can't create temporary file, errno=%d", errno); + FAIL2("Can't create temporary file (%s), errno=%d", tmpname, errno); return 1; } diff --git a/chinese/celvis/files/patch-vi.h b/chinese/celvis/files/patch-vi.h index 735ad96ff5c4..a696005f31f0 100644 --- a/chinese/celvis/files/patch-vi.h +++ b/chinese/celvis/files/patch-vi.h @@ -1,11 +1,11 @@ ---- vi.h.orig Sun Oct 20 19:08:33 1991 -+++ vi.h Thu Aug 15 04:45:45 1996 -@@ -101,7 +101,7 @@ +--- vi.h.orig 1991-10-21 02:08:33 UTC ++++ vi.h +@@ -101,7 +101,7 @@ extern struct _viflags #define READONLY 0x0002 /* the file is read-only */ #define HADNUL 0x0004 /* the file contained NUL characters */ #define MODIFIED 0x0008 /* the file has been modified */ -#define NOFILE 0x0010 /* no name is known for the current text */ +#define NOFILENAME 0x0010 /* no name is known for the current text */ #define ADDEDNL 0x0020 /* newlines were added to the file */ /* macros used to set/clear/test flags */