diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-16 14:26:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-16 14:26:06 +0000 |
commit | 5e1295d040076f0853941a5562d273bf9b8c0837 (patch) | |
tree | 6bb36ad7d688ea985c97e50dac95f29393b6aa1c /main/lynx | |
parent | 2be964e742c984c769619f3799ff3bd9c5a4b91b (diff) | |
download | aports-5e1295d040076f0853941a5562d273bf9b8c0837.tar.bz2 aports-5e1295d040076f0853941a5562d273bf9b8c0837.tar.xz |
main/lynx: fix build against newer ncurses
Diffstat (limited to 'main/lynx')
-rw-r--r-- | main/lynx/APKBUILD | 35 | ||||
-rw-r--r-- | main/lynx/ncurses.patch | 78 |
2 files changed, 93 insertions, 20 deletions
diff --git a/main/lynx/APKBUILD b/main/lynx/APKBUILD index ff3e6f6b7c..d13ac21f34 100644 --- a/main/lynx/APKBUILD +++ b/main/lynx/APKBUILD @@ -5,7 +5,7 @@ pkgname=lynx pkgver=2.8.8_p2 _relver=${pkgver/_p/rel.} _v=${_relver%rel.*} -pkgrel=5 +pkgrel=6 pkgdesc="Cross-platform text-based browser" url="http://lynx.invisible-island.net/" arch="all" @@ -14,21 +14,12 @@ depends="gzip" makedepends="libressl-dev gettext zlib-dev glib-dev perl ncurses-dev" install="" subpackages="$pkgname-doc" -source="http://invisible-mirror.net/archives/lynx/tarballs/${pkgname}${_relver}.tar.bz2" - -_builddir="$srcdir"/${pkgname}${_v//./-} -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +source="http://invisible-mirror.net/archives/lynx/tarballs/${pkgname}${_relver}.tar.bz2 + ncurses.patch" +builddir="$srcdir"/${pkgname}${_v//./-} build() { - cd "$_builddir" + cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -40,16 +31,20 @@ build() { --enable-ipv6 \ || return 1 make helpdir=/usr/share/doc/lynx/help \ - docdir=/usr/share/doc/lynx || return 1 + docdir=/usr/share/doc/lynx +} + +check() { + cd "$builddir" + ./lynx -version } package() { - cd "$_builddir" + cd "$builddir" make DESTDIR="$pkgdir" install install-help install-doc \ helpdir=/usr/share/doc/lynx/help \ - docdir=/usr/share/doc/lynx || return 1 + docdir=/usr/share/doc/lynx } -md5sums="b231c2aa34dfe7ca25681ef4e55ee7e8 lynx2.8.8rel.2.tar.bz2" -sha256sums="6980e75cf0d677fd52c116e2e0dfd3884e360970c88c8356a114338500d5bee7 lynx2.8.8rel.2.tar.bz2" -sha512sums="a475fb7b79641ddd7c20861e16d3d71ccb1a5ae33247cce0b9e73690dd664ebf129964c026bc33b0f082a7585e5a6acae9afc9a65f308e19b49fa0a8bebc0362 lynx2.8.8rel.2.tar.bz2" +sha512sums="a475fb7b79641ddd7c20861e16d3d71ccb1a5ae33247cce0b9e73690dd664ebf129964c026bc33b0f082a7585e5a6acae9afc9a65f308e19b49fa0a8bebc0362 lynx2.8.8rel.2.tar.bz2 +cb5336b3528d2d52dc3414e908ffa8c01bea9c0d111d542259308d673ee7dd93814a6281ba7d0b31c96b4d1276726ec3806e29e3be287d0bc257a401826bdc3f ncurses.patch" diff --git a/main/lynx/ncurses.patch b/main/lynx/ncurses.patch new file mode 100644 index 0000000000..5acab0cf93 --- /dev/null +++ b/main/lynx/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); + } + } |