Gentoo Archives: gentoo-commits

From: "Lars Wendler (polynomial-c)" <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-shells/bash: bash-4.3.ebuild ChangeLog
Date: Thu, 27 Feb 2014 10:28:34
Message-Id: 20140227102823.5C6242004C@flycatcher.gentoo.org
1 polynomial-c 14/02/27 10:28:23
2
3 Modified: ChangeLog
4 Added: bash-4.3.ebuild
5 Log:
6 Version bump
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
9
10 Revision Changes Path
11 1.352 app-shells/bash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.352&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.352&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.351&r2=1.352
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
20 retrieving revision 1.351
21 retrieving revision 1.352
22 diff -u -r1.351 -r1.352
23 --- ChangeLog 31 Jan 2014 05:42:08 -0000 1.351
24 +++ ChangeLog 27 Feb 2014 10:28:23 -0000 1.352
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-shells/bash
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.351 2014/01/31 05:42:08 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.352 2014/02/27 10:28:23 polynomial-c Exp $
30 +
31 +*bash-4.3 (27 Feb 2014)
32 +
33 + 27 Feb 2014; Lars Wendler <polynomial-c@g.o> +bash-4.3.ebuild:
34 + Version bump.
35
36 *bash-4.3_rc2 (31 Jan 2014)
37
38
39
40
41 1.1 app-shells/bash/bash-4.3.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: bash-4.3.ebuild
47 ===================================================================
48 # Copyright 1999-2014 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.3.ebuild,v 1.1 2014/02/27 10:28:23 polynomial-c Exp $
51
52 EAPI=4
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 [[ ${PV} == *_rc* ]] && SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
82
83 LICENSE="GPL-3"
84 SLOT="0"
85 #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
86 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline vanilla"
87
88 DEPEND=">=sys-libs/ncurses-5.2-r2
89 readline? ( >=sys-libs/readline-6.3 )
90 nls? ( virtual/libintl )"
91 RDEPEND="${DEPEND}
92 !<sys-apps/portage-2.1.6.7_p1
93 !<sys-apps/paludis-0.26.0_alpha5"
94 # we only need yacc when the .y files get patched (bash42-005)
95 DEPEND+=" virtual/yacc"
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_prepare() {
112 #use mem-scramble
113 # Include official patches
114 [[ ${PLEVEL} -gt 0 ]] && epatch $(patches -s)
115
116 # Clean out local libs so we know we use system ones w/releases.
117 if [[ ${PV} != *_rc* ]] ; then
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 fi
122
123 # Avoid regenerating docs after patches #407985
124 sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
125 touch -r . doc/*
126
127 epatch "${FILESDIR}"/${PN}-4.2-execute-job-control.patch #383237
128 epatch "${FILESDIR}"/${PN}-4.2-no-readline.patch
129
130 epatch_user
131 }
132
133 src_configure() {
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+=( --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 if [[ ${PV} != *_rc* ]] ; then
168 # Use system readline only with released versions.
169 myconf+=( --with-installed-readline=. )
170 fi
171
172 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
173 tc-export AR #444070
174 econf \
175 --docdir=/usr/share/doc/${PF} \
176 --with-curses \
177 $(use_with afs) \
178 $(use_enable net net-redirections) \
179 --disable-profiling \
180 $(use_enable mem-scramble) \
181 $(use_with mem-scramble bash-malloc) \
182 $(use_enable readline) \
183 $(use_enable readline history) \
184 $(use_enable readline bang-history) \
185 "${myconf[@]}"
186 }
187
188 src_compile() {
189 emake
190
191 if use plugins ; then
192 emake -C examples/loadables all others
193 fi
194 }
195
196 src_install() {
197 emake install DESTDIR="${D}"
198
199 dodir /bin
200 mv "${D}"/usr/bin/bash "${D}"/bin/ || die
201 dosym bash /bin/rbash
202
203 insinto /etc/bash
204 doins "${FILESDIR}"/{bashrc,bash_logout}
205 insinto /etc/skel
206 for f in bash{_logout,_profile,rc} ; do
207 newins "${FILESDIR}"/dot-${f} .${f}
208 done
209
210 local sed_args=(
211 -e "s:#${USERLAND}#@::"
212 -e '/#@/d'
213 )
214 if ! use readline ; then
215 sed_args+=( #432338
216 -e '/^shopt -s histappend/s:^:#:'
217 -e 's:use_color=true:use_color=false:'
218 )
219 fi
220 sed -i \
221 "${sed_args[@]}" \
222 "${D}"/etc/skel/.bashrc \
223 "${D}"/etc/bash/bashrc || die
224
225 if use plugins ; then
226 exeinto /usr/$(get_libdir)/bash
227 doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
228 insinto /usr/include/bash-plugins
229 doins *.h builtins/*.h examples/loadables/*.h include/*.h \
230 lib/{glob/glob.h,tilde/tilde.h}
231 fi
232
233 if use examples ; then
234 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
235 exeinto /usr/share/doc/${PF}/${d}
236 insinto /usr/share/doc/${PF}/${d}
237 for f in ${d}/* ; do
238 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
239 doexe ${f}
240 else
241 doins ${f}
242 fi
243 done
244 done
245 fi
246
247 doman doc/*.1
248 dodoc AUTHORS Y2K
249 dosym bash.info /usr/share/info/bashref.info
250 }
251
252 pkg_preinst() {
253 if [[ -e ${ROOT}/etc/bashrc ]] && [[ ! -d ${ROOT}/etc/bash ]] ; then
254 mkdir -p "${ROOT}"/etc/bash || die
255 mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
256 fi
257
258 if [[ -L ${ROOT}/bin/sh ]] ; then
259 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
260 # missing even temporarily causes a fatal error with paludis.
261 local target=$(readlink "${ROOT}"/bin/sh)
262 local tmp=$(emktemp "${ROOT}"/bin)
263 ln -sf "${target}" "${tmp}"
264 mv -f "${tmp}" "${ROOT}"/bin/sh
265 fi
266 }
267
268 pkg_postinst() {
269 # If /bin/sh does not exist, provide it
270 if [[ ! -e ${ROOT}/bin/sh ]] ; then
271 ln -sf bash "${ROOT}"/bin/sh
272 fi
273 }