diff options
-rw-r--r-- | games/powwow/Makefile | 4 | ||||
-rw-r--r-- | games/powwow/distinfo | 6 | ||||
-rw-r--r-- | games/powwow/files/patch-follow.c | 74 | ||||
-rw-r--r-- | games/powwow/files/patch-ptr.c | 17 | ||||
-rw-r--r-- | games/powwow/files/patch-ptr.h | 10 | ||||
-rw-r--r-- | games/powwow/files/patch-tty.c | 88 |
6 files changed, 184 insertions, 15 deletions
diff --git a/games/powwow/Makefile b/games/powwow/Makefile index ee785db85076..6b3878521b4d 100644 --- a/games/powwow/Makefile +++ b/games/powwow/Makefile @@ -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 diff --git a/games/powwow/distinfo b/games/powwow/distinfo index 30065f0c777f..879c7ac8ef93 100644 --- a/games/powwow/distinfo +++ b/games/powwow/distinfo @@ -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 diff --git a/games/powwow/files/patch-follow.c b/games/powwow/files/patch-follow.c index b6d5b51a3565..a201b02ccb11 100644 --- a/games/powwow/files/patch-follow.c +++ b/games/powwow/files/patch-follow.c @@ -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, <csave); - 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, <c); + #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, <csave); + #else /* not USE_SGTTY */ ++#if POSIX ++ tcsetattr(0, TCSANOW, &ttybsave); ++#else + ioctl(0, TCSETS, &ttybsave); ++#endif + #endif /* USE_SGTTY */ + } + diff --git a/games/powwow/files/patch-ptr.c b/games/powwow/files/patch-ptr.c new file mode 100644 index 000000000000..2204aefb4463 --- /dev/null +++ b/games/powwow/files/patch-ptr.c @@ -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) + { diff --git a/games/powwow/files/patch-ptr.h b/games/powwow/files/patch-ptr.h new file mode 100644 index 000000000000..1401af6d38cc --- /dev/null +++ b/games/powwow/files/patch-ptr.h @@ -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_ */ diff --git a/games/powwow/files/patch-tty.c b/games/powwow/files/patch-tty.c new file mode 100644 index 000000000000..caf031e21da9 --- /dev/null +++ b/games/powwow/files/patch-tty.c @@ -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, <c); + #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, <csave); + #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 */ + } |