pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/lynx lynx: Pull in upstream ncurses fixes, and fix...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a6264b8fb159
branches:  trunk
changeset: 380569:a6264b8fb159
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu May 17 10:16:25 2018 +0000

description:
lynx: Pull in upstream ncurses fixes, and fix SunOS.

diffstat:

 www/lynx/Makefile                      |   4 ++-
 www/lynx/distinfo                      |   4 ++-
 www/lynx/patches/patch-src_LYCurses.c  |  49 ++++++++++++++++++++++++++++++++++
 www/lynx/patches/patch-src_LYStrings.c |  22 +++++++++++++++
 4 files changed, 77 insertions(+), 2 deletions(-)

diffs (113 lines):

diff -r a8d56b789ed2 -r a6264b8fb159 www/lynx/Makefile
--- a/www/lynx/Makefile Thu May 17 10:03:14 2018 +0000
+++ b/www/lynx/Makefile Thu May 17 10:16:25 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.129 2018/02/16 07:17:09 wiz Exp $
+# $NetBSD: Makefile,v 1.130 2018/05/17 10:16:25 jperkin Exp $
 
 DISTNAME=      lynx2.8.8rel.2
 PKGNAME=       ${DISTNAME:S/lynx/lynx-/:S/rel//}
@@ -73,6 +73,8 @@
 CONFIGURE_ENV+=                BUILD_CC=${NATIVE_CC:Q}
 .endif
 
+CONFIGURE_ENV.SunOS+=  cf_cv_xopen_source=no
+
 .include "../../devel/gettext-tools/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
diff -r a8d56b789ed2 -r a6264b8fb159 www/lynx/distinfo
--- a/www/lynx/distinfo Thu May 17 10:03:14 2018 +0000
+++ b/www/lynx/distinfo Thu May 17 10:16:25 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.36 2018/02/16 07:17:09 wiz Exp $
+$NetBSD: distinfo,v 1.37 2018/05/17 10:16:25 jperkin Exp $
 
 SHA1 (lynx2.8.8rel.2.tar.bz2) = 65bbf95627c88723bbb5880155e5fe01c2753d0c
 RMD160 (lynx2.8.8rel.2.tar.bz2) = a683f9c163a6c343bde53ffde99dbecce4e41b02
@@ -11,4 +11,6 @@
 SHA1 (patch-aa) = 85e76c4b2708e01dd1abdc1af764a067bd83bcb9
 SHA1 (patch-ab) = 26fab3bd426a76df530e6780eefe36464059bc6a
 SHA1 (patch-af) = 31399c0c3394b90c0680708fff06f6f9e19674b3
+SHA1 (patch-src_LYCurses.c) = 66f416fd17cdb7a00beb4b850be711faf0afb605
+SHA1 (patch-src_LYStrings.c) = 7472abbb8dd864f9361b0371c5ceff9a1e257ed6
 SHA1 (patch-src_LYUtils.c) = fadef16c363b3e4327dd822f57b99274bcc6c6e3
diff -r a8d56b789ed2 -r a6264b8fb159 www/lynx/patches/patch-src_LYCurses.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/lynx/patches/patch-src_LYCurses.c     Thu May 17 10:16:25 2018 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-src_LYCurses.c,v 1.3 2018/05/17 10:16:25 jperkin Exp $
+
+Pull in upstream patch to fix build against newer ncurses.
+
+--- src/LYCurses.c.orig        2014-03-09 21:43:10.000000000 +0000
++++ src/LYCurses.c
+@@ -1695,7 +1695,7 @@ void lynx_enable_mouse(int state)
+ void lynx_nl2crlf(int normal GCC_UNUSED)
+ {
+ #if defined(NCURSES_VERSION_PATCH) && defined(SET_TTY) && defined(TERMIOS) && defined(ONLCR)
+-    static TTY saved_tty;
++    static struct termios saved_tty;
+     static int did_save = FALSE;
+     static int waiting = FALSE;
+     static int can_fix = TRUE;
+@@ -1704,8 +1704,10 @@ void lynx_nl2crlf(int normal GCC_UNUSED)
+       if (cur_term == 0) {
+           can_fix = FALSE;
+       } else {
+-          saved_tty = cur_term->Nttyb;
++          tcgetattr(fileno(stdout), &saved_tty);
+           did_save = TRUE;
++          if ((saved_tty.c_oflag & ONLCR))
++              can_fix = FALSE;
+ #if NCURSES_VERSION_PATCH < 20010529
+           /* workaround for optimizer bug with nonl() */
+           if ((tigetstr("cud1") != 0 && *tigetstr("cud1") == '\n')
+@@ -1717,14 +1719,18 @@ void lynx_nl2crlf(int normal GCC_UNUSED)
+     if (can_fix) {
+       if (normal) {
+           if (!waiting) {
+-              cur_term->Nttyb.c_oflag |= ONLCR;
++              struct termios alter_tty = saved_tty;
++
++              alter_tty.c_oflag |= ONLCR;
++              tcsetattr(fileno(stdout), TCSAFLUSH, &alter_tty);
++              def_prog_mode();
+               waiting = TRUE;
+               nonl();
+           }
+       } else {
+           if (waiting) {
+-              cur_term->Nttyb = saved_tty;
+-              SET_TTY(fileno(stdout), &saved_tty);
++              tcsetattr(fileno(stdout), TCSAFLUSH, &saved_tty);
++              def_prog_mode();
+               waiting = FALSE;
+               nl();
+               LYrefresh();
diff -r a8d56b789ed2 -r a6264b8fb159 www/lynx/patches/patch-src_LYStrings.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/lynx/patches/patch-src_LYStrings.c    Thu May 17 10:16:25 2018 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_LYStrings.c,v 1.3 2018/05/17 10:16:25 jperkin Exp $
+
+Pull in upstream patch to fix build against newer ncurses.
+
+--- src/LYStrings.c.orig       2013-11-29 00:52:56.000000000 +0000
++++ src/LYStrings.c
+@@ -1004,12 +1004,13 @@ static const char *expand_tiname(const c
+ {
+     char name[BUFSIZ];
+     int code;
++    TERMTYPE *tp = (TERMTYPE *) (cur_term);
+ 
+     LYStrNCpy(name, first, len);
+     if ((code = lookup_tiname(name, strnames)) >= 0
+       || (code = lookup_tiname(name, strfnames)) >= 0) {
+-      if (cur_term->type.Strings[code] != 0) {
+-          LYStrNCpy(*result, cur_term->type.Strings[code], (final - *result));
++      if (tp->Strings[code] != 0) {
++          LYStrNCpy(*result, tp->Strings[code], (final - *result));
+           (*result) += strlen(*result);
+       }
+     }



Home | Main Index | Thread Index | Old Index