Gentoo Archives: gentoo-commits

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