1 |
commit: 31ea80d39218e125993ab64694fb0261871843ae |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 21 09:10:31 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 21 09:16:26 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31ea80d3 |
7 |
|
8 |
app-shells/bash: Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.64, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
app-shells/bash/bash-5.0_p2-r2.ebuild | 267 --------------------- |
14 |
app-shells/bash/bash-5.0_p3.ebuild | 266 -------------------- |
15 |
.../bash/files/bash-5.0-globpat-backslashes.patch | 206 ---------------- |
16 |
3 files changed, 739 deletions(-) |
17 |
|
18 |
diff --git a/app-shells/bash/bash-5.0_p2-r2.ebuild b/app-shells/bash/bash-5.0_p2-r2.ebuild |
19 |
deleted file mode 100644 |
20 |
index 7383e634420..00000000000 |
21 |
--- a/app-shells/bash/bash-5.0_p2-r2.ebuild |
22 |
+++ /dev/null |
23 |
@@ -1,267 +0,0 @@ |
24 |
-# Copyright 1999-2019 Gentoo Authors |
25 |
-# Distributed under the terms of the GNU General Public License v2 |
26 |
- |
27 |
-EAPI=6 |
28 |
- |
29 |
-inherit flag-o-matic toolchain-funcs multilib prefix |
30 |
- |
31 |
-# Official patchlevel |
32 |
-# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/ |
33 |
-PLEVEL=${PV##*_p} |
34 |
-MY_PV=${PV/_p*} |
35 |
-MY_PV=${MY_PV/_/-} |
36 |
-MY_P=${PN}-${MY_PV} |
37 |
-is_release() { |
38 |
- case ${PV} in |
39 |
- *_alpha*|*_beta*|*_rc*) return 1 ;; |
40 |
- *) return 0 ;; |
41 |
- esac |
42 |
-} |
43 |
-[[ ${PV} != *_p* ]] && PLEVEL=0 |
44 |
-patches() { |
45 |
- local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} |
46 |
- [[ ${plevel} -eq 0 ]] && return 1 |
47 |
- eval set -- {1..${plevel}} |
48 |
- set -- $(printf "${pn}${pv/\.}-%03d " "$@") |
49 |
- if [[ ${opt} == -s ]] ; then |
50 |
- echo "${@/#/${DISTDIR}/}" |
51 |
- else |
52 |
- local u |
53 |
- for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do |
54 |
- printf "${u}/${pn}-${pv}-patches/%s " "$@" |
55 |
- done |
56 |
- fi |
57 |
-} |
58 |
- |
59 |
-# The version of readline this bash normally ships with. |
60 |
-READLINE_VER="8.0" |
61 |
- |
62 |
-DESCRIPTION="The standard GNU Bourne again shell" |
63 |
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" |
64 |
-if is_release ; then |
65 |
- SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" |
66 |
-else |
67 |
- SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
68 |
-fi |
69 |
- |
70 |
-LICENSE="GPL-3" |
71 |
-SLOT="0" |
72 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
73 |
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline" |
74 |
- |
75 |
-DEPEND=" |
76 |
- >=sys-libs/ncurses-5.2-r2:0= |
77 |
- readline? ( >=sys-libs/readline-${READLINE_VER}:0= ) |
78 |
- nls? ( virtual/libintl ) |
79 |
-" |
80 |
-RDEPEND=" |
81 |
- ${DEPEND} |
82 |
- !<sys-apps/portage-2.1.6.7_p1 |
83 |
-" |
84 |
-# we only need yacc when the .y files get patched (bash42-005) |
85 |
-#DEPEND+=" virtual/yacc" |
86 |
- |
87 |
-S="${WORKDIR}/${MY_P}" |
88 |
- |
89 |
-PATCHES=( |
90 |
- # Patches from Chet sent to bashbug ml |
91 |
- "${FILESDIR}"/${PN}-5.0-history-zero-length.patch |
92 |
- "${FILESDIR}"/${PN}-5.0-history-append.patch |
93 |
- "${FILESDIR}"/${PN}-5.0-optimize-connection-fork.patch |
94 |
- "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch |
95 |
- "${FILESDIR}"/${PN}-5.0-globpat-backslashes.patch |
96 |
-) |
97 |
- |
98 |
-pkg_setup() { |
99 |
- if is-flag -malign-double ; then #7332 |
100 |
- eerror "Detected bad CFLAGS '-malign-double'. Do not use this" |
101 |
- eerror "as it breaks LFS (struct stat64) on x86." |
102 |
- die "remove -malign-double from your CFLAGS mr ricer" |
103 |
- fi |
104 |
- if use bashlogger ; then |
105 |
- ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." |
106 |
- ewarn "This will log ALL output you enter into the shell, you have been warned." |
107 |
- fi |
108 |
-} |
109 |
- |
110 |
-src_unpack() { |
111 |
- unpack ${MY_P}.tar.gz |
112 |
-} |
113 |
- |
114 |
-src_prepare() { |
115 |
- # Include official patches |
116 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
117 |
- |
118 |
- # Clean out local libs so we know we use system ones w/releases. |
119 |
- if is_release ; then |
120 |
- rm -rf lib/{readline,termcap}/* |
121 |
- touch lib/{readline,termcap}/Makefile.in # for config.status |
122 |
- sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die |
123 |
- fi |
124 |
- |
125 |
- # Prefixify hardcoded path names. No-op for non-prefix. |
126 |
- hprefixify pathnames.h.in |
127 |
- |
128 |
- # Avoid regenerating docs after patches #407985 |
129 |
- sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die |
130 |
- touch -r . doc/* |
131 |
- |
132 |
- eapply -p0 "${PATCHES[@]}" |
133 |
- eapply_user |
134 |
-} |
135 |
- |
136 |
-src_configure() { |
137 |
- local myconf=( |
138 |
- --disable-profiling |
139 |
- --docdir='$(datarootdir)'/doc/${PF} |
140 |
- --htmldir='$(docdir)/html' |
141 |
- --with-curses |
142 |
- $(use_enable mem-scramble) |
143 |
- $(use_enable net net-redirections) |
144 |
- $(use_enable readline) |
145 |
- $(use_enable readline bang-history) |
146 |
- $(use_enable readline history) |
147 |
- $(use_with afs) |
148 |
- $(use_with mem-scramble bash-malloc) |
149 |
- ) |
150 |
- |
151 |
- # For descriptions of these, see config-top.h |
152 |
- # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 |
153 |
- append-cppflags \ |
154 |
- -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \ |
155 |
- -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \ |
156 |
- -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \ |
157 |
- -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \ |
158 |
- -DNON_INTERACTIVE_LOGIN_SHELLS \ |
159 |
- -DSSH_SOURCE_BASHRC \ |
160 |
- $(use bashlogger && echo -DSYSLOG_HISTORY) |
161 |
- |
162 |
- # Don't even think about building this statically without |
163 |
- # reading Bug 7714 first. If you still build it statically, |
164 |
- # don't come crying to us with bugs ;). |
165 |
- #use static && export LDFLAGS="${LDFLAGS} -static" |
166 |
- use nls || myconf+=( --disable-nls ) |
167 |
- |
168 |
- # Historically, we always used the builtin readline, but since |
169 |
- # our handling of SONAME upgrades has gotten much more stable |
170 |
- # in the PM (and the readline ebuild itself preserves the old |
171 |
- # libs during upgrades), linking against the system copy should |
172 |
- # be safe. |
173 |
- # Exact cached version here doesn't really matter as long as it |
174 |
- # is at least what's in the DEPEND up above. |
175 |
- export ac_cv_rl_version=${READLINE_VER%%_*} |
176 |
- |
177 |
- # Force linking with system curses ... the bundled termcap lib |
178 |
- # sucks bad compared to ncurses. For the most part, ncurses |
179 |
- # is here because readline needs it. But bash itself calls |
180 |
- # ncurses in one or two small places :(. |
181 |
- |
182 |
- if is_release ; then |
183 |
- # Use system readline only with released versions. |
184 |
- myconf+=( --with-installed-readline=. ) |
185 |
- fi |
186 |
- |
187 |
- if use plugins; then |
188 |
- append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash |
189 |
- else |
190 |
- # Disable the plugins logic by hand since bash doesn't |
191 |
- # provide a way of doing it. |
192 |
- export ac_cv_func_dl{close,open,sym}=no \ |
193 |
- ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no |
194 |
- sed -i \ |
195 |
- -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \ |
196 |
- configure || die |
197 |
- fi |
198 |
- tc-export AR #444070 |
199 |
- econf "${myconf[@]}" |
200 |
-} |
201 |
- |
202 |
-src_compile() { |
203 |
- emake |
204 |
- |
205 |
- if use plugins ; then |
206 |
- emake -C examples/loadables all others |
207 |
- fi |
208 |
-} |
209 |
- |
210 |
-src_install() { |
211 |
- local d f |
212 |
- |
213 |
- default |
214 |
- |
215 |
- dodir /bin |
216 |
- mv "${ED%/}"/usr/bin/bash "${ED%/}"/bin/ || die |
217 |
- dosym bash /bin/rbash |
218 |
- |
219 |
- insinto /etc/bash |
220 |
- doins "${FILESDIR}"/bash_logout |
221 |
- doins "$(prefixify_ro "${FILESDIR}"/bashrc)" |
222 |
- keepdir /etc/bash/bashrc.d |
223 |
- insinto /etc/skel |
224 |
- for f in bash{_logout,_profile,rc} ; do |
225 |
- newins "${FILESDIR}"/dot-${f} .${f} |
226 |
- done |
227 |
- |
228 |
- local sed_args=( |
229 |
- -e "s:#${USERLAND}#@::" |
230 |
- -e '/#@/d' |
231 |
- ) |
232 |
- if ! use readline ; then |
233 |
- sed_args+=( #432338 |
234 |
- -e '/^shopt -s histappend/s:^:#:' |
235 |
- -e 's:use_color=true:use_color=false:' |
236 |
- ) |
237 |
- fi |
238 |
- sed -i \ |
239 |
- "${sed_args[@]}" \ |
240 |
- "${ED%/}"/etc/skel/.bashrc \ |
241 |
- "${ED%/}"/etc/bash/bashrc || die |
242 |
- |
243 |
- if use plugins ; then |
244 |
- exeinto /usr/$(get_libdir)/bash |
245 |
- doexe $(echo examples/loadables/*.o | sed 's:\.o::g') |
246 |
- insinto /usr/include/bash-plugins |
247 |
- doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} |
248 |
- fi |
249 |
- |
250 |
- if use examples ; then |
251 |
- for d in examples/{functions,misc,scripts,startup-files} ; do |
252 |
- exeinto /usr/share/doc/${PF}/${d} |
253 |
- insinto /usr/share/doc/${PF}/${d} |
254 |
- for f in ${d}/* ; do |
255 |
- if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then |
256 |
- doexe ${f} |
257 |
- else |
258 |
- doins ${f} |
259 |
- fi |
260 |
- done |
261 |
- done |
262 |
- fi |
263 |
- |
264 |
- doman doc/*.1 |
265 |
- newdoc CWRU/changelog ChangeLog |
266 |
- dosym bash.info /usr/share/info/bashref.info |
267 |
-} |
268 |
- |
269 |
-pkg_preinst() { |
270 |
- if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then |
271 |
- mkdir -p "${EROOT}"/etc/bash |
272 |
- mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ |
273 |
- fi |
274 |
- |
275 |
- if [[ -L ${EROOT}/bin/sh ]] ; then |
276 |
- # rewrite the symlink to ensure that its mtime changes. having /bin/sh |
277 |
- # missing even temporarily causes a fatal error with paludis. |
278 |
- local target=$(readlink "${EROOT}"/bin/sh) |
279 |
- local tmp=$(emktemp "${EROOT}"/bin) |
280 |
- ln -sf "${target}" "${tmp}" |
281 |
- mv -f "${tmp}" "${EROOT}"/bin/sh |
282 |
- fi |
283 |
-} |
284 |
- |
285 |
-pkg_postinst() { |
286 |
- # If /bin/sh does not exist, provide it |
287 |
- if [[ ! -e ${EROOT}/bin/sh ]] ; then |
288 |
- ln -sf bash "${EROOT}"/bin/sh |
289 |
- fi |
290 |
-} |
291 |
|
292 |
diff --git a/app-shells/bash/bash-5.0_p3.ebuild b/app-shells/bash/bash-5.0_p3.ebuild |
293 |
deleted file mode 100644 |
294 |
index 0e14a04dc16..00000000000 |
295 |
--- a/app-shells/bash/bash-5.0_p3.ebuild |
296 |
+++ /dev/null |
297 |
@@ -1,266 +0,0 @@ |
298 |
-# Copyright 1999-2019 Gentoo Authors |
299 |
-# Distributed under the terms of the GNU General Public License v2 |
300 |
- |
301 |
-EAPI=6 |
302 |
- |
303 |
-inherit flag-o-matic toolchain-funcs multilib prefix |
304 |
- |
305 |
-# Official patchlevel |
306 |
-# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/ |
307 |
-PLEVEL=${PV##*_p} |
308 |
-MY_PV=${PV/_p*} |
309 |
-MY_PV=${MY_PV/_/-} |
310 |
-MY_P=${PN}-${MY_PV} |
311 |
-is_release() { |
312 |
- case ${PV} in |
313 |
- *_alpha*|*_beta*|*_rc*) return 1 ;; |
314 |
- *) return 0 ;; |
315 |
- esac |
316 |
-} |
317 |
-[[ ${PV} != *_p* ]] && PLEVEL=0 |
318 |
-patches() { |
319 |
- local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} |
320 |
- [[ ${plevel} -eq 0 ]] && return 1 |
321 |
- eval set -- {1..${plevel}} |
322 |
- set -- $(printf "${pn}${pv/\.}-%03d " "$@") |
323 |
- if [[ ${opt} == -s ]] ; then |
324 |
- echo "${@/#/${DISTDIR}/}" |
325 |
- else |
326 |
- local u |
327 |
- for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do |
328 |
- printf "${u}/${pn}-${pv}-patches/%s " "$@" |
329 |
- done |
330 |
- fi |
331 |
-} |
332 |
- |
333 |
-# The version of readline this bash normally ships with. |
334 |
-READLINE_VER="8.0" |
335 |
- |
336 |
-DESCRIPTION="The standard GNU Bourne again shell" |
337 |
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" |
338 |
-if is_release ; then |
339 |
- SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" |
340 |
-else |
341 |
- SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
342 |
-fi |
343 |
- |
344 |
-LICENSE="GPL-3" |
345 |
-SLOT="0" |
346 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
347 |
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline" |
348 |
- |
349 |
-DEPEND=" |
350 |
- >=sys-libs/ncurses-5.2-r2:0= |
351 |
- readline? ( >=sys-libs/readline-${READLINE_VER}:0= ) |
352 |
- nls? ( virtual/libintl ) |
353 |
-" |
354 |
-RDEPEND=" |
355 |
- ${DEPEND} |
356 |
- !<sys-apps/portage-2.1.6.7_p1 |
357 |
-" |
358 |
-# we only need yacc when the .y files get patched (bash42-005) |
359 |
-#DEPEND+=" virtual/yacc" |
360 |
- |
361 |
-S="${WORKDIR}/${MY_P}" |
362 |
- |
363 |
-PATCHES=( |
364 |
- # Patches from Chet sent to bashbug ml |
365 |
- "${FILESDIR}"/${PN}-5.0-history-zero-length.patch |
366 |
- "${FILESDIR}"/${PN}-5.0-history-append.patch |
367 |
- "${FILESDIR}"/${PN}-5.0-optimize-connection-fork.patch |
368 |
- "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch |
369 |
-) |
370 |
- |
371 |
-pkg_setup() { |
372 |
- if is-flag -malign-double ; then #7332 |
373 |
- eerror "Detected bad CFLAGS '-malign-double'. Do not use this" |
374 |
- eerror "as it breaks LFS (struct stat64) on x86." |
375 |
- die "remove -malign-double from your CFLAGS mr ricer" |
376 |
- fi |
377 |
- if use bashlogger ; then |
378 |
- ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." |
379 |
- ewarn "This will log ALL output you enter into the shell, you have been warned." |
380 |
- fi |
381 |
-} |
382 |
- |
383 |
-src_unpack() { |
384 |
- unpack ${MY_P}.tar.gz |
385 |
-} |
386 |
- |
387 |
-src_prepare() { |
388 |
- # Include official patches |
389 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
390 |
- |
391 |
- # Clean out local libs so we know we use system ones w/releases. |
392 |
- if is_release ; then |
393 |
- rm -rf lib/{readline,termcap}/* |
394 |
- touch lib/{readline,termcap}/Makefile.in # for config.status |
395 |
- sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die |
396 |
- fi |
397 |
- |
398 |
- # Prefixify hardcoded path names. No-op for non-prefix. |
399 |
- hprefixify pathnames.h.in |
400 |
- |
401 |
- # Avoid regenerating docs after patches #407985 |
402 |
- sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die |
403 |
- touch -r . doc/* |
404 |
- |
405 |
- eapply -p0 "${PATCHES[@]}" |
406 |
- eapply_user |
407 |
-} |
408 |
- |
409 |
-src_configure() { |
410 |
- local myconf=( |
411 |
- --disable-profiling |
412 |
- --docdir='$(datarootdir)'/doc/${PF} |
413 |
- --htmldir='$(docdir)/html' |
414 |
- --with-curses |
415 |
- $(use_enable mem-scramble) |
416 |
- $(use_enable net net-redirections) |
417 |
- $(use_enable readline) |
418 |
- $(use_enable readline bang-history) |
419 |
- $(use_enable readline history) |
420 |
- $(use_with afs) |
421 |
- $(use_with mem-scramble bash-malloc) |
422 |
- ) |
423 |
- |
424 |
- # For descriptions of these, see config-top.h |
425 |
- # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 |
426 |
- append-cppflags \ |
427 |
- -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \ |
428 |
- -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \ |
429 |
- -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \ |
430 |
- -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \ |
431 |
- -DNON_INTERACTIVE_LOGIN_SHELLS \ |
432 |
- -DSSH_SOURCE_BASHRC \ |
433 |
- $(use bashlogger && echo -DSYSLOG_HISTORY) |
434 |
- |
435 |
- # Don't even think about building this statically without |
436 |
- # reading Bug 7714 first. If you still build it statically, |
437 |
- # don't come crying to us with bugs ;). |
438 |
- #use static && export LDFLAGS="${LDFLAGS} -static" |
439 |
- use nls || myconf+=( --disable-nls ) |
440 |
- |
441 |
- # Historically, we always used the builtin readline, but since |
442 |
- # our handling of SONAME upgrades has gotten much more stable |
443 |
- # in the PM (and the readline ebuild itself preserves the old |
444 |
- # libs during upgrades), linking against the system copy should |
445 |
- # be safe. |
446 |
- # Exact cached version here doesn't really matter as long as it |
447 |
- # is at least what's in the DEPEND up above. |
448 |
- export ac_cv_rl_version=${READLINE_VER%%_*} |
449 |
- |
450 |
- # Force linking with system curses ... the bundled termcap lib |
451 |
- # sucks bad compared to ncurses. For the most part, ncurses |
452 |
- # is here because readline needs it. But bash itself calls |
453 |
- # ncurses in one or two small places :(. |
454 |
- |
455 |
- if is_release ; then |
456 |
- # Use system readline only with released versions. |
457 |
- myconf+=( --with-installed-readline=. ) |
458 |
- fi |
459 |
- |
460 |
- if use plugins; then |
461 |
- append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash |
462 |
- else |
463 |
- # Disable the plugins logic by hand since bash doesn't |
464 |
- # provide a way of doing it. |
465 |
- export ac_cv_func_dl{close,open,sym}=no \ |
466 |
- ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no |
467 |
- sed -i \ |
468 |
- -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \ |
469 |
- configure || die |
470 |
- fi |
471 |
- tc-export AR #444070 |
472 |
- econf "${myconf[@]}" |
473 |
-} |
474 |
- |
475 |
-src_compile() { |
476 |
- emake |
477 |
- |
478 |
- if use plugins ; then |
479 |
- emake -C examples/loadables all others |
480 |
- fi |
481 |
-} |
482 |
- |
483 |
-src_install() { |
484 |
- local d f |
485 |
- |
486 |
- default |
487 |
- |
488 |
- dodir /bin |
489 |
- mv "${ED%/}"/usr/bin/bash "${ED%/}"/bin/ || die |
490 |
- dosym bash /bin/rbash |
491 |
- |
492 |
- insinto /etc/bash |
493 |
- doins "${FILESDIR}"/bash_logout |
494 |
- doins "$(prefixify_ro "${FILESDIR}"/bashrc)" |
495 |
- keepdir /etc/bash/bashrc.d |
496 |
- insinto /etc/skel |
497 |
- for f in bash{_logout,_profile,rc} ; do |
498 |
- newins "${FILESDIR}"/dot-${f} .${f} |
499 |
- done |
500 |
- |
501 |
- local sed_args=( |
502 |
- -e "s:#${USERLAND}#@::" |
503 |
- -e '/#@/d' |
504 |
- ) |
505 |
- if ! use readline ; then |
506 |
- sed_args+=( #432338 |
507 |
- -e '/^shopt -s histappend/s:^:#:' |
508 |
- -e 's:use_color=true:use_color=false:' |
509 |
- ) |
510 |
- fi |
511 |
- sed -i \ |
512 |
- "${sed_args[@]}" \ |
513 |
- "${ED%/}"/etc/skel/.bashrc \ |
514 |
- "${ED%/}"/etc/bash/bashrc || die |
515 |
- |
516 |
- if use plugins ; then |
517 |
- exeinto /usr/$(get_libdir)/bash |
518 |
- doexe $(echo examples/loadables/*.o | sed 's:\.o::g') |
519 |
- insinto /usr/include/bash-plugins |
520 |
- doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} |
521 |
- fi |
522 |
- |
523 |
- if use examples ; then |
524 |
- for d in examples/{functions,misc,scripts,startup-files} ; do |
525 |
- exeinto /usr/share/doc/${PF}/${d} |
526 |
- insinto /usr/share/doc/${PF}/${d} |
527 |
- for f in ${d}/* ; do |
528 |
- if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then |
529 |
- doexe ${f} |
530 |
- else |
531 |
- doins ${f} |
532 |
- fi |
533 |
- done |
534 |
- done |
535 |
- fi |
536 |
- |
537 |
- doman doc/*.1 |
538 |
- newdoc CWRU/changelog ChangeLog |
539 |
- dosym bash.info /usr/share/info/bashref.info |
540 |
-} |
541 |
- |
542 |
-pkg_preinst() { |
543 |
- if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then |
544 |
- mkdir -p "${EROOT}"/etc/bash |
545 |
- mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ |
546 |
- fi |
547 |
- |
548 |
- if [[ -L ${EROOT}/bin/sh ]] ; then |
549 |
- # rewrite the symlink to ensure that its mtime changes. having /bin/sh |
550 |
- # missing even temporarily causes a fatal error with paludis. |
551 |
- local target=$(readlink "${EROOT}"/bin/sh) |
552 |
- local tmp=$(emktemp "${EROOT}"/bin) |
553 |
- ln -sf "${target}" "${tmp}" |
554 |
- mv -f "${tmp}" "${EROOT}"/bin/sh |
555 |
- fi |
556 |
-} |
557 |
- |
558 |
-pkg_postinst() { |
559 |
- # If /bin/sh does not exist, provide it |
560 |
- if [[ ! -e ${EROOT}/bin/sh ]] ; then |
561 |
- ln -sf bash "${EROOT}"/bin/sh |
562 |
- fi |
563 |
-} |
564 |
|
565 |
diff --git a/app-shells/bash/files/bash-5.0-globpat-backslashes.patch b/app-shells/bash/files/bash-5.0-globpat-backslashes.patch |
566 |
deleted file mode 100644 |
567 |
index 21acaf7e7ff..00000000000 |
568 |
--- a/app-shells/bash/files/bash-5.0-globpat-backslashes.patch |
569 |
+++ /dev/null |
570 |
@@ -1,206 +0,0 @@ |
571 |
-*** ../bash-5.0-patched/lib/glob/glob_loop.c 2019-01-16 16:13:21.000000000 -0500 |
572 |
---- lib/glob/glob_loop.c 2019-02-01 09:45:11.000000000 -0500 |
573 |
-*************** |
574 |
-*** 27,34 **** |
575 |
- register const GCHAR *p; |
576 |
- register GCHAR c; |
577 |
-! int bopen; |
578 |
- |
579 |
- p = pattern; |
580 |
-! bopen = 0; |
581 |
- |
582 |
- while ((c = *p++) != L('\0')) |
583 |
---- 27,34 ---- |
584 |
- register const GCHAR *p; |
585 |
- register GCHAR c; |
586 |
-! int bopen, bsquote; |
587 |
- |
588 |
- p = pattern; |
589 |
-! bopen = bsquote = 0; |
590 |
- |
591 |
- while ((c = *p++) != L('\0')) |
592 |
-*************** |
593 |
-*** 56,66 **** |
594 |
- case L('\\'): |
595 |
- /* Don't let the pattern end in a backslash (GMATCH returns no match |
596 |
-! if the pattern ends in a backslash anyway), but otherwise return 1, |
597 |
-! since the matching engine uses backslash as an escape character |
598 |
-! and it can be removed. */ |
599 |
-! return (*p != L('\0')); |
600 |
- } |
601 |
- |
602 |
-! return 0; |
603 |
- } |
604 |
- |
605 |
---- 56,75 ---- |
606 |
- case L('\\'): |
607 |
- /* Don't let the pattern end in a backslash (GMATCH returns no match |
608 |
-! if the pattern ends in a backslash anyway), but otherwise note that |
609 |
-! we have seen this, since the matching engine uses backslash as an |
610 |
-! escape character and it can be removed. We return 2 later if we |
611 |
-! have seen only backslash-escaped characters, so interested callers |
612 |
-! know they can shortcut and just dequote the pathname. */ |
613 |
-! if (*p != L('\0')) |
614 |
-! { |
615 |
-! p++; |
616 |
-! bsquote = 1; |
617 |
-! continue; |
618 |
-! } |
619 |
-! else /* (*p == L('\0')) */ |
620 |
-! return 0; |
621 |
- } |
622 |
- |
623 |
-! return bsquote ? 2 : 0; |
624 |
- } |
625 |
- |
626 |
-*** ../bash-5.0-patched/lib/glob/glob.h 2013-10-28 14:46:12.000000000 -0400 |
627 |
---- lib/glob/glob.h 2019-03-07 11:06:47.000000000 -0500 |
628 |
-*************** |
629 |
-*** 31,34 **** |
630 |
---- 31,35 ---- |
631 |
- #define GX_ADDCURDIR 0x200 /* internal -- add passed directory name */ |
632 |
- #define GX_GLOBSTAR 0x400 /* turn on special handling of ** */ |
633 |
-+ #define GX_RECURSE 0x800 /* internal -- glob_filename called recursively */ |
634 |
- |
635 |
- extern int glob_pattern_p __P((const char *)); |
636 |
-*** ../bash-5.0-patched/lib/glob/glob.c 2018-09-20 10:53:23.000000000 -0400 |
637 |
---- lib/glob/glob.c 2019-03-07 14:23:43.000000000 -0500 |
638 |
-*************** |
639 |
-*** 1062,1066 **** |
640 |
- unsigned int directory_len; |
641 |
- int free_dirname; /* flag */ |
642 |
-! int dflags; |
643 |
- |
644 |
- result = (char **) malloc (sizeof (char *)); |
645 |
---- 1078,1082 ---- |
646 |
- unsigned int directory_len; |
647 |
- int free_dirname; /* flag */ |
648 |
-! int dflags, hasglob; |
649 |
- |
650 |
- result = (char **) malloc (sizeof (char *)); |
651 |
-*************** |
652 |
-*** 1111,1117 **** |
653 |
- } |
654 |
- |
655 |
- /* If directory_name contains globbing characters, then we |
656 |
-! have to expand the previous levels. Just recurse. */ |
657 |
-! if (directory_len > 0 && glob_pattern_p (directory_name)) |
658 |
- { |
659 |
- char **directories, *d, *p; |
660 |
---- 1127,1136 ---- |
661 |
- } |
662 |
- |
663 |
-+ hasglob = 0; |
664 |
- /* If directory_name contains globbing characters, then we |
665 |
-! have to expand the previous levels. Just recurse. |
666 |
-! If glob_pattern_p returns != [0,1] we have a pattern that has backslash |
667 |
-! quotes but no unquoted glob pattern characters. We dequote it below. */ |
668 |
-! if (directory_len > 0 && (hasglob = glob_pattern_p (directory_name)) == 1) |
669 |
- { |
670 |
- char **directories, *d, *p; |
671 |
-*************** |
672 |
-*** 1176,1180 **** |
673 |
- d[directory_len - 1] = '\0'; |
674 |
- |
675 |
-! directories = glob_filename (d, dflags); |
676 |
- |
677 |
- if (free_dirname) |
678 |
---- 1195,1199 ---- |
679 |
- d[directory_len - 1] = '\0'; |
680 |
- |
681 |
-! directories = glob_filename (d, dflags|GX_RECURSE); |
682 |
- |
683 |
- if (free_dirname) |
684 |
-*************** |
685 |
-*** 1333,1336 **** |
686 |
---- 1352,1369 ---- |
687 |
- return (NULL); |
688 |
- } |
689 |
-+ /* If we have a directory name with quoted characters, and we are |
690 |
-+ being called recursively to glob the directory portion of a pathname, |
691 |
-+ we need to dequote the directory name before returning it so the |
692 |
-+ caller can read the directory */ |
693 |
-+ if (directory_len > 0 && hasglob == 2 && (flags & GX_RECURSE) != 0) |
694 |
-+ { |
695 |
-+ dequote_pathname (directory_name); |
696 |
-+ directory_len = strlen (directory_name); |
697 |
-+ } |
698 |
-+ |
699 |
-+ /* We could check whether or not the dequoted directory_name is a |
700 |
-+ directory and return it here, returning the original directory_name |
701 |
-+ if not, but we don't do that yet. I'm not sure it matters. */ |
702 |
-+ |
703 |
- /* Handle GX_MARKDIRS here. */ |
704 |
- result[0] = (char *) malloc (directory_len + 1); |
705 |
-*** ../bash-5.0-patched/pathexp.c 2018-04-29 17:44:48.000000000 -0400 |
706 |
---- pathexp.c 2019-01-31 20:19:41.000000000 -0500 |
707 |
-*************** |
708 |
-*** 66,74 **** |
709 |
- register int c; |
710 |
- char *send; |
711 |
-! int open; |
712 |
- |
713 |
- DECLARE_MBSTATE; |
714 |
- |
715 |
-! open = 0; |
716 |
- send = string + strlen (string); |
717 |
- |
718 |
---- 66,74 ---- |
719 |
- register int c; |
720 |
- char *send; |
721 |
-! int open, bsquote; |
722 |
- |
723 |
- DECLARE_MBSTATE; |
724 |
- |
725 |
-! open = bsquote = 0; |
726 |
- send = string + strlen (string); |
727 |
- |
728 |
-*************** |
729 |
-*** 101,105 **** |
730 |
- globbing. */ |
731 |
- case '\\': |
732 |
-! return (*string != 0); |
733 |
- |
734 |
- case CTLESC: |
735 |
---- 101,112 ---- |
736 |
- globbing. */ |
737 |
- case '\\': |
738 |
-! if (*string != '\0' && *string != '/') |
739 |
-! { |
740 |
-! bsquote = 1; |
741 |
-! string++; |
742 |
-! continue; |
743 |
-! } |
744 |
-! else if (*string == 0) |
745 |
-! return (0); |
746 |
- |
747 |
- case CTLESC: |
748 |
-*************** |
749 |
-*** 118,122 **** |
750 |
- #endif |
751 |
- } |
752 |
-! return (0); |
753 |
- } |
754 |
- |
755 |
---- 125,130 ---- |
756 |
- #endif |
757 |
- } |
758 |
-! |
759 |
-! return (bsquote ? 2 : 0); |
760 |
- } |
761 |
- |
762 |
-*** ../bash-5.0-patched/bashline.c 2019-01-16 16:13:21.000000000 -0500 |
763 |
---- bashline.c 2019-02-22 09:29:08.000000000 -0500 |
764 |
-*************** |
765 |
-*** 3753,3757 **** |
766 |
- |
767 |
- case '\\': |
768 |
-! if (*string == 0) |
769 |
- return (0); |
770 |
- } |
771 |
---- 3766,3770 ---- |
772 |
- |
773 |
- case '\\': |
774 |
-! if (*string++ == 0) |
775 |
- return (0); |
776 |
- } |