summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2015-11-09 07:18:34 +0000
committerdholland <dholland@pkgsrc.org>2015-11-09 07:18:34 +0000
commit44cc1124bfc516bcaf90b019b7213950d7ed3e58 (patch)
tree4759229388ac1ff4c78f0bf4adf05dcca3fda7ef /lang
parent421a8add3b905430fec1ff07dad9000917e61b79 (diff)
downloadpkgsrc-44cc1124bfc516bcaf90b019b7213950d7ed3e58.tar.gz
Use termios unconditionally; forget about legacy sysv termio and legacy
bsd sgtty.h.
Diffstat (limited to 'lang')
-rw-r--r--lang/ucblogo/Makefile3
-rw-r--r--lang/ucblogo/distinfo4
-rw-r--r--lang/ucblogo/patches/patch-term.c97
3 files changed, 98 insertions, 6 deletions
diff --git a/lang/ucblogo/Makefile b/lang/ucblogo/Makefile
index ec2939ddc7b..faf5033fbaa 100644
--- a/lang/ucblogo/Makefile
+++ b/lang/ucblogo/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.27 2015/11/09 07:17:37 dholland Exp $
+# $NetBSD: Makefile,v 1.28 2015/11/09 07:18:34 dholland Exp $
DISTNAME= ucblogo
PKGNAME= ${DISTNAME}-6.0
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://www.cs.berkeley.edu/~bh/downloads/
# Not at GNU mirrors yet
diff --git a/lang/ucblogo/distinfo b/lang/ucblogo/distinfo
index ff7f5710079..5ca88247d6d 100644
--- a/lang/ucblogo/distinfo
+++ b/lang/ucblogo/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2015/11/06 20:33:21 joerg Exp $
+$NetBSD: distinfo,v 1.12 2015/11/09 07:18:34 dholland Exp $
SHA1 (ucblogo-6.0/ucblogo.tar.gz) = ad62c689c264b1aeb7bd58dd9c08ca602bade8f1
RMD160 (ucblogo-6.0/ucblogo.tar.gz) = 7cd9ec8eeff00fb3440f5036d57a9b29383ab310
@@ -11,7 +11,7 @@ SHA1 (patch-graphics.c) = 232ed36d7e1dd058ada493040acd467c96257dd3
SHA1 (patch-intern.c) = 2ed10c027fbea3410585838629477a0e085c1e83
SHA1 (patch-makehelp.c) = e236bbf271337d6f45474c071f2ea26f14b09744
SHA1 (patch-print.c) = d988911dddb5a27228366b607a4acd442facef42
-SHA1 (patch-term.c) = 621b4a5a02e0e6c150d8655957f945a81177cb08
+SHA1 (patch-term.c) = 5b0c41497e2c6e282385bd395101f638a247b83a
SHA1 (patch-wrksp.c) = cca5b7192d359355cbf14d0f44047ff5bc77cba4
SHA1 (patch-xgraphics.c) = e12f2ff10f990b4d9d00041db970de87ec41684d
SHA1 (patch-xgraphics.h) = 3b4c6a74cd328241dd2ea8c601879bd24911570d
diff --git a/lang/ucblogo/patches/patch-term.c b/lang/ucblogo/patches/patch-term.c
index a9511929a2a..eb73272cafb 100644
--- a/lang/ucblogo/patches/patch-term.c
+++ b/lang/ucblogo/patches/patch-term.c
@@ -1,8 +1,38 @@
-$NetBSD: patch-term.c,v 1.1 2013/07/18 12:05:09 joerg Exp $
+$NetBSD: patch-term.c,v 1.2 2015/11/09 07:18:34 dholland Exp $
---- term.c.orig 2002-10-03 16:54:33.000000000 +0000
+- unconditionally use termios, not legacy termio or sgtty.h
+- unconditionally include term.h for termcap stuff
+
+--- term.c.orig 2008-09-14 04:57:09.000000000 +0000
+++ term.c
-@@ -53,6 +53,9 @@
+@@ -30,26 +30,11 @@
+ #include <console.h>
+ #endif
+
+-#ifdef HAVE_TERMIO_H
+-#ifdef HAVE_WX
+-#include <termios.h>
+-#else
+-#include <termio.h>
+-#endif
+-#else
+-#ifdef HAVE_SGTTY_H
+-#include <sgtty.h>
+-#endif
+-#endif
+-
+ #undef TRUE
+ #undef FALSE
+
+ #ifdef HAVE_TERMCAP_H
+ #include <termcap.h>
+-#ifdef HAVE_SGTTY_H
+-#include <sgtty.h>
+-#endif
+ #else
+ #ifdef HAVE_TERMLIB_H
+ #include <termlib.h>
+@@ -60,6 +45,9 @@
#endif
#endif
@@ -12,3 +42,64 @@ $NetBSD: patch-term.c,v 1.1 2013/07/18 12:05:09 joerg Exp $
#undef TRUE
#undef FALSE
+@@ -78,13 +66,7 @@ char cm_arr[40];
+ char so_arr[40];
+ char se_arr[40];
+
+-#ifdef HAVE_TERMIO_H
+-struct termio tty_cooked, tty_cbreak;
+-#else
+-#ifdef HAVE_SGTTY_H
+-struct sgttyb tty_cooked, tty_cbreak;
+-#endif
+-#endif
++struct termios tty_cooked, tty_cbreak;
+
+ int interactive, tty_charmode;
+
+@@ -132,18 +114,11 @@ void term_init(void) {
+ #endif /* WIN32 */
+ #else
+ if (interactive) {
+-#ifdef HAVE_TERMIO_H
+- ioctl(0,TCGETA,(char *)(&tty_cooked));
++ tcgetattr(0, &tty_cooked);
+ tty_cbreak = tty_cooked;
+ tty_cbreak.c_cc[VMIN] = '\01';
+ tty_cbreak.c_cc[VTIME] = '\0';
+ tty_cbreak.c_lflag &= ~(ECHO|ICANON);
+-#else
+- ioctl(0,TIOCGETP,(char *)(&tty_cooked));
+- tty_cbreak = tty_cooked;
+- tty_cbreak.sg_flags |= CBREAK;
+- tty_cbreak.sg_flags &= ~ECHO;
+-#endif
+ }
+ tty_charmode = 0;
+ tgetent(bp, getenv("TERM"));
+@@ -188,11 +163,7 @@ void term_init(void) {
+ void charmode_on() {
+ #ifdef unix
+ if ((readstream == stdin) && interactive && !tty_charmode) {
+-#ifdef HAVE_TERMIO_H
+- ioctl(0,TCSETA,(char *)(&tty_cbreak));
+-#else /* !HAVE_TERMIO_H */
+- ioctl(0,TIOCSETP,(char *)(&tty_cbreak));
+-#endif /* HAVE_TERMIO_H */
++ tcsetattr(0, TCSANOW, &tty_cbreak);
+ tty_charmode++;
+ }
+ #endif /* unix */
+@@ -204,11 +175,7 @@ void charmode_on() {
+ void charmode_off() {
+ #ifdef unix
+ if (tty_charmode) {
+-#ifdef HAVE_TERMIO_H
+- ioctl(0,TCSETA,(char *)(&tty_cooked));
+-#else /* !HAVE_TERMIO_H */
+- ioctl(0,TIOCSETP,(char *)(&tty_cooked));
+-#endif /* HAVE_TERMIO_H */
++ tcsetattr(0, TCSANOW, &tty_cooked);
+ tty_charmode = 0;
+ }
+ #endif /* unix */