Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/lynx/PKGBUILD12
-rw-r--r--extra/lynx/alpine-lynx-2.8.8-ncurses.patch78
2 files changed, 90 insertions, 0 deletions
diff --git a/extra/lynx/PKGBUILD b/extra/lynx/PKGBUILD
new file mode 100644
index 00000000..f126e56b
--- /dev/null
+++ b/extra/lynx/PKGBUILD
@@ -0,0 +1,12 @@
+# see FS#56510
+# patch from AlpineLinux, see: https://git.alpinelinux.org/cgit/aports/tree/main/lynx/ncurses.patch
+
+source+=(alpine-lynx-2.8.8-ncurses.patch)
+sha256sums+=('06d1a968cd7eed0711683ed055c67118f52ef7ea22fcb7995447d3d7a9297f1d')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /patch/a patch -Np1 -i ../alpine-lynx-2.8.8-ncurses.patch
+ '
+)"
diff --git a/extra/lynx/alpine-lynx-2.8.8-ncurses.patch b/extra/lynx/alpine-lynx-2.8.8-ncurses.patch
new file mode 100644
index 00000000..5acab0cf
--- /dev/null
+++ b/extra/lynx/alpine-lynx-2.8.8-ncurses.patch
@@ -0,0 +1,78 @@
+From f0b064b47bfa046da941f5029cdc1b4c851553ce Mon Sep 17 00:00:00 2001
+From: "Thomas E. Dickey" <dickey@invisible-island.net>
+Date: Sat, 18 Mar 2017 21:44:28 +0000
+Subject: [PATCH] snapshot of project "lynx", label v2-8-9dev_11m
+
+---
+ CHANGES | 5 +++--
+ src/LYCurses.c | 18 ++++++++++++------
+ src/LYStrings.c | 7 ++++---
+ 3 files changed, 19 insertions(+), 11 deletions(-)
+
+diff --git a/src/LYCurses.c b/src/LYCurses.c
+index 6b839c28..63b73ece 100644
+--- a/src/LYCurses.c
++++ b/src/LYCurses.c
+@@ -1696,7 +1696,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;
+@@ -1705,8 +1705,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')
+@@ -1718,14 +1720,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 --git a/src/LYStrings.c b/src/LYStrings.c
+index e97481c2..02b1286d 100644
+--- a/src/LYStrings.c
++++ b/src/LYStrings.c
+@@ -1004,12 +1004,13 @@ static const char *expand_tiname(const char *first, size_t len, char **result, 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);
+ }
+ }