Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/
Date: Sun, 09 Feb 2020 00:35:32
Message-Id: 1581208522.7dff0b4075abbc480886b847185ea69fb163a689.polynomial-c@gentoo
1 commit: 7dff0b4075abbc480886b847185ea69fb163a689
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 9 00:32:53 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 9 00:35:22 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dff0b40
7
8 app-shells/bash: Removed old
9
10 Package-Manager: Portage-2.3.87, Repoman-2.3.20
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-shells/bash/bash-5.0_p9.ebuild | 265 -------------------------------------
14 1 file changed, 265 deletions(-)
15
16 diff --git a/app-shells/bash/bash-5.0_p9.ebuild b/app-shells/bash/bash-5.0_p9.ebuild
17 deleted file mode 100644
18 index e112f72e3aa..00000000000
19 --- a/app-shells/bash/bash-5.0_p9.ebuild
20 +++ /dev/null
21 @@ -1,265 +0,0 @@
22 -# Copyright 1999-2019 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -inherit flag-o-matic toolchain-funcs multilib prefix
28 -
29 -# Official patchlevel
30 -# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
31 -PLEVEL=${PV##*_p}
32 -MY_PV=${PV/_p*}
33 -MY_PV=${MY_PV/_/-}
34 -MY_P=${PN}-${MY_PV}
35 -is_release() {
36 - case ${PV} in
37 - *_alpha*|*_beta*|*_rc*) return 1 ;;
38 - *) return 0 ;;
39 - esac
40 -}
41 -[[ ${PV} != *_p* ]] && PLEVEL=0
42 -patches() {
43 - local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
44 - [[ ${plevel} -eq 0 ]] && return 1
45 - eval set -- {1..${plevel}}
46 - set -- $(printf "${pn}${pv/\.}-%03d " "$@")
47 - if [[ ${opt} == -s ]] ; then
48 - echo "${@/#/${DISTDIR}/}"
49 - else
50 - local u
51 - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
52 - printf "${u}/${pn}-${pv}-patches/%s " "$@"
53 - done
54 - fi
55 -}
56 -
57 -# The version of readline this bash normally ships with.
58 -READLINE_VER="8.0"
59 -
60 -DESCRIPTION="The standard GNU Bourne again shell"
61 -HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
62 -if is_release ; then
63 - SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
64 -else
65 - SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
66 -fi
67 -
68 -LICENSE="GPL-3"
69 -SLOT="0"
70 -KEYWORDS="~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 ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
71 -IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
72 -
73 -DEPEND="
74 - >=sys-libs/ncurses-5.2-r2:0=
75 - nls? ( virtual/libintl )
76 - readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
77 -"
78 -RDEPEND="
79 - ${DEPEND}
80 - !<sys-apps/portage-2.1.6.7_p1
81 -"
82 -# we only need yacc when the .y files get patched (bash42-005)
83 -#DEPEND+=" virtual/yacc"
84 -
85 -S="${WORKDIR}/${MY_P}"
86 -
87 -PATCHES=(
88 - # Patches from Chet sent to bashbug ml
89 - "${FILESDIR}"/${PN}-5.0-history-append.patch
90 - "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
91 - "${FILESDIR}"/${PN}-5.0-assignment-preceding-builtin.patch
92 -)
93 -
94 -pkg_setup() {
95 - if is-flag -malign-double ; then #7332
96 - eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
97 - eerror "as it breaks LFS (struct stat64) on x86."
98 - die "remove -malign-double from your CFLAGS mr ricer"
99 - fi
100 - if use bashlogger ; then
101 - ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
102 - ewarn "This will log ALL output you enter into the shell, you have been warned."
103 - fi
104 -}
105 -
106 -src_unpack() {
107 - unpack ${MY_P}.tar.gz
108 -}
109 -
110 -src_prepare() {
111 - # Include official patches
112 - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
113 -
114 - # Clean out local libs so we know we use system ones w/releases.
115 - if is_release ; then
116 - rm -rf lib/{readline,termcap}/*
117 - touch lib/{readline,termcap}/Makefile.in # for config.status
118 - sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
119 - fi
120 -
121 - # Prefixify hardcoded path names. No-op for non-prefix.
122 - hprefixify pathnames.h.in
123 -
124 - # Avoid regenerating docs after patches #407985
125 - sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
126 - touch -r . doc/*
127 -
128 - eapply -p0 "${PATCHES[@]}"
129 - eapply_user
130 -}
131 -
132 -src_configure() {
133 - local myconf=(
134 - --disable-profiling
135 - --docdir='$(datarootdir)'/doc/${PF}
136 - --htmldir='$(docdir)/html'
137 - --with-curses
138 - $(use_enable mem-scramble)
139 - $(use_enable net net-redirections)
140 - $(use_enable readline)
141 - $(use_enable readline bang-history)
142 - $(use_enable readline history)
143 - $(use_with afs)
144 - $(use_with mem-scramble bash-malloc)
145 - )
146 -
147 - # For descriptions of these, see config-top.h
148 - # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
149 - append-cppflags \
150 - -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
151 - -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
152 - -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
153 - -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
154 - -DNON_INTERACTIVE_LOGIN_SHELLS \
155 - -DSSH_SOURCE_BASHRC \
156 - $(use bashlogger && echo -DSYSLOG_HISTORY)
157 -
158 - # Don't even think about building this statically without
159 - # reading Bug 7714 first. If you still build it statically,
160 - # don't come crying to us with bugs ;).
161 - #use static && export LDFLAGS="${LDFLAGS} -static"
162 - use nls || myconf+=( --disable-nls )
163 -
164 - # Historically, we always used the builtin readline, but since
165 - # our handling of SONAME upgrades has gotten much more stable
166 - # in the PM (and the readline ebuild itself preserves the old
167 - # libs during upgrades), linking against the system copy should
168 - # be safe.
169 - # Exact cached version here doesn't really matter as long as it
170 - # is at least what's in the DEPEND up above.
171 - export ac_cv_rl_version=${READLINE_VER%%_*}
172 -
173 - # Force linking with system curses ... the bundled termcap lib
174 - # sucks bad compared to ncurses. For the most part, ncurses
175 - # is here because readline needs it. But bash itself calls
176 - # ncurses in one or two small places :(.
177 -
178 - if is_release ; then
179 - # Use system readline only with released versions.
180 - myconf+=( --with-installed-readline=. )
181 - fi
182 -
183 - if use plugins; then
184 - append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
185 - else
186 - # Disable the plugins logic by hand since bash doesn't
187 - # provide a way of doing it.
188 - export ac_cv_func_dl{close,open,sym}=no \
189 - ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
190 - sed -i \
191 - -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
192 - configure || die
193 - fi
194 - tc-export AR #444070
195 - econf "${myconf[@]}"
196 -}
197 -
198 -src_compile() {
199 - emake
200 -
201 - if use plugins ; then
202 - emake -C examples/loadables all others
203 - fi
204 -}
205 -
206 -src_install() {
207 - local d f
208 -
209 - default
210 -
211 - dodir /bin
212 - mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
213 - dosym bash /bin/rbash
214 -
215 - insinto /etc/bash
216 - doins "${FILESDIR}"/bash_logout
217 - doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
218 - keepdir /etc/bash/bashrc.d
219 - insinto /etc/skel
220 - for f in bash{_logout,_profile,rc} ; do
221 - newins "${FILESDIR}"/dot-${f} .${f}
222 - done
223 -
224 - local sed_args=(
225 - -e "s:#${USERLAND}#@::"
226 - -e '/#@/d'
227 - )
228 - if ! use readline ; then
229 - sed_args+=( #432338
230 - -e '/^shopt -s histappend/s:^:#:'
231 - -e 's:use_color=true:use_color=false:'
232 - )
233 - fi
234 - sed -i \
235 - "${sed_args[@]}" \
236 - "${ED}"/etc/skel/.bashrc \
237 - "${ED}"/etc/bash/bashrc || die
238 -
239 - if use plugins ; then
240 - exeinto /usr/$(get_libdir)/bash
241 - doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
242 - insinto /usr/include/bash-plugins
243 - doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
244 - fi
245 -
246 - if use examples ; then
247 - for d in examples/{functions,misc,scripts,startup-files} ; do
248 - exeinto /usr/share/doc/${PF}/${d}
249 - insinto /usr/share/doc/${PF}/${d}
250 - for f in ${d}/* ; do
251 - if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
252 - doexe ${f}
253 - else
254 - doins ${f}
255 - fi
256 - done
257 - done
258 - fi
259 -
260 - doman doc/*.1
261 - newdoc CWRU/changelog ChangeLog
262 - dosym bash.info /usr/share/info/bashref.info
263 -}
264 -
265 -pkg_preinst() {
266 - if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
267 - mkdir -p "${EROOT}"/etc/bash
268 - mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
269 - fi
270 -
271 - if [[ -L ${EROOT}/bin/sh ]] ; then
272 - # rewrite the symlink to ensure that its mtime changes. having /bin/sh
273 - # missing even temporarily causes a fatal error with paludis.
274 - local target=$(readlink "${EROOT}"/bin/sh)
275 - local tmp=$(emktemp "${EROOT}"/bin)
276 - ln -sf "${target}" "${tmp}"
277 - mv -f "${tmp}" "${EROOT}"/bin/sh
278 - fi
279 -}
280 -
281 -pkg_postinst() {
282 - # If /bin/sh does not exist, provide it
283 - if [[ ! -e ${EROOT}/bin/sh ]] ; then
284 - ln -sf bash "${EROOT}"/bin/sh
285 - fi
286 -}