summaryrefslogtreecommitdiff
path: root/shells/tcsh
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2017-02-17 19:21:44 +0000
committerhe <he@pkgsrc.org>2017-02-17 19:21:44 +0000
commite6a1ad81a9cf0abd862d17115aab01797f312b78 (patch)
tree98c7370a245fecee37f02a0e9d6ec5f9c48be19e /shells/tcsh
parent3afc4f51ef258569ca4cd3d55e96468c138b214e (diff)
downloadpkgsrc-e6a1ad81a9cf0abd862d17115aab01797f312b78.tar.gz
Make the <meta> modifier work on Linux again by applying a fix
from upstream, ref. https://github.com/tcsh-org/tcsh/commit/8e6dfd53321a0b0047f7d75db21a946c166c600b Unfortunately the AsciiOnly reversion causes a SEGV because *ch is used to index in the command array, and now contains INVALID_BYTE. Reproduce error with: env -i ./tcsh <meta>b Bump PKGREVISION.
Diffstat (limited to 'shells/tcsh')
-rw-r--r--shells/tcsh/Makefile4
-rw-r--r--shells/tcsh/distinfo3
-rw-r--r--shells/tcsh/patches/patch-ed.inputl.c35
3 files changed, 39 insertions, 3 deletions
diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile
index 20ad48f3764..dd610d036f3 100644
--- a/shells/tcsh/Makefile
+++ b/shells/tcsh/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.84 2017/01/19 18:52:25 agc Exp $
+# $NetBSD: Makefile,v 1.85 2017/02/17 19:21:44 he Exp $
DISTNAME= tcsh-6.20.00
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= shells
MASTER_SITES= ftp://ftp.astron.com/pub/tcsh/
MASTER_SITES+= ftp://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/
diff --git a/shells/tcsh/distinfo b/shells/tcsh/distinfo
index 49ee5f29324..b8cb0dab821 100644
--- a/shells/tcsh/distinfo
+++ b/shells/tcsh/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2016/12/24 13:18:43 kim Exp $
+$NetBSD: distinfo,v 1.39 2017/02/17 19:21:44 he Exp $
SHA1 (tcsh-6.20.00.tar.gz) = a77d68434cc4bed731a46a39b9e01523e3a1e98c
RMD160 (tcsh-6.20.00.tar.gz) = 3f119421ef3500cea1bebe2edf35c6d81ca1c8f3
@@ -8,6 +8,7 @@ SHA1 (patch-aa) = 440849534fc49afdbd70b95d6cbc62ff5abee240
SHA1 (patch-ab) = 8cf26988778b5331360eb1aab98bfcc920c71ac2
SHA1 (patch-configure) = 91c2019da8c074bd6f24b84bf798ccd497110727
SHA1 (patch-ed.chared.c) = d26ba00afcba958b5bb1efc2171e6211c8a5f964
+SHA1 (patch-ed.inputl.c) = d91c55ba297fcbe69f09b1ab3a7b50b9d83114c3
SHA1 (patch-nls-catgen) = fe5da1ea0edfcb646bcc271e614f5075afa56c60
SHA1 (patch-sh.func.c) = 030a2647930300f96147715ae17ab95c79ca8ca2
SHA1 (patch-sh.h) = ac6211ddd5e552e9baec2d35aed5e7e573cab04e
diff --git a/shells/tcsh/patches/patch-ed.inputl.c b/shells/tcsh/patches/patch-ed.inputl.c
new file mode 100644
index 00000000000..b8b88a3b35a
--- /dev/null
+++ b/shells/tcsh/patches/patch-ed.inputl.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-ed.inputl.c,v 1.1 2017/02/17 19:21:44 he Exp $
+
+Add fix from upstream: Unfortunately the AsciiOnly reversion causes
+a SEGV because *ch is used to index in the command array, and now contains
+INVALID_BYTE. Reproduce error with:
+ env -i ./tcsh
+ <meta>b
+
+--- ed.inputl.c.orig 2012-10-19 15:23:32.000000000 +0000
++++ ed.inputl.c
+@@ -800,13 +800,17 @@ GetNextChar(Char *cp)
+ return -1;
+ }
+ }
+- cbp++;
+- if (normal_mbtowc(cp, cbuf, cbp) == -1) {
+- reset_mbtowc();
+- if (cbp < MB_CUR_MAX)
+- continue; /* Maybe a partial character */
+- /* And drop the following bytes, if any */
+- *cp = (unsigned char)*cbuf | INVALID_BYTE;
++ if (AsciiOnly) {
++ *cp = (unsigned char)*cbuf;
++ } else {
++ cbp++;
++ if (normal_mbtowc(cp, cbuf, cbp) == -1) {
++ reset_mbtowc();
++ if (cbp < MB_CUR_MAX)
++ continue; /* Maybe a partial character */
++ /* And drop the following bytes, if any */
++ *cp = (unsigned char)*cbuf | INVALID_BYTE;
++ }
+ }
+ break;
+ }