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