Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-shells/bash: bash-4.2_p51.ebuild bash-4.3_p28.ebuild bash-3.2_p55.ebuild ChangeLog bash-4.1_p15.ebuild bash-4.0_p42.ebuild bash-3.1_p21.ebuild bash-4.3_p27-r1.ebuild bash-4.1_p13.ebuild bash-4.0_p40.ebuild bash-3.2_p53.ebuild bash-3.1_p19.ebuild bash-4.2_p49.ebuild bash-4.2_p50-r1.ebuild bash-4.1_p14-r1.ebuild
Date: Wed, 01 Oct 2014 20:47:29
Message-Id: 20141001204724.527D66B34@oystercatcher.gentoo.org
1 polynomial-c 14/10/01 20:47:24
2
3 Modified: ChangeLog
4 Added: bash-4.2_p51.ebuild bash-4.3_p28.ebuild
5 bash-3.2_p55.ebuild bash-4.1_p15.ebuild
6 bash-4.0_p42.ebuild bash-3.1_p21.ebuild
7 Removed: bash-4.3_p27-r1.ebuild bash-4.1_p13.ebuild
8 bash-4.0_p40.ebuild bash-3.2_p53.ebuild
9 bash-3.1_p19.ebuild bash-4.2_p49.ebuild
10 bash-4.2_p50-r1.ebuild bash-4.1_p14-r1.ebuild
11 Log:
12 Finally the official patch to fix CVE-2014-7186 and CVE-2014-7187 is out (bug #523742). Committed straight to stable where previous -r1 version was stable
13
14 (Portage version: 2.2.14_rc1/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 0x981CA6FC)
15
16 Revision Changes Path
17 1.404 app-shells/bash/ChangeLog
18
19 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.404&view=markup
20 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.404&content-type=text/plain
21 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.403&r2=1.404
22
23 Index: ChangeLog
24 ===================================================================
25 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
26 retrieving revision 1.403
27 retrieving revision 1.404
28 diff -u -r1.403 -r1.404
29 --- ChangeLog 1 Oct 2014 16:41:27 -0000 1.403
30 +++ ChangeLog 1 Oct 2014 20:47:24 -0000 1.404
31 @@ -1,6 +1,22 @@
32 # ChangeLog for app-shells/bash
33 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
34 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.403 2014/10/01 16:41:27 pinkbyte Exp $
35 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.404 2014/10/01 20:47:24 polynomial-c Exp $
36 +
37 +*bash-4.3_p28 (01 Oct 2014)
38 +*bash-4.2_p51 (01 Oct 2014)
39 +*bash-4.1_p15 (01 Oct 2014)
40 +*bash-4.0_p42 (01 Oct 2014)
41 +*bash-3.2_p55 (01 Oct 2014)
42 +*bash-3.1_p21 (01 Oct 2014)
43 +
44 + 01 Oct 2014; Lars Wendler <polynomial-c@g.o> -bash-3.1_p19.ebuild,
45 + +bash-3.1_p21.ebuild, -bash-3.2_p53.ebuild, +bash-3.2_p55.ebuild,
46 + -bash-4.0_p40.ebuild, +bash-4.0_p42.ebuild, -bash-4.1_p13.ebuild,
47 + -bash-4.1_p14-r1.ebuild, +bash-4.1_p15.ebuild, -bash-4.2_p49.ebuild,
48 + -bash-4.2_p50-r1.ebuild, +bash-4.2_p51.ebuild, -bash-4.3_p27-r1.ebuild,
49 + +bash-4.3_p28.ebuild, -files/bash-redir-stack-overflow.patch:
50 + Finally the official patch to fix CVE-2014-7186 and CVE-2014-7187 is out (bug
51 + #523742). Committed straight to stable where previous -r1 version was stable.
52
53 01 Oct 2014; Sergey Popov <pinkbyte@g.o> bash-4.2_p50-r1.ebuild:
54 s390 stable, wrt bug #523742
55
56
57
58 1.1 app-shells/bash/bash-4.2_p51.ebuild
59
60 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p51.ebuild?rev=1.1&view=markup
61 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p51.ebuild?rev=1.1&content-type=text/plain
62
63 Index: bash-4.2_p51.ebuild
64 ===================================================================
65 # Copyright 1999-2014 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.2_p51.ebuild,v 1.1 2014/10/01 20:47:24 polynomial-c Exp $
68
69 EAPI="4"
70
71 inherit eutils flag-o-matic toolchain-funcs multilib
72
73 # Official patchlevel
74 # See ftp://ftp.cwru.edu/pub/bash/bash-4.2-patches/
75 PLEVEL=${PV##*_p}
76 MY_PV=${PV/_p*}
77 MY_PV=${MY_PV/_/-}
78 MY_P=${PN}-${MY_PV}
79 [[ ${PV} != *_p* ]] && PLEVEL=0
80 patches() {
81 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
82 [[ ${plevel} -eq 0 ]] && return 1
83 eval set -- {1..${plevel}}
84 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
85 if [[ ${opt} == -s ]] ; then
86 echo "${@/#/${DISTDIR}/}"
87 else
88 local u
89 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
90 printf "${u}/${pn}-${pv}-patches/%s " "$@"
91 done
92 fi
93 }
94
95 DESCRIPTION="The standard GNU Bourne again shell"
96 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
97 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
98
99 LICENSE="GPL-3"
100 SLOT="0"
101 KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
102 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
103
104 DEPEND=">=sys-libs/ncurses-5.2-r2
105 readline? ( >=sys-libs/readline-6.2 )
106 nls? ( virtual/libintl )"
107 RDEPEND="${DEPEND}
108 !!<sys-apps/portage-2.1.6.7_p1
109 !!<sys-apps/paludis-0.26.0_alpha5"
110 # we only need yacc when the .y files get patched (bash42-005)
111 DEPEND+=" virtual/yacc"
112
113 S=${WORKDIR}/${MY_P}
114
115 pkg_setup() {
116 if is-flag -malign-double ; then #7332
117 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
118 eerror "as it breaks LFS (struct stat64) on x86."
119 die "remove -malign-double from your CFLAGS mr ricer"
120 fi
121 if use bashlogger ; then
122 ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
123 ewarn "This will log ALL output you enter into the shell, you have been warned."
124 fi
125 }
126
127 src_unpack() {
128 unpack ${MY_P}.tar.gz
129 }
130
131 src_prepare() {
132 # Include official patches
133 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
134
135 # Clean out local libs so we know we use system ones
136 rm -rf lib/{readline,termcap}/*
137 touch lib/{readline,termcap}/Makefile.in # for config.status
138 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
139
140 # Avoid regenerating docs after patches #407985
141 sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
142 touch -r . doc/*
143
144 epatch "${FILESDIR}"/${PN}-4.2-execute-job-control.patch #383237
145 epatch "${FILESDIR}"/${PN}-4.2-parallel-build.patch
146 epatch "${FILESDIR}"/${PN}-4.2-no-readline.patch
147 epatch "${FILESDIR}"/${PN}-4.2-read-retry.patch #447810
148 if ! use vanilla ; then
149 epatch "${FILESDIR}"/${PN}-4.2-speed-up-read-N.patch
150 fi
151
152 epatch_user
153 }
154
155 src_configure() {
156 local myconf=()
157
158 # For descriptions of these, see config-top.h
159 # bashrc/#26952 bash_logout/#90488 ssh/#24762
160 append-cppflags \
161 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
162 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
163 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
164 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
165 -DNON_INTERACTIVE_LOGIN_SHELLS \
166 -DSSH_SOURCE_BASHRC \
167 $(use bashlogger && echo -DSYSLOG_HISTORY)
168
169 # Don't even think about building this statically without
170 # reading Bug 7714 first. If you still build it statically,
171 # don't come crying to us with bugs ;).
172 #use static && export LDFLAGS="${LDFLAGS} -static"
173 use nls || myconf+=( --disable-nls )
174
175 # Historically, we always used the builtin readline, but since
176 # our handling of SONAME upgrades has gotten much more stable
177 # in the PM (and the readline ebuild itself preserves the old
178 # libs during upgrades), linking against the system copy should
179 # be safe.
180 # Exact cached version here doesn't really matter as long as it
181 # is at least what's in the DEPEND up above.
182 export ac_cv_rl_version=6.2
183
184 # Force linking with system curses ... the bundled termcap lib
185 # sucks bad compared to ncurses. For the most part, ncurses
186 # is here because readline needs it. But bash itself calls
187 # ncurses in one or two small places :(.
188
189 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
190 tc-export AR #444070
191 econf \
192 --with-installed-readline=. \
193 --with-curses \
194 $(use_with afs) \
195 $(use_enable net net-redirections) \
196 --disable-profiling \
197 $(use_enable mem-scramble) \
198 $(use_with mem-scramble bash-malloc) \
199 $(use_enable readline) \
200 $(use_enable readline history) \
201 $(use_enable readline bang-history) \
202 "${myconf[@]}"
203 }
204
205 src_compile() {
206 emake
207
208 if use plugins ; then
209 emake -C examples/loadables all others
210 fi
211 }
212
213 src_install() {
214 emake install DESTDIR="${D}"
215
216 dodir /bin
217 mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
218 dosym bash /bin/rbash
219
220 insinto /etc/bash
221 doins "${FILESDIR}"/{bashrc,bash_logout}
222 insinto /etc/skel
223 for f in bash{_logout,_profile,rc} ; do
224 newins "${FILESDIR}"/dot-${f} .${f}
225 done
226
227 local sed_args=(
228 -e "s:#${USERLAND}#@::"
229 -e '/#@/d'
230 )
231 if ! use readline ; then
232 sed_args+=( #432338
233 -e '/^shopt -s histappend/s:^:#:'
234 -e 's:use_color=true:use_color=false:'
235 )
236 fi
237 sed -i \
238 "${sed_args[@]}" \
239 "${ED}"/etc/skel/.bashrc \
240 "${ED}"/etc/bash/bashrc || die
241
242 if use plugins ; then
243 exeinto /usr/$(get_libdir)/bash
244 doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
245 insinto /usr/include/bash-plugins
246 doins *.h builtins/*.h examples/loadables/*.h include/*.h \
247 lib/{glob/glob.h,tilde/tilde.h}
248 fi
249
250 if use examples ; then
251 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; 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 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
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
293
294 1.1 app-shells/bash/bash-4.3_p28.ebuild
295
296 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p28.ebuild?rev=1.1&view=markup
297 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p28.ebuild?rev=1.1&content-type=text/plain
298
299 Index: bash-4.3_p28.ebuild
300 ===================================================================
301 # Copyright 1999-2014 Gentoo Foundation
302 # Distributed under the terms of the GNU General Public License v2
303 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.3_p28.ebuild,v 1.1 2014/10/01 20:47:24 polynomial-c Exp $
304
305 EAPI="4"
306
307 inherit eutils flag-o-matic toolchain-funcs multilib
308
309 # Official patchlevel
310 # See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
311 PLEVEL=${PV##*_p}
312 MY_PV=${PV/_p*}
313 MY_PV=${MY_PV/_/-}
314 MY_P=${PN}-${MY_PV}
315 [[ ${PV} != *_p* ]] && PLEVEL=0
316 patches() {
317 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
318 [[ ${plevel} -eq 0 ]] && return 1
319 eval set -- {1..${plevel}}
320 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
321 if [[ ${opt} == -s ]] ; then
322 echo "${@/#/${DISTDIR}/}"
323 else
324 local u
325 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
326 printf "${u}/${pn}-${pv}-patches/%s " "$@"
327 done
328 fi
329 }
330
331 # The version of readline this bash normally ships with.
332 READLINE_VER="6.3"
333
334 DESCRIPTION="The standard GNU Bourne again shell"
335 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
336 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
337 [[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
338
339 LICENSE="GPL-3"
340 SLOT="0"
341 #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
342 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
343
344 DEPEND=">=sys-libs/ncurses-5.2-r2
345 readline? ( >=sys-libs/readline-${READLINE_VER} )
346 nls? ( virtual/libintl )"
347 RDEPEND="${DEPEND}
348 !<sys-apps/portage-2.1.6.7_p1
349 !<sys-apps/paludis-0.26.0_alpha5"
350 # we only need yacc when the .y files get patched (bash42-005)
351 DEPEND+=" virtual/yacc"
352
353 S=${WORKDIR}/${MY_P}
354
355 pkg_setup() {
356 if is-flag -malign-double ; then #7332
357 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
358 eerror "as it breaks LFS (struct stat64) on x86."
359 die "remove -malign-double from your CFLAGS mr ricer"
360 fi
361 if use bashlogger ; then
362 ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
363 ewarn "This will log ALL output you enter into the shell, you have been warned."
364 fi
365 }
366
367 src_unpack() {
368 unpack ${MY_P}.tar.gz
369 }
370
371 src_prepare() {
372 # Include official patches
373 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
374
375 # Clean out local libs so we know we use system ones w/releases.
376 if [[ ${PV} != *_rc* ]] ; then
377 rm -rf lib/{readline,termcap}/*
378 touch lib/{readline,termcap}/Makefile.in # for config.status
379 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
380 fi
381
382 # Avoid regenerating docs after patches #407985
383 sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
384 touch -r . doc/*
385
386 epatch "${FILESDIR}"/${PN}-4.3-compat-lvl.patch
387 epatch "${FILESDIR}"/${PN}-4.3-parse-time-keyword.patch
388 epatch "${FILESDIR}"/${PN}-4.3-append-process-segfault.patch
389 epatch "${FILESDIR}"/${PN}-4.3-term-cleanup.patch
390
391 epatch_user
392 }
393
394 src_configure() {
395 local myconf=()
396
397 # For descriptions of these, see config-top.h
398 # bashrc/#26952 bash_logout/#90488 ssh/#24762
399 append-cppflags \
400 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
401 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
402 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
403 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
404 -DNON_INTERACTIVE_LOGIN_SHELLS \
405 -DSSH_SOURCE_BASHRC \
406 $(use bashlogger && echo -DSYSLOG_HISTORY)
407
408 # Don't even think about building this statically without
409 # reading Bug 7714 first. If you still build it statically,
410 # don't come crying to us with bugs ;).
411 #use static && export LDFLAGS="${LDFLAGS} -static"
412 use nls || myconf+=( --disable-nls )
413
414 # Historically, we always used the builtin readline, but since
415 # our handling of SONAME upgrades has gotten much more stable
416 # in the PM (and the readline ebuild itself preserves the old
417 # libs during upgrades), linking against the system copy should
418 # be safe.
419 # Exact cached version here doesn't really matter as long as it
420 # is at least what's in the DEPEND up above.
421 export ac_cv_rl_version=${READLINE_VER}
422
423 # Force linking with system curses ... the bundled termcap lib
424 # sucks bad compared to ncurses. For the most part, ncurses
425 # is here because readline needs it. But bash itself calls
426 # ncurses in one or two small places :(.
427
428 if [[ ${PV} != *_rc* ]] ; then
429 # Use system readline only with released versions.
430 myconf+=( --with-installed-readline=. )
431 fi
432
433 if use plugins; then
434 append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
435 else
436 # Disable the plugins logic by hand since bash doesn't
437 # provide a way of doing it.
438 export ac_cv_func_dl{close,open,sym}=no \
439 ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
440 sed -i \
441 -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
442 configure || die
443 fi
444 tc-export AR #444070
445 econf \
446 --docdir='$(datarootdir)'/doc/${PF} \
447 --htmldir='$(docdir)/html' \
448 --with-curses \
449 $(use_with afs) \
450 $(use_enable net net-redirections) \
451 --disable-profiling \
452 $(use_enable mem-scramble) \
453 $(use_with mem-scramble bash-malloc) \
454 $(use_enable readline) \
455 $(use_enable readline history) \
456 $(use_enable readline bang-history) \
457 "${myconf[@]}"
458 }
459
460 src_compile() {
461 emake
462
463 if use plugins ; then
464 emake -C examples/loadables all others
465 fi
466 }
467
468 src_install() {
469 local d f
470
471 default
472
473 dodir /bin
474 mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
475 dosym bash /bin/rbash
476
477 insinto /etc/bash
478 doins "${FILESDIR}"/{bashrc,bash_logout}
479 insinto /etc/skel
480 for f in bash{_logout,_profile,rc} ; do
481 newins "${FILESDIR}"/dot-${f} .${f}
482 done
483
484 local sed_args=(
485 -e "s:#${USERLAND}#@::"
486 -e '/#@/d'
487 )
488 if ! use readline ; then
489 sed_args+=( #432338
490 -e '/^shopt -s histappend/s:^:#:'
491 -e 's:use_color=true:use_color=false:'
492 )
493 fi
494 sed -i \
495 "${sed_args[@]}" \
496 "${ED}"/etc/skel/.bashrc \
497 "${ED}"/etc/bash/bashrc || die
498
499 if use plugins ; then
500 exeinto /usr/$(get_libdir)/bash
501 doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
502 insinto /usr/include/bash-plugins
503 doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
504 fi
505
506 if use examples ; then
507 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
508 exeinto /usr/share/doc/${PF}/${d}
509 insinto /usr/share/doc/${PF}/${d}
510 for f in ${d}/* ; do
511 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
512 doexe ${f}
513 else
514 doins ${f}
515 fi
516 done
517 done
518 fi
519
520 doman doc/*.1
521 newdoc CWRU/changelog ChangeLog
522 dosym bash.info /usr/share/info/bashref.info
523 }
524
525 pkg_preinst() {
526 if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
527 mkdir -p "${EROOT}"/etc/bash
528 mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
529 fi
530
531 if [[ -L ${EROOT}/bin/sh ]] ; then
532 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
533 # missing even temporarily causes a fatal error with paludis.
534 local target=$(readlink "${EROOT}"/bin/sh)
535 local tmp=$(emktemp "${EROOT}"/bin)
536 ln -sf "${target}" "${tmp}"
537 mv -f "${tmp}" "${EROOT}"/bin/sh
538 fi
539 }
540
541 pkg_postinst() {
542 # If /bin/sh does not exist, provide it
543 if [[ ! -e ${EROOT}/bin/sh ]] ; then
544 ln -sf bash "${EROOT}"/bin/sh
545 fi
546 }
547
548
549
550 1.1 app-shells/bash/bash-3.2_p55.ebuild
551
552 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-3.2_p55.ebuild?rev=1.1&view=markup
553 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-3.2_p55.ebuild?rev=1.1&content-type=text/plain
554
555 Index: bash-3.2_p55.ebuild
556 ===================================================================
557 # Copyright 1999-2014 Gentoo Foundation
558 # Distributed under the terms of the GNU General Public License v2
559 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.2_p55.ebuild,v 1.1 2014/10/01 20:47:24 polynomial-c Exp $
560
561 EAPI="4"
562
563 inherit eutils flag-o-matic toolchain-funcs
564
565 # Official patchlevel
566 # See ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/
567 PLEVEL=${PV##*_p}
568 MY_PV=${PV/_p*}
569 MY_PV=${MY_PV/_/-}
570 MY_P=${PN}-${MY_PV}
571 [[ ${PV} != *_p* ]] && PLEVEL=0
572 patches() {
573 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
574 [[ ${plevel} -eq 0 ]] && return 1
575 eval set -- {1..${plevel}}
576 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
577 if [[ ${opt} == -s ]] ; then
578 echo "${@/#/${DISTDIR}/}"
579 else
580 local u
581 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
582 printf "${u}/${pn}-${pv}-patches/%s " "$@"
583 done
584 fi
585 }
586
587 DESCRIPTION="The standard GNU Bourne again shell"
588 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
589 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
590
591 LICENSE="GPL-2"
592 SLOT="${MY_PV}"
593 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
594 IUSE="afs +net nls +readline"
595
596 DEPEND=">=sys-libs/ncurses-5.2-r2
597 readline? ( >=sys-libs/readline-6.2 )
598 nls? ( virtual/libintl )"
599 RDEPEND="${DEPEND}"
600
601 S=${WORKDIR}/${MY_P}
602
603 pkg_setup() {
604 if is-flag -malign-double ; then #7332
605 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
606 eerror "as it breaks LFS (struct stat64) on x86."
607 die "remove -malign-double from your CFLAGS mr ricer"
608 fi
609 }
610
611 src_unpack() {
612 unpack ${MY_P}.tar.gz
613 }
614
615 src_prepare() {
616 # Include official patches
617 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
618
619 # Clean out local libs so we know we use system ones
620 rm -rf lib/{readline,termcap}/*
621 touch lib/{readline,termcap}/Makefile.in # for config.status
622 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
623
624 epatch "${FILESDIR}"/autoconf-mktime-2.59.patch #220040
625 epatch "${FILESDIR}"/${PN}-3.1-gentoo.patch
626 epatch "${FILESDIR}"/${PN}-3.2-loadables.patch
627 epatch "${FILESDIR}"/${PN}-3.2-protos.patch
628 epatch "${FILESDIR}"/${PN}-3.2-session-leader.patch #231775
629 epatch "${FILESDIR}"/${PN}-3.2-parallel-build.patch #189671
630 epatch "${FILESDIR}"/${PN}-3.2-ldflags-for-build.patch #211947
631 epatch "${FILESDIR}"/${PN}-3.2-process-subst.patch
632 epatch "${FILESDIR}"/${PN}-3.2-ulimit.patch
633 epatch "${FILESDIR}"/${PN}-3.0-trap-fg-signals.patch
634 epatch "${FILESDIR}"/${PN}-3.2-dev-fd-test-as-user.patch #131875
635
636 epatch_user
637 }
638
639 src_configure() {
640 local myconf=()
641
642 # Force pgrp synchronization
643 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81653
644 export bash_cv_pgrp_pipe=yes
645
646 # For descriptions of these, see config-top.h
647 # bashrc/#26952 bash_logout/#90488 ssh/#24762
648 append-cppflags \
649 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
650 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
651 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
652 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
653 -DNON_INTERACTIVE_LOGIN_SHELLS \
654 -DSSH_SOURCE_BASHRC
655
656 # Don't even think about building this statically without
657 # reading Bug 7714 first. If you still build it statically,
658 # don't come crying to us with bugs ;).
659 #use static && export LDFLAGS="${LDFLAGS} -static"
660 use nls || myconf+=( --disable-nls )
661
662 # Historically, we always used the builtin readline, but since
663 # our handling of SONAME upgrades has gotten much more stable
664 # in the PM (and the readline ebuild itself preserves the old
665 # libs during upgrades), linking against the system copy should
666 # be safe.
667 # Exact cached version here doesn't really matter as long as it
668 # is at least what's in the DEPEND up above.
669 export ac_cv_rl_version=6.2
670
671 # Force linking with system curses ... the bundled termcap lib
672 # sucks bad compared to ncurses. For the most part, ncurses
673 # is here because readline needs it. But bash itself calls
674 # ncurses in one or two small places :(.
675
676 tc-export AR #444070
677 econf \
678 --with-installed-readline=. \
679 --with-curses \
680 $(use_with afs) \
681 $(use_enable net net-redirections) \
682 --disable-profiling \
683 --without-gnu-malloc \
684 $(use_enable readline) \
685 $(use_enable readline history) \
686 $(use_enable readline bang-history) \
687 "${myconf[@]}"
688 }
689
690 src_install() {
691 into /
692 newbin bash bash-${SLOT}
693
694 newman doc/bash.1 bash-${SLOT}.1
695 newman doc/builtins.1 builtins-${SLOT}.1
696
697 insinto /usr/share/info
698 newins doc/bashref.info bash-${SLOT}.info
699 dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
700
701 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
702 }
703
704
705
706 1.1 app-shells/bash/bash-4.1_p15.ebuild
707
708 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.1_p15.ebuild?rev=1.1&view=markup
709 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.1_p15.ebuild?rev=1.1&content-type=text/plain
710
711 Index: bash-4.1_p15.ebuild
712 ===================================================================
713 # Copyright 1999-2014 Gentoo Foundation
714 # Distributed under the terms of the GNU General Public License v2
715 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.1_p15.ebuild,v 1.1 2014/10/01 20:47:24 polynomial-c Exp $
716
717 EAPI="4"
718
719 inherit eutils flag-o-matic toolchain-funcs
720
721 # Official patchlevel
722 # See ftp://ftp.cwru.edu/pub/bash/bash-4.1-patches/
723 PLEVEL=${PV##*_p}
724 MY_PV=${PV/_p*}
725 MY_PV=${MY_PV/_/-}
726 MY_P=${PN}-${MY_PV}
727 [[ ${PV} != *_p* ]] && PLEVEL=0
728 patches() {
729 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
730 [[ ${plevel} -eq 0 ]] && return 1
731 eval set -- {1..${plevel}}
732 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
733 if [[ ${opt} == -s ]] ; then
734 echo "${@/#/${DISTDIR}/}"
735 else
736 local u
737 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
738 printf "${u}/${pn}-${pv}-patches/%s " "$@"
739 done
740 fi
741 }
742
743 DESCRIPTION="The standard GNU Bourne again shell"
744 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
745 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
746
747 LICENSE="GPL-3"
748 SLOT="${MY_PV}"
749 KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
750 IUSE="afs mem-scramble +net nls +readline"
751
752 DEPEND=">=sys-libs/ncurses-5.2-r2
753 readline? ( >=sys-libs/readline-6.2 )
754 nls? ( virtual/libintl )"
755 RDEPEND="${DEPEND}"
756
757 S=${WORKDIR}/${MY_P}
758
759 pkg_setup() {
760 if is-flag -malign-double ; then #7332
761 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
762 eerror "as it breaks LFS (struct stat64) on x86."
763 die "remove -malign-double from your CFLAGS mr ricer"
764 fi
765 }
766
767 src_unpack() {
768 unpack ${MY_P}.tar.gz
769 }
770
771 src_prepare() {
772 # Include official patches
773 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
774
775 # Clean out local libs so we know we use system ones
776 rm -rf lib/{readline,termcap}/*
777 touch lib/{readline,termcap}/Makefile.in # for config.status
778 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
779
780 epatch "${FILESDIR}"/${PN}-4.1-fbsd-eaccess.patch #303411
781 sed -i '1i#define NEED_FPURGE_DECL' execute_cmd.c # needs fpurge() decl
782 epatch "${FILESDIR}"/${PN}-4.1-parallel-build.patch
783
784 epatch_user
785 }
786
787 src_configure() {
788 local myconf=()
789
790 myconf+=( --without-lispdir ) #335896
791
792 # For descriptions of these, see config-top.h
793 # bashrc/#26952 bash_logout/#90488 ssh/#24762
794 append-cppflags \
795 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
796 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
797 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
798 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
799 -DNON_INTERACTIVE_LOGIN_SHELLS \
800 -DSSH_SOURCE_BASHRC
801
802 # Don't even think about building this statically without
803 # reading Bug 7714 first. If you still build it statically,
804 # don't come crying to us with bugs ;).
805 #use static && export LDFLAGS="${LDFLAGS} -static"
806 use nls || myconf+=( --disable-nls )
807
808 # Historically, we always used the builtin readline, but since
809 # our handling of SONAME upgrades has gotten much more stable
810 # in the PM (and the readline ebuild itself preserves the old
811 # libs during upgrades), linking against the system copy should
812 # be safe.
813 # Exact cached version here doesn't really matter as long as it
814 # is at least what's in the DEPEND up above.
815 export ac_cv_rl_version=6.2
816
817 # Force linking with system curses ... the bundled termcap lib
818 # sucks bad compared to ncurses. For the most part, ncurses
819 # is here because readline needs it. But bash itself calls
820 # ncurses in one or two small places :(.
821
822 tc-export AR #444070
823 econf \
824 --with-installed-readline=. \
825 --with-curses \
826 $(use_with afs) \
827 $(use_enable net net-redirections) \
828 --disable-profiling \
829 $(use_enable mem-scramble) \
830 $(use_with mem-scramble bash-malloc) \
831 $(use_enable readline) \
832 $(use_enable readline history) \
833 $(use_enable readline bang-history) \
834 "${myconf[@]}"
835 }
836
837 src_install() {
838 into /
839 newbin bash bash-${SLOT}
840
841 newman doc/bash.1 bash-${SLOT}.1
842 newman doc/builtins.1 builtins-${SLOT}.1
843
844 insinto /usr/share/info
845 newins doc/bashref.info bash-${SLOT}.info
846 dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
847
848 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
849 }
850
851
852
853 1.1 app-shells/bash/bash-4.0_p42.ebuild
854
855 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.0_p42.ebuild?rev=1.1&view=markup
856 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.0_p42.ebuild?rev=1.1&content-type=text/plain
857
858 Index: bash-4.0_p42.ebuild
859 ===================================================================
860 # Copyright 1999-2014 Gentoo Foundation
861 # Distributed under the terms of the GNU General Public License v2
862 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.0_p42.ebuild,v 1.1 2014/10/01 20:47:24 polynomial-c Exp $
863
864 EAPI="4"
865
866 inherit eutils flag-o-matic toolchain-funcs
867
868 # Official patchlevel
869 # See ftp://ftp.cwru.edu/pub/bash/bash-4.0-patches/
870 PLEVEL=${PV##*_p}
871 MY_PV=${PV/_p*}
872 MY_PV=${MY_PV/_/-}
873 MY_P=${PN}-${MY_PV}
874 [[ ${PV} != *_p* ]] && PLEVEL=0
875 patches() {
876 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
877 [[ ${plevel} -eq 0 ]] && return 1
878 eval set -- {1..${plevel}}
879 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
880 if [[ ${opt} == -s ]] ; then
881 echo "${@/#/${DISTDIR}/}"
882 else
883 local u
884 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
885 printf "${u}/${pn}-${pv}-patches/%s " "$@"
886 done
887 fi
888 }
889
890 DESCRIPTION="The standard GNU Bourne again shell"
891 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
892 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
893
894 LICENSE="GPL-3"
895 SLOT="${MY_PV}"
896 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
897 IUSE="afs mem-scramble +net nls +readline"
898
899 DEPEND=">=sys-libs/ncurses-5.2-r2
900 readline? ( >=sys-libs/readline-6.2 )
901 nls? ( virtual/libintl )"
902 RDEPEND="${DEPEND}"
903
904 S=${WORKDIR}/${MY_P}
905
906 pkg_setup() {
907 if is-flag -malign-double ; then #7332
908 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
909 eerror "as it breaks LFS (struct stat64) on x86."
910 die "remove -malign-double from your CFLAGS mr ricer"
911 fi
912 }
913
914 src_unpack() {
915 unpack ${MY_P}.tar.gz
916 }
917
918 src_prepare() {
919 # Include official patches
920 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
921
922 # Clean out local libs so we know we use system ones
923 rm -rf lib/{readline,termcap}/*
924 touch lib/{readline,termcap}/Makefile.in # for config.status
925 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
926
927 epatch "${FILESDIR}"/${PN}-4.0-configure.patch #304901
928 epatch "${FILESDIR}"/${PN}-4.x-deferred-heredocs.patch
929 sed -i '1i#define NEED_FPURGE_DECL' execute_cmd.c # needs fpurge() decl
930 epatch "${FILESDIR}"/${PN}-3.2-parallel-build.patch #189671
931 epatch "${FILESDIR}"/${PN}-4.0-ldflags-for-build.patch #211947
932 epatch "${FILESDIR}"/${PN}-4.0-negative-return.patch
933 epatch "${FILESDIR}"/${PN}-4.0-parallel-build.patch #267613
934 sed -i '/\.o: .*shell\.h/s:$: pathnames.h:' Makefile.in #267613
935
936 epatch_user
937 }
938
939 src_configure() {
940 local myconf=()
941
942 # For descriptions of these, see config-top.h
943 # bashrc/#26952 bash_logout/#90488 ssh/#24762
944 append-cppflags \
945 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
946 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
947 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
948 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
949 -DNON_INTERACTIVE_LOGIN_SHELLS \
950 -DSSH_SOURCE_BASHRC
951
952 # Don't even think about building this statically without
953 # reading Bug 7714 first. If you still build it statically,
954 # don't come crying to us with bugs ;).
955 #use static && export LDFLAGS="${LDFLAGS} -static"
956 use nls || myconf+=( --disable-nls )
957
958 # Historically, we always used the builtin readline, but since
959 # our handling of SONAME upgrades has gotten much more stable
960 # in the PM (and the readline ebuild itself preserves the old
961 # libs during upgrades), linking against the system copy should
962 # be safe.
963 # Exact cached version here doesn't really matter as long as it
964 # is at least what's in the DEPEND up above.
965 export ac_cv_rl_version=6.2
966
967 # Force linking with system curses ... the bundled termcap lib
968 # sucks bad compared to ncurses. For the most part, ncurses
969 # is here because readline needs it. But bash itself calls
970 # ncurses in one or two small places :(.
971
972 tc-export AR #444070
973 econf \
974 --with-installed-readline=. \
975 --with-curses \
976 $(use_with afs) \
977 $(use_enable net net-redirections) \
978 --disable-profiling \
979 $(use_enable mem-scramble) \
980 $(use_with mem-scramble bash-malloc) \
981 $(use_enable readline) \
982 $(use_enable readline history) \
983 $(use_enable readline bang-history) \
984 "${myconf[@]}"
985 }
986
987 src_install() {
988 into /
989 newbin bash bash-${SLOT}
990
991 newman doc/bash.1 bash-${SLOT}.1
992 newman doc/builtins.1 builtins-${SLOT}.1
993
994 insinto /usr/share/info
995 newins doc/bashref.info bash-${SLOT}.info
996 dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
997
998 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
999 }
1000
1001
1002
1003 1.1 app-shells/bash/bash-3.1_p21.ebuild
1004
1005 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-3.1_p21.ebuild?rev=1.1&view=markup
1006 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-3.1_p21.ebuild?rev=1.1&content-type=text/plain
1007
1008 Index: bash-3.1_p21.ebuild
1009 ===================================================================
1010 # Copyright 1999-2014 Gentoo Foundation
1011 # Distributed under the terms of the GNU General Public License v2
1012 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-3.1_p21.ebuild,v 1.1 2014/10/01 20:47:24 polynomial-c Exp $
1013
1014 EAPI="4"
1015
1016 inherit eutils flag-o-matic toolchain-funcs
1017
1018 # Official patchlevel
1019 # See ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/
1020 PLEVEL=${PV##*_p}
1021 MY_PV=${PV/_p*}
1022 MY_PV=${MY_PV/_/-}
1023 MY_P=${PN}-${MY_PV}
1024 [[ ${PV} != *_p* ]] && PLEVEL=0
1025 patches() {
1026 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
1027 [[ ${plevel} -eq 0 ]] && return 1
1028 eval set -- {1..${plevel}}
1029 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
1030 if [[ ${opt} == -s ]] ; then
1031 echo "${@/#/${DISTDIR}/}"
1032 else
1033 local u
1034 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
1035 printf "${u}/${pn}-${pv}-patches/%s " "$@"
1036 done
1037 fi
1038 }
1039
1040 DESCRIPTION="The standard GNU Bourne again shell"
1041 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
1042 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
1043
1044 LICENSE="GPL-2"
1045 SLOT="${MY_PV}"
1046 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
1047 IUSE="afs +net nls +readline"
1048
1049 DEPEND=">=sys-libs/ncurses-5.2-r2
1050 readline? ( >=sys-libs/readline-6.2 )
1051 nls? ( virtual/libintl )"
1052 RDEPEND="${DEPEND}"
1053
1054 S=${WORKDIR}/${MY_P}
1055
1056 pkg_setup() {
1057 if is-flag -malign-double ; then #7332
1058 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
1059 eerror "as it breaks LFS (struct stat64) on x86."
1060 die "remove -malign-double from your CFLAGS mr ricer"
1061 fi
1062 }
1063
1064 src_unpack() {
1065 unpack ${MY_P}.tar.gz
1066 }
1067
1068 src_prepare() {
1069 # Include official patches
1070 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
1071
1072 # Clean out local libs so we know we use system ones
1073 rm -rf lib/{readline,termcap}/*
1074 touch lib/{readline,termcap}/Makefile.in # for config.status
1075 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
1076
1077 epatch "${FILESDIR}"/${PN}-3.1-gentoo.patch
1078 epatch "${FILESDIR}"/autoconf-mktime-2.53.patch #220040
1079 epatch "${FILESDIR}"/${PN}-3.1-ulimit.patch
1080 epatch "${FILESDIR}"/${PN}-3.0-read-memleak.patch
1081 epatch "${FILESDIR}"/${PN}-3.0-trap-fg-signals.patch
1082 epatch "${FILESDIR}"/bash-3.1-fix-dash-login-shell.patch #118257
1083 epatch "${FILESDIR}"/bash-3.1-dev-fd-test-as-user.patch #131875
1084
1085 epatch_user
1086 }
1087
1088 src_configure() {
1089 local myconf=()
1090
1091 # Force pgrp synchronization
1092 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81653
1093 export bash_cv_pgrp_pipe=yes
1094
1095 # For descriptions of these, see config-top.h
1096 # bashrc/#26952 bash_logout/#90488 ssh/#24762
1097 append-cppflags \
1098 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
1099 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
1100 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
1101 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
1102 -DNON_INTERACTIVE_LOGIN_SHELLS \
1103 -DSSH_SOURCE_BASHRC
1104
1105 # Don't even think about building this statically without
1106 # reading Bug 7714 first. If you still build it statically,
1107 # don't come crying to us with bugs ;).
1108 #use static && export LDFLAGS="${LDFLAGS} -static"
1109 use nls || myconf+=( --disable-nls )
1110
1111 # Historically, we always used the builtin readline, but since
1112 # our handling of SONAME upgrades has gotten much more stable
1113 # in the PM (and the readline ebuild itself preserves the old
1114 # libs during upgrades), linking against the system copy should
1115 # be safe.
1116 # Exact cached version here doesn't really matter as long as it
1117 # is at least what's in the DEPEND up above.
1118 export ac_cv_rl_version=6.2
1119
1120 # Force linking with system curses ... the bundled termcap lib
1121 # sucks bad compared to ncurses. For the most part, ncurses
1122 # is here because readline needs it. But bash itself calls
1123 # ncurses in one or two small places :(.
1124
1125 tc-export AR #444070
1126 econf \
1127 --with-installed-readline=. \
1128 --with-curses \
1129 $(use_with afs) \
1130 $(use_enable net net-redirections) \
1131 --disable-profiling \
1132 --without-gnu-malloc \
1133 $(use_enable readline) \
1134 $(use_enable readline history) \
1135 $(use_enable readline bang-history) \
1136 "${myconf[@]}"
1137 }
1138
1139 src_compile() {
1140 emake -j1 #102426
1141 }
1142
1143 src_install() {
1144 into /
1145 newbin bash bash-${SLOT}
1146
1147 newman doc/bash.1 bash-${SLOT}.1
1148 newman doc/builtins.1 builtins-${SLOT}.1
1149
1150 insinto /usr/share/info
1151 newins doc/bashref.info bash-${SLOT}.info
1152 dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
1153
1154 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
1155 }