summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-shells/tcsh
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-shells/tcsh')
-rw-r--r--app-shells/tcsh/Manifest5
-rw-r--r--app-shells/tcsh/files/tcsh-6.14-makefile.patch16
-rw-r--r--app-shells/tcsh/files/tcsh-6.14-use-ncurses.patch11
-rw-r--r--app-shells/tcsh/files/tcsh-6.14.00-debian-dircolors.patch19
-rw-r--r--app-shells/tcsh/files/tcsh-6.15.00-normalize-command-fix.patch14
-rw-r--r--app-shells/tcsh/files/tcsh-6.18.01-aix.patch14
-rw-r--r--app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch31
-rw-r--r--app-shells/tcsh/metadata.xml18
-rw-r--r--app-shells/tcsh/tcsh-6.17-r1.ebuild94
-rw-r--r--app-shells/tcsh/tcsh-6.17.06.ebuild90
-rw-r--r--app-shells/tcsh/tcsh-6.18.01-r2.ebuild100
-rw-r--r--app-shells/tcsh/tcsh-6.18.01-r3.ebuild101
-rw-r--r--app-shells/tcsh/tcsh-6.18.01.ebuild90
13 files changed, 603 insertions, 0 deletions
diff --git a/app-shells/tcsh/Manifest b/app-shells/tcsh/Manifest
new file mode 100644
index 00000000000..32a79a26cd2
--- /dev/null
+++ b/app-shells/tcsh/Manifest
@@ -0,0 +1,5 @@
+DIST tcsh-6.17.00.tar.gz 890084 SHA256 575266122bc2bc351c84a7f858020c0e6b6f95a64ad4de3ce95e340f57e4a9a9 SHA512 7bb1504ea3aed7d67943c9a642b12982621c79325ef223bfed43c01ea6f9aca44cab7c5c949a7fac910fd5140dac154c2ac125362a7a0bb4c1992ef2fdd76fe3 WHIRLPOOL 2f9350c378b4a6aa757bd7168fb38ababe4e89e842ab43335d43b222af73ff27bdeef558ad9c83d54a5b8a22be18e8be86e4da218fa1fdc91e903476104c94cb
+DIST tcsh-6.17.06.tar.gz 919999 SHA256 c9eff6aa782ecec5c6719954b529fadac97c32f3ba4c56fa07c40d425c2d91df SHA512 77105b6d42ae2924acee5cf9caf759fb713292e89a0a651056e2e89839ee2a3d85286e5b54b570eefce8fdee6742745a12276b448bb891b860a89cc11b42592b WHIRLPOOL 625f718b89ffd53a9f07211c4d1b06c2468ee190afebb032dd519cb3acb57515cdbd5392bc1130885702653561ac3e30e3b562ab10fef37b163b8ae02f089f84
+DIST tcsh-6.18.01.tar.gz 926872 SHA256 d81ca27851f3e8545666399b4bcf25433e602a195113b3f7c73886fef84c9fa8 SHA512 2791709f6db19b70652259f7dd5ee5c5d7943e814b3904cac5a3e890ff3b144401ed8552bd4f82ec789378d85c3f785438446c4d97d229c46bd0a08970d34628 WHIRLPOOL 3a77a207fb53e81ccedec821dc20c55cdd60f0ea290b3042e0858dc479a9a208d515c065521118e85dba839f0ff765b435c42118849d5159e12cab52fdbfc001
+DIST tcsh-gentoo-patches-r1.8.tar.bz2 2484 SHA256 77fa4ae60090ad5a6ec50185eec9070757eedb798b1c29327d27fc582cb59f37 SHA512 ab7bf0beb7fcb6fd0d5f18089f6e86ee62b5cc780a1b34cee576199eaac3b08ee84740b53327a37440b58042246a12da253c698655367fde548e121f4e3101b2 WHIRLPOOL 8ec43dd26dcedb6ef12a552c8029a88e9cc7569ba069c90567d75ddd103fe08edaabd8c57418484435bb782410f9b58886e189f347cb50249280aa7fb88afb4f
+DIST tcsh-gentoo-patches-r1.9.tar.bz2 2488 SHA256 6375f48d78b64fd97fc2cb07e8117e41459521a8de3919d174eec321a98af483 SHA512 9903e9c3e2279abcac09a3235f3c5db9f42156c18137eb651ede195ca2b069f0b5bc6105fed33666b69796c4ebf03e4efe63cd9beba1898bac7297a2f74bfd3d WHIRLPOOL a16e642f32095f5403cad38446acc50e1802e874dba66eccfdc2ab7f5108fe77e91f5990585ba4fffb808be92c15a05f70eaf1fb436da040287b04c207c9a105
diff --git a/app-shells/tcsh/files/tcsh-6.14-makefile.patch b/app-shells/tcsh/files/tcsh-6.14-makefile.patch
new file mode 100644
index 00000000000..6d85aa0588f
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.14-makefile.patch
@@ -0,0 +1,16 @@
+* don't strip (portage does that for us)
+* don't try to move away an older tcsh binary; we don't install in / so
+ that only results in an ugly error message
+
+--- tcsh-6.14.00/Makefile.in
++++ tcsh-6.14.00/Makefile.in
+@@ -477,9 +477,7 @@
+
+ install: tcsh$(EXEEXT)
+ -mkdir -p ${DESTBIN}
+- -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old
+ cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT)
+- -strip ${DESTBIN}/tcsh$(EXEEXT)
+ chmod 755 ${DESTBIN}/tcsh$(EXEEXT)
+
+ install.man: tcsh.man
diff --git a/app-shells/tcsh/files/tcsh-6.14-use-ncurses.patch b/app-shells/tcsh/files/tcsh-6.14-use-ncurses.patch
new file mode 100644
index 00000000000..8fc902c19b4
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.14-use-ncurses.patch
@@ -0,0 +1,11 @@
+--- configure.in
++++ configure.in
+@@ -257,7 +257,7 @@
+ dnl Checks for libraries
+ AC_SEARCH_LIBS(crypt, crypt)
+ AC_SEARCH_LIBS(getspnam, sec)
+-AC_SEARCH_LIBS(tgetent, termlib termcap curses ncurses)
++AC_SEARCH_LIBS(tgetent, ncurses)
+ AC_SEARCH_LIBS(gethostbyname, nsl)
+ AC_SEARCH_LIBS(connect, socket)
+ AC_SEARCH_LIBS([iconv], [iconv], [AC_DEFINE([HAVE_ICONV], [1],
diff --git a/app-shells/tcsh/files/tcsh-6.14.00-debian-dircolors.patch b/app-shells/tcsh/files/tcsh-6.14.00-debian-dircolors.patch
new file mode 100644
index 00000000000..194d478c403
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.14.00-debian-dircolors.patch
@@ -0,0 +1,19 @@
+--- tcsh-6.14.00/tw.color.c
++++ tcsh-6.14.00/tw.color.c
+@@ -235,13 +235,10 @@
+ if ((Char)variables[i].variable[0] == (v[0] & CHAR) &&
+ (Char)variables[i].variable[1] == (v[1] & CHAR))
+ break;
+- if (i < nvariables) {
+- v += 3;
++ v += 3;
++ if (i < nvariables)
+ getstring(&c, &v, &variables[i].color, ':');
+- continue;
+- }
+- else
+- stderror(ERR_BADCOLORVAR, v[0], v[1]);
++ continue;
+ }
+ break;
+ }
diff --git a/app-shells/tcsh/files/tcsh-6.15.00-normalize-command-fix.patch b/app-shells/tcsh/files/tcsh-6.15.00-normalize-command-fix.patch
new file mode 100644
index 00000000000..b3b27ef7f14
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.15.00-normalize-command-fix.patch
@@ -0,0 +1,14 @@
+http://bugs.gw.com/view.php?id=53
+
+diff -uNr tcsh-6.15.00.orig/tw.parse.c tcsh-6.15.00/tw.parse.c
+--- tcsh-6.15.00.orig/tw.parse.c 2007-03-01 23:21:42.000000000 +0200
++++ tcsh-6.15.00/tw.parse.c 2007-06-30 20:10:54.000000000 +0300
+@@ -433,7 +433,7 @@
+ Char *p;
+ int found;
+
+- found = !cmd_expand(qline.s + wordp, &p);
++ found = cmd_expand(qline.s + wordp, &p);
+
+ if (!found) {
+ xfree(p);
diff --git a/app-shells/tcsh/files/tcsh-6.18.01-aix.patch b/app-shells/tcsh/files/tcsh-6.18.01-aix.patch
new file mode 100644
index 00000000000..669d2063473
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.18.01-aix.patch
@@ -0,0 +1,14 @@
+Upstream report, without better patch yet:
+http://bugs.gw.com/view.php?id=366
+
+--- tc.who.c.orig 2014-06-26 11:21:43 +0200
++++ tc.who.c 2014-06-26 11:21:58 +0200
+@@ -60,6 +60,8 @@
+ # define TCSH_PATH_UTMP _PATH_UTMPX
+ # elif defined(UTMPX_FILE)
+ # define TCSH_PATH_UTMP UTMPX_FILE
++# elif defined(UTMP_FILE)
++# define TCSH_PATH_UTMP UTMP_FILE
+ # elif __FreeBSD_version >= 900000
+ # /* Why isn't this defined somewhere? */
+ # define TCSH_PATH_UTMP "/var/run/utx.active"
diff --git a/app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch b/app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch
new file mode 100644
index 00000000000..d9501572fe5
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/545176
+http://mx.gw.com/pipermail/tcsh-bugs/2015-May/000945.html
+https://github.com/tcsh-org/tcsh/commit/624d3aebb6e6afadb4f35e894d11b5ebe290cd87
+
+From 624d3aebb6e6afadb4f35e894d11b5ebe290cd87 Mon Sep 17 00:00:00 2001
+From: christos <christos>
+Date: Thu, 28 May 2015 11:47:03 +0000
+Subject: [PATCH] avoid gcc-5 optimization malloc + memset = calloc (Fridolin
+ Pokorny)
+
+---
+ tc.alloc.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/tc.alloc.c
++++ b/tc.alloc.c
+@@ -348,10 +348,13 @@ calloc(size_t i, size_t j)
+ {
+ #ifndef lint
+ char *cp;
++ volatile size_t k;
+
+ i *= j;
+ cp = xmalloc(i);
+- memset(cp, 0, i);
++ /* Stop gcc 5.x from optimizing malloc+memset = calloc */
++ k = i;
++ memset(cp, 0, k);
+
+ return ((memalign_t) cp);
+ #else
diff --git a/app-shells/tcsh/metadata.xml b/app-shells/tcsh/metadata.xml
new file mode 100644
index 00000000000..bbb6c66303b
--- /dev/null
+++ b/app-shells/tcsh/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
+ <longdescription>
+ Tcsh is an enhanced, but completely compatible version of the Berkeley
+ UNIX C shell (csh). It is a command language interpreter usable both as
+ an interactive login shell and a shell script command processor. It
+ includes a command-line editor, programmable word completion, spelling
+ correction, a history mechanism, job control and a C-like syntax.
+ </longdescription>
+ <use>
+ <flag name="catalogs">Add support for NLS catalogs</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-shells/tcsh/tcsh-6.17-r1.ebuild b/app-shells/tcsh/tcsh-6.17-r1.ebuild
new file mode 100644
index 00000000000..cb515e8503e
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.17-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+inherit eutils flag-o-matic autotools prefix
+
+CONFVER="1.8"
+
+MY_P="${P}.00"
+DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
+HOMEPAGE="http://www.tcsh.org/"
+SRC_URI="ftp://ftp.astron.com/pub/tcsh/old/${MY_P}.tar.gz
+ http://www.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="catalogs doc"
+RESTRICT="test"
+
+# we need gettext because we run autoconf (AM_ICONV)
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( dev-lang/perl )"
+
+S=${WORKDIR}/${MY_P}
+CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
+
+src_prepare() {
+ epatch "${FILESDIR}/${MY_P/17/14}"-debian-dircolors.patch # bug #120792
+ epatch "${FILESDIR}"/${PN}-6.14-makefile.patch # bug #151951
+ epatch "${FILESDIR}"/${PN}-6.14-use-ncurses.patch
+ eautoreconf
+
+ if use catalogs ; then
+ einfo "enabling NLS catalogs support..."
+ sed -i -e "s/#undef NLS_CATALOGS/#define NLS_CATALOGS/" \
+ config_f.h || die
+ eend $?
+ fi
+
+ # unify ECHO behaviour
+ echo "#undef ECHO_STYLE" >> config_f.h
+ echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
+
+ eprefixify "${CONFDIR}"/*
+ # activate the right default PATH
+ if [[ -z ${EPREFIX} ]] ; then
+ sed -i \
+ -e 's/^#MAIN//' -e '/^#PREFIX/d' \
+ "${CONFDIR}"/csh.login || die
+ else
+ sed -i \
+ -e 's/^#PREFIX//' -e '/^#MAIN/d' \
+ "${CONFDIR}"/csh.login || die
+ fi
+}
+
+src_configure() {
+ # make tcsh look and live along the lines of the prefix
+ append-flags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
+ append-flags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
+ append-flags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
+ append-flags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
+ append-flags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
+
+ econf \
+ --prefix="${EPREFIX:-/}" \
+ --datarootdir='${prefix}/usr/share' \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.man || die
+
+ if use doc ; then
+ perl tcsh.man2html tcsh.man || die
+ dohtml tcsh.html/*.html
+ fi
+
+ insinto /etc
+ doins \
+ "${CONFDIR}"/csh.cshrc \
+ "${CONFDIR}"/csh.login
+
+ dodoc FAQ Fixes NewThings Ported README WishList Y2K
+
+ # bug #119703: add csh -> tcsh symlink
+ dosym /bin/tcsh /bin/csh
+}
diff --git a/app-shells/tcsh/tcsh-6.17.06.ebuild b/app-shells/tcsh/tcsh-6.17.06.ebuild
new file mode 100644
index 00000000000..f0378a86b07
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.17.06.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools prefix
+
+CONFVER="1.9"
+
+DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
+HOMEPAGE="http://www.tcsh.org/"
+SRC_URI="ftp://ftp.astron.com/pub/tcsh/beta/${P}.tar.gz
+ http://www.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls doc"
+RESTRICT="test"
+
+# we need gettext because we run autoconf (AM_ICONV)
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( dev-lang/perl )"
+
+CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.14.00-debian-dircolors.patch # bug #120792
+ epatch "${FILESDIR}"/${PN}-6.14-makefile.patch # bug #151951
+ epatch "${FILESDIR}"/${PN}-6.14-use-ncurses.patch
+ eautoreconf
+
+ # fix gencat usage
+ sed -i -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
+ nls/Makefile.in || die
+
+ # unify ECHO behaviour
+ echo "#undef ECHO_STYLE" >> config_f.h
+ echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
+
+ eprefixify "${CONFDIR}"/*
+ # activate the right default PATH
+ if [[ -z ${EPREFIX} ]] ; then
+ sed -i \
+ -e 's/^#MAIN//' -e '/^#PREFIX/d' \
+ "${CONFDIR}"/csh.login || die
+ else
+ sed -i \
+ -e 's/^#PREFIX//' -e '/^#MAIN/d' \
+ "${CONFDIR}"/csh.login || die
+ fi
+}
+
+src_configure() {
+ # make tcsh look and live along the lines of the prefix
+ append-flags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
+ append-flags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
+ append-flags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
+ append-flags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
+ append-flags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
+
+ econf \
+ --prefix="${EPREFIX:-/}" \
+ --datarootdir='${prefix}/usr/share' \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.man || die
+
+ if use doc ; then
+ perl tcsh.man2html tcsh.man || die
+ dohtml tcsh.html/*.html
+ fi
+
+ insinto /etc
+ doins \
+ "${CONFDIR}"/csh.cshrc \
+ "${CONFDIR}"/csh.login
+
+ dodoc FAQ Fixes NewThings Ported README WishList Y2K
+
+ # bug #119703: add csh -> tcsh symlink
+ dosym /bin/tcsh /bin/csh
+}
diff --git a/app-shells/tcsh/tcsh-6.18.01-r2.ebuild b/app-shells/tcsh/tcsh-6.18.01-r2.ebuild
new file mode 100644
index 00000000000..3dc6ead2c59
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.18.01-r2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools prefix
+
+CONFVER="1.9"
+
+DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
+HOMEPAGE="http://www.tcsh.org/"
+SRC_URI="ftp://ftp.astron.com/pub/tcsh/${P}.tar.gz
+ http://www.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls doc"
+RESTRICT="test"
+
+# we need gettext because we run autoconf (AM_ICONV)
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( dev-lang/perl )"
+
+CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.14.00-debian-dircolors.patch # bug #120792
+ epatch "${FILESDIR}"/${PN}-6.14-makefile.patch # bug #151951
+ epatch "${FILESDIR}"/${PN}-6.14-use-ncurses.patch
+ epatch "${FILESDIR}"/${PN}-6.18.01-aix.patch
+
+ # fix dependency on ncurses[tinfo], #459484
+ sed \
+ -e "s:\(ncurses\):\1 tinfo:g" \
+ -i configure.in || die
+
+ eautoreconf
+
+ # fix gencat usage
+ sed -i -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
+ nls/Makefile.in || die
+
+ # use sysmalloc (for larger alloc sets) on Darwin also
+ sed -i -e 's/__MACHTEN__/__MACH__/' config_f.h || die
+
+ # unify ECHO behaviour
+ echo "#undef ECHO_STYLE" >> config_f.h
+ echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
+
+ eprefixify "${CONFDIR}"/*
+ # activate the right default PATH
+ if [[ -z ${EPREFIX} ]] ; then
+ sed -i \
+ -e 's/^#MAIN//' -e '/^#PREFIX/d' \
+ "${CONFDIR}"/csh.login || die
+ else
+ sed -i \
+ -e 's/^#PREFIX//' -e '/^#MAIN/d' \
+ "${CONFDIR}"/csh.login || die
+ fi
+}
+
+src_configure() {
+ # make tcsh look and live along the lines of the prefix
+ append-cppflags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
+ append-cppflags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
+ append-cppflags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
+ append-cppflags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
+ append-cppflags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
+
+ econf \
+ --prefix="${EPREFIX:-/}" \
+ --datarootdir='${prefix}/usr/share' \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.man || die
+
+ if use doc ; then
+ perl tcsh.man2html tcsh.man || die
+ dohtml tcsh.html/*.html
+ fi
+
+ insinto /etc
+ doins \
+ "${CONFDIR}"/csh.cshrc \
+ "${CONFDIR}"/csh.login
+
+ dodoc FAQ Fixes NewThings Ported README WishList Y2K
+
+ # bug #119703: add csh -> tcsh symlink
+ dosym /bin/tcsh /bin/csh
+}
diff --git a/app-shells/tcsh/tcsh-6.18.01-r3.ebuild b/app-shells/tcsh/tcsh-6.18.01-r3.ebuild
new file mode 100644
index 00000000000..31db28723a0
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.18.01-r3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools prefix
+
+CONFVER="1.9"
+
+DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
+HOMEPAGE="http://www.tcsh.org/"
+SRC_URI="ftp://ftp.astron.com/pub/tcsh/${P}.tar.gz
+ http://www.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls doc"
+RESTRICT="test"
+
+# we need gettext because we run autoconf (AM_ICONV)
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( dev-lang/perl )"
+
+CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.14.00-debian-dircolors.patch # bug #120792
+ epatch "${FILESDIR}"/${PN}-6.14-makefile.patch # bug #151951
+ epatch "${FILESDIR}"/${PN}-6.14-use-ncurses.patch
+ epatch "${FILESDIR}"/${PN}-6.18.01-aix.patch
+ epatch "${FILESDIR}"/${PN}-6.18.01-gcc5.patch
+
+ # fix dependency on ncurses[tinfo], #459484
+ sed \
+ -e "s:\(ncurses\):\1 tinfo:g" \
+ -i configure.in || die
+
+ eautoreconf
+
+ # fix gencat usage
+ sed -i -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
+ nls/Makefile.in || die
+
+ # use sysmalloc (for larger alloc sets) on Darwin also
+ sed -i -e 's/__MACHTEN__/__MACH__/' config_f.h || die
+
+ # unify ECHO behaviour
+ echo "#undef ECHO_STYLE" >> config_f.h
+ echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
+
+ eprefixify "${CONFDIR}"/*
+ # activate the right default PATH
+ if [[ -z ${EPREFIX} ]] ; then
+ sed -i \
+ -e 's/^#MAIN//' -e '/^#PREFIX/d' \
+ "${CONFDIR}"/csh.login || die
+ else
+ sed -i \
+ -e 's/^#PREFIX//' -e '/^#MAIN/d' \
+ "${CONFDIR}"/csh.login || die
+ fi
+}
+
+src_configure() {
+ # make tcsh look and live along the lines of the prefix
+ append-cppflags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
+ append-cppflags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
+ append-cppflags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
+ append-cppflags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
+ append-cppflags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
+
+ econf \
+ --prefix="${EPREFIX:-/}" \
+ --datarootdir='${prefix}/usr/share' \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.man || die
+
+ if use doc ; then
+ perl tcsh.man2html tcsh.man || die
+ dohtml tcsh.html/*.html
+ fi
+
+ insinto /etc
+ doins \
+ "${CONFDIR}"/csh.cshrc \
+ "${CONFDIR}"/csh.login
+
+ dodoc FAQ Fixes NewThings Ported README WishList Y2K
+
+ # bug #119703: add csh -> tcsh symlink
+ dosym /bin/tcsh /bin/csh
+}
diff --git a/app-shells/tcsh/tcsh-6.18.01.ebuild b/app-shells/tcsh/tcsh-6.18.01.ebuild
new file mode 100644
index 00000000000..8e010a492da
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.18.01.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic autotools prefix
+
+CONFVER="1.9"
+
+DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
+HOMEPAGE="http://www.tcsh.org/"
+SRC_URI="ftp://ftp.astron.com/pub/tcsh/${P}.tar.gz
+ http://www.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="nls doc"
+RESTRICT="test"
+
+# we need gettext because we run autoconf (AM_ICONV)
+RDEPEND=">=sys-libs/ncurses-5.1
+ virtual/libiconv"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ doc? ( dev-lang/perl )"
+
+CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.14.00-debian-dircolors.patch # bug #120792
+ epatch "${FILESDIR}"/${PN}-6.14-makefile.patch # bug #151951
+ epatch "${FILESDIR}"/${PN}-6.14-use-ncurses.patch
+ eautoreconf
+
+ # fix gencat usage
+ sed -i -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
+ nls/Makefile.in || die
+
+ # unify ECHO behaviour
+ echo "#undef ECHO_STYLE" >> config_f.h
+ echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
+
+ eprefixify "${CONFDIR}"/*
+ # activate the right default PATH
+ if [[ -z ${EPREFIX} ]] ; then
+ sed -i \
+ -e 's/^#MAIN//' -e '/^#PREFIX/d' \
+ "${CONFDIR}"/csh.login || die
+ else
+ sed -i \
+ -e 's/^#PREFIX//' -e '/^#MAIN/d' \
+ "${CONFDIR}"/csh.login || die
+ fi
+}
+
+src_configure() {
+ # make tcsh look and live along the lines of the prefix
+ append-cppflags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
+ append-cppflags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
+ append-cppflags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
+ append-cppflags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
+ append-cppflags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
+
+ econf \
+ --prefix="${EPREFIX:-/}" \
+ --datarootdir='${prefix}/usr/share' \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install.man || die
+
+ if use doc ; then
+ perl tcsh.man2html tcsh.man || die
+ dohtml tcsh.html/*.html
+ fi
+
+ insinto /etc
+ doins \
+ "${CONFDIR}"/csh.cshrc \
+ "${CONFDIR}"/csh.login
+
+ dodoc FAQ Fixes NewThings Ported README WishList Y2K
+
+ # bug #119703: add csh -> tcsh symlink
+ dosym /bin/tcsh /bin/csh
+}