Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-shells/bash: bash-4.3_p33-r2.ebuild ChangeLog
Date: Tue, 24 Feb 2015 20:58:50
Message-Id: 20150224205846.612941279A@oystercatcher.gentoo.org
1 vapier 15/02/24 20:58:46
2
3 Modified: ChangeLog
4 Added: bash-4.3_p33-r2.ebuild
5 Log:
6 Do window title setup through PS1 #223641 by michael@××××××××.com. Add history -a to PROMPT_COMMAND #517342 by Paweł Hajdan, Jr.. Add fix from upstream for variable declare weirdness.
7
8 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.429 app-shells/bash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.429&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.429&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.428&r2=1.429
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
20 retrieving revision 1.428
21 retrieving revision 1.429
22 diff -u -r1.428 -r1.429
23 --- ChangeLog 21 Jan 2015 11:54:51 -0000 1.428
24 +++ ChangeLog 24 Feb 2015 20:58:46 -0000 1.429
25 @@ -1,6 +1,14 @@
26 # ChangeLog for app-shells/bash
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.428 2015/01/21 11:54:51 polynomial-c Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.429 2015/02/24 20:58:46 vapier Exp $
30 +
31 +*bash-4.3_p33-r2 (24 Feb 2015)
32 +
33 + 24 Feb 2015; Mike Frysinger <vapier@g.o> +bash-4.3_p33-r2.ebuild,
34 + +files/bash-4.3-declare-visibility.patch, +files/bashrc-r2:
35 + Do window title setup through PS1 #223641 by michael@××××××××.com. Add
36 + history -a to PROMPT_COMMAND #517342 by Paweł Hajdan, Jr.. Add fix from
37 + upstream for variable declare weirdness.
38
39 *bash-4.3_p33-r1 (21 Jan 2015)
40
41
42
43
44 1.1 app-shells/bash/bash-4.3_p33-r2.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p33-r2.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p33-r2.ebuild?rev=1.1&content-type=text/plain
48
49 Index: bash-4.3_p33-r2.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.3_p33-r2.ebuild,v 1.1 2015/02/24 20:58:46 vapier Exp $
54
55 EAPI="4"
56
57 inherit eutils flag-o-matic toolchain-funcs multilib
58
59 # Official patchlevel
60 # See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
61 PLEVEL=${PV##*_p}
62 MY_PV=${PV/_p*}
63 MY_PV=${MY_PV/_/-}
64 MY_P=${PN}-${MY_PV}
65 [[ ${PV} != *_p* ]] && PLEVEL=0
66 patches() {
67 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
68 [[ ${plevel} -eq 0 ]] && return 1
69 eval set -- {1..${plevel}}
70 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
71 if [[ ${opt} == -s ]] ; then
72 echo "${@/#/${DISTDIR}/}"
73 else
74 local u
75 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
76 printf "${u}/${pn}-${pv}-patches/%s " "$@"
77 done
78 fi
79 }
80
81 # The version of readline this bash normally ships with.
82 READLINE_VER="6.3"
83
84 DESCRIPTION="The standard GNU Bourne again shell"
85 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
86 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
87 [[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
88
89 LICENSE="GPL-3"
90 SLOT="0"
91 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
92 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
93
94 DEPEND=">=sys-libs/ncurses-5.2-r2
95 readline? ( >=sys-libs/readline-${READLINE_VER} )
96 nls? ( virtual/libintl )"
97 RDEPEND="${DEPEND}
98 !<sys-apps/portage-2.1.6.7_p1
99 !<sys-apps/paludis-0.26.0_alpha5"
100 # we only need yacc when the .y files get patched (bash42-005)
101 DEPEND+=" virtual/yacc"
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 if use bashlogger ; then
112 ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
113 ewarn "This will log ALL output you enter into the shell, you have been warned."
114 fi
115 }
116
117 src_unpack() {
118 unpack ${MY_P}.tar.gz
119 }
120
121 src_prepare() {
122 # Include official patches
123 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
124
125 # Clean out local libs so we know we use system ones w/releases.
126 if [[ ${PV} != *_rc* ]] ; then
127 rm -rf lib/{readline,termcap}/*
128 touch lib/{readline,termcap}/Makefile.in # for config.status
129 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
130 fi
131
132 # Avoid regenerating docs after patches #407985
133 sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
134 touch -r . doc/*
135
136 epatch "${FILESDIR}"/${PN}-4.3-compat-lvl.patch
137 epatch "${FILESDIR}"/${PN}-4.3-parse-time-keyword.patch
138 epatch "${FILESDIR}"/${PN}-4.3-append-process-segfault.patch
139 epatch "${FILESDIR}"/${PN}-4.3-mapfile-improper-array-name-validation.patch
140 epatch "${FILESDIR}"/${PN}-4.3-arrayfunc.patch
141 epatch "${FILESDIR}"/${PN}-4.3-declare-visibility.patch
142
143 epatch_user
144 }
145
146 src_configure() {
147 local myconf=()
148
149 # For descriptions of these, see config-top.h
150 # bashrc/#26952 bash_logout/#90488 ssh/#24762
151 append-cppflags \
152 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
153 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
154 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
155 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
156 -DNON_INTERACTIVE_LOGIN_SHELLS \
157 -DSSH_SOURCE_BASHRC \
158 $(use bashlogger && echo -DSYSLOG_HISTORY)
159
160 # Don't even think about building this statically without
161 # reading Bug 7714 first. If you still build it statically,
162 # don't come crying to us with bugs ;).
163 #use static && export LDFLAGS="${LDFLAGS} -static"
164 use nls || myconf+=( --disable-nls )
165
166 # Historically, we always used the builtin readline, but since
167 # our handling of SONAME upgrades has gotten much more stable
168 # in the PM (and the readline ebuild itself preserves the old
169 # libs during upgrades), linking against the system copy should
170 # be safe.
171 # Exact cached version here doesn't really matter as long as it
172 # is at least what's in the DEPEND up above.
173 export ac_cv_rl_version=${READLINE_VER}
174
175 # Force linking with system curses ... the bundled termcap lib
176 # sucks bad compared to ncurses. For the most part, ncurses
177 # is here because readline needs it. But bash itself calls
178 # ncurses in one or two small places :(.
179
180 if [[ ${PV} != *_rc* ]] ; then
181 # Use system readline only with released versions.
182 myconf+=( --with-installed-readline=. )
183 fi
184
185 if use plugins; then
186 append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
187 else
188 # Disable the plugins logic by hand since bash doesn't
189 # provide a way of doing it.
190 export ac_cv_func_dl{close,open,sym}=no \
191 ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
192 sed -i \
193 -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
194 configure || die
195 fi
196 tc-export AR #444070
197 econf \
198 --docdir='$(datarootdir)'/doc/${PF} \
199 --htmldir='$(docdir)/html' \
200 --with-curses \
201 $(use_with afs) \
202 $(use_enable net net-redirections) \
203 --disable-profiling \
204 $(use_enable mem-scramble) \
205 $(use_with mem-scramble bash-malloc) \
206 $(use_enable readline) \
207 $(use_enable readline history) \
208 $(use_enable readline bang-history) \
209 "${myconf[@]}"
210 }
211
212 src_compile() {
213 emake
214
215 if use plugins ; then
216 emake -C examples/loadables all others
217 fi
218 }
219
220 src_install() {
221 local d f
222
223 default
224
225 dodir /bin
226 mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
227 dosym bash /bin/rbash
228
229 insinto /etc/bash
230 doins "${FILESDIR}"/bash_logout
231 newins "${FILESDIR}"/bashrc-r2 bashrc
232 keepdir /etc/bash/bashrc.d
233 insinto /etc/skel
234 for f in bash{_logout,_profile,rc} ; do
235 newins "${FILESDIR}"/dot-${f} .${f}
236 done
237
238 local sed_args=(
239 -e "s:#${USERLAND}#@::"
240 -e '/#@/d'
241 )
242 if ! use readline ; then
243 sed_args+=( #432338
244 -e '/^shopt -s histappend/s:^:#:'
245 -e 's:use_color=true:use_color=false:'
246 )
247 fi
248 sed -i \
249 "${sed_args[@]}" \
250 "${ED}"/etc/skel/.bashrc \
251 "${ED}"/etc/bash/bashrc || die
252
253 if use plugins ; then
254 exeinto /usr/$(get_libdir)/bash
255 doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
256 insinto /usr/include/bash-plugins
257 doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
258 fi
259
260 if use examples ; then
261 for d in examples/{functions,misc,scripts,startup-files} ; do
262 exeinto /usr/share/doc/${PF}/${d}
263 insinto /usr/share/doc/${PF}/${d}
264 for f in ${d}/* ; do
265 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
266 doexe ${f}
267 else
268 doins ${f}
269 fi
270 done
271 done
272 fi
273
274 doman doc/*.1
275 newdoc CWRU/changelog ChangeLog
276 dosym bash.info /usr/share/info/bashref.info
277 }
278
279 pkg_preinst() {
280 if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
281 mkdir -p "${EROOT}"/etc/bash
282 mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
283 fi
284
285 if [[ -L ${EROOT}/bin/sh ]] ; then
286 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
287 # missing even temporarily causes a fatal error with paludis.
288 local target=$(readlink "${EROOT}"/bin/sh)
289 local tmp=$(emktemp "${EROOT}"/bin)
290 ln -sf "${target}" "${tmp}"
291 mv -f "${tmp}" "${EROOT}"/bin/sh
292 fi
293 }
294
295 pkg_postinst() {
296 # If /bin/sh does not exist, provide it
297 if [[ ! -e ${EROOT}/bin/sh ]] ; then
298 ln -sf bash "${EROOT}"/bin/sh
299 fi
300 }