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