1 |
commit: 1bb1b0ae4d363b8368d0cecb250a3db3efef2e06 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 4 19:48:37 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 4 19:48:37 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bb1b0ae |
7 |
|
8 |
app-shells/bash: Removed old |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
app-shells/bash/bash-5.0_p11-r1.ebuild | 266 --------------------------------- |
13 |
app-shells/bash/bash-5.1.ebuild | 262 -------------------------------- |
14 |
2 files changed, 528 deletions(-) |
15 |
|
16 |
diff --git a/app-shells/bash/bash-5.0_p11-r1.ebuild b/app-shells/bash/bash-5.0_p11-r1.ebuild |
17 |
deleted file mode 100644 |
18 |
index bb06e48ea22..00000000000 |
19 |
--- a/app-shells/bash/bash-5.0_p11-r1.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,266 +0,0 @@ |
22 |
-# Copyright 1999-2021 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-EAPI=7 |
26 |
- |
27 |
-inherit flag-o-matic toolchain-funcs multilib prefix |
28 |
- |
29 |
-# Official patchlevel |
30 |
-# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/ |
31 |
-PLEVEL=${PV##*_p} |
32 |
-MY_PV=${PV/_p*} |
33 |
-MY_PV=${MY_PV/_/-} |
34 |
-MY_P=${PN}-${MY_PV} |
35 |
-is_release() { |
36 |
- case ${PV} in |
37 |
- *_alpha*|*_beta*|*_rc*) return 1 ;; |
38 |
- *) return 0 ;; |
39 |
- esac |
40 |
-} |
41 |
-[[ ${PV} != *_p* ]] && PLEVEL=0 |
42 |
-patches() { |
43 |
- local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} |
44 |
- [[ ${plevel} -eq 0 ]] && return 1 |
45 |
- eval set -- {1..${plevel}} |
46 |
- set -- $(printf "${pn}${pv/\.}-%03d " "$@") |
47 |
- if [[ ${opt} == -s ]] ; then |
48 |
- echo "${@/#/${DISTDIR}/}" |
49 |
- else |
50 |
- local u |
51 |
- for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do |
52 |
- printf "${u}/${pn}-${pv}-patches/%s " "$@" |
53 |
- done |
54 |
- fi |
55 |
-} |
56 |
- |
57 |
-# The version of readline this bash normally ships with. |
58 |
-READLINE_VER="8.0" |
59 |
- |
60 |
-DESCRIPTION="The standard GNU Bourne again shell" |
61 |
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" |
62 |
-if is_release ; then |
63 |
- SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" |
64 |
-else |
65 |
- SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
66 |
-fi |
67 |
- |
68 |
-LICENSE="GPL-3" |
69 |
-SLOT="0" |
70 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
71 |
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline" |
72 |
- |
73 |
-DEPEND=" |
74 |
- >=sys-libs/ncurses-5.2-r2:0= |
75 |
- nls? ( virtual/libintl ) |
76 |
- readline? ( >=sys-libs/readline-${READLINE_VER}:0= ) |
77 |
-" |
78 |
-RDEPEND=" |
79 |
- ${DEPEND} |
80 |
- !<sys-apps/portage-2.1.6.7_p1 |
81 |
-" |
82 |
-# we only need yacc when the .y files get patched (bash42-005) |
83 |
-#DEPEND+=" virtual/yacc" |
84 |
- |
85 |
-S="${WORKDIR}/${MY_P}" |
86 |
- |
87 |
-PATCHES=( |
88 |
- # Patches from Chet sent to bashbug ml |
89 |
- "${FILESDIR}"/${PN}-5.0-history-append.patch |
90 |
- "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch |
91 |
- # fix CVE-2019-18276 #702488 |
92 |
- "${FILESDIR}"/${PN}-5.0_p11-disable_priv_mode.patch |
93 |
-) |
94 |
- |
95 |
-pkg_setup() { |
96 |
- if is-flag -malign-double ; then #7332 |
97 |
- eerror "Detected bad CFLAGS '-malign-double'. Do not use this" |
98 |
- eerror "as it breaks LFS (struct stat64) on x86." |
99 |
- die "remove -malign-double from your CFLAGS mr ricer" |
100 |
- fi |
101 |
- if use bashlogger ; then |
102 |
- ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." |
103 |
- ewarn "This will log ALL output you enter into the shell, you have been warned." |
104 |
- fi |
105 |
-} |
106 |
- |
107 |
-src_unpack() { |
108 |
- unpack ${MY_P}.tar.gz |
109 |
-} |
110 |
- |
111 |
-src_prepare() { |
112 |
- # Include official patches |
113 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
114 |
- |
115 |
- # Clean out local libs so we know we use system ones w/releases. |
116 |
- if is_release ; then |
117 |
- rm -rf lib/{readline,termcap}/* |
118 |
- touch lib/{readline,termcap}/Makefile.in # for config.status |
119 |
- sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die |
120 |
- fi |
121 |
- |
122 |
- # Prefixify hardcoded path names. No-op for non-prefix. |
123 |
- hprefixify pathnames.h.in |
124 |
- |
125 |
- # Avoid regenerating docs after patches #407985 |
126 |
- sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die |
127 |
- touch -r . doc/* |
128 |
- |
129 |
- eapply -p0 "${PATCHES[@]}" |
130 |
- eapply_user |
131 |
-} |
132 |
- |
133 |
-src_configure() { |
134 |
- local myconf=( |
135 |
- --disable-profiling |
136 |
- --docdir='$(datarootdir)'/doc/${PF} |
137 |
- --htmldir='$(docdir)/html' |
138 |
- --with-curses |
139 |
- $(use_enable mem-scramble) |
140 |
- $(use_enable net net-redirections) |
141 |
- $(use_enable readline) |
142 |
- $(use_enable readline bang-history) |
143 |
- $(use_enable readline history) |
144 |
- $(use_with afs) |
145 |
- $(use_with mem-scramble bash-malloc) |
146 |
- ) |
147 |
- |
148 |
- # For descriptions of these, see config-top.h |
149 |
- # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 |
150 |
- append-cppflags \ |
151 |
- -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \ |
152 |
- -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \ |
153 |
- -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \ |
154 |
- -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \ |
155 |
- -DNON_INTERACTIVE_LOGIN_SHELLS \ |
156 |
- -DSSH_SOURCE_BASHRC \ |
157 |
- $(use bashlogger && echo -DSYSLOG_HISTORY) |
158 |
- |
159 |
- # Don't even think about building this statically without |
160 |
- # reading Bug 7714 first. If you still build it statically, |
161 |
- # don't come crying to us with bugs ;). |
162 |
- #use static && export LDFLAGS="${LDFLAGS} -static" |
163 |
- use nls || myconf+=( --disable-nls ) |
164 |
- |
165 |
- # Historically, we always used the builtin readline, but since |
166 |
- # our handling of SONAME upgrades has gotten much more stable |
167 |
- # in the PM (and the readline ebuild itself preserves the old |
168 |
- # libs during upgrades), linking against the system copy should |
169 |
- # be safe. |
170 |
- # Exact cached version here doesn't really matter as long as it |
171 |
- # is at least what's in the DEPEND up above. |
172 |
- export ac_cv_rl_version=${READLINE_VER%%_*} |
173 |
- |
174 |
- # Force linking with system curses ... the bundled termcap lib |
175 |
- # sucks bad compared to ncurses. For the most part, ncurses |
176 |
- # is here because readline needs it. But bash itself calls |
177 |
- # ncurses in one or two small places :(. |
178 |
- |
179 |
- if is_release ; then |
180 |
- # Use system readline only with released versions. |
181 |
- myconf+=( --with-installed-readline=. ) |
182 |
- fi |
183 |
- |
184 |
- if use plugins; then |
185 |
- append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash |
186 |
- else |
187 |
- # Disable the plugins logic by hand since bash doesn't |
188 |
- # provide a way of doing it. |
189 |
- export ac_cv_func_dl{close,open,sym}=no \ |
190 |
- ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no |
191 |
- sed -i \ |
192 |
- -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \ |
193 |
- configure || die |
194 |
- fi |
195 |
- tc-export AR #444070 |
196 |
- econf "${myconf[@]}" |
197 |
-} |
198 |
- |
199 |
-src_compile() { |
200 |
- emake |
201 |
- |
202 |
- if use plugins ; then |
203 |
- emake -C examples/loadables all others |
204 |
- fi |
205 |
-} |
206 |
- |
207 |
-src_install() { |
208 |
- local d f |
209 |
- |
210 |
- default |
211 |
- |
212 |
- dodir /bin |
213 |
- mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die |
214 |
- dosym bash /bin/rbash |
215 |
- |
216 |
- insinto /etc/bash |
217 |
- doins "${FILESDIR}"/bash_logout |
218 |
- doins "$(prefixify_ro "${FILESDIR}"/bashrc)" |
219 |
- keepdir /etc/bash/bashrc.d |
220 |
- insinto /etc/skel |
221 |
- for f in bash{_logout,_profile,rc} ; do |
222 |
- newins "${FILESDIR}"/dot-${f} .${f} |
223 |
- done |
224 |
- |
225 |
- local sed_args=( |
226 |
- -e "s:#${USERLAND}#@::" |
227 |
- -e '/#@/d' |
228 |
- ) |
229 |
- if ! use readline ; then |
230 |
- sed_args+=( #432338 |
231 |
- -e '/^shopt -s histappend/s:^:#:' |
232 |
- -e 's:use_color=true:use_color=false:' |
233 |
- ) |
234 |
- fi |
235 |
- sed -i \ |
236 |
- "${sed_args[@]}" \ |
237 |
- "${ED}"/etc/skel/.bashrc \ |
238 |
- "${ED}"/etc/bash/bashrc || die |
239 |
- |
240 |
- if use plugins ; then |
241 |
- exeinto /usr/$(get_libdir)/bash |
242 |
- doexe $(echo examples/loadables/*.o | sed 's:\.o::g') |
243 |
- insinto /usr/include/bash-plugins |
244 |
- doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} |
245 |
- fi |
246 |
- |
247 |
- if use examples ; then |
248 |
- for d in examples/{functions,misc,scripts,startup-files} ; do |
249 |
- exeinto /usr/share/doc/${PF}/${d} |
250 |
- insinto /usr/share/doc/${PF}/${d} |
251 |
- for f in ${d}/* ; do |
252 |
- if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then |
253 |
- doexe ${f} |
254 |
- else |
255 |
- doins ${f} |
256 |
- fi |
257 |
- done |
258 |
- done |
259 |
- fi |
260 |
- |
261 |
- doman doc/*.1 |
262 |
- newdoc CWRU/changelog ChangeLog |
263 |
- dosym bash.info /usr/share/info/bashref.info |
264 |
-} |
265 |
- |
266 |
-pkg_preinst() { |
267 |
- if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then |
268 |
- mkdir -p "${EROOT}"/etc/bash |
269 |
- mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ |
270 |
- fi |
271 |
- |
272 |
- if [[ -L ${EROOT}/bin/sh ]] ; then |
273 |
- # rewrite the symlink to ensure that its mtime changes. having /bin/sh |
274 |
- # missing even temporarily causes a fatal error with paludis. |
275 |
- local target=$(readlink "${EROOT}"/bin/sh) |
276 |
- local tmp="${T}"/sh |
277 |
- ln -sf "${target}" "${tmp}" |
278 |
- mv -f "${tmp}" "${EROOT}"/bin/sh |
279 |
- fi |
280 |
-} |
281 |
- |
282 |
-pkg_postinst() { |
283 |
- # If /bin/sh does not exist, provide it |
284 |
- if [[ ! -e ${EROOT}/bin/sh ]] ; then |
285 |
- ln -sf bash "${EROOT}"/bin/sh |
286 |
- fi |
287 |
-} |
288 |
|
289 |
diff --git a/app-shells/bash/bash-5.1.ebuild b/app-shells/bash/bash-5.1.ebuild |
290 |
deleted file mode 100644 |
291 |
index 1d3db2119d5..00000000000 |
292 |
--- a/app-shells/bash/bash-5.1.ebuild |
293 |
+++ /dev/null |
294 |
@@ -1,262 +0,0 @@ |
295 |
-# Copyright 1999-2021 Gentoo Authors |
296 |
-# Distributed under the terms of the GNU General Public License v2 |
297 |
- |
298 |
-EAPI=7 |
299 |
- |
300 |
-inherit flag-o-matic toolchain-funcs multilib prefix |
301 |
- |
302 |
-# Official patchlevel |
303 |
-# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/ |
304 |
-PLEVEL="${PV##*_p}" |
305 |
-MY_PV="${PV/_p*}" |
306 |
-MY_PV="${MY_PV/_/-}" |
307 |
-MY_P="${PN}-${MY_PV}" |
308 |
-is_release() { |
309 |
- case ${PV} in |
310 |
- *_alpha*|*_beta*|*_rc*) return 1 ;; |
311 |
- *) return 0 ;; |
312 |
- esac |
313 |
-} |
314 |
-[[ ${PV} != *_p* ]] && PLEVEL=0 |
315 |
-patches() { |
316 |
- local opt=${1} plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} |
317 |
- [[ ${plevel} -eq 0 ]] && return 1 |
318 |
- eval set -- {1..${plevel}} |
319 |
- set -- $(printf "${pn}${pv/\.}-%03d " "$@") |
320 |
- if [[ ${opt} == -s ]] ; then |
321 |
- echo "${@/#/${DISTDIR}/}" |
322 |
- else |
323 |
- local u |
324 |
- for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do |
325 |
- printf "${u}/${pn}-${pv}-patches/%s " "$@" |
326 |
- done |
327 |
- fi |
328 |
-} |
329 |
- |
330 |
-# The version of readline this bash normally ships with. |
331 |
-READLINE_VER="8.1" |
332 |
- |
333 |
-DESCRIPTION="The standard GNU Bourne again shell" |
334 |
-HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" |
335 |
-if is_release ; then |
336 |
- SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" |
337 |
-else |
338 |
- SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" |
339 |
-fi |
340 |
- |
341 |
-LICENSE="GPL-3" |
342 |
-SLOT="0" |
343 |
-[[ "${PV}" == *_rc* ]] || \ |
344 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
345 |
-IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline" |
346 |
- |
347 |
-DEPEND=" |
348 |
- >=sys-libs/ncurses-5.2-r2:0= |
349 |
- nls? ( virtual/libintl ) |
350 |
- readline? ( >=sys-libs/readline-${READLINE_VER}:0= ) |
351 |
-" |
352 |
-RDEPEND=" |
353 |
- ${DEPEND} |
354 |
-" |
355 |
-# we only need yacc when the .y files get patched (bash42-005) |
356 |
-#BDEPEND="virtual/yacc" |
357 |
- |
358 |
-S="${WORKDIR}/${MY_P}" |
359 |
- |
360 |
-PATCHES=( |
361 |
- # Patches from Chet sent to bashbug ml |
362 |
- "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch |
363 |
-) |
364 |
- |
365 |
-pkg_setup() { |
366 |
- if is-flag -malign-double ; then #7332 |
367 |
- eerror "Detected bad CFLAGS '-malign-double'. Do not use this" |
368 |
- eerror "as it breaks LFS (struct stat64) on x86." |
369 |
- die "remove -malign-double from your CFLAGS mr ricer" |
370 |
- fi |
371 |
- if use bashlogger ; then |
372 |
- ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." |
373 |
- ewarn "This will log ALL output you enter into the shell, you have been warned." |
374 |
- fi |
375 |
-} |
376 |
- |
377 |
-src_unpack() { |
378 |
- unpack ${MY_P}.tar.gz |
379 |
-} |
380 |
- |
381 |
-src_prepare() { |
382 |
- # Include official patches |
383 |
- [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) |
384 |
- |
385 |
- # Clean out local libs so we know we use system ones w/releases. |
386 |
- if is_release ; then |
387 |
- rm -rf lib/{readline,termcap}/* || die |
388 |
- touch lib/{readline,termcap}/Makefile.in || die # for config.status |
389 |
- sed -ri -e 's:\$[{(](RL|HIST)_LIBSRC[)}]/[[:alpha:]_-]*\.h::g' Makefile.in || die |
390 |
- fi |
391 |
- |
392 |
- # Prefixify hardcoded path names. No-op for non-prefix. |
393 |
- hprefixify pathnames.h.in |
394 |
- |
395 |
- # Avoid regenerating docs after patches #407985 |
396 |
- sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die |
397 |
- touch -r . doc/* || die |
398 |
- |
399 |
- eapply -p0 "${PATCHES[@]}" |
400 |
- eapply "${FILESDIR}/${PN}-5.1-parallel_make.patch" |
401 |
- eapply_user |
402 |
-} |
403 |
- |
404 |
-src_configure() { |
405 |
- local myconf=( |
406 |
- --disable-profiling |
407 |
- --with-curses |
408 |
- $(use_enable mem-scramble) |
409 |
- $(use_enable net net-redirections) |
410 |
- $(use_enable readline) |
411 |
- $(use_enable readline bang-history) |
412 |
- $(use_enable readline history) |
413 |
- $(use_with afs) |
414 |
- $(use_with mem-scramble bash-malloc) |
415 |
- ) |
416 |
- |
417 |
- # For descriptions of these, see config-top.h |
418 |
- # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 |
419 |
- append-cppflags \ |
420 |
- -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \ |
421 |
- -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \ |
422 |
- -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \ |
423 |
- -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \ |
424 |
- -DNON_INTERACTIVE_LOGIN_SHELLS \ |
425 |
- -DSSH_SOURCE_BASHRC \ |
426 |
- $(use bashlogger && echo -DSYSLOG_HISTORY) |
427 |
- |
428 |
- # Don't even think about building this statically without |
429 |
- # reading Bug 7714 first. If you still build it statically, |
430 |
- # don't come crying to us with bugs ;). |
431 |
- #use static && export LDFLAGS="${LDFLAGS} -static" |
432 |
- use nls || myconf+=( --disable-nls ) |
433 |
- |
434 |
- # Historically, we always used the builtin readline, but since |
435 |
- # our handling of SONAME upgrades has gotten much more stable |
436 |
- # in the PM (and the readline ebuild itself preserves the old |
437 |
- # libs during upgrades), linking against the system copy should |
438 |
- # be safe. |
439 |
- # Exact cached version here doesn't really matter as long as it |
440 |
- # is at least what's in the DEPEND up above. |
441 |
- export ac_cv_rl_version=${READLINE_VER%%_*} |
442 |
- |
443 |
- # Force linking with system curses ... the bundled termcap lib |
444 |
- # sucks bad compared to ncurses. For the most part, ncurses |
445 |
- # is here because readline needs it. But bash itself calls |
446 |
- # ncurses in one or two small places :(. |
447 |
- |
448 |
- if is_release ; then |
449 |
- # Use system readline only with released versions. |
450 |
- myconf+=( --with-installed-readline=. ) |
451 |
- fi |
452 |
- |
453 |
- if use plugins; then |
454 |
- append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash |
455 |
- else |
456 |
- # Disable the plugins logic by hand since bash doesn't |
457 |
- # provide a way of doing it. |
458 |
- export ac_cv_func_dl{close,open,sym}=no \ |
459 |
- ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no |
460 |
- sed -i \ |
461 |
- -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \ |
462 |
- configure || die |
463 |
- fi |
464 |
- tc-export AR #444070 |
465 |
- econf "${myconf[@]}" |
466 |
-} |
467 |
- |
468 |
-src_compile() { |
469 |
- emake |
470 |
- |
471 |
- if use plugins ; then |
472 |
- emake -C examples/loadables all others |
473 |
- fi |
474 |
-} |
475 |
- |
476 |
-src_install() { |
477 |
- local d f |
478 |
- |
479 |
- default |
480 |
- |
481 |
- dodir /bin |
482 |
- mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die |
483 |
- dosym bash /bin/rbash |
484 |
- |
485 |
- insinto /etc/bash |
486 |
- doins "${FILESDIR}"/bash_logout |
487 |
- doins "$(prefixify_ro "${FILESDIR}"/bashrc)" |
488 |
- keepdir /etc/bash/bashrc.d |
489 |
- insinto /etc/skel |
490 |
- for f in bash{_logout,_profile,rc} ; do |
491 |
- newins "${FILESDIR}"/dot-${f} .${f} |
492 |
- done |
493 |
- |
494 |
- local sed_args=( |
495 |
- -e "s:#${USERLAND}#@::" |
496 |
- -e '/#@/d' |
497 |
- ) |
498 |
- if ! use readline ; then |
499 |
- sed_args+=( #432338 |
500 |
- -e '/^shopt -s histappend/s:^:#:' |
501 |
- -e 's:use_color=true:use_color=false:' |
502 |
- ) |
503 |
- fi |
504 |
- sed -i \ |
505 |
- "${sed_args[@]}" \ |
506 |
- "${ED}"/etc/skel/.bashrc \ |
507 |
- "${ED}"/etc/bash/bashrc || die |
508 |
- |
509 |
- if use plugins ; then |
510 |
- exeinto /usr/$(get_libdir)/bash |
511 |
- doexe $(echo examples/loadables/*.o | sed 's:\.o::g') |
512 |
- insinto /usr/include/bash-plugins |
513 |
- doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} |
514 |
- fi |
515 |
- |
516 |
- if use examples ; then |
517 |
- for d in examples/{functions,misc,scripts,startup-files} ; do |
518 |
- exeinto /usr/share/doc/${PF}/${d} |
519 |
- docinto ${d} |
520 |
- for f in ${d}/* ; do |
521 |
- if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then |
522 |
- doexe ${f} |
523 |
- else |
524 |
- dodoc ${f} |
525 |
- fi |
526 |
- done |
527 |
- done |
528 |
- fi |
529 |
- |
530 |
- doman doc/*.1 |
531 |
- newdoc CWRU/changelog ChangeLog |
532 |
- dosym bash.info /usr/share/info/bashref.info |
533 |
-} |
534 |
- |
535 |
-pkg_preinst() { |
536 |
- if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then |
537 |
- mkdir -p "${EROOT}"/etc/bash |
538 |
- mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ |
539 |
- fi |
540 |
- |
541 |
- if [[ -L ${EROOT}/bin/sh ]] ; then |
542 |
- # rewrite the symlink to ensure that its mtime changes. having /bin/sh |
543 |
- # missing even temporarily causes a fatal error with paludis. |
544 |
- local target=$(readlink "${EROOT}"/bin/sh) |
545 |
- local tmp="${T}"/sh |
546 |
- ln -sf "${target}" "${tmp}" |
547 |
- mv -f "${tmp}" "${EROOT}"/bin/sh |
548 |
- fi |
549 |
-} |
550 |
- |
551 |
-pkg_postinst() { |
552 |
- # If /bin/sh does not exist, provide it |
553 |
- if [[ ! -e ${EROOT}/bin/sh ]] ; then |
554 |
- ln -sf bash "${EROOT}"/bin/sh |
555 |
- fi |
556 |
-} |