From 702a1ead1ed781ad3aedd9bee5cdba8440d946b1 Mon Sep 17 00:00:00 2001 From: Stanislav Sedov Date: Sat, 14 Jun 2008 14:14:58 +0000 Subject: [PATCH] - Eliminate sgtty dependency. - Bump PORTREVISION. PR: ports/124460 Submitted by: ed@ --- math/calctool/Makefile | 2 +- math/calctool/files/patch-aa | 22 --------------- math/calctool/files/patch-tty.c | 47 +++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 23 deletions(-) delete mode 100644 math/calctool/files/patch-aa create mode 100644 math/calctool/files/patch-tty.c diff --git a/math/calctool/Makefile b/math/calctool/Makefile index 072c30586723..636dd159f770 100644 --- a/math/calctool/Makefile +++ b/math/calctool/Makefile @@ -7,7 +7,7 @@ PORTNAME= calctool PORTVERSION= 2.4.13 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= math MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= nsayer diff --git a/math/calctool/files/patch-aa b/math/calctool/files/patch-aa deleted file mode 100644 index 2815917e35c2..000000000000 --- a/math/calctool/files/patch-aa +++ /dev/null @@ -1,22 +0,0 @@ -*** tty.c.orig Wed Dec 4 12:43:55 1996 ---- tty.c Wed Dec 4 12:45:33 1996 -*************** -*** 1,5 **** -- /*LINTLIBRARY*/ -- - /* @(#)tty.c 1.14 90/02/06 - * - * These are the dumb tty dependent graphics routines used by calctool. ---- 1,3 ---- -*************** -*** 21,26 **** ---- 19,26 ---- - #include - #include - #include -+ #include -+ #include - #include "calctool.h" - #include "color.h" - #include "extern.h" - diff --git a/math/calctool/files/patch-tty.c b/math/calctool/files/patch-tty.c new file mode 100644 index 000000000000..54c9920a8c90 --- /dev/null +++ b/math/calctool/files/patch-tty.c @@ -0,0 +1,47 @@ +--- tty.c.orig 2008-06-14 18:05:30.000000000 +0400 ++++ tty.c 2008-06-14 18:08:25.000000000 +0400 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -30,7 +31,7 @@ + char *getenv(), *tgetstr(), *tgoto() ; + int destroy_frame(), outc() ; + +-struct sgttyb in_new, in_old ; ++struct termios in_new, in_old ; + + + SIGRET +@@ -90,7 +91,7 @@ + } + do_move(0, 0) ; + SIGNAL(SIGINT, SIG_IGN) ; +- IOCTL(0, TIOCSETP, &in_old) ; ++ tcsetattr(0, TCSANOW, &in_old) ; + exit(0) ; + } + +@@ -315,11 +316,14 @@ + + SIGNAL(SIGINT, cleanup) ; + +- IOCTL(0, TIOCGETP, &in_old) ; /* Setup standard input. */ ++ tcgetattr(0, &in_old) ; /* Setup standard input. */ + in_new = in_old ; +- in_new.sg_flags |= RAW ; +- in_new.sg_flags &= ~(ECHO | CRMOD) ; +- IOCTL(0, TIOCSETP, &in_new) ; ++ in_new.c_iflag |= IGNBRK; ++ in_new.c_iflag &= ~ICRNL; ++ in_new.c_lflag &= ~(ECHOCTL|ISIG|ICANON|IEXTEN); ++ in_new.c_oflag &= ~ONLCR; ++ in_new.c_lflag &= ~ECHO; ++ tcsetattr(0, TCSANOW, &in_new) ; + + setbuf(stdout, (char *) NULL) ; +