Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-shells/bash: ChangeLog bash-4.3_p8.ebuild bash-4.3-r3.ebuild
Date: Mon, 31 Mar 2014 07:00:54
Message-Id: 20140331070051.4E12C2005C@flycatcher.gentoo.org
1 polynomial-c 14/03/31 07:00:51
2
3 Modified: ChangeLog
4 Added: bash-4.3_p8.ebuild
5 Removed: bash-4.3-r3.ebuild
6 Log:
7 Bump to latest official patch release
8
9 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
10
11 Revision Changes Path
12 1.359 app-shells/bash/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.359&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.359&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.358&r2=1.359
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
21 retrieving revision 1.358
22 retrieving revision 1.359
23 diff -u -r1.358 -r1.359
24 --- ChangeLog 28 Mar 2014 02:10:54 -0000 1.358
25 +++ ChangeLog 31 Mar 2014 07:00:51 -0000 1.359
26 @@ -1,6 +1,14 @@
27 # ChangeLog for app-shells/bash
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.358 2014/03/28 02:10:54 vapier Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.359 2014/03/31 07:00:51 polynomial-c Exp $
31 +
32 +*bash-4.3_p8 (31 Mar 2014)
33 +
34 + 31 Mar 2014; Lars Wendler <polynomial-c@g.o> -bash-4.3-r3.ebuild,
35 + +bash-4.3_p8.ebuild, -files/bash-4.3-compound-array-empty-value.patch,
36 + -files/bash-4.3-debug-trap.patch, -files/bash-4.3-extglob-skipname.patch,
37 + -files/bash-4.3-jobs-exit.patch, -files/bash-4.3-parse-ansi-expand.patch:
38 + Bump to latest official patch release.
39
40 *bash-4.3-r3 (28 Mar 2014)
41
42
43
44
45 1.1 app-shells/bash/bash-4.3_p8.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p8.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p8.ebuild?rev=1.1&content-type=text/plain
49
50 Index: bash-4.3_p8.ebuild
51 ===================================================================
52 # Copyright 1999-2014 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/app-shells/bash/bash-4.3_p8.ebuild,v 1.1 2014/03/31 07:00:51 polynomial-c Exp $
55
56 EAPI="4"
57
58 inherit eutils flag-o-matic toolchain-funcs multilib
59
60 # Official patchlevel
61 # See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
62 PLEVEL=${PV##*_p}
63 MY_PV=${PV/_p*}
64 MY_PV=${MY_PV/_/-}
65 MY_P=${PN}-${MY_PV}
66 [[ ${PV} != *_p* ]] && PLEVEL=0
67 patches() {
68 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
69 [[ ${plevel} -eq 0 ]] && return 1
70 eval set -- {1..${plevel}}
71 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
72 if [[ ${opt} == -s ]] ; then
73 echo "${@/#/${DISTDIR}/}"
74 else
75 local u
76 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
77 printf "${u}/${pn}-${pv}-patches/%s " "$@"
78 done
79 fi
80 }
81
82 # The version of readline this bash normally ships with.
83 READLINE_VER="6.3"
84
85 DESCRIPTION="The standard GNU Bourne again shell"
86 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
87 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
88 [[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
89
90 LICENSE="GPL-3"
91 SLOT="0"
92 #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
93 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
94
95 DEPEND=">=sys-libs/ncurses-5.2-r2
96 readline? ( >=sys-libs/readline-${READLINE_VER} )
97 nls? ( virtual/libintl )"
98 RDEPEND="${DEPEND}
99 !<sys-apps/portage-2.1.6.7_p1
100 !<sys-apps/paludis-0.26.0_alpha5"
101 # we only need yacc when the .y files get patched (bash42-005)
102 DEPEND+=" virtual/yacc"
103
104 S=${WORKDIR}/${MY_P}
105
106 pkg_setup() {
107 if is-flag -malign-double ; then #7332
108 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
109 eerror "as it breaks LFS (struct stat64) on x86."
110 die "remove -malign-double from your CFLAGS mr ricer"
111 fi
112 if use bashlogger ; then
113 ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
114 ewarn "This will log ALL output you enter into the shell, you have been warned."
115 fi
116 }
117
118 src_unpack() {
119 unpack ${MY_P}.tar.gz
120 }
121
122 src_prepare() {
123 # Include official patches
124 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
125
126 # Clean out local libs so we know we use system ones w/releases.
127 if [[ ${PV} != *_rc* ]] ; then
128 rm -rf lib/{readline,termcap}/*
129 touch lib/{readline,termcap}/Makefile.in # for config.status
130 sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
131 fi
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.3-pcomplete-dequote.patch
138 epatch "${FILESDIR}"/${PN}-4.3-input-line-realloc.patch
139
140 epatch_user
141 }
142
143 src_configure() {
144 local myconf=()
145
146 # For descriptions of these, see config-top.h
147 # bashrc/#26952 bash_logout/#90488 ssh/#24762
148 append-cppflags \
149 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
150 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
151 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
152 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
153 -DNON_INTERACTIVE_LOGIN_SHELLS \
154 -DSSH_SOURCE_BASHRC \
155 $(use bashlogger && echo -DSYSLOG_HISTORY)
156
157 # Don't even think about building this statically without
158 # reading Bug 7714 first. If you still build it statically,
159 # don't come crying to us with bugs ;).
160 #use static && export LDFLAGS="${LDFLAGS} -static"
161 use nls || myconf+=( --disable-nls )
162
163 # Historically, we always used the builtin readline, but since
164 # our handling of SONAME upgrades has gotten much more stable
165 # in the PM (and the readline ebuild itself preserves the old
166 # libs during upgrades), linking against the system copy should
167 # be safe.
168 # Exact cached version here doesn't really matter as long as it
169 # is at least what's in the DEPEND up above.
170 export ac_cv_rl_version=${READLINE_VER}
171
172 # Force linking with system curses ... the bundled termcap lib
173 # sucks bad compared to ncurses. For the most part, ncurses
174 # is here because readline needs it. But bash itself calls
175 # ncurses in one or two small places :(.
176
177 if [[ ${PV} != *_rc* ]] ; then
178 # Use system readline only with released versions.
179 myconf+=( --with-installed-readline=. )
180 fi
181
182 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
183 tc-export AR #444070
184 econf \
185 --docdir='$(datarootdir)'/doc/${PF} \
186 --htmldir='$(docdir)/html' \
187 --with-curses \
188 $(use_with afs) \
189 $(use_enable net net-redirections) \
190 --disable-profiling \
191 $(use_enable mem-scramble) \
192 $(use_with mem-scramble bash-malloc) \
193 $(use_enable readline) \
194 $(use_enable readline history) \
195 $(use_enable readline bang-history) \
196 "${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 "${D}"/usr/bin/bash "${D}"/bin/ || die
214 dosym bash /bin/rbash
215
216 insinto /etc/bash
217 doins "${FILESDIR}"/{bashrc,bash_logout}
218 insinto /etc/skel
219 for f in bash{_logout,_profile,rc} ; do
220 newins "${FILESDIR}"/dot-${f} .${f}
221 done
222
223 local sed_args=(
224 -e "s:#${USERLAND}#@::"
225 -e '/#@/d'
226 )
227 if ! use readline ; then
228 sed_args+=( #432338
229 -e '/^shopt -s histappend/s:^:#:'
230 -e 's:use_color=true:use_color=false:'
231 )
232 fi
233 sed -i \
234 "${sed_args[@]}" \
235 "${D}"/etc/skel/.bashrc \
236 "${D}"/etc/bash/bashrc || die
237
238 if use plugins ; then
239 exeinto /usr/$(get_libdir)/bash
240 doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
241 insinto /usr/include/bash-plugins
242 doins *.h builtins/*.h examples/loadables/*.h include/*.h \
243 lib/{glob/glob.h,tilde/tilde.h}
244 fi
245
246 if use examples ; then
247 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
248 exeinto /usr/share/doc/${PF}/${d}
249 insinto /usr/share/doc/${PF}/${d}
250 for f in ${d}/* ; do
251 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
252 doexe ${f}
253 else
254 doins ${f}
255 fi
256 done
257 done
258 fi
259
260 doman doc/*.1
261 newdoc CWRU/changelog ChangeLog
262 dosym bash.info /usr/share/info/bashref.info
263 }
264
265 pkg_preinst() {
266 if [ -e "${ROOT}/etc/bashrc" ] && [ ! -d "${ROOT}/etc/bash" ] ; then
267 mkdir -p "${ROOT}"/etc/bash
268 mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
269 fi
270
271 if [ -L "${ROOT}/bin/sh" ] ; then
272 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
273 # missing even temporarily causes a fatal error with paludis.
274 local target=$(readlink "${ROOT}"/bin/sh)
275 local tmp=$(emktemp "${ROOT}"/bin)
276 ln -sf "${target}" "${tmp}"
277 mv -f "${tmp}" "${ROOT}"/bin/sh
278 fi
279 }
280
281 pkg_postinst() {
282 # If /bin/sh does not exist, provide it
283 if [ ! -e "${ROOT}/bin/sh" ] ; then
284 ln -sf bash "${ROOT}"/bin/sh
285 fi
286 }