summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2005-03-02 08:54:49 +0000
committerDaniel Black <dragonheart@gentoo.org>2005-03-02 08:54:49 +0000
commitd9ca29b057e00ca41262447502ee812b6d351311 (patch)
treeae39fa5ac50d7fb35a23315c1c06a2490aa5f2aa /app-shells
parentUse bash builtins for testing. Added MYTH_NICE option. (diff)
downloadgentoo-2-d9ca29b057e00ca41262447502ee812b6d351311.tar.gz
gentoo-2-d9ca29b057e00ca41262447502ee812b6d351311.tar.bz2
gentoo-2-d9ca29b057e00ca41262447502ee812b6d351311.zip
russian characters problems as per bug #83732
(Portage version: 2.0.51.18)
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/tcsh/ChangeLog15
-rw-r--r--app-shells/tcsh/Manifest27
-rw-r--r--app-shells/tcsh/files/digest-tcsh-6.13-r12
-rw-r--r--app-shells/tcsh/files/tcsh-6.11.00-termcap.patch12
-rw-r--r--app-shells/tcsh/files/tcsh-6.12.00-setpgrp.patch14
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-arch.patch24
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-charset.patch15
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-closem.patch20
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-codeset.patch81
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-cstr.patch11
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-dspmbyte.patch60
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-fcntl.patch20
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-glob.patch11
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-iconv.patch402
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-utmp.patch59
-rw-r--r--app-shells/tcsh/files/tcsh-6.13.00-winchg.patch50
-rw-r--r--app-shells/tcsh/tcsh-6.13-r1.ebuild69
17 files changed, 885 insertions, 7 deletions
diff --git a/app-shells/tcsh/ChangeLog b/app-shells/tcsh/ChangeLog
index b53f60e5896b..f01038b72f51 100644
--- a/app-shells/tcsh/ChangeLog
+++ b/app-shells/tcsh/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for app-shells/tcsh
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-shells/tcsh/ChangeLog,v 1.30 2005/01/02 21:49:13 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-shells/tcsh/ChangeLog,v 1.31 2005/03/02 08:54:49 dragonheart Exp $
+
+*tcsh-6.13-r1 (02 Mar 2005)
+
+ 02 Mar 2005; Daniel Black <dragonheart@gentoo.org>
+ +files/tcsh-6.11.00-termcap.patch, +files/tcsh-6.12.00-setpgrp.patch,
+ +files/tcsh-6.13.00-arch.patch, +files/tcsh-6.13.00-charset.patch,
+ +files/tcsh-6.13.00-closem.patch, +files/tcsh-6.13.00-codeset.patch,
+ +files/tcsh-6.13.00-cstr.patch, +files/tcsh-6.13.00-dspmbyte.patch,
+ +files/tcsh-6.13.00-fcntl.patch, +files/tcsh-6.13.00-glob.patch,
+ +files/tcsh-6.13.00-iconv.patch, +files/tcsh-6.13.00-utmp.patch,
+ +files/tcsh-6.13.00-winchg.patch, +tcsh-6.13-r1.ebuild:
+ russian characters problems as per bug #83732. Thanks to Yuri Karaban
+ <ykar@list.ru> for the bug and finding and testing all the patches
02 Jan 2005; Ciaran McCreesh <ciaranm@gentoo.org> :
Change encoding to UTF-8 for GLEP 31 compliance
diff --git a/app-shells/tcsh/Manifest b/app-shells/tcsh/Manifest
index 1eb1b19caa06..ec2eee221438 100644
--- a/app-shells/tcsh/Manifest
+++ b/app-shells/tcsh/Manifest
@@ -1,14 +1,29 @@
-MD5 30acd869de9bba91604c74415e3a487b tcsh-6.13.ebuild 1299
MD5 276344ebc5b590ff59844eac73678488 ChangeLog 3866
-MD5 9930dcee201eaffb059995d4fdbd2263 tcsh-6.12-r3.ebuild 1391
MD5 6d796b061ed1c1337ef157a5f74dab35 metadata.xml 403
+MD5 9930dcee201eaffb059995d4fdbd2263 tcsh-6.12-r3.ebuild 1391
+MD5 30acd869de9bba91604c74415e3a487b tcsh-6.13.ebuild 1299
+MD5 272d82e4c777e34a04fcebc34dd4f1f9 tcsh-6.13-r1.ebuild 1904
+MD5 36f0897401e2ff873f97e8eac302169d files/digest-tcsh-6.13 121
MD5 299cd79eb3cbc2a3caeac1c3a0309556 files/csh.cshrc_new 2810
-MD5 8c5915d05b8b0c2db109c754a2bee20f files/tcsh-bindkey 3597
MD5 4869b9da87c79854e2cc97241f125853 files/csh.login_new 1482
-MD5 16713fff7d0ccc21e1c32b250cdc44ff files/tcsh-aliases 2399
+MD5 c6384002cda1bc11c1e31ca9513b9ad6 files/tcsh-6.12.00-setpgrp.patch 545
MD5 968abc8b96dbc3821d09bc3ee58c41a7 files/digest-tcsh-6.12-r3 121
+MD5 18a0fc2cb5f14ddf82a1947cdd43ca43 files/tcsh-6.11.00-termcap.patch 406
+MD5 1b31eca34600baccddcfdf5d8bca139d files/tcsh-6.13.00-charset.patch 616
MD5 0c7590ddc33afe8fa448f51871ad677c files/tcsh-6.12-tc.os.h-gentoo.diff 363
+MD5 16713fff7d0ccc21e1c32b250cdc44ff files/tcsh-aliases 2399
+MD5 8c5915d05b8b0c2db109c754a2bee20f files/tcsh-bindkey 3597
+MD5 e717dd2122d1ae7ab9ee8ebf2c33636a files/tcsh-settings 3271
MD5 6bd69d3c815412ada4579ac8f8cc9c45 files/tcsh.config 1466
MD5 a51fb6146ec2bcb7a603e5af41f6c7a2 files/tcsh_enable_kanji.diff 466
-MD5 e717dd2122d1ae7ab9ee8ebf2c33636a files/tcsh-settings 3271
-MD5 36f0897401e2ff873f97e8eac302169d files/digest-tcsh-6.13 121
+MD5 d612d75d8d811c7932e5c214946cb7ba files/tcsh-6.13.00-dspmbyte.patch 2312
+MD5 c2ca2472d2e81e30f23492c306c03ada files/tcsh-6.13.00-iconv.patch 11230
+MD5 fb2384289b070107607f18091513ec74 files/tcsh-6.13.00-cstr.patch 396
+MD5 36f0897401e2ff873f97e8eac302169d files/digest-tcsh-6.13-r1 121
+MD5 f47afb634d66cb19feac4ab83997a576 files/tcsh-6.13.00-arch.patch 1055
+MD5 87462113a0339dfc85377c3fbef14828 files/tcsh-6.13.00-fcntl.patch 726
+MD5 01e7c42d58599a89564127e92f85caac files/tcsh-6.13.00-codeset.patch 2448
+MD5 4ed6009ff61cfdc1f29287d8a0e0835c files/tcsh-6.13.00-glob.patch 305
+MD5 8a48eb2d6512d50375df4e87e060feed files/tcsh-6.13.00-winchg.patch 1731
+MD5 08dda7e3da3d8f4bc8e41d5ac7a4fbdd files/tcsh-6.13.00-closem.patch 433
+MD5 88ecd43a2f94275ddecaae78650745f8 files/tcsh-6.13.00-utmp.patch 1578
diff --git a/app-shells/tcsh/files/digest-tcsh-6.13-r1 b/app-shells/tcsh/files/digest-tcsh-6.13-r1
new file mode 100644
index 000000000000..18dfd0c5dbeb
--- /dev/null
+++ b/app-shells/tcsh/files/digest-tcsh-6.13-r1
@@ -0,0 +1,2 @@
+MD5 11c0c9c9148652dc01270c4880d1cc6e tcsh-6.13.00.tar.gz 844755
+MD5 d4108a1ef7482d9440e5032e8a8d77b3 tcsh-complete 45242
diff --git a/app-shells/tcsh/files/tcsh-6.11.00-termcap.patch b/app-shells/tcsh/files/tcsh-6.11.00-termcap.patch
new file mode 100644
index 000000000000..b28144b8ee38
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.11.00-termcap.patch
@@ -0,0 +1,12 @@
+Prefer libtermcap to libncurses for the shell.
+--- tcsh-6.11.00/configure.in 2002-06-05 10:50:07.000000000 -0400
++++ tcsh-6.11.00/configure.in 2002-06-05 10:50:03.000000000 -0400
+@@ -253,7 +253,7 @@
+ esac
+
+ AC_SEARCH_LIBS(crypt, crypt)
+-AC_SEARCH_LIBS(tgetent, termlib curses termcap)
++AC_SEARCH_LIBS(tgetent, termlib termcap curses)
+ AC_SEARCH_LIBS(gethostbyname, nsl)
+ AC_SEARCH_LIBS(connect, socket)
+
diff --git a/app-shells/tcsh/files/tcsh-6.12.00-setpgrp.patch b/app-shells/tcsh/files/tcsh-6.12.00-setpgrp.patch
new file mode 100644
index 000000000000..8efe3bf8142d
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.12.00-setpgrp.patch
@@ -0,0 +1,14 @@
+Don't include our own declaration of setpgrp if the system defines prototypes
+for SysV functions (like setpgrp()). Not sure if this is the Right fix or not.
+--- tcsh-6.12.00/sh.h 2004-02-10 11:35:44.000000000 -0500
++++ tcsh-6.12.00/sh.h 2004-02-10 11:35:40.000000000 -0500
+@@ -474,7 +474,9 @@
+ extern pid_t getpgrp __P((void));
+ # endif /* BSD || SUNOS4 || IRISD || DGUX */
+ # endif /* POSIX */
++#ifndef _SVID_SOURCE
+ extern pid_t setpgrp __P((pid_t, pid_t));
++#endif
+ #endif /* !WINNT_NATIVE */
+
+ typedef sigret_t (*signalfun_t) __P((int));
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-arch.patch b/app-shells/tcsh/files/tcsh-6.13.00-arch.patch
new file mode 100644
index 000000000000..c1612e6ab07f
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-arch.patch
@@ -0,0 +1,24 @@
+--- tcsh-6.13.00/host.defs.arch 2003-02-08 21:03:25.000000000 +0100
++++ tcsh-6.13.00/host.defs 2004-09-15 18:32:39.770032216 +0200
+@@ -438,11 +438,21 @@
+ newdef : defined(linux)
+ comment : Linus Torvalds's linux
+ vendor : defined(M_intel) : "intel"
++hosttype: defined(__ia64__) : "ia64-linux"
++hosttype: defined(__powerpc64__) : "powerpc64-linux"
++hosttype: defined(__s390x__) : "s390x-linux"
++hosttype: defined(__s390__) : "s390-linux"
++hosttype: defined(__x86_64__) : "x86_64-linux"
+ hosttype: defined(M_i586) : "i586-linux"
+ hosttype: defined(M_i486) : "i486-linux"
+ hosttype: defined(M_i386) : "i386-linux"
+ ostype : !defined(PPC) : "linux"
+ ostype : defined(PPC) : "mklinux"
++machtype: defined(__ia64__) : "ia64"
++machtype: defined(__powerpc64__) : "powerpc64"
++machtype: defined(__s390x__) : "s390x"
++machtype: defined(__s390__) : "s390"
++machtype: defined(__x86_64__) : "x86_64"
+ machtype: defined(M_i586) : "i586"
+ machtype: defined(M_i486) : "i486"
+ machtype: defined(M_i386) : "i386"
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-charset.patch b/app-shells/tcsh/files/tcsh-6.13.00-charset.patch
new file mode 100644
index 000000000000..c9dc39d86cc6
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-charset.patch
@@ -0,0 +1,15 @@
+--- tcsh-6.13.00/nls/russian/charset.charset 2004-08-17 17:54:12.229979032 +0200
++++ tcsh-6.13.00/nls/russian/charset 2004-08-17 17:54:30.695171896 +0200
+@@ -1 +1 @@
+-$ codeset=ISO-8859-5
++$ codeset=KOI8-R
+--- tcsh-6.13.00/nls/pl/charset.charset 2004-08-17 17:51:05.985292528 +0200
++++ tcsh-6.13.00/nls/pl/charset 2004-08-17 17:51:12.798256800 +0200
+@@ -1 +1 @@
+-$ codeset=ISO-8859-5
++$ codeset=ISO-8859-2
+--- tcsh-6.13.00/nls/ukrainian/charset.charset 2004-08-17 17:55:09.520269584 +0200
++++ tcsh-6.13.00/nls/ukrainian/charset 2004-08-17 17:55:15.252398168 +0200
+@@ -1 +1 @@
+-$ codeset=ISO-8859-5
++$ codeset=KOI8-U
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-closem.patch b/app-shells/tcsh/files/tcsh-6.13.00-closem.patch
new file mode 100644
index 000000000000..158881bb1436
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-closem.patch
@@ -0,0 +1,20 @@
+--- tcsh/sh.misc.c 2004-09-08 18:36:04.000000000 +0200
++++ tcsh-6.13.00/sh.misc.c 2004-09-08 23:53:43.081020880 +0200
+@@ -257,6 +257,7 @@
+ closem()
+ {
+ register int f;
++ struct stat st;
+
+ #ifdef NLS_BUGS
+ #ifdef NLS_CATALOGS
+@@ -273,6 +274,9 @@
+ #ifdef MALLOC_TRACE
+ && f != 25
+ #endif /* MALLOC_TRACE */
++#ifdef S_ISSOCK
++ && fstat(f, &st) == 0 && !S_ISSOCK(st.st_mode)
++#endif
+ )
+ {
+ (void) close(f);
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-codeset.patch b/app-shells/tcsh/files/tcsh-6.13.00-codeset.patch
new file mode 100644
index 000000000000..846c8b112a3b
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-codeset.patch
@@ -0,0 +1,81 @@
+diff -ur tcsh-6.13.00/config.h.in tcsh/config.h.in
+--- tcsh-6.13.00/config.h.in 2004-09-14 20:01:21.622550088 +0200
++++ tcsh/config.h.in 2004-09-14 19:40:59.835289984 +0200
+@@ -3,6 +3,9 @@
+ /* Define to 1 if you have the iconv () interface */
+ #undef HAVE_ICONV
+
++/* Define to 1 if you have the `nl_langinfo' function. */
++#undef HAVE_NL_LANGINFO
++
+ /* Define to the address where bug reports for this package should be sent. */
+ #undef PACKAGE_BUGREPORT
+
+diff -ur tcsh-6.13.00/configure tcsh/configure
+diff -ur tcsh-6.13.00/configure.in tcsh/configure.in
+--- tcsh-6.13.00/configure.in 2004-09-14 20:01:21.624549784 +0200
++++ tcsh/configure.in 2004-09-14 19:34:44.314377840 +0200
+@@ -257,6 +257,7 @@
+ ;;
+ esac
+
++AC_CHECK_FUNCS([nl_langinfo])
+ AC_SEARCH_LIBS(crypt, crypt)
+ AC_SEARCH_LIBS(tgetent, termlib termcap curses)
+ AC_SEARCH_LIBS(gethostbyname, nsl)
+diff -ur tcsh-6.13.00/sh.set.c tcsh/sh.set.c
+--- tcsh-6.13.00/sh.set.c 2004-09-14 20:01:21.647546288 +0200
++++ tcsh/sh.set.c 2004-09-14 19:35:06.276039160 +0200
+@@ -37,6 +37,10 @@
+ #include "ed.h"
+ #include "tw.h"
+
++#ifdef HAVE_NL_LANGINFO
++#include <langinfo.h>
++#endif
++
+ extern Char HistLit;
+ extern bool GotTermCaps;
+ int numeof = 0;
+@@ -1254,7 +1258,29 @@
+ { STRSTARKUTF8, STRKUTF8 },
+ { NULL, NULL }
+ };
++#ifdef HAVE_NL_LANGINFO
++ struct dspm_autoset_Table dspmc[] = {
++ { STRSTARKUTF8, STRKUTF8 },
++ { STRKEUC, STRKEUC },
++ { STRGB2312, STRKEUC },
++ { STRKBIG5, STRKBIG5 },
++ { NULL, NULL }
++ };
++ Char *codeset;
+
++ codeset = str2short(nl_langinfo(CODESET));
++ if (*codeset != '\0') {
++ for (i = 0; dspmc[i].n; i++) {
++ Char *estr;
++ if (dspmc[i].n[0] && t_pmatch(pcp, dspmc[i].n, &estr, 0) > 0) {
++ set(CHECK_MBYTEVAR, Strsave(dspmc[i].v), VAR_READWRITE);
++ update_dspmbyte_vars();
++ return;
++ }
++ }
++ }
++#endif
++
+ if (*pcp == '\0')
+ return;
+
+diff -ur tcsh-6.13.00/tc.const.c tcsh/tc.const.c
+--- tcsh-6.13.00/tc.const.c 2004-09-14 20:01:21.579556624 +0200
++++ tcsh/tc.const.c 2004-09-14 19:31:30.274876328 +0200
+@@ -129,6 +129,8 @@
+ Char STRKBIG5[] = { 'b', 'i', 'g', '5', '\0' };
+ Char STRKUTF8[] = { 'u', 't', 'f', '8', '\0' };
+ Char STRSTARKUTF8[] = { '*', 'u', 't', 'f', '*', '8', '\0' };
++Char STRGB2312[] = { 'g', 'b', '2', '3', '1', '2', '\0' };
++
+ # ifdef MBYTEDEBUG /* Sorry, use for beta testing */
+ Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' };
+ # endif /* MBYTEMAP */
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-cstr.patch b/app-shells/tcsh/files/tcsh-6.13.00-cstr.patch
new file mode 100644
index 000000000000..c8b64dde7eba
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-cstr.patch
@@ -0,0 +1,11 @@
+--- tcsh-6.13.00/tc.bind.c.cstr 2004-09-21 23:07:46.383456872 +0200
++++ tcsh-6.13.00/tc.bind.c 2004-09-21 23:08:38.053601816 +0200
+@@ -195,7 +195,7 @@
+ return;
+ if (key) {
+ if (SetArrowKeys(&in, XmapStr(&out), ntype) == -1)
+- xprintf(CGETS(20, 2, "Bad key name: %S\n"), in);
++ xprintf(CGETS(20, 2, "Bad key name: %S\n"), in.buf);
+ }
+ else
+ AddXkey(&in, XmapStr(&out), ntype);
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-dspmbyte.patch b/app-shells/tcsh/files/tcsh-6.13.00-dspmbyte.patch
new file mode 100644
index 000000000000..e3aad1f940aa
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-dspmbyte.patch
@@ -0,0 +1,60 @@
+--- tcsh-6.13.00/tc.const.c.mbyte 2004-03-21 17:48:15.000000000 +0100
++++ tcsh-6.13.00/tc.const.c 2004-08-18 10:48:34.322157016 +0200
+@@ -128,7 +128,7 @@
+ Char STRKSJIS[] = { 's', 'j', 'i', 's', '\0' };
+ Char STRKBIG5[] = { 'b', 'i', 'g', '5', '\0' };
+ Char STRKUTF8[] = { 'u', 't', 'f', '8', '\0' };
+-Char STRSTARKUTF8[] = { '*', 'u', 't', 'f', '8', '\0' };
++Char STRSTARKUTF8[] = { '*', 'u', 't', 'f', '*', '8', '\0' };
+ # ifdef MBYTEDEBUG /* Sorry, use for beta testing */
+ Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' };
+ # endif /* MBYTEMAP */
+--- tcsh-6.13.00/sh.glob.c.mbyte 2004-08-18 11:14:33.033196920 +0200
++++ tcsh-6.13.00/sh.glob.c 2004-08-18 11:21:16.575849112 +0200
+@@ -987,12 +987,12 @@
+ if (endstr == NULL)
+ /* Exact matches only */
+ for (p = blk; *p; p++)
+- gres |= t_pmatch(string, *p, &tstring, 0) == 2 ? 1 : 0;
++ gres |= t_pmatch(string, *p, &tstring, 1) == 2 ? 1 : 0;
+ else {
+ /* partial matches */
+ int minc = 0x7fffffff;
+ for (p = blk; *p; p++)
+- if (t_pmatch(string, *p, &tstring, 0) != 0) {
++ if (t_pmatch(string, *p, &tstring, 1) != 0) {
+ int t = (int) (tstring - string);
+ gres |= 1;
+ if (minc == -1 || minc > t)
+@@ -1079,8 +1079,8 @@
+ if (match)
+ continue;
+ if (rangec == '-' && *(pattern-2) != '[' && *pattern != ']') {
+- match = (globcharcoll(stringc, *pattern & TRIM, cs) <= 0 &&
+- globcharcoll(*(pattern-2) & TRIM, stringc, cs) <= 0);
++ match = (globcharcoll(stringc, *pattern & TRIM, 0) <= 0 &&
++ globcharcoll(*(pattern-2) & TRIM, stringc, 0) <= 0);
+ pattern++;
+ }
+ else
+@@ -1093,7 +1093,8 @@
+ *estr = string;
+ break;
+ default:
+- if ((patternc & TRIM) != stringc)
++ if (cs ? (patternc & TRIM) != stringc
++ : Tolower(patternc & TRIM) != Tolower(stringc))
+ return (0);
+ *estr = string;
+ break;
+--- tcsh-6.13.00/sh.set.c.mbyte 2004-03-21 17:48:14.000000000 +0100
++++ tcsh-6.13.00/sh.set.c 2004-08-18 10:48:34.000000000 +0200
+@@ -1260,7 +1260,7 @@
+
+ for (i = 0; dspmt[i].n; i++) {
+ Char *estr;
+- if (t_pmatch(pcp, dspmt[i].n, &estr, 1) > 0) {
++ if (dspmt[i].n[0] && t_pmatch(pcp, dspmt[i].n, &estr, 0) > 0) {
+ set(CHECK_MBYTEVAR, Strsave(dspmt[i].v), VAR_READWRITE);
+ update_dspmbyte_vars();
+ break;
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-fcntl.patch b/app-shells/tcsh/files/tcsh-6.13.00-fcntl.patch
new file mode 100644
index 000000000000..8bc3602c2b33
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-fcntl.patch
@@ -0,0 +1,20 @@
+--- tcsh-6.13.00/sh.sem.c.fcntl 2004-08-23 12:55:48.300002488 +0200
++++ tcsh-6.13.00/sh.sem.c 2004-08-23 13:00:59.745655552 +0200
+@@ -863,7 +863,7 @@
+ stderror(ERR_SYSTEM, tmp, strerror(errno));
+ /* allow input files larger than 2Gb */
+ #ifndef WINNT_NATIVE
+- (void) fcntl(fd, O_LARGEFILE, 0);
++ (void) fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_LARGEFILE);
+ #endif /*!WINNT_NATIVE*/
+ (void) dmove(fd, 0);
+ }
+@@ -923,7 +923,7 @@
+ stderror(ERR_SYSTEM, tmp, strerror(errno));
+ /* allow input files larger than 2Gb */
+ #ifndef WINNT_NATIVE
+- (void) fcntl(fd, O_LARGEFILE, 0);
++ (void) fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_LARGEFILE);
+ #endif /*!WINNT_NATIVE*/
+ }
+ (void) dmove(fd, 1);
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-glob.patch b/app-shells/tcsh/files/tcsh-6.13.00-glob.patch
new file mode 100644
index 000000000000..ed984bf4e6e8
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-glob.patch
@@ -0,0 +1,11 @@
+--- tcsh-6.13.00/glob.c.glob 2004-08-18 18:24:23.163464816 +0200
++++ tcsh-6.13.00/glob.c 2004-08-18 18:24:45.622050592 +0200
+@@ -164,6 +164,8 @@
+ } else {
+ if (islower(c1) && isupper(c2))
+ return (1);
++ if (isupper(c1) && islower(c2))
++ return (-1);
+ }
+ s1[0] = c1;
+ s2[0] = c2;
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-iconv.patch b/app-shells/tcsh/files/tcsh-6.13.00-iconv.patch
new file mode 100644
index 000000000000..adf7405f1430
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-iconv.patch
@@ -0,0 +1,402 @@
+diff -urN tcsh-6.13.00/config.h.in tcsh/config.h.in
+--- tcsh-6.13.00/config.h.in 1999-05-11 15:22:46.000000000 +0200
++++ tcsh/config.h.in 2004-07-16 19:49:55.000000000 +0200
+@@ -1 +1,19 @@
+-/* config.h.in. Generated automatically from configure.in by autoheader. */
++/* config.h.in. Generated from configure.in by autoheader. */
++
++/* Define to 1 if you have the iconv () interface */
++#undef HAVE_ICONV
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
+diff -urN tcsh-6.13.00/configure.in tcsh/configure.in
+--- tcsh-6.13.00/configure.in 2003-03-12 20:14:50.000000000 +0100
++++ tcsh/configure.in 2004-07-17 01:54:18.474111752 +0200
+@@ -261,6 +261,8 @@
+ AC_SEARCH_LIBS(tgetent, termlib curses termcap)
+ AC_SEARCH_LIBS(gethostbyname, nsl)
+ AC_SEARCH_LIBS(connect, socket)
++AC_SEARCH_LIBS([iconv], [iconv], [AC_DEFINE([HAVE_ICONV], [1],
++ [Define to 1 if you have the iconv () interface])])
+
+ dnl This is not good enough; we need sockaddr_storage too.
+ dnl See whether we can use IPv6 related functions
+diff -urN tcsh-6.13.00/nls/C/charset tcsh/nls/C/charset
+--- tcsh-6.13.00/nls/C/charset 2004-02-23 16:04:08.000000000 +0100
++++ tcsh/nls/C/charset 2004-07-17 02:16:24.186572824 +0200
+@@ -1 +1,3 @@
+ $ codeset=US-ASCII
++$set 255
++1 US-ASCII
+diff -urN tcsh-6.13.00/nls/et/charset tcsh/nls/et/charset
+--- tcsh-6.13.00/nls/et/charset 2004-02-23 16:04:08.000000000 +0100
++++ tcsh/nls/et/charset 2004-07-17 02:16:27.741032464 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-1
++$set 255
++1 ISO-8859-1
+diff -urN tcsh-6.13.00/nls/finnish/charset tcsh/nls/finnish/charset
+--- tcsh-6.13.00/nls/finnish/charset 2004-02-23 16:04:09.000000000 +0100
++++ tcsh/nls/finnish/charset 2004-07-17 02:16:34.898944296 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-1
++$set 255
++1 ISO-8859-1
+diff -urN tcsh-6.13.00/nls/french/charset tcsh/nls/french/charset
+--- tcsh-6.13.00/nls/french/charset 2004-02-23 16:04:09.000000000 +0100
++++ tcsh/nls/french/charset 2004-07-17 02:16:39.592230808 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-1
++$set 255
++1 ISO-8859-1
+diff -urN tcsh-6.13.00/nls/german/charset tcsh/nls/german/charset
+--- tcsh-6.13.00/nls/german/charset 2004-02-23 16:04:09.000000000 +0100
++++ tcsh/nls/german/charset 2004-07-17 02:16:40.647070448 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-1
++$set 255
++1 ISO-8859-1
+diff -urN tcsh-6.13.00/nls/greek/charset tcsh/nls/greek/charset
+--- tcsh-6.13.00/nls/greek/charset 2004-02-23 16:04:09.000000000 +0100
++++ tcsh/nls/greek/charset 2004-07-17 02:16:41.545933800 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-7
++$set 255
++1 ISO-8859-7
+diff -urN tcsh-6.13.00/nls/italian/charset tcsh/nls/italian/charset
+--- tcsh-6.13.00/nls/italian/charset 2004-02-23 16:04:09.000000000 +0100
++++ tcsh/nls/italian/charset 2004-07-17 02:16:42.464794112 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-1
++$set 255
++1 ISO-8859-1
+diff -urN tcsh-6.13.00/nls/ja/charset tcsh/nls/ja/charset
+--- tcsh-6.13.00/nls/ja/charset 2004-02-23 16:04:10.000000000 +0100
++++ tcsh/nls/ja/charset 2004-07-17 02:16:43.342660656 +0200
+@@ -1 +1,3 @@
+ $ codeset=EUC-JP
++$set 255
++1 EUC-JP
+diff -urN tcsh-6.13.00/nls/Makefile tcsh/nls/Makefile
+--- tcsh-6.13.00/nls/Makefile 2004-02-21 21:34:26.000000000 +0100
++++ tcsh/nls/Makefile 2004-07-16 19:09:58.000000000 +0200
+@@ -2,7 +2,7 @@
+ SUBDIRS= C et finnish french german greek italian ja pl russian \
+ spanish ukrainian
+ #GENCAT= gencat --new
+-#CHARSET= charset
++CHARSET= charset
+ GENCAT= gencat
+
+ catalogs:
+diff -urN tcsh-6.13.00/nls/pl/charset tcsh/nls/pl/charset
+--- tcsh-6.13.00/nls/pl/charset 2004-02-23 16:04:10.000000000 +0100
++++ tcsh/nls/pl/charset 2004-07-17 02:16:44.124541792 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-2
++$set 255
++1 ISO-8859-2
+diff -urN tcsh-6.13.00/nls/russian/charset tcsh/nls/russian/charset
+--- tcsh-6.13.00/nls/russian/charset 2004-02-23 16:04:10.000000000 +0100
++++ tcsh/nls/russian/charset 2004-07-17 02:16:44.827434936 +0200
+@@ -1 +1,3 @@
+ $ codeset=KOI8-R
++$set 255
++1 KOI8-R
+diff -urN tcsh-6.13.00/nls/spanish/charset tcsh/nls/spanish/charset
+--- tcsh-6.13.00/nls/spanish/charset 2004-02-23 16:04:10.000000000 +0100
++++ tcsh/nls/spanish/charset 2004-07-17 02:16:45.685304520 +0200
+@@ -1 +1,3 @@
+ $ codeset=ISO-8859-1
++$set 255
++1 ISO-8859-1
+diff -urN tcsh-6.13.00/nls/ukrainian/charset tcsh/nls/ukrainian/charset
+--- tcsh-6.13.00/nls/ukrainian/charset 2004-02-23 16:04:11.000000000 +0100
++++ tcsh/nls/ukrainian/charset 2004-07-17 02:16:46.448188544 +0200
+@@ -1 +1,3 @@
+ $ codeset=KOI8-U
++$set 255
++1 KOI8-U
+diff -urN tcsh-6.13.00/sh.c tcsh/sh.c
+--- tcsh-6.13.00/sh.c 2004-02-21 21:34:24.000000000 +0100
++++ tcsh/sh.c 2004-07-17 02:29:55.143288664 +0200
+@@ -2387,7 +2387,7 @@
+ {
+ #ifdef NLS_BUGS
+ #ifdef NLS_CATALOGS
+- (void)catclose(catd);
++ nlsclose();
+ #endif /* NLS_CATALOGS */
+ #endif /* NLS_BUGS */
+
+@@ -2462,7 +2462,7 @@
+ * because messages will stop working on the parent too.
+ */
+ if (child == 0)
+- (void) catclose(catd);
++ nlsclose();
+ #endif /* NLS_CATALOGS */
+ #ifdef WINNT_NATIVE
+ nt_cleanup();
+diff -urN tcsh-6.13.00/sh.decls.h tcsh/sh.decls.h
+--- tcsh-6.13.00/sh.decls.h 2004-03-21 17:48:14.000000000 +0100
++++ tcsh/sh.decls.h 2004-07-17 01:57:10.879902088 +0200
+@@ -33,6 +33,11 @@
+ #ifndef _h_sh_decls
+ #define _h_sh_decls
+
++#ifdef HAVE_ICONV
++#include <iconv.h>
++#include <nl_types.h>
++#endif
++
+ /*
+ * sh.c
+ */
+@@ -178,7 +183,12 @@
+ #if defined(FILEC) && defined(TIOCSTI)
+ extern int sortscmp __P((Char **, Char **));
+ #endif
++
++#ifdef HAVE_ICONV
++extern char *iconv_catgets __P((nl_catd, int, int, const char *));
++#endif
+ extern void nlsinit __P((void));
++extern void nlsclose __P((void));
+ extern int t_pmatch __P((Char *, Char *, Char **, int));
+
+ /*
+diff -urN tcsh-6.13.00/sh.func.c tcsh/sh.func.c
+--- tcsh-6.13.00/sh.func.c 2004-05-13 17:23:39.000000000 +0200
++++ tcsh/sh.func.c 2004-07-17 02:16:08.605941440 +0200
+@@ -41,6 +41,10 @@
+ #include "nt.const.h"
+ #endif /* WINNT_NATIVE */
+
++#ifdef HAVE_ICONV
++#include <langinfo.h>
++#endif
++
+ /*
+ * C shell
+ */
+@@ -1379,16 +1383,16 @@
+ # ifdef LC_COLLATE
+ (void) setlocale(LC_COLLATE, "");
+ # endif
++# ifdef LC_CTYPE
++ (void) setlocale(LC_CTYPE, ""); /* for iscntrl */
++# endif /* LC_CTYPE */
+ # ifdef NLS_CATALOGS
+ # ifdef LC_MESSAGES
+ (void) setlocale(LC_MESSAGES, "");
+ # endif /* LC_MESSAGES */
+- (void) catclose(catd);
++ nlsclose();
+ nlsinit();
+ # endif /* NLS_CATALOGS */
+-# ifdef LC_CTYPE
+- (void) setlocale(LC_CTYPE, ""); /* for iscntrl */
+-# endif /* LC_CTYPE */
+ # ifdef SETLOCALEBUG
+ dont_free = 0;
+ # endif /* SETLOCALEBUG */
+@@ -1412,7 +1416,7 @@
+
+ #ifdef NLS_CATALOGS
+ if (eq(vp, STRNLSPATH)) {
+- (void) catclose(catd);
++ nlsclose();
+ nlsinit();
+ }
+ #endif
+@@ -1571,16 +1575,16 @@
+ # ifdef LC_COLLATE
+ (void) setlocale(LC_COLLATE, "");
+ # endif
++# ifdef LC_CTYPE
++ (void) setlocale(LC_CTYPE, ""); /* for iscntrl */
++# endif /* LC_CTYPE */
+ # ifdef NLS_CATALOGS
+ # ifdef LC_MESSAGES
+ (void) setlocale(LC_MESSAGES, "");
+ # endif /* LC_MESSAGES */
+- (void) catclose(catd);
++ nlsclose();
+ nlsinit();
+ # endif /* NLS_CATALOGS */
+-# ifdef LC_CTYPE
+- (void) setlocale(LC_CTYPE, ""); /* for iscntrl */
+-# endif /* LC_CTYPE */
+ # ifdef SETLOCALEBUG
+ dont_free = 0;
+ # endif /* SETLOCALEBUG */
+@@ -1613,7 +1617,7 @@
+ #endif /* COLOR_LS_F */
+ #ifdef NLS_CATALOGS
+ else if (eq(name, STRNLSPATH)) {
+- (void) catclose(catd);
++ nlsclose();
+ nlsinit();
+ }
+ #endif
+@@ -2435,6 +2439,56 @@
+ flush();
+ }
+
++#ifdef HAVE_ICONV
++iconv_t catgets_iconv; /* Or (iconv_t)-1 */
++
++char *
++iconv_catgets(catd, set_id, msg_id, s)
++nl_catd catd;
++int set_id, msg_id;
++const char *s;
++{
++ static char *buf; /* = NULL; */
++ static size_t buf_size; /* = 0; */
++
++ char *orig, *src, *dest;
++ size_t src_size, dest_size;
++
++ orig = catgets(catd, set_id, msg_id, s);
++ if (catgets_iconv == (iconv_t)-1 || orig == s)
++ return orig;
++ src = orig;
++ src_size = strlen (src) + 1;
++ dest = buf;
++ while (src_size != 0) {
++ dest_size = buf + buf_size - dest;
++ if (iconv(catgets_iconv, &src, &src_size, &dest, &dest_size)
++ == (size_t)-1) {
++ switch (errno) {
++ case E2BIG:
++ {
++ char *p;
++
++ if (buf_size == 0)
++ buf_size = 32;
++ p = xrealloc (buf, 2 * buf_size);
++ if (p == NULL)
++ return orig;
++ buf_size *= 2;
++ dest = p + (dest - buf);
++ buf = p;
++ break;
++ }
++
++ case EILSEQ: case EINVAL: default:
++ return orig;
++ }
++ }
++ }
++ return buf;
++}
++#endif
++
+ void
+ nlsinit()
+ {
+@@ -2445,6 +2499,11 @@
+ xsnprintf((char *)catalog, sizeof(catalog), "tcsh.%s",
+ short2str(varval(STRcatalog)));
+ catd = catopen(catalog, MCLoadBySet);
++#ifdef HAVE_ICONV
++ /* catgets (), not CGETS, the charset name should be in ASCII anyway. */
++ catgets_iconv = iconv_open (nl_langinfo (CODESET),
++ catgets(catd, 255, 1, "ASCII"));
++#endif /* HAVE_ICONV */
+ #endif /* NLS_CATALOGS */
+ #ifdef WINNT_NATIVE
+ nls_dll_init();
+@@ -2455,3 +2514,15 @@
+ editinit(); /* init the editor messages */
+ terminit(); /* init the termcap messages */
+ }
++
++void
++nlsclose()
++{
++#ifdef HAVE_ICONV
++ if (catgets_iconv != (iconv_t)-1) {
++ iconv_close (catgets_iconv);
++ catgets_iconv = (iconv_t)-1;
++ }
++#endif /* HAVE_ICONV */
++ catclose(catd);
++}
+diff -urN tcsh-6.13.00/sh.h tcsh/sh.h
+--- tcsh-6.13.00/sh.h 2004-02-21 21:34:25.000000000 +0100
++++ tcsh/sh.h 2004-07-17 01:50:28.439082392 +0200
+@@ -35,6 +35,10 @@
+
+ #include "config.h"
+
++#ifdef HAVE_ICONV
++#include <iconv.h>
++#endif
++
+ #ifndef HAVE_QUAD
+ #ifdef __GNUC__
+ #define HAVE_QUAD 1
+@@ -1245,7 +1249,12 @@
+ # define MCLoadBySet 0
+ # endif
+ EXTERN nl_catd catd;
+-# define CGETS(b, c, d) catgets(catd, b, c, d)
++# ifdef HAVE_ICONV
++EXTERN iconv_t catgets_iconv; /* Or (iconv_t)-1 */
++# define CGETS(b, c, d) iconv_catgets(catd, b, c, d)
++# else
++# define CGETS(b, c, d) catgets(catd, b, c, d)
++# endif
+ # define CSAVS(b, c, d) strsave(CGETS(b, c, d))
+ # else
+ # define CGETS(b, c, d) d
+diff -urN tcsh-6.13.00/sh.misc.c tcsh/sh.misc.c
+--- tcsh-6.13.00/sh.misc.c 2003-03-12 20:14:51.000000000 +0100
++++ tcsh/sh.misc.c 2004-07-17 02:30:01.477325744 +0200
+@@ -260,7 +260,7 @@
+
+ #ifdef NLS_BUGS
+ #ifdef NLS_CATALOGS
+- (void)catclose(catd);
++ nlsclose();
+ #endif /* NLS_CATALOGS */
+ #endif /* NLS_BUGS */
+ #ifdef YPBUGS
+diff -urN tcsh-6.13.00/sh.set.c tcsh/sh.set.c
+--- tcsh-6.13.00/sh.set.c 2004-03-21 17:48:14.000000000 +0100
++++ tcsh/sh.set.c 2004-07-17 02:04:17.022118624 +0200
+@@ -192,7 +192,7 @@
+ #endif
+ #ifdef NLS_CATALOGS
+ else if (eq(vp, STRcatalog)) {
+- (void) catclose(catd);
++ nlsclose();
+ nlsinit();
+ }
+ #if defined(FILEC) && defined(TIOCSTI)
+@@ -779,7 +779,7 @@
+ update_dspmbyte_vars();
+ #endif
+ #ifdef NLS_CATALOGS
+- (void) catclose(catd);
++ nlsclose();
+ nlsinit();
+ #endif /* NLS_CATALOGS */
+ }
+
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-utmp.patch b/app-shells/tcsh/files/tcsh-6.13.00-utmp.patch
new file mode 100644
index 000000000000..5f6d583608a6
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-utmp.patch
@@ -0,0 +1,59 @@
+Use libc's built-in getutXXX() functions for manipulating the file.
+
+--- tcsh-6.13.00/tc.who.c.utmp 2004-08-17 17:19:44.541315488 +0200
++++ tcsh-6.13.00/tc.who.c 2004-08-17 17:22:12.251860072 +0200
+@@ -165,12 +165,13 @@
+ watch_login(force)
+ int force;
+ {
+- int utmpfd, comp = -1, alldone;
++ int comp = -1, alldone;
+ int firsttime = stlast == 1;
+ #ifdef BSDSIGS
+ sigmask_t omask;
+ #endif /* BSDSIGS */
+ struct utmp utmp;
++ struct utmp *uptr;
+ struct who *wp, *wpnew;
+ struct varent *v;
+ Char **vp = NULL;
+@@ -263,18 +264,8 @@
+ return;
+ }
+ stlast = sta.st_mtime;
+- if ((utmpfd = open(_PATH_UTMP, O_RDONLY|O_LARGEFILE)) < 0) {
+- if (!force)
+- xprintf(CGETS(26, 2,
+- "%s cannot be opened. Please \"unset watch\".\n"),
+- _PATH_UTMP);
+-# ifdef BSDSIGS
+- (void) sigsetmask(omask);
+-# else
+- (void) sigrelse(SIGINT);
+-# endif
+- return;
+- }
++ utmpname(_PATH_UTMP);
++ setutent();
+
+ /*
+ * xterm clears the entire utmp entry - mark everyone on the status list
+@@ -289,7 +280,8 @@
+ * Read in the utmp file, sort the entries, and update existing entries or
+ * add new entries to the status list.
+ */
+- while (read(utmpfd, (char *) &utmp, sizeof utmp) == sizeof utmp) {
++ while ((uptr = getutent())) {
++ memcpy(&utmp, uptr, sizeof(utmp));
+
+ # ifdef DEAD_PROCESS
+ # ifndef IRIS4D
+@@ -385,7 +377,7 @@
+ wp->who_prev = wpnew; /* linked in now */
+ }
+ }
+- (void) close(utmpfd);
++ endutent();
+ # if defined(UTHOST) && defined(_SEQUENT_)
+ endutent();
+ # endif
diff --git a/app-shells/tcsh/files/tcsh-6.13.00-winchg.patch b/app-shells/tcsh/files/tcsh-6.13.00-winchg.patch
new file mode 100644
index 000000000000..87c2a22b020c
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.13.00-winchg.patch
@@ -0,0 +1,50 @@
+diff -urN tcsh-6.13.00/ed.init.c tcsh-6.13.01/ed.init.c
+--- tcsh-6.13.00/ed.init.c 2002-07-07 00:28:13.000000000 +0200
++++ tcsh-6.13.01/ed.init.c 2004-05-21 20:51:25.000000000 +0200
+@@ -127,6 +127,7 @@
+ #else /* BSDSIGS */
+ (void) sigrelse(SIG_WINDOW);
+ #endif /* BSDSIGS */
++ windowchg = 0;
+ }
+
+ sigret_t
+diff -urN tcsh-6.13.00/ed.inputl.c tcsh-6.13.01/ed.inputl.c
+--- tcsh-6.13.00/ed.inputl.c 2002-06-25 21:02:11.000000000 +0200
++++ tcsh-6.13.01/ed.inputl.c 2004-05-21 20:50:36.000000000 +0200
+@@ -738,6 +738,10 @@
+ #ifdef WINNT_NATIVE
+ __nt_want_vcode = 1;
+ #endif /* WINNT_NATIVE */
++#ifdef SIG_WINDOW
++ if (windowchg)
++ (void) check_window_size(0); /* for window systems */
++#endif /* SIG_WINDOW */
+ while ((num_read = read(SHIN, (char *) &tcp, 1)) == -1) {
+ if (errno == EINTR)
+ continue;
+diff -urN tcsh-6.13.00/sh.c tcsh-6.13.01/sh.c
+--- tcsh-6.13.00/sh.c 2004-02-21 21:34:24.000000000 +0100
++++ tcsh-6.13.01/sh.c 2004-07-24 23:52:48.000000000 +0200
+@@ -2181,7 +2181,6 @@
+ freesyn(savet), savet = NULL;
+ #ifdef SIG_WINDOW
+ if (windowchg || (catch && intty && !whyles && !tellwhat)) {
+- windowchg = 0;
+ (void) check_window_size(0); /* for window systems */
+ }
+ #endif /* SIG_WINDOW */
+diff -urN tcsh-6.13.00/sh.lex.c tcsh-6.13.01/sh.lex.c
+--- tcsh-6.13.00/sh.lex.c 2003-08-04 18:19:13.000000000 +0200
++++ tcsh-6.13.01/sh.lex.c 2004-05-21 20:50:36.000000000 +0200
+@@ -1765,6 +1775,10 @@
+ if (c == 0 || (c < 0 && fixio(SHIN, errno) == -1))
+ return (-1);
+ }
++#ifdef SIG_WINDOW
++ if (windowchg)
++ (void) check_window_size(0); /* for window systems */
++#endif /* SIG_WINDOW */
+ #ifndef WINNT_NATIVE
+ c = fbuf[(int) fseekp / BUFSIZE][(int) fseekp % BUFSIZE];
+ fseekp++;
diff --git a/app-shells/tcsh/tcsh-6.13-r1.ebuild b/app-shells/tcsh/tcsh-6.13-r1.ebuild
new file mode 100644
index 000000000000..ff143ed09e80
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.13-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-shells/tcsh/tcsh-6.13-r1.ebuild,v 1.1 2005/03/02 08:54:49 dragonheart Exp $
+
+inherit eutils
+
+MY_P="${PN}-${PV}.00"
+DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
+HOMEPAGE="http://www.tcsh.org/"
+SRC_URI="ftp://ftp.astron.com/pub/tcsh/${MY_P}.tar.gz
+ mirror://gentoo/tcsh-complete"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~mips"
+IUSE="perl"
+
+RDEPEND="virtual/libc
+ >=sys-libs/ncurses-5.1
+ perl? ( dev-lang/perl )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+
+ cd ${S}
+
+ epatch ${FILESDIR}/tcsh-6.13.00-utmp.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-dspmbyte.patch
+ epatch ${FILESDIR}/tcsh-6.11.00-termcap.patch
+ epatch ${FILESDIR}/tcsh-6.12.00-setpgrp.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-charset.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-iconv.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-glob.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-arch.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-fcntl.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-winchg.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-codeset.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-closem.patch
+ epatch ${FILESDIR}/tcsh-6.13.00-cstr.patch
+}
+
+src_compile() {
+ econf --prefix=/ || die "econf failed"
+ emake || die "compile problem"
+}
+
+src_install() {
+ make DESTDIR=${D} install install.man || die
+
+ if use perl ; then
+ perl tcsh.man2html || die
+ dohtml tcsh.html/*.html
+ fi
+
+ dosym /bin/tcsh /bin/csh
+ dodoc FAQ Fixes NewThings Ported README WishList Y2K
+
+ insinto /etc
+ newins ${FILESDIR}/csh.cshrc_new csh.cshrc
+ newins ${FILESDIR}/csh.login_new csh.login
+
+ insinto /etc/skel
+ newins ${FILESDIR}/tcsh.config .tcsh.config
+
+ insinto /etc/profile.d
+ doins ${FILESDIR}/tcsh-settings ${FILESDIR}/tcsh-aliases ${FILESDIR}/tcsh-bindkey ${DISTDIR}/tcsh-complete
+}