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