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