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.1_p10.ebuild
Date: Mon, 28 Feb 2011 18:25:47
Message-Id: 20110228182536.78D8820054@flycatcher.gentoo.org
1 vapier 11/02/28 18:25:36
2
3 Modified: ChangeLog
4 Added: bash-4.1_p10.ebuild
5 Log:
6 Version bump #356513 by Lars Wendler.
7
8 (Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.279 app-shells/bash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.279&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.279&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.278&r2=1.279
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
20 retrieving revision 1.278
21 retrieving revision 1.279
22 diff -u -r1.278 -r1.279
23 --- ChangeLog 19 Feb 2011 18:51:21 -0000 1.278
24 +++ ChangeLog 28 Feb 2011 18:25:36 -0000 1.279
25 @@ -1,6 +1,11 @@
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.278 2011/02/19 18:51:21 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.279 2011/02/28 18:25:36 vapier Exp $
30 +
31 +*bash-4.1_p10 (28 Feb 2011)
32 +
33 + 28 Feb 2011; Mike Frysinger <vapier@g.o> +bash-4.1_p10.ebuild:
34 + Version bump #356513 by Lars Wendler.
35
36 19 Feb 2011; Mike Frysinger <vapier@g.o> files/bashrc:
37 Touch up by Evert for HOME replacement in PROMPT_PROMPT_COMMAND #354719.
38
39
40
41 1.1 app-shells/bash/bash-4.1_p10.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.1_p10.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.1_p10.ebuild?rev=1.1&content-type=text/plain
45
46 Index: bash-4.1_p10.ebuild
47 ===================================================================
48 # Copyright 1999-2011 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.1_p10.ebuild,v 1.1 2011/02/28 18:25:36 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-3.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 READLINE_VER=6.1
64 READLINE_PLEVEL=0 # both readline patches are also released as bash patches
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 $(patches ${READLINE_PLEVEL} readline ${READLINE_VER})"
84
85 LICENSE="GPL-3"
86 SLOT="0"
87 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
88 IUSE="afs bashlogger examples mem-scramble +net nls plugins vanilla"
89
90 DEPEND=">=sys-libs/ncurses-5.2-r2
91 nls? ( virtual/libintl )"
92 RDEPEND="${DEPEND}
93 !<sys-apps/portage-2.1.7.16
94 !<sys-apps/paludis-0.26.0_alpha5"
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 cd lib/readline
117 [[ ${READLINE_PLEVEL} -gt 0 ]] && epatch $(patches -s ${READLINE_PLEVEL} readline ${READLINE_VER})
118 cd ../..
119
120 epatch "${FILESDIR}"/${PN}-4.1-fbsd-eaccess.patch #303411
121
122 if ! use vanilla ; then
123 sed -i '1i#define NEED_FPURGE_DECL' execute_cmd.c # needs fpurge() decl
124 epatch "${FILESDIR}"/${PN}-4.1-parallel-build.patch
125 fi
126 }
127
128 src_compile() {
129 local myconf=
130
131 # For descriptions of these, see config-top.h
132 # bashrc/#26952 bash_logout/#90488 ssh/#24762
133 append-cppflags \
134 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
135 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
136 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
137 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
138 -DNON_INTERACTIVE_LOGIN_SHELLS \
139 -DSSH_SOURCE_BASHRC \
140 $(use bashlogger && echo -DSYSLOG_HISTORY)
141
142 # Always use the buildin readline, else if we update readline
143 # bash gets borked as readline is usually not binary compadible
144 # between minor versions.
145 #myconf="${myconf} $(use_with !readline installed-readline)"
146 myconf="${myconf} --without-installed-readline"
147
148 # Don't even think about building this statically without
149 # reading Bug 7714 first. If you still build it statically,
150 # don't come crying to us with bugs ;).
151 #use static && export LDFLAGS="${LDFLAGS} -static"
152 use nls || myconf="${myconf} --disable-nls"
153
154 # Force linking with system curses ... the bundled termcap lib
155 # sucks bad compared to ncurses
156 myconf="${myconf} --with-curses"
157
158 myconf="${myconf} --without-lispdir" #335896
159
160 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
161 econf \
162 $(use_with afs) \
163 $(use_enable net net-redirections) \
164 --disable-profiling \
165 $(use_enable mem-scramble) \
166 $(use_with mem-scramble bash-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 }