aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>1984-04-04 00:44:18 +0000
committerpsyc://loupsycedyglgamf.onion/~lynX <ircs://psyced.org/youbroketheinternet>1984-04-04 00:44:18 +0000
commitbc43b87c90b7ed73c9a5637014b18b0fdbc0eb2e (patch)
treef2b7a5ca79dc4d3b3c4fccd2c08d7786db0beb7e
parentc4de9dc2d9f51be865d3ee89fcdcdf3b4fe36455 (diff)
downloadyoubroketheinternet-overlay-bc43b87c90b7ed73c9a5637014b18b0fdbc0eb2e.tar.gz
youbroketheinternet-overlay-bc43b87c90b7ed73c9a5637014b18b0fdbc0eb2e.zip
a minor patch for tcsh(1)
-rw-r--r--README11
-rw-r--r--app-shells/tcsh/Manifest3
-rw-r--r--app-shells/tcsh/files/tcsh-6.18.01-aix.patch14
-rw-r--r--app-shells/tcsh/files/tcsh-6.20.00-debian-dircolors.patch21
-rw-r--r--app-shells/tcsh/files/tcsh-6.20.00-use-ncurses-tinfo.patch11
-rw-r--r--app-shells/tcsh/files/tcsh-6.21.00-fno-common.patch22
-rw-r--r--app-shells/tcsh/files/tcsh-6.21.00-no-nls.patch17
-rw-r--r--app-shells/tcsh/files/tcsh-6.21.00-use-ncurses.patch11
-rw-r--r--app-shells/tcsh/files/tcsh-lynXified-delete-path.patch33
-rw-r--r--app-shells/tcsh/metadata.xml15
-rw-r--r--app-shells/tcsh/tcsh-6.20.00.ebuild102
-rw-r--r--app-shells/tcsh/tcsh-6.21.00-r1.ebuild104
12 files changed, 364 insertions, 0 deletions
diff --git a/README b/README
index cb3a0a7..202c9cc 100644
--- a/README
+++ b/README
@@ -79,6 +79,17 @@ without this all these years?
79 79
80[ask ng0] 80[ask ng0]
81 81
82== app-shells/tcsh ==
83
84Removing a long path specification from the command line
85can be tedious with tcsh as it has no notion of file names
86containing whitespace while editing the command line.
87My patch makes CTRL-W aka kill-region do this whenever no
88mark has been set (which is the default), instead of giving
89an error. Back when tcsh was created, no sane Unix person
90would put whitespace into filenames! Filesystems had barely
91just learned to even be capable of such perversions.
92
82== dev-db/cayley == 93== dev-db/cayley ==
83 94
84A graph database written in Go. Borrowed the ebuild from 95A graph database written in Go. Borrowed the ebuild from
diff --git a/app-shells/tcsh/Manifest b/app-shells/tcsh/Manifest
new file mode 100644
index 0000000..4862d06
--- /dev/null
+++ b/app-shells/tcsh/Manifest
@@ -0,0 +1,3 @@
1DIST tcsh-6.20.00.tar.gz 1001696 BLAKE2B dfebde21c70f236e1070a93621a331ce1a53efab4496c44f25b51e98e843a8d0e3ca503da46a4fc0177b57b682e3ecc07f8120cde25ecf466c8ff094df5f9463 SHA512 c5635393c22341e62fb9a0b953ddf8871a876ab09deb08c98237f93afa9257b4a3381d1db65eefe769e22ef845db29ab7bc78773f1f609d73c8205689a6683e9
2DIST tcsh-6.21.00.tar.gz 1001909 BLAKE2B 7f2be382a3a344d55e0785eace79377e20dd2cd2eb9e9533168fbb6286631cdcd35bdc06cd42d9439a29a7cd1a911416bfe6b0245065535aebdf5adb58d2c301 SHA512 d7f46588a35b9cd01cfa33d0f9bbae09e9692605b5c045c2b58e66dba958ab904ddfe45aa7361767034e6cc03a34ad9ba4d14fa836df723bade29f3f6a18a46c
3DIST tcsh-gentoo-patches-r1.9.tar.bz2 2488 BLAKE2B 58924e623c75068cdc686be61755bdbcf8d0949a2141ac532ac089f80ff083b2c9f6767038b9fc52171a00ed82c558b83216327c87b41f51c3648343869cd5b6 SHA512 9903e9c3e2279abcac09a3235f3c5db9f42156c18137eb651ede195ca2b069f0b5bc6105fed33666b69796c4ebf03e4efe63cd9beba1898bac7297a2f74bfd3d
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 0000000..669d206
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.18.01-aix.patch
@@ -0,0 +1,14 @@
1Upstream report, without better patch yet:
2http://bugs.gw.com/view.php?id=366
3
4--- tc.who.c.orig 2014-06-26 11:21:43 +0200
5+++ tc.who.c 2014-06-26 11:21:58 +0200
6@@ -60,6 +60,8 @@
7 # define TCSH_PATH_UTMP _PATH_UTMPX
8 # elif defined(UTMPX_FILE)
9 # define TCSH_PATH_UTMP UTMPX_FILE
10+# elif defined(UTMP_FILE)
11+# define TCSH_PATH_UTMP UTMP_FILE
12 # elif __FreeBSD_version >= 900000
13 # /* Why isn't this defined somewhere? */
14 # define TCSH_PATH_UTMP "/var/run/utx.active"
diff --git a/app-shells/tcsh/files/tcsh-6.20.00-debian-dircolors.patch b/app-shells/tcsh/files/tcsh-6.20.00-debian-dircolors.patch
new file mode 100644
index 0000000..3b18f1c
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.20.00-debian-dircolors.patch
@@ -0,0 +1,21 @@
1forward-ported 6.14 to 6.20 patch from Debian
2
3--- tcsh-6.20.00/tw.color.c
4+++ tcsh-6.20.00/tw.color.c
5@@ -382,13 +382,10 @@
6 if ((Char)variables[i].variable[0] == (v[0] & CHAR) &&
7 (Char)variables[i].variable[1] == (v[1] & CHAR))
8 break;
9- if (i < nvariables) {
10- v += 3;
11+ v += 3;
12+ if (i < nvariables)
13 getstring(&c, &v, &variables[i].color, ':');
14- continue;
15- }
16- else
17- stderror(ERR_BADCOLORVAR, v[0], v[1]);
18+ continue;
19 }
20 break;
21 }
diff --git a/app-shells/tcsh/files/tcsh-6.20.00-use-ncurses-tinfo.patch b/app-shells/tcsh/files/tcsh-6.20.00-use-ncurses-tinfo.patch
new file mode 100644
index 0000000..e178418
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.20.00-use-ncurses-tinfo.patch
@@ -0,0 +1,11 @@
1--- tcsh-6.20.00/configure.ac
2+++ tcsh-6.20.00/configure.ac
3@@ -317,7 +317,7 @@
4 dnl Checks for libraries
5 AC_SEARCH_LIBS(crypt, crypt)
6 AC_SEARCH_LIBS(getspnam, sec)
7-AC_SEARCH_LIBS([tgetent], [termlib termcap curses ncurses], [], [
8+AC_SEARCH_LIBS([tgetent], [ncurses tinfo], [], [
9 AC_MSG_ERROR([unable to find the tgetent() function])
10 ])
11 AC_SEARCH_LIBS(gethostbyname, nsl)
diff --git a/app-shells/tcsh/files/tcsh-6.21.00-fno-common.patch b/app-shells/tcsh/files/tcsh-6.21.00-fno-common.patch
new file mode 100644
index 0000000..b5a0cf0
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.21.00-fno-common.patch
@@ -0,0 +1,22 @@
1From 6974bc35a5cda6eab748e364bd76a860ca66968b Mon Sep 17 00:00:00 2001
2From: zoulasc <christos@zoulas.com>
3Date: Sat, 11 Jan 2020 11:16:51 -0500
4Subject: [PATCH] Remove extra variable definition that cause -fno-common build
5 to fail (Werner Fink)
6
7---
8 tc.sig.c | 1 -
9 1 file changed, 1 deletion(-)
10
11diff --git a/tc.sig.c b/tc.sig.c
12index 77659ca..576605a 100644
13--- a/tc.sig.c
14+++ b/tc.sig.c
15@@ -56,7 +56,6 @@ int alrmcatch_disabled; /* = 0; */
16 int phup_disabled; /* = 0; */
17 int pchild_disabled; /* = 0; */
18 int pintr_disabled; /* = 0; */
19-int handle_interrupt; /* = 0; */
20
21 int
22 handle_pending_signals(void)
diff --git a/app-shells/tcsh/files/tcsh-6.21.00-no-nls.patch b/app-shells/tcsh/files/tcsh-6.21.00-no-nls.patch
new file mode 100644
index 0000000..a01ebfb
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.21.00-no-nls.patch
@@ -0,0 +1,17 @@
1GetCmdChar: fix compilation with --disable-nls
2
3Bug: https://bugs.gentoo.org/689904
4
5--- a/ed.inputl.c
6+++ b/ed.inputl.c
7@@ -669,8 +669,8 @@
8 {
9 #ifndef WINNT_NATIVE // We use more than 256 for various extended keys
10- wint_t c = ch & CHAR;
11+ eChar c = ch & CHAR;
12 #else
13- wint_t c = ch;
14+ eChar c = ch;
15 #endif
16 return c < NT_NUM_KEYS ? CurrentKeyMap[c] : F_INSERT;
17 }
diff --git a/app-shells/tcsh/files/tcsh-6.21.00-use-ncurses.patch b/app-shells/tcsh/files/tcsh-6.21.00-use-ncurses.patch
new file mode 100644
index 0000000..d268474
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-6.21.00-use-ncurses.patch
@@ -0,0 +1,11 @@
1--- tcsh-6.21.00/configure.ac
2+++ tcsh-6.21.00/configure.ac
3@@ -317,7 +317,7 @@
4 dnl Checks for libraries
5 AC_SEARCH_LIBS(crypt, crypt)
6 AC_SEARCH_LIBS(getspnam, sec)
7-AC_SEARCH_LIBS([tgetent], [termlib tinfo termcap curses ncurses], [], [
8+AC_SEARCH_LIBS([tgetent], [tinfo ncurses], [], [
9 AC_MSG_ERROR([unable to find the tgetent() function])
10 ])
11 AC_SEARCH_LIBS(gethostbyname, nsl)
diff --git a/app-shells/tcsh/files/tcsh-lynXified-delete-path.patch b/app-shells/tcsh/files/tcsh-lynXified-delete-path.patch
new file mode 100644
index 0000000..ffc9971
--- /dev/null
+++ b/app-shells/tcsh/files/tcsh-lynXified-delete-path.patch
@@ -0,0 +1,33 @@
1--- ed.chared.c-orig 2020-02-21 10:46:54.518972312 +0100
2+++ ed.chared.c 2020-02-21 12:47:14.091944771 +0100
3@@ -2632,9 +2632,28 @@
4 CCRETVAL
5 e_killregion(Char c)
6 {
7+ Char *cp;
8+
9 USE(c);
10- if (!Mark)
11- return(CC_ERROR);
12+ if (!Mark || Mark == InputBuf || Mark == Cursor) {
13+ /*
14+ * proposed default behavior: backward-delete of a file path
15+ * accepting either double quote or backslash syntaxes
16+ * --symlynX 2020
17+ */
18+ for (cp = Cursor-2; cp >= InputBuf && *cp != '"'; cp--) {
19+// xprintf("Looking at '%c'\n", *cp);
20+ }
21+ if (cp > InputBuf) Mark = cp;
22+ else {
23+ for (cp = Cursor-3; cp >= InputBuf && (cp[1] != ' ' || *cp == '\\'); cp--) {
24+// xprintf("Then at '%c'\n", *cp);
25+ }
26+ if (++cp > InputBuf) Mark = cp+1;
27+ else return(CC_ERROR);
28+ }
29+// xprintf("Mark set at '%c'\n", *Mark);
30+ }
31
32 if (Mark > Cursor) {
33 c_push_kill(Cursor, Mark); /* copy it */
diff --git a/app-shells/tcsh/metadata.xml b/app-shells/tcsh/metadata.xml
new file mode 100644
index 0000000..1e378f9
--- /dev/null
+++ b/app-shells/tcsh/metadata.xml
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
3<pkgmetadata>
4 <maintainer type="person">
5 <email>grobian@gentoo.org</email>
6 <name>Fabian Groffen</name>
7 </maintainer>
8 <longdescription>
9 Tcsh is an enhanced, but completely compatible version of the Berkeley
10 UNIX C shell (csh). It is a command language interpreter usable both as
11 an interactive login shell and a shell script command processor. It
12 includes a command-line editor, programmable word completion, spelling
13 correction, a history mechanism, job control and a C-like syntax.
14 </longdescription>
15</pkgmetadata>
diff --git a/app-shells/tcsh/tcsh-6.20.00.ebuild b/app-shells/tcsh/tcsh-6.20.00.ebuild
new file mode 100644
index 0000000..1c2a4f2
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.20.00.ebuild
@@ -0,0 +1,102 @@
1# Copyright 1999-2020 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6inherit eutils flag-o-matic autotools prefix
7
8CONFVER="1.9"
9
10DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
11HOMEPAGE="http://www.tcsh.org/"
12SRC_URI="
13 ftp://ftp.astron.com/pub/tcsh/${P}.tar.gz
14 https://dev.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
15
16LICENSE="BSD"
17SLOT="0"
18KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
19IUSE="nls doc"
20RESTRICT="test"
21
22# we need gettext because we run autoconf (AM_ICONV)
23RDEPEND="
24 >=sys-libs/ncurses-5.1:0=
25 virtual/libiconv"
26DEPEND="${RDEPEND}
27 sys-devel/gettext
28 doc? ( dev-lang/perl )"
29
30CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
31
32PATCHES=(
33 "${FILESDIR}"/${PN}-6.20.00-debian-dircolors.patch # bug #120792
34 "${FILESDIR}"/${PN}-6.20.00-use-ncurses-tinfo.patch
35 "${FILESDIR}"/${PN}-6.18.01-aix.patch
36 "${FILESDIR}"/tcsh-lynXified-delete-path.patch
37)
38
39src_prepare() {
40 epatch "${PATCHES[@]}"
41
42 eautoreconf
43
44 # fix gencat usage
45 sed \
46 -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
47 -i nls/Makefile.in || die
48
49 # use sysmalloc (for larger alloc sets) on Darwin also
50 sed -i -e 's/__MACHTEN__/__MACH__/' config_f.h || die
51
52 # unify ECHO behaviour
53 echo "#undef ECHO_STYLE" >> config_f.h
54 echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
55
56 eprefixify "${CONFDIR}"/*
57 # activate the right default PATH
58 if [[ -z ${EPREFIX} ]] ; then
59 sed -i \
60 -e 's/^#MAIN//' -e '/^#PREFIX/d' \
61 "${CONFDIR}"/csh.login || die
62 else
63 sed -i \
64 -e 's/^#PREFIX//' -e '/^#MAIN/d' \
65 "${CONFDIR}"/csh.login || die
66 fi
67
68 eapply_user
69}
70
71src_configure() {
72 # make tcsh look and live along the lines of the prefix
73 append-cppflags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
74 append-cppflags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
75 append-cppflags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
76 append-cppflags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
77 append-cppflags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
78
79 econf \
80 --prefix="${EPREFIX:-}" \
81 --datarootdir='${prefix}/usr/share' \
82 $(use_enable nls)
83}
84
85src_install() {
86 emake DESTDIR="${D}" install install.man
87
88 DOCS=( FAQ Fixes NewThings Ported README WishList Y2K )
89 if use doc ; then
90 perl tcsh.man2html tcsh.man || die
91 HTML_DOCS=( tcsh.html/*.html )
92 fi
93 einstalldocs
94
95 insinto /etc
96 doins \
97 "${CONFDIR}"/csh.cshrc \
98 "${CONFDIR}"/csh.login
99
100 # bug #119703: add csh -> tcsh symlink
101 dosym tcsh /bin/csh
102}
diff --git a/app-shells/tcsh/tcsh-6.21.00-r1.ebuild b/app-shells/tcsh/tcsh-6.21.00-r1.ebuild
new file mode 100644
index 0000000..59b8936
--- /dev/null
+++ b/app-shells/tcsh/tcsh-6.21.00-r1.ebuild
@@ -0,0 +1,104 @@
1# Copyright 1999-2020 Gentoo Authors
2# Distributed under the terms of the GNU General Public License v2
3
4EAPI=6
5
6inherit eutils flag-o-matic autotools prefix
7
8CONFVER="1.9"
9
10DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
11HOMEPAGE="http://www.tcsh.org/"
12SRC_URI="
13 ftp://ftp.astron.com/pub/tcsh/${P}.tar.gz
14 https://dev.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
15
16LICENSE="BSD"
17SLOT="0"
18KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
19IUSE="nls doc"
20RESTRICT="test"
21
22# we need gettext because we run autoconf (AM_ICONV)
23RDEPEND="
24 >=sys-libs/ncurses-5.1:0=
25 virtual/libiconv"
26DEPEND="${RDEPEND}
27 sys-devel/gettext
28 doc? ( dev-lang/perl )"
29
30CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
31
32PATCHES=(
33 "${FILESDIR}"/${PN}-6.20.00-debian-dircolors.patch # bug #120792
34 "${FILESDIR}"/${PN}-6.18.01-aix.patch
35 "${FILESDIR}"/${PN}-6.21.00-no-nls.patch
36 "${FILESDIR}"/${PN}-6.21.00-use-ncurses.patch
37 "${FILESDIR}"/${PN}-6.21.00-fno-common.patch # upstream
38 "${FILESDIR}"/tcsh-lynXified-delete-path.patch
39)
40
41src_prepare() {
42 epatch "${PATCHES[@]}"
43
44 eautoreconf
45
46 # fix gencat usage
47 sed \
48 -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
49 -i nls/Makefile.in || die
50
51 # use sysmalloc (for larger alloc sets) on Darwin also
52 sed -i -e 's/__MACHTEN__/__MACH__/' config_f.h || die
53
54 # unify ECHO behaviour
55 echo "#undef ECHO_STYLE" >> config_f.h
56 echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
57
58 eprefixify "${CONFDIR}"/*
59 # activate the right default PATH
60 if [[ -z ${EPREFIX} ]] ; then
61 sed -i \
62 -e 's/^#MAIN//' -e '/^#PREFIX/d' \
63 "${CONFDIR}"/csh.login || die
64 else
65 sed -i \
66 -e 's/^#PREFIX//' -e '/^#MAIN/d' \
67 "${CONFDIR}"/csh.login || die
68 fi
69
70 eapply_user
71}
72
73src_configure() {
74 # make tcsh look and live along the lines of the prefix
75 append-cppflags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
76 append-cppflags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
77 append-cppflags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
78 append-cppflags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
79 append-cppflags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
80
81 econf \
82 --prefix="${EPREFIX:-}" \
83 --datarootdir='${prefix}/usr/share' \
84 $(use_enable nls)
85}
86
87src_install() {
88 emake DESTDIR="${D}" install install.man
89
90 DOCS=( FAQ Fixes NewThings Ported README.md WishList Y2K )
91 if use doc ; then
92 perl tcsh.man2html tcsh.man || die
93 HTML_DOCS=( tcsh.html/*.html )
94 fi
95 einstalldocs
96
97 insinto /etc
98 doins \
99 "${CONFDIR}"/csh.cshrc \
100 "${CONFDIR}"/csh.login
101
102 # bug #119703: add csh -> tcsh symlink
103 dosym tcsh /bin/csh
104}