Gentoo Archives: gentoo-commits

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