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: ChangeLog bash-4.2_p8-r1.ebuild
Date: Fri, 29 Apr 2011 22:54:44
Message-Id: 20110429225434.93EAF20057@flycatcher.gentoo.org
1 vapier 11/04/29 22:54:34
2
3 Modified: ChangeLog
4 Added: bash-4.2_p8-r1.ebuild
5 Log:
6 Add fix from upstream for heredocs printing #363371 by Andrey Hippo.
7
8 (Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.287 app-shells/bash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.287&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.287&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.286&r2=1.287
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
20 retrieving revision 1.286
21 retrieving revision 1.287
22 diff -u -r1.286 -r1.287
23 --- ChangeLog 15 Mar 2011 19:41:24 -0000 1.286
24 +++ ChangeLog 29 Apr 2011 22:54:34 -0000 1.287
25 @@ -1,6 +1,12 @@
26 # ChangeLog for app-shells/bash
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.286 2011/03/15 19:41:24 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.287 2011/04/29 22:54:34 vapier Exp $
30 +
31 +*bash-4.2_p8-r1 (29 Apr 2011)
32 +
33 + 29 Apr 2011; Mike Frysinger <vapier@g.o> +bash-4.2_p8-r1.ebuild,
34 + +files/bash-4.2-print-heredoc.patch:
35 + Add fix from upstream for heredocs printing #363371 by Andrey Hippo.
36
37 *bash-4.2_p8 (15 Mar 2011)
38
39
40
41
42 1.1 app-shells/bash/bash-4.2_p8-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p8-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p8-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: bash-4.2_p8-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2011 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.2_p8-r1.ebuild,v 1.1 2011/04/29 22:54:34 vapier Exp $
52
53 EAPI="1"
54
55 inherit eutils flag-o-matic toolchain-funcs multilib
56
57 # Official patchlevel
58 # See ftp://ftp.cwru.edu/pub/bash/bash-4.2-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 READLINE_VER=6.1
65 READLINE_PLEVEL=0 # both readline patches are also released as bash patches
66 patches() {
67 local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
68 [[ ${plevel} -eq 0 ]] && return 1
69 eval set -- {1..${plevel}}
70 set -- $(printf "${pn}${pv/\.}-%03d " "$@")
71 if [[ ${opt} == -s ]] ; then
72 echo "${@/#/${DISTDIR}/}"
73 else
74 local u
75 for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
76 printf "${u}/${pn}-${pv}-patches/%s " "$@"
77 done
78 fi
79 }
80
81 DESCRIPTION="The standard GNU Bourne again shell"
82 HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
83 SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)
84 $(patches ${READLINE_PLEVEL} readline ${READLINE_VER})"
85
86 LICENSE="GPL-3"
87 SLOT="0"
88 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
89 IUSE="afs bashlogger examples mem-scramble +net nls plugins vanilla"
90
91 DEPEND=">=sys-libs/ncurses-5.2-r2
92 nls? ( virtual/libintl )"
93 RDEPEND="${DEPEND}
94 !<sys-apps/portage-2.1.7.16
95 !<sys-apps/paludis-0.26.0_alpha5"
96
97 S=${WORKDIR}/${MY_P}
98
99 pkg_setup() {
100 if is-flag -malign-double ; then #7332
101 eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
102 eerror "as it breaks LFS (struct stat64) on x86."
103 die "remove -malign-double from your CFLAGS mr ricer"
104 fi
105 if use bashlogger ; then
106 ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
107 ewarn "This will log ALL output you enter into the shell, you have been warned."
108 fi
109 }
110
111 src_unpack() {
112 unpack ${MY_P}.tar.gz
113 cd "${S}"
114
115 # Include official patches
116 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
117 epatch "${FILESDIR}"/${PN}-4.2-print-heredoc.patch #363371
118 cd lib/readline
119 [[ ${READLINE_PLEVEL} -gt 0 ]] && epatch $(patches -s ${READLINE_PLEVEL} readline ${READLINE_VER})
120 cd ../..
121 }
122
123 src_compile() {
124 local myconf=
125
126 # For descriptions of these, see config-top.h
127 # bashrc/#26952 bash_logout/#90488 ssh/#24762
128 append-cppflags \
129 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
130 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
131 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
132 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
133 -DNON_INTERACTIVE_LOGIN_SHELLS \
134 -DSSH_SOURCE_BASHRC \
135 $(use bashlogger && echo -DSYSLOG_HISTORY)
136
137 # Always use the buildin readline, else if we update readline
138 # bash gets borked as readline is usually not binary compadible
139 # between minor versions.
140 #myconf="${myconf} $(use_with !readline installed-readline)"
141 myconf="${myconf} --without-installed-readline"
142
143 # Don't even think about building this statically without
144 # reading Bug 7714 first. If you still build it statically,
145 # don't come crying to us with bugs ;).
146 #use static && export LDFLAGS="${LDFLAGS} -static"
147 use nls || myconf="${myconf} --disable-nls"
148
149 # Force linking with system curses ... the bundled termcap lib
150 # sucks bad compared to ncurses
151 myconf="${myconf} --with-curses"
152
153 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
154 econf \
155 $(use_with afs) \
156 $(use_enable net net-redirections) \
157 --disable-profiling \
158 $(use_enable mem-scramble) \
159 $(use_with mem-scramble bash-malloc) \
160 ${myconf} || die
161 emake || die "make failed"
162
163 if use plugins ; then
164 emake -C examples/loadables all others || die
165 fi
166 }
167
168 src_install() {
169 emake install DESTDIR="${D}" || die
170
171 dodir /bin
172 mv "${D}"/usr/bin/bash "${D}"/bin/ || die
173 dosym bash /bin/rbash
174
175 insinto /etc/bash
176 doins "${FILESDIR}"/{bashrc,bash_logout}
177 insinto /etc/skel
178 for f in bash{_logout,_profile,rc} ; do
179 newins "${FILESDIR}"/dot-${f} .${f}
180 done
181
182 sed -i -e "s:#${USERLAND}#@::" "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
183 sed -i -e '/#@/d' "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
184
185 if use plugins ; then
186 exeinto /usr/$(get_libdir)/bash
187 doexe $(echo examples/loadables/*.o | sed 's:\.o::g') || die
188 fi
189
190 if use examples ; then
191 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
192 exeinto /usr/share/doc/${PF}/${d}
193 insinto /usr/share/doc/${PF}/${d}
194 for f in ${d}/* ; do
195 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
196 doexe ${f}
197 else
198 doins ${f}
199 fi
200 done
201 done
202 fi
203
204 doman doc/*.1
205 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
206 dosym bash.info /usr/share/info/bashref.info
207 }
208
209 pkg_preinst() {
210 if [[ -e ${ROOT}/etc/bashrc ]] && [[ ! -d ${ROOT}/etc/bash ]] ; then
211 mkdir -p "${ROOT}"/etc/bash
212 mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
213 fi
214
215 if [[ -L ${ROOT}/bin/sh ]]; then
216 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
217 # missing even temporarily causes a fatal error with paludis.
218 local target=$(readlink "${ROOT}"/bin/sh)
219 ln -sf "${target}" "${ROOT}"/bin/sh
220 fi
221 }
222
223 pkg_postinst() {
224 # If /bin/sh does not exist, provide it
225 if [[ ! -e ${ROOT}/bin/sh ]]; then
226 ln -sf bash "${ROOT}"/bin/sh
227 fi
228 }