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