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