1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-06 11:41:52 +00:00

- Update to 1.2.13

PR:		ports/124637
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua>
Approved by:	maintainer
This commit is contained in:
Pav Lucistnik 2008-06-18 20:47:42 +00:00
parent 87eb81a7db
commit 1e0e46e9bc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=215122
6 changed files with 184 additions and 15 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= powwow
PORTVERSION= 1.2.10
PORTVERSION= 1.2.13
CATEGORIES= games
MASTER_SITES= http://hoopajoo.net/static/projects/ \
ftp://ftp.wilbury.sk/pub/FreeBSD/local/distfiles/
@ -15,7 +15,6 @@ MAINTAINER= otis@sk.FreeBSD.org
COMMENT= Client to play MUDs
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-bsd
MAN6= powwow.6
@ -28,6 +27,7 @@ BROKEN= does not compile
pre-build:
@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/defines.h \
${WRKSRC}/list.c ${WRKSRC}/main.c ${WRKSRC}/cmd2.c ${WRKSRC}/beam.c
@${REINPLACE_CMD} -e 's|^DEFS = |DEFS = -DPOSIX |' ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/powwow ${PREFIX}/bin

View File

@ -1,3 +1,3 @@
MD5 (powwow-1.2.10.tar.gz) = f8d948d5a0cb5fd1e74d05ad1420441a
SHA256 (powwow-1.2.10.tar.gz) = fd556e876529ac5b1c8be915b9750a45ff5cde8ec88e66befe88a56844f9799b
SIZE (powwow-1.2.10.tar.gz) = 257811
MD5 (powwow-1.2.13.tar.gz) = 42240a569c7fba837aa140f084de55ed
SHA256 (powwow-1.2.13.tar.gz) = be22d1d8f12b89d70375e1657eb7d746a338d606a4afe29f8fa5b423bf7415ef
SIZE (powwow-1.2.13.tar.gz) = 274569

View File

@ -1,11 +1,65 @@
--- follow.c.orig Sat Oct 14 00:12:28 2006
+++ follow.c Sat Oct 14 00:12:43 2006
@@ -96,7 +96,7 @@
ioctl(0, TIOCGLTC, &ltcsave);
ttyb = ttybsave;
ttyb.sg_flags = (ttyb.sg_flags|O_CBREAK) & ~O_ECHO;
- ioctl(tty_read_fd, TIOCSETP, &ttyb);
+ ioctl(0, TIOCSETP, &ttyb);
ltc = ltcsave;
ltc.t_suspc = -1;
Index: follow.c
@@ -13,7 +13,9 @@
#include <sys/time.h>
#include <sys/types.h>
-#ifndef USE_SGTTY
+#ifdef POSIX
+# include <termios.h>
+#elif !defined(USE_SGTTY)
# ifdef APOLLO
# include "/sys5.3/usr/include/sys/termio.h"
# else
@@ -44,6 +46,9 @@
# define O_CBREAK CBREAK
#endif
+#ifdef POSIX
+typedef struct termios termiostruct;
+#else
#if defined(TCSETS) || defined(TCSETATTR)
# ifndef TCSETS /* cc for HP-UX SHOULD define this... */
# define TCSETS TCSETATTR
@@ -55,6 +60,7 @@
# define TCGETS TCGETA
typedef struct termio termiostruct;
#endif
+#endif /* POSIX */
#ifdef VSUSP
# define O_SUSP VSUSP
@@ -102,14 +108,22 @@
ioctl(0, TIOCSLTC, &ltc);
#else /* not USE_SGTTY */
termiostruct ttyb;
+#if POSIX
+ tcgetattr(0, &ttyb);
+#else
ioctl(0, TCGETS, &ttyb);
+#endif
ttybsave = ttyb;
ttyb.c_lflag &= ~(ECHO|ICANON);
ttyb.c_cc[VTIME] = 0;
ttyb.c_cc[VMIN] = 1;
/* disable the special handling of the suspend key (handle it ourselves) */
ttyb.c_cc[O_SUSP] = 0;
+#if POSIX
+ tcsetattr(0, TCSANOW, &ttyb);
+#else
ioctl(0, TCSETS, &ttyb);
+#endif
#endif /* USE_SGTTY */
}
@@ -123,7 +137,11 @@
ioctl(0, TIOCSETC, &tcsave);
ioctl(0, TIOCSLTC, &ltcsave);
#else /* not USE_SGTTY */
+#if POSIX
+ tcsetattr(0, TCSANOW, &ttybsave);
+#else
ioctl(0, TCSETS, &ttybsave);
+#endif
#endif /* USE_SGTTY */
}

View File

@ -0,0 +1,17 @@
Index: ptr.c
@@ -407,6 +407,7 @@
return (char*)p; /* shortcut for NULL */
}
+#ifdef _GNU_SOURCE
/*
* find last occurrence of c in p
* return NULL if none found.
@@ -427,6 +428,7 @@
else
return NULL;
}
+#endif
char *ptrrchr __P2 (ptr,p, char,c)
{

View File

@ -0,0 +1,10 @@
Index: ptr.h
@@ -65,7 +65,7 @@
/* TODO: watch memrchr, it is defined differently here than under _GNU_SOURCE,
* so it could cause bizarre results if a module makes use of a library that
* uses it */
-char *memrchr __P ((char *p, int lenp, char c));
+//char *memrchr __P ((char *p, int lenp, char c));
#endif
#endif /* _PTR_H_ */

View File

@ -0,0 +1,88 @@
Index: tty.c
@@ -33,7 +33,9 @@
#include "tty.h"
#include "tcp.h"
-#ifndef USE_SGTTY
+#ifdef POSIX
+# include <termios.h>
+#elif !defined(USE_SGTTY)
# ifdef APOLLO
# include "/sys5.3/usr/include/sys/termio.h"
# else
@@ -64,6 +66,9 @@
# define O_CBREAK CBREAK
#endif
+#ifdef POSIX
+typedef struct termios termiostruct;
+#else
#if defined(TCSETS) || defined(TCSETATTR)
# ifndef TCSETS /* cc for HP-UX SHOULD define this... */
# define TCSETS TCSETATTR
@@ -75,6 +80,7 @@
# define TCGETS TCGETA
typedef struct termio termiostruct;
#endif
+#endif /* POSIX */
#ifdef VSUSP
# define O_SUSP VSUSP
@@ -181,14 +187,22 @@
ioctl(tty_read_fd, TIOCSLTC, &ltc);
#else /* not USE_SGTTY */
termiostruct ttyb;
+#if POSIX
+ tcgetattr(tty_read_fd, &ttyb);
+#else
ioctl(tty_read_fd, TCGETS, &ttyb);
+#endif
ttybsave = ttyb;
ttyb.c_lflag &= ~(ECHO|ICANON);
ttyb.c_cc[VTIME] = 0;
ttyb.c_cc[VMIN] = 1;
/* disable the special handling of the suspend key (handle it ourselves) */
ttyb.c_cc[O_SUSP] = 0;
+#if POSIX
+ tcsetattr(tty_read_fd, TCSANOW, &ttyb);
+#else
ioctl(tty_read_fd, TCSETS, &ttyb);
+#endif
#endif /* USE_SGTTY */
#ifdef USE_LOCALE
@@ -216,7 +230,11 @@
ioctl(tty_read_fd, TIOCSETC, &tcsave);
ioctl(tty_read_fd, TIOCSLTC, &ltcsave);
#else /* not USE_SGTTY */
+#if POSIX
+ tcsetattr(tty_read_fd, TCSANOW, &ttybsave);
+#else
ioctl(tty_read_fd, TCSETS, &ttybsave);
+#endif
#endif /* USE_SGTTY */
tty_puts(kpadend);
tty_flush();
@@ -251,7 +269,11 @@
#else /* not USE_SGTTY */
int i;
termiostruct ttyb;
+#if POSIX
+ tcgetattr(tty_read_fd, &ttyb);
+#else
ioctl(tty_read_fd, TCGETS, &ttyb);
+#endif
if (linemode & LM_CHAR) {
/* char-by-char mode: disable all special keys and set raw mode */
for(i = 0; i < NCCS; i++)
@@ -266,7 +288,11 @@
/* set cooked mode */
ttyb.c_oflag |= OPOST;
}
+#if POSIX
+ tcsetattr(tty_read_fd, TCSANOW, &ttyb);
+#else
ioctl(tty_read_fd, TCSETS, &ttyb);
+#endif
#endif /* USE_SGTTY */
}