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