Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: app-shells/bash/
Date: Thu, 27 Dec 2018 15:38:54
Message-Id: 1545925125.c2695a82ec1ad90849761cd5147589b38f041881.grobian@gentoo
1 commit: c2695a82ec1ad90849761cd5147589b38f041881
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 27 15:38:45 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 27 15:38:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=c2695a82
7
8 app-shells/bash: cleanup
9
10 Package-Manager: Portage-2.3.52.2-prefix, Repoman-2.3.12
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 app-shells/bash/bash-4.4-r1.ebuild | 251 -------------------------------------
14 1 file changed, 251 deletions(-)
15
16 diff --git a/app-shells/bash/bash-4.4-r1.ebuild b/app-shells/bash/bash-4.4-r1.ebuild
17 deleted file mode 100644
18 index b818de4fdd..0000000000
19 --- a/app-shells/bash/bash-4.4-r1.ebuild
20 +++ /dev/null
21 @@ -1,251 +0,0 @@
22 -# Copyright 1999-2016 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -# $Id$
25 -
26 -EAPI="5"
27 -
28 -inherit eutils flag-o-matic toolchain-funcs multilib prefix
29 -
30 -# Official patchlevel
31 -# See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
32 -PLEVEL=${PV##*_p}
33 -MY_PV=${PV/_p*}
34 -MY_PV=${MY_PV/_/-}
35 -MY_P=${PN}-${MY_PV}
36 -[[ ${PV} != *_p* ]] && PLEVEL=0
37 -patches() {
38 - local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
39 - [[ ${plevel} -eq 0 ]] && return 1
40 - eval set -- {1..${plevel}}
41 - set -- $(printf "${pn}${pv/\.}-%03d " "$@")
42 - if [[ ${opt} == -s ]] ; then
43 - echo "${@/#/${DISTDIR}/}"
44 - else
45 - local u
46 - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
47 - printf "${u}/${pn}-${pv}-patches/%s " "$@"
48 - done
49 - fi
50 -}
51 -
52 -# The version of readline this bash normally ships with.
53 -READLINE_VER="7.0"
54 -
55 -DESCRIPTION="The standard GNU Bourne again shell"
56 -HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
57 -case ${PV} in
58 -*_alpha*|*_beta*|*_rc*) SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" ;;
59 -*) SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" ;;
60 -esac
61 -
62 -LICENSE="GPL-3"
63 -SLOT="0"
64 -#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
65 -IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
66 -
67 -DEPEND=">=sys-libs/ncurses-5.2-r2:0=
68 - readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
69 - nls? ( virtual/libintl )"
70 -RDEPEND="${DEPEND}
71 - !<sys-apps/portage-2.1.6.7_p1
72 - !<sys-apps/paludis-0.26.0_alpha5"
73 -# we only need yacc when the .y files get patched (bash42-005)
74 -#DEPEND+=" virtual/yacc"
75 -
76 -S=${WORKDIR}/${MY_P}
77 -
78 -pkg_setup() {
79 - if is-flag -malign-double ; then #7332
80 - eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
81 - eerror "as it breaks LFS (struct stat64) on x86."
82 - die "remove -malign-double from your CFLAGS mr ricer"
83 - fi
84 - if use bashlogger ; then
85 - ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
86 - ewarn "This will log ALL output you enter into the shell, you have been warned."
87 - fi
88 -}
89 -
90 -src_unpack() {
91 - unpack ${MY_P}.tar.gz
92 -}
93 -
94 -src_prepare() {
95 - # Include official patches
96 - [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
97 -
98 - # bug 597006: large HISTFILESIZE value may result in upfront memory exhaustion
99 - epatch "${FILESDIR}"/${PN}-4.4-history-alloclist.patch
100 -
101 - # Clean out local libs so we know we use system ones w/releases.
102 - if [[ ${PV} != *_rc* ]] ; then
103 - rm -rf lib/{readline,termcap}/*
104 - touch lib/{readline,termcap}/Makefile.in # for config.status
105 - sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
106 - fi
107 -
108 - # Prefixify hardcoded path names. No-op for non-prefix.
109 - hprefixify pathnames.h.in
110 -
111 - # Avoid regenerating docs after patches #407985
112 - sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
113 - touch -r . doc/*
114 -
115 - epatch_user
116 -}
117 -
118 -src_configure() {
119 - local myconf=()
120 -
121 - # For descriptions of these, see config-top.h
122 - # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
123 - append-cppflags \
124 - -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
125 - -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
126 - -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
127 - -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
128 - -DNON_INTERACTIVE_LOGIN_SHELLS \
129 - -DSSH_SOURCE_BASHRC \
130 - $(use bashlogger && echo -DSYSLOG_HISTORY)
131 -
132 - # Don't even think about building this statically without
133 - # reading Bug 7714 first. If you still build it statically,
134 - # don't come crying to us with bugs ;).
135 - #use static && export LDFLAGS="${LDFLAGS} -static"
136 - use nls || myconf+=( --disable-nls )
137 -
138 - # Historically, we always used the builtin readline, but since
139 - # our handling of SONAME upgrades has gotten much more stable
140 - # in the PM (and the readline ebuild itself preserves the old
141 - # libs during upgrades), linking against the system copy should
142 - # be safe.
143 - # Exact cached version here doesn't really matter as long as it
144 - # is at least what's in the DEPEND up above.
145 - export ac_cv_rl_version=${READLINE_VER%%_*}
146 -
147 - # Force linking with system curses ... the bundled termcap lib
148 - # sucks bad compared to ncurses. For the most part, ncurses
149 - # is here because readline needs it. But bash itself calls
150 - # ncurses in one or two small places :(.
151 -
152 - if [[ ${PV} != *_rc* ]] ; then
153 - # Use system readline only with released versions.
154 - myconf+=( --with-installed-readline=. )
155 - fi
156 -
157 - if use plugins; then
158 - append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
159 - else
160 - # Disable the plugins logic by hand since bash doesn't
161 - # provide a way of doing it.
162 - export ac_cv_func_dl{close,open,sym}=no \
163 - ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
164 - sed -i \
165 - -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
166 - configure || die
167 - fi
168 - tc-export AR #444070
169 - econf \
170 - --docdir='$(datarootdir)'/doc/${PF} \
171 - --htmldir='$(docdir)/html' \
172 - --with-curses \
173 - $(use_with afs) \
174 - $(use_enable net net-redirections) \
175 - --disable-profiling \
176 - $(use_enable mem-scramble) \
177 - $(use_with mem-scramble bash-malloc) \
178 - $(use_enable readline) \
179 - $(use_enable readline history) \
180 - $(use_enable readline bang-history) \
181 - "${myconf[@]}"
182 -}
183 -
184 -src_compile() {
185 - emake
186 -
187 - if use plugins ; then
188 - emake -C examples/loadables all others
189 - fi
190 -}
191 -
192 -src_install() {
193 - local d f
194 -
195 - default
196 -
197 - dodir /bin
198 - mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
199 - dosym bash /bin/rbash
200 -
201 - insinto /etc/bash
202 - doins "${FILESDIR}"/bash_logout
203 - doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
204 - keepdir /etc/bash/bashrc.d
205 - insinto /etc/skel
206 - for f in bash{_logout,_profile,rc} ; do
207 - newins "${FILESDIR}"/dot-${f} .${f}
208 - done
209 -
210 - local sed_args=(
211 - -e "s:#${USERLAND}#@::"
212 - -e '/#@/d'
213 - )
214 - if ! use readline ; then
215 - sed_args+=( #432338
216 - -e '/^shopt -s histappend/s:^:#:'
217 - -e 's:use_color=true:use_color=false:'
218 - )
219 - fi
220 - sed -i \
221 - "${sed_args[@]}" \
222 - "${ED}"/etc/skel/.bashrc \
223 - "${ED}"/etc/bash/bashrc || die
224 -
225 - if use plugins ; then
226 - exeinto /usr/$(get_libdir)/bash
227 - doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
228 - insinto /usr/include/bash-plugins
229 - doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
230 - fi
231 -
232 - if use examples ; then
233 - for d in examples/{functions,misc,scripts,startup-files} ; do
234 - exeinto /usr/share/doc/${PF}/${d}
235 - insinto /usr/share/doc/${PF}/${d}
236 - for f in ${d}/* ; do
237 - if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
238 - doexe ${f}
239 - else
240 - doins ${f}
241 - fi
242 - done
243 - done
244 - fi
245 -
246 - doman doc/*.1
247 - newdoc CWRU/changelog ChangeLog
248 - dosym bash.info /usr/share/info/bashref.info
249 -}
250 -
251 -pkg_preinst() {
252 - if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
253 - mkdir -p "${EROOT}"/etc/bash
254 - mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
255 - fi
256 -
257 - if [[ -L ${EROOT}/bin/sh ]] ; then
258 - # rewrite the symlink to ensure that its mtime changes. having /bin/sh
259 - # missing even temporarily causes a fatal error with paludis.
260 - local target=$(readlink "${EROOT}"/bin/sh)
261 - local tmp=$(emktemp "${EROOT}"/bin)
262 - ln -sf "${target}" "${tmp}"
263 - mv -f "${tmp}" "${EROOT}"/bin/sh
264 - fi
265 -}
266 -
267 -pkg_postinst() {
268 - # If /bin/sh does not exist, provide it
269 - if [[ ! -e ${EROOT}/bin/sh ]] ; then
270 - ln -sf bash "${EROOT}"/bin/sh
271 - fi
272 -}