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_p29.ebuild ChangeLog
Date: Wed, 30 May 2012 16:06:49
Message-Id: 20120530160634.A095D2004B@flycatcher.gentoo.org
1 vapier 12/05/30 16:06:34
2
3 Modified: ChangeLog
4 Added: bash-4.2_p29.ebuild
5 Log:
6 Version bump #418205 by Lars Wendler (Polynomial-C).
7
8 (Portage version: HEAD/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.313 app-shells/bash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.313&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.313&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.312&r2=1.313
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
20 retrieving revision 1.312
21 retrieving revision 1.313
22 diff -u -r1.312 -r1.313
23 --- ChangeLog 23 May 2012 01:13:17 -0000 1.312
24 +++ ChangeLog 30 May 2012 16:06:34 -0000 1.313
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.312 2012/05/23 01:13:17 zmedico Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.313 2012/05/30 16:06:34 vapier Exp $
30 +
31 +*bash-4.2_p29 (30 May 2012)
32 +
33 + 30 May 2012; Mike Frysinger <vapier@g.o> +bash-4.2_p29.ebuild:
34 + Version bump #418205 by Lars Wendler (Polynomial-C).
35
36 23 May 2012; Zac Medico <zmedico@g.o> bash-4.1_p10.ebuild,
37 bash-4.1_p11.ebuild, bash-4.1_p7.ebuild, bash-4.1_p9.ebuild,
38
39
40
41 1.1 app-shells/bash/bash-4.2_p29.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p29.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p29.ebuild?rev=1.1&content-type=text/plain
45
46 Index: bash-4.2_p29.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_p29.ebuild,v 1.1 2012/05/30 16:06:34 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
131 src_compile() {
132 local myconf=
133
134 # For descriptions of these, see config-top.h
135 # bashrc/#26952 bash_logout/#90488 ssh/#24762
136 append-cppflags \
137 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
138 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
139 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
140 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
141 -DNON_INTERACTIVE_LOGIN_SHELLS \
142 -DSSH_SOURCE_BASHRC \
143 $(use bashlogger && echo -DSYSLOG_HISTORY)
144
145 # Don't even think about building this statically without
146 # reading Bug 7714 first. If you still build it statically,
147 # don't come crying to us with bugs ;).
148 #use static && export LDFLAGS="${LDFLAGS} -static"
149 use nls || myconf="${myconf} --disable-nls"
150
151 # Historically, we always used the builtin readline, but since
152 # our handling of SONAME upgrades has gotten much more stable
153 # in the PM (and the readline ebuild itself preserves the old
154 # libs during upgrades), linking against the system copy should
155 # be safe.
156 # Exact cached version here doesn't really matter as long as it
157 # is at least what's in the DEPEND up above.
158 export ac_cv_rl_version=6.2
159
160 # Force linking with system curses ... the bundled termcap lib
161 # sucks bad compared to ncurses. For the most part, ncurses
162 # is here because readline needs it. But bash itself calls
163 # ncurses in one or two small places :(.
164
165 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
166 econf \
167 --with-installed-readline=. \
168 --with-curses \
169 $(use_with afs) \
170 $(use_enable net net-redirections) \
171 --disable-profiling \
172 $(use_enable mem-scramble) \
173 $(use_with mem-scramble bash-malloc) \
174 $(use_enable readline) \
175 $(use_enable readline history) \
176 $(use_enable readline bang-history) \
177 ${myconf}
178 emake || die
179
180 if use plugins ; then
181 emake -C examples/loadables all others || die
182 fi
183 }
184
185 src_install() {
186 emake install DESTDIR="${D}" || die
187
188 dodir /bin
189 mv "${D}"/usr/bin/bash "${D}"/bin/ || die
190 dosym bash /bin/rbash
191
192 insinto /etc/bash
193 doins "${FILESDIR}"/{bashrc,bash_logout}
194 insinto /etc/skel
195 for f in bash{_logout,_profile,rc} ; do
196 newins "${FILESDIR}"/dot-${f} .${f}
197 done
198
199 sed -i -e "s:#${USERLAND}#@::" "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
200 sed -i -e '/#@/d' "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
201
202 if use plugins ; then
203 exeinto /usr/$(get_libdir)/bash
204 doexe $(echo examples/loadables/*.o | sed 's:\.o::g') || die
205 fi
206
207 if use examples ; then
208 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
209 exeinto /usr/share/doc/${PF}/${d}
210 insinto /usr/share/doc/${PF}/${d}
211 for f in ${d}/* ; do
212 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
213 doexe ${f}
214 else
215 doins ${f}
216 fi
217 done
218 done
219 fi
220
221 doman doc/*.1
222 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
223 dosym bash.info /usr/share/info/bashref.info
224 }
225
226 pkg_preinst() {
227 if [[ -e ${ROOT}/etc/bashrc ]] && [[ ! -d ${ROOT}/etc/bash ]] ; then
228 mkdir -p "${ROOT}"/etc/bash
229 mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
230 fi
231
232 if [[ -L ${ROOT}/bin/sh ]]; then
233 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
234 # missing even temporarily causes a fatal error with paludis.
235 local target=$(readlink "${ROOT}"/bin/sh)
236 local tmp=$(emktemp "${ROOT}"/bin)
237 ln -sf "${target}" "${tmp}"
238 mv -f "${tmp}" "${ROOT}"/bin/sh
239 fi
240 }
241
242 pkg_postinst() {
243 # If /bin/sh does not exist, provide it
244 if [[ ! -e ${ROOT}/bin/sh ]]; then
245 ln -sf bash "${ROOT}"/bin/sh
246 fi
247 }