aboutsummaryrefslogtreecommitdiff
path: root/japanese/rogue_s
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2008-02-04 17:03:48 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2008-02-04 17:03:48 +0000
commitae40d9715c9c52170824120ade18de7b13aa8dd5 (patch)
tree8c4c651a32bf9eaa8946e966450550b08acef526 /japanese/rogue_s
parentc0ec557460e115d806d3073dc12dc31749d92c4a (diff)
downloadports-ae40d9715c9c52170824120ade18de7b13aa8dd5.tar.gz
ports-ae40d9715c9c52170824120ade18de7b13aa8dd5.zip
Fix build error without sgtty.h, and investigate some terminal codes.
PR: ports/119113 Submitted by: Ed Schouten ed at fxq.nl Yoshihiko Sarumaru mistral at imasy.or.jp (maintainer) Approved by: Yoshihiko Sarumaru mistral at imasy.or.jp (maintainer)
Notes
Notes: svn path=/head/; revision=206717
Diffstat (limited to 'japanese/rogue_s')
-rw-r--r--japanese/rogue_s/Makefile1
-rw-r--r--japanese/rogue_s/files/patch-aa2
-rw-r--r--japanese/rogue_s/files/patch-ac93
3 files changed, 94 insertions, 2 deletions
diff --git a/japanese/rogue_s/Makefile b/japanese/rogue_s/Makefile
index ddd6729cb00a..c8df8ba90ef8 100644
--- a/japanese/rogue_s/Makefile
+++ b/japanese/rogue_s/Makefile
@@ -7,6 +7,7 @@
PORTNAME= rogue_s
PORTVERSION= 1.3a
+PORTREVISION= 1
CATEGORIES= japanese games
MASTER_SITES= ${MASTER_SITE_LOCAL} \
${MASTER_SITE_PORTS_JP:S,/%SUBDIR%/,/,}
diff --git a/japanese/rogue_s/files/patch-aa b/japanese/rogue_s/files/patch-aa
index f2bcf2b63762..dbb08caaaeb9 100644
--- a/japanese/rogue_s/files/patch-aa
+++ b/japanese/rogue_s/files/patch-aa
@@ -16,7 +16,7 @@
-#CFLAGS = -O -g -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO
-#LIBS =
+CC = cc
-+CFLAGS += -DUNIX -DUNIX_BSD4_2 -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -DCOLOR -DMESG_DIR=\"${PREFIX}/share/rogue\" -DLIST_MESSAGES
++CFLAGS += -DUNIX -DUNIX_SYSV -DUNIX_386BSD -DCURSES -DJAPAN -DEUC -DTOPSCO -DCOLOR -DMESG_DIR=\"${PREFIX}/share/rogue\" -DLIST_MESSAGES
+LIBS =
# for NeXT (Japanese, using jcurses of NeXT) by Yasha
diff --git a/japanese/rogue_s/files/patch-ac b/japanese/rogue_s/files/patch-ac
index 8aa0de2b014f..16861da99662 100644
--- a/japanese/rogue_s/files/patch-ac
+++ b/japanese/rogue_s/files/patch-ac
@@ -1,6 +1,70 @@
--- machdep.c.orig Mon Sep 14 14:40:12 1992
+++ machdep.c Fri Dec 4 00:22:26 1998
-@@ -397,9 +397,9 @@
+@@ -54,9 +54,10 @@
+ # include <sys/types.h>
+ # include <sys/file.h>
+ # include <sys/stat.h>
++# include <sys/ioctl.h>
+ # ifdef UNIX_SYSV
+ # include <time.h>
+-# include <termio.h>
++# include <termios.h>
+ # endif /* UNIX_SYSV */
+ # ifdef UNIX_BSD4_2
+ # include <sys/time.h>
+@@ -268,13 +269,7 @@
+ #ifdef UNIX
+ long ln = 0;
+
+-#ifdef UNIX_BSD4_2
+ ioctl(0, FIONREAD, &ln);
+-#endif /* UNIX_BSD4_2 */
+-#ifdef UNIX_SYSV
+- ioctl(0, TCFLSH, &ln);
+- ln = 0;
+-#endif /* UNIX_SYSV */
+ #ifdef UNIX_386BSD
+ fpurge(stdin);
+ #else
+@@ -334,8 +329,8 @@
+ struct tchars tc_temp;
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- static struct termio _oldtty;
+- struct termio _tty;
++ static struct termios _oldtty;
++ struct termios _tty;
+ #endif /* UNIX_SYSV */
+
+ if (!called_before) {
+@@ -345,7 +340,7 @@
+ ioctl(0, TIOCGLTC, &ltc_orig);
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- ioctl(0, TCGETA, &_oldtty);
++ tcgetattr(0, &_oldtty);
+ #endif /* UNIX_SYSV */
+ }
+ #ifdef UNIX_BSD4_2
+@@ -364,7 +359,7 @@
+ tc_temp.t_startc = tc_temp.t_stopc = -1;
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- _tty.c_cc[VSWTCH] = CNSWTCH;
++ _tty.c_cc[VSUSP] = _tty.c_cc[VDSUSP] = 0;
+ #endif /* UNIX_SYSV */
+ }
+ #ifdef UNIX_BSD4_2
+@@ -372,7 +367,7 @@
+ ioctl(0, TIOCSLTC, &ltc_temp);
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- ioctl(0, TCSETA, &_tty);
++ tcsetattr(0, TCSANOW, &_tty);
+ #endif /* UNIX_SYSV */
+ #endif /* UNIX */
+ }
+@@ -397,9 +392,9 @@
md_heed_signals()
{
#ifdef UNIX
@@ -13,3 +77,30 @@
#endif /* UNIX */
#ifdef HUMAN
+@@ -907,19 +902,19 @@
+ }
+ #endif /* UNIX_BSD4_2 */
+ #ifdef UNIX_SYSV
+- struct termio tty_buf;
+- static struct termio tty_save;
++ struct termios tty_buf;
++ static struct termios tty_save;
+
+ if (on) {
+- ioctl(0, TCGETA, &tty_buf);
++ tcgetattr(0, &tty_buf);
+ tty_save = tty_buf;
+ tty_buf.c_lflag &= ~(ICANON | ECHO);
+ tty_buf.c_oflag &= ~ONLCR;
+- tty_buf.c_cc[4] = 1; /* MIN */
+- tty_buf.c_cc[5] = 2; /* TIME */
+- ioctl(0, TCSETAF, &tty_buf);
++ tty_buf.c_cc[VMIN] = 1;
++ tty_buf.c_cc[VTIME] = 2;
++ tcsetattr(0, TCSAFLUSH, &tty_buf);
+ } else {
+- ioctl(0, TCSETAF, &tty_save);
++ tcsetattr(0, TCSAFLUSH, &tty_save);
+ }
+ #endif /* UNIX_SYSV */
+ #endif /* UNIX */