Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/tcsh/files/, app-shells/tcsh/
Date: Tue, 18 May 2021 11:35:17
Message-Id: 1621337710.0cbe880a5806bcf88d459f0527b1517081d4db98.grobian@gentoo
1 commit: 0cbe880a5806bcf88d459f0527b1517081d4db98
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 18 11:34:44 2021 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Tue May 18 11:35:10 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cbe880a
7
8 app-shells/tcsh-6.2104: version bump
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.2
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 app-shells/tcsh/Manifest | 1 +
14 app-shells/tcsh/files/tcsh-6.21.04-no-nls.patch | 18 +++++
15 app-shells/tcsh/tcsh-6.22.04.ebuild | 103 ++++++++++++++++++++++++
16 3 files changed, 122 insertions(+)
17
18 diff --git a/app-shells/tcsh/Manifest b/app-shells/tcsh/Manifest
19 index e7de9ecf0e8..a8941cee354 100644
20 --- a/app-shells/tcsh/Manifest
21 +++ b/app-shells/tcsh/Manifest
22 @@ -1,2 +1,3 @@
23 DIST tcsh-6.22.02.tar.gz 1006405 BLAKE2B f18b2c48958b4d38a0f55b0df8563564b2a3b34becf02eda8802d7f5e2194082bf96c46323d606c2e6bd2a26aaed303bae3132d03515274407c63b713583dde7 SHA512 32d271b568c63265ea4c98494f5e60b37c3a3fc2594e8763b8f6f0b09018ab9db7ef6f951120b37f7880ccf04ba3a2559e30dc08d24f4ba9dc36853238d55980
24 +DIST tcsh-6.22.04.tar.gz 1012977 BLAKE2B 5702e17e25603a244e4481294cbe2dc2272d4f3ac8362be9e1dd65f3857e0e54520a245d321dda5ef747345776c22068dcb130705daddf71cb650b154ed96ba4 SHA512 3956df52124d496dc0e67e4e3e801787f31690f96a60399953e401648d5b4cfb06baa9833c32cb771177b3e89b7a27e5765534db073206568fe773598a55e873
25 DIST tcsh-gentoo-patches-r1.9.tar.bz2 2488 BLAKE2B 58924e623c75068cdc686be61755bdbcf8d0949a2141ac532ac089f80ff083b2c9f6767038b9fc52171a00ed82c558b83216327c87b41f51c3648343869cd5b6 SHA512 9903e9c3e2279abcac09a3235f3c5db9f42156c18137eb651ede195ca2b069f0b5bc6105fed33666b69796c4ebf03e4efe63cd9beba1898bac7297a2f74bfd3d
26
27 diff --git a/app-shells/tcsh/files/tcsh-6.21.04-no-nls.patch b/app-shells/tcsh/files/tcsh-6.21.04-no-nls.patch
28 new file mode 100644
29 index 00000000000..7f465d8a75e
30 --- /dev/null
31 +++ b/app-shells/tcsh/files/tcsh-6.21.04-no-nls.patch
32 @@ -0,0 +1,18 @@
33 +GetCmdChar: fix compilation with --disable-nls
34 +
35 +Bug: https://bugs.gentoo.org/689904
36 +
37 +--- a/ed.inputl.c
38 ++++ b/ed.inputl.c
39 +@@ -668,9 +668,9 @@
40 + GetCmdChar(Char ch)
41 + {
42 + #ifndef WINNT_NATIVE // We use more than 256 for various extended keys
43 +- wint_t c = ch & CHAR;
44 ++ eChar c = ch & CHAR;
45 + #else
46 +- wint_t c = ch;
47 ++ eChar c = ch;
48 + #endif
49 + return c < NT_NUM_KEYS ? CurrentKeyMap[c] : F_INSERT;
50 + }
51
52 diff --git a/app-shells/tcsh/tcsh-6.22.04.ebuild b/app-shells/tcsh/tcsh-6.22.04.ebuild
53 new file mode 100644
54 index 00000000000..3ce4f1d44b2
55 --- /dev/null
56 +++ b/app-shells/tcsh/tcsh-6.22.04.ebuild
57 @@ -0,0 +1,103 @@
58 +# Copyright 1999-2021 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=7
62 +
63 +inherit flag-o-matic autotools prefix
64 +
65 +CONFVER="1.9"
66 +
67 +DESCRIPTION="Enhanced version of the Berkeley C shell (csh)"
68 +HOMEPAGE="https://www.tcsh.org/"
69 +SRC_URI="
70 + ftp://ftp.astron.com/pub/tcsh/${P}.tar.gz
71 + https://dev.gentoo.org/~grobian/distfiles/tcsh-gentoo-patches-r${CONFVER}.tar.bz2"
72 +
73 +LICENSE="BSD"
74 +SLOT="0"
75 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
76 +IUSE="nls doc"
77 +RESTRICT="test"
78 +
79 +# we need gettext because we run autoconf (AM_ICONV)
80 +RDEPEND="
81 + >=sys-libs/ncurses-5.1:0=
82 + virtual/libiconv"
83 +DEPEND="${RDEPEND}
84 + sys-devel/gettext
85 + doc? ( dev-lang/perl )"
86 +
87 +CONFDIR=${WORKDIR}/tcsh-gentoo-patches-r${CONFVER}
88 +
89 +PATCHES=(
90 + "${FILESDIR}"/${PN}-6.20.00-debian-dircolors.patch # bug #120792
91 + "${FILESDIR}"/${PN}-6.21.04-no-nls.patch
92 + "${FILESDIR}"/${PN}-6.21.00-use-ncurses.patch
93 +)
94 +
95 +src_prepare() {
96 + default
97 +
98 + eautoreconf
99 +
100 + # fix gencat usage
101 + sed \
102 + -e 's/cat \$\^ \$> | \$(GENCAT) \$@/rm -f $@; $(GENCAT) $@ $> $^/' \
103 + -i nls/Makefile.in || die
104 +
105 + # always use sysmalloc, the builtin malloc fails on Darwin, musl,
106 + # etc. it's already used for glibc-linux, so this doesn't change
107 + # anything for the majority of users
108 + sed -i -e 's/undef SYSMALLOC/define SYSMALLOC/' config_f.h || die
109 +
110 + # unify ECHO behaviour
111 + echo "#undef ECHO_STYLE" >> config_f.h
112 + echo "#define ECHO_STYLE BOTH_ECHO" >> config_f.h
113 +
114 + eprefixify "${CONFDIR}"/*
115 + # activate the right default PATH
116 + if [[ -z ${EPREFIX} ]] ; then
117 + sed -i \
118 + -e 's/^#MAIN//' -e '/^#PREFIX/d' \
119 + "${CONFDIR}"/csh.login || die
120 + else
121 + sed -i \
122 + -e 's/^#PREFIX//' -e '/^#MAIN/d' \
123 + "${CONFDIR}"/csh.login || die
124 + fi
125 +
126 + eapply_user
127 +}
128 +
129 +src_configure() {
130 + # make tcsh look and live along the lines of the prefix
131 + append-cppflags -D_PATH_DOTCSHRC="'"'"${EPREFIX}/etc/csh.cshrc"'"'"
132 + append-cppflags -D_PATH_DOTLOGIN="'"'"${EPREFIX}/etc/csh.login"'"'"
133 + append-cppflags -D_PATH_DOTLOGOUT="'"'"${EPREFIX}/etc/csh.logout"'"'"
134 + append-cppflags -D_PATH_USRBIN="'"'"${EPREFIX}/usr/bin"'"'"
135 + append-cppflags -D_PATH_BIN="'"'"${EPREFIX}/bin"'"'"
136 +
137 + econf \
138 + --prefix="${EPREFIX:-}" \
139 + --datarootdir='${prefix}/usr/share' \
140 + $(use_enable nls)
141 +}
142 +
143 +src_install() {
144 + emake DESTDIR="${D}" install install.man
145 +
146 + DOCS=( FAQ Fixes NewThings Ported README.md WishList Y2K )
147 + if use doc ; then
148 + perl tcsh.man2html tcsh.man || die
149 + HTML_DOCS=( tcsh.html/*.html )
150 + fi
151 + einstalldocs
152 +
153 + insinto /etc
154 + doins \
155 + "${CONFDIR}"/csh.cshrc \
156 + "${CONFDIR}"/csh.login
157 +
158 + # bug #119703: add csh -> tcsh symlink
159 + dosym tcsh /bin/csh
160 +}