This welcomes textproc/ispell in the 1990s and switches it from
sgtty ioctls to POSIX termios.
ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/ispell/Makefile,v
retrieving revision 1.59
diff -u -p -r1.59 Makefile
--- Makefile 14 Mar 2013 09:25:09 -0000 1.59
+++ Makefile 5 Dec 2013 20:30:18 -0000
@@ -57,7 +57,7 @@ EXTRACT_ONLY= ${DISTNAME}.tar.gz \
SUBST_VARS+= VERSION
PKGNAME-main= ${DISTNAME}
-REVISION-main= 7
+REVISION-main= 8
MULTI_PACKAGES= -main -dutch -french -german -swedish -russian
-portuguese \
-slovak -spanish
.for i in ${MULTI_PACKAGES}
Index: patches/patch-config_X
===================================================================
RCS file: patches/patch-config_X
diff -N patches/patch-config_X
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-config_X 5 Dec 2013 20:30:18 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- config.X.orig Wed Jul 25 23:51:45 2001
++++ config.X Thu Dec 5 21:27:28 2013
+@@ -172,6 +172,10 @@
+ #include <sys/dir.h>
+ #endif /* USG */
+
++#ifndef TERMIOS
++#define TERMIOS 1 /* POSIX termios.h */
++#endif /* TERMIOS */
++
+ /*
+ ** Things that normally go in a Makefile. Define these just like you
+ ** might in the Makefile, except you should use #define instead of
Index: patches/patch-term_c
===================================================================
RCS file: patches/patch-term_c
diff -N patches/patch-term_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-term_c 5 Dec 2013 20:30:18 -0000
@@ -0,0 +1,155 @@
+$OpenBSD$
+--- term.c.orig Wed Jul 25 23:51:46 2001
++++ term.c Thu Dec 5 21:13:57 2013
+@@ -80,7 +80,9 @@ static char Rcs_Id[] =
+ #include "ispell.h"
+ #include "proto.h"
+ #include "msgs.h"
+-#ifdef USG
++#if defined(TERMIOS)
++#include <termios.h>
++#elif defined(USG)
+ #include <termio.h>
+ #else
+ #include <sgtty.h>
+@@ -151,7 +153,10 @@ static int putch (c)
+ return putchar (c);
+ }
+
+-#ifdef USG
++#if defined(TERMIOS)
++static struct termios sbuf;
++static struct termios osbuf;
++#elif defined(USG)
+ static struct termio sbuf;
+ static struct termio osbuf;
+ #else
+@@ -257,12 +262,32 @@ retry:
+ #endif /* SIGTSTP */
+ #endif /* TIOCPGRP */
+
+-#ifdef USG
++#if defined(TERMIOS)
+ if (!isatty (0))
+ {
+ (void) fprintf (stderr, TERM_C_NO_BATCH);
+ exit (1);
+ }
++ (void) tcgetattr (0, &osbuf);
++ termchanged = 1;
++
++ sbuf = osbuf;
++ sbuf.c_lflag &= ~(ECHO | ECHOK | ECHONL | ICANON);
++ sbuf.c_oflag &= ~(OPOST);
++ sbuf.c_iflag &= ~(INLCR | IGNCR | ICRNL);
++ sbuf.c_cc[VMIN] = 1;
++ sbuf.c_cc[VTIME] = 1;
++ (void) tcsetattr (0, TCSADRAIN, &sbuf);
++
++ uerasechar = osbuf.c_cc[VERASE];
++ ukillchar = osbuf.c_cc[VKILL];
++
++#elif defined(USG)
++ if (!isatty (0))
++ {
++ (void) fprintf (stderr, TERM_C_NO_BATCH);
++ exit (1);
++ }
+ (void) ioctl (0, TCGETA, (char *) &osbuf);
+ termchanged = 1;
+
+@@ -306,7 +331,7 @@ retry:
+ #endif
+ #endif
+
+-#ifndef USG
++#if !defined(TERMIOS) && !defined(USG)
+ (void) ioctl (0, TIOCGETP, (char *) &osbuf);
+ #ifdef TIOCGLTC
+ (void) ioctl (0, TIOCGLTC, (char *) &oltc);
+@@ -327,7 +352,7 @@ retry:
+ (void) ioctl (0, TIOCSLTC, (char *) <c);
+ #endif
+
+-#endif /* USG */
++#endif /* TERMIOS && USG */
+
+ if ((oldint = signal (SIGINT, SIG_IGN)) != SIG_IGN)
+ (void) signal (SIGINT, done);
+@@ -359,7 +384,9 @@ SIGNAL_TYPE done (signo)
+ {
+ if (te)
+ tputs (te, 1, putch);
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -375,7 +402,9 @@ SIGNAL_TYPE done (signo)
+ static SIGNAL_TYPE onstop (signo)
+ int signo;
+ {
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -390,7 +419,9 @@ static SIGNAL_TYPE onstop (signo)
+ (void) kill (0, signo);
+ /* stop here until continued */
+ (void) signal (signo, onstop);
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &sbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &sbuf);
+@@ -450,7 +481,9 @@ int shellescape (buf)
+ }
+ argv[i] = NULL;
+
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -496,7 +529,9 @@ int shellescape (buf)
+ (void) signal (SIGTSTP, onstop);
+ #endif
+
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &sbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &sbuf);
+@@ -529,7 +564,9 @@ void shescape (buf)
+ int ch;
+ #endif
+
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &osbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &osbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &osbuf);
+@@ -561,7 +598,9 @@ void shescape (buf)
+ (void) signal (SIGTSTP, onstop);
+ #endif
+
+-#ifdef USG
++#if defined(TERMIOS)
++ (void) tcsetattr (0, TCSADRAIN, &sbuf);
++#elif defined(USG)
+ (void) ioctl (0, TCSETAW, (char *) &sbuf);
+ #else
+ (void) ioctl (0, TIOCSETP, (char *) &sbuf);
--
Christian "naddy" Weisgerber [email protected]