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: bash-4.3_p11-r2.ebuild ChangeLog bash-4.3_p11.ebuild
Date: Sat, 26 Apr 2014 20:14:26
Message-Id: 20140426201420.D88D02004B@flycatcher.gentoo.org
1 polynomial-c 14/04/26 20:14:20
2
3 Modified: ChangeLog
4 Added: bash-4.3_p11-r2.ebuild
5 Removed: bash-4.3_p11.ebuild
6 Log:
7 Added another upstream fix. 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.366 app-shells/bash/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.366&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.366&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.365&r2=1.366
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
21 retrieving revision 1.365
22 retrieving revision 1.366
23 diff -u -r1.365 -r1.366
24 --- ChangeLog 16 Apr 2014 09:39:12 -0000 1.365
25 +++ ChangeLog 26 Apr 2014 20:14:20 -0000 1.366
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.365 2014/04/16 09:39:12 polynomial-c Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.366 2014/04/26 20:14:20 polynomial-c Exp $
31 +
32 +*bash-4.3_p11-r2 (26 Apr 2014)
33 +
34 + 26 Apr 2014; Lars Wendler <polynomial-c@g.o> -bash-4.3_p11.ebuild,
35 + +bash-4.3_p11-r2.ebuild, +files/bash-4.3-complete-dequoting.patch:
36 + Added another upstream fix. Removed old.
37
38 *bash-4.3_p11-r1 (16 Apr 2014)
39
40
41
42
43 1.1 app-shells/bash/bash-4.3_p11-r2.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p11-r2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3_p11-r2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: bash-4.3_p11-r2.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_p11-r2.ebuild,v 1.1 2014/04/26 20:14:20 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-jobs-run-sigchld-trap.patch \
136 "${FILESDIR}"/${PN}-4.3-complete-dequoting.patch
137
138 epatch_user
139 }
140
141 src_configure() {
142 local myconf=()
143
144 # For descriptions of these, see config-top.h
145 # bashrc/#26952 bash_logout/#90488 ssh/#24762
146 append-cppflags \
147 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
148 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
149 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
150 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
151 -DNON_INTERACTIVE_LOGIN_SHELLS \
152 -DSSH_SOURCE_BASHRC \
153 $(use bashlogger && echo -DSYSLOG_HISTORY)
154
155 # Don't even think about building this statically without
156 # reading Bug 7714 first. If you still build it statically,
157 # don't come crying to us with bugs ;).
158 #use static && export LDFLAGS="${LDFLAGS} -static"
159 use nls || myconf+=( --disable-nls )
160
161 # Historically, we always used the builtin readline, but since
162 # our handling of SONAME upgrades has gotten much more stable
163 # in the PM (and the readline ebuild itself preserves the old
164 # libs during upgrades), linking against the system copy should
165 # be safe.
166 # Exact cached version here doesn't really matter as long as it
167 # is at least what's in the DEPEND up above.
168 export ac_cv_rl_version=${READLINE_VER}
169
170 # Force linking with system curses ... the bundled termcap lib
171 # sucks bad compared to ncurses. For the most part, ncurses
172 # is here because readline needs it. But bash itself calls
173 # ncurses in one or two small places :(.
174
175 if [[ ${PV} != *_rc* ]] ; then
176 # Use system readline only with released versions.
177 myconf+=( --with-installed-readline=. )
178 fi
179
180 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
181 tc-export AR #444070
182 econf \
183 --docdir='$(datarootdir)'/doc/${PF} \
184 --htmldir='$(docdir)/html' \
185 --with-curses \
186 $(use_with afs) \
187 $(use_enable net net-redirections) \
188 --disable-profiling \
189 $(use_enable mem-scramble) \
190 $(use_with mem-scramble bash-malloc) \
191 $(use_enable readline) \
192 $(use_enable readline history) \
193 $(use_enable readline bang-history) \
194 "${myconf[@]}"
195 }
196
197 src_compile() {
198 emake
199
200 if use plugins ; then
201 emake -C examples/loadables all others
202 fi
203 }
204
205 src_install() {
206 local d f
207
208 default
209
210 dodir /bin
211 mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
212 dosym bash /bin/rbash
213
214 insinto /etc/bash
215 doins "${FILESDIR}"/{bashrc,bash_logout}
216 insinto /etc/skel
217 for f in bash{_logout,_profile,rc} ; do
218 newins "${FILESDIR}"/dot-${f} .${f}
219 done
220
221 local sed_args=(
222 -e "s:#${USERLAND}#@::"
223 -e '/#@/d'
224 )
225 if ! use readline ; then
226 sed_args+=( #432338
227 -e '/^shopt -s histappend/s:^:#:'
228 -e 's:use_color=true:use_color=false:'
229 )
230 fi
231 sed -i \
232 "${sed_args[@]}" \
233 "${ED}"/etc/skel/.bashrc \
234 "${ED}"/etc/bash/bashrc || die
235
236 if use plugins ; then
237 exeinto /usr/$(get_libdir)/bash
238 doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
239 insinto /usr/include/bash-plugins
240 doins *.h builtins/*.h examples/loadables/*.h include/*.h \
241 lib/{glob/glob.h,tilde/tilde.h}
242 fi
243
244 if use examples ; then
245 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
246 exeinto /usr/share/doc/${PF}/${d}
247 insinto /usr/share/doc/${PF}/${d}
248 for f in ${d}/* ; do
249 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
250 doexe ${f}
251 else
252 doins ${f}
253 fi
254 done
255 done
256 fi
257
258 doman doc/*.1
259 newdoc CWRU/changelog ChangeLog
260 dosym bash.info /usr/share/info/bashref.info
261 }
262
263 pkg_preinst() {
264 if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
265 mkdir -p "${EROOT}"/etc/bash
266 mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
267 fi
268
269 if [[ -L ${EROOT}/bin/sh ]] ; then
270 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
271 # missing even temporarily causes a fatal error with paludis.
272 local target=$(readlink "${EROOT}"/bin/sh)
273 local tmp=$(emktemp "${EROOT}"/bin)
274 ln -sf "${target}" "${tmp}"
275 mv -f "${tmp}" "${EROOT}"/bin/sh
276 fi
277 }
278
279 pkg_postinst() {
280 # If /bin/sh does not exist, provide it
281 if [[ ! -e ${EROOT}/bin/sh ]] ; then
282 ln -sf bash "${EROOT}"/bin/sh
283 fi
284 }