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_p46.ebuild ChangeLog
Date: Tue, 01 Apr 2014 06:47:48
Message-Id: 20140401064743.B5C922005E@flycatcher.gentoo.org
1 vapier 14/04/01 06:47:43
2
3 Modified: ChangeLog
4 Added: bash-4.2_p46.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.360 app-shells/bash/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.360&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?rev=1.360&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/ChangeLog?r1=1.359&r2=1.360
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v
20 retrieving revision 1.359
21 retrieving revision 1.360
22 diff -u -r1.359 -r1.360
23 --- ChangeLog 31 Mar 2014 07:00:51 -0000 1.359
24 +++ ChangeLog 1 Apr 2014 06:47:43 -0000 1.360
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.359 2014/03/31 07:00:51 polynomial-c Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-shells/bash/ChangeLog,v 1.360 2014/04/01 06:47:43 vapier Exp $
30 +
31 +*bash-4.2_p46 (01 Apr 2014)
32 +
33 + 01 Apr 2014; Mike Frysinger <vapier@g.o> +bash-4.2_p46.ebuild:
34 + Version bump.
35
36 *bash-4.3_p8 (31 Mar 2014)
37
38
39
40
41 1.1 app-shells/bash/bash-4.2_p46.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p46.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/bash/bash-4.2_p46.ebuild?rev=1.1&content-type=text/plain
45
46 Index: bash-4.2_p46.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.2_p46.ebuild,v 1.1 2014/04/01 06:47:43 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 ~arm64 ~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 epatch "${FILESDIR}"/${PN}-4.2-read-retry.patch #447810
130 if ! use vanilla ; then
131 epatch "${FILESDIR}"/${PN}-4.2-speed-up-read-N.patch
132 fi
133
134 epatch_user
135 }
136
137 src_compile() {
138 local myconf=()
139
140 # For descriptions of these, see config-top.h
141 # bashrc/#26952 bash_logout/#90488 ssh/#24762
142 append-cppflags \
143 -DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\' \
144 -DSTANDARD_UTILS_PATH=\'\"/bin:/usr/bin:/sbin:/usr/sbin\"\' \
145 -DSYS_BASHRC=\'\"/etc/bash/bashrc\"\' \
146 -DSYS_BASH_LOGOUT=\'\"/etc/bash/bash_logout\"\' \
147 -DNON_INTERACTIVE_LOGIN_SHELLS \
148 -DSSH_SOURCE_BASHRC \
149 $(use bashlogger && echo -DSYSLOG_HISTORY)
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+=( --disable-nls )
156
157 # Historically, we always used the builtin readline, but since
158 # our handling of SONAME upgrades has gotten much more stable
159 # in the PM (and the readline ebuild itself preserves the old
160 # libs during upgrades), linking against the system copy should
161 # be safe.
162 # Exact cached version here doesn't really matter as long as it
163 # is at least what's in the DEPEND up above.
164 export ac_cv_rl_version=6.2
165
166 # Force linking with system curses ... the bundled termcap lib
167 # sucks bad compared to ncurses. For the most part, ncurses
168 # is here because readline needs it. But bash itself calls
169 # ncurses in one or two small places :(.
170
171 use plugins && append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
172 tc-export AR #444070
173 econf \
174 --with-installed-readline=. \
175 --with-curses \
176 $(use_with afs) \
177 $(use_enable net net-redirections) \
178 --disable-profiling \
179 $(use_enable mem-scramble) \
180 $(use_with mem-scramble bash-malloc) \
181 $(use_enable readline) \
182 $(use_enable readline history) \
183 $(use_enable readline bang-history) \
184 "${myconf[@]}"
185 emake || die
186
187 if use plugins ; then
188 emake -C examples/loadables all others || die
189 fi
190 }
191
192 src_install() {
193 emake install DESTDIR="${D}" || die
194
195 dodir /bin
196 mv "${D}"/usr/bin/bash "${D}"/bin/ || die
197 dosym bash /bin/rbash
198
199 insinto /etc/bash
200 doins "${FILESDIR}"/{bashrc,bash_logout}
201 insinto /etc/skel
202 for f in bash{_logout,_profile,rc} ; do
203 newins "${FILESDIR}"/dot-${f} .${f}
204 done
205
206 local sed_args=(
207 -e "s:#${USERLAND}#@::"
208 -e '/#@/d'
209 )
210 if ! use readline ; then
211 sed_args+=( #432338
212 -e '/^shopt -s histappend/s:^:#:'
213 -e 's:use_color=true:use_color=false:'
214 )
215 fi
216 sed -i \
217 "${sed_args[@]}" \
218 "${D}"/etc/skel/.bashrc \
219 "${D}"/etc/bash/bashrc || die
220
221 if use plugins ; then
222 exeinto /usr/$(get_libdir)/bash
223 doexe $(echo examples/loadables/*.o | sed 's:\.o::g') || die
224 insinto /usr/include/bash-plugins
225 doins *.h builtins/*.h examples/loadables/*.h include/*.h \
226 lib/{glob/glob.h,tilde/tilde.h}
227 fi
228
229 if use examples ; then
230 for d in examples/{functions,misc,scripts,scripts.noah,scripts.v2} ; do
231 exeinto /usr/share/doc/${PF}/${d}
232 insinto /usr/share/doc/${PF}/${d}
233 for f in ${d}/* ; do
234 if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
235 doexe ${f}
236 else
237 doins ${f}
238 fi
239 done
240 done
241 fi
242
243 doman doc/*.1
244 dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
245 dosym bash.info /usr/share/info/bashref.info
246 }
247
248 pkg_preinst() {
249 if [[ -e ${ROOT}/etc/bashrc ]] && [[ ! -d ${ROOT}/etc/bash ]] ; then
250 mkdir -p "${ROOT}"/etc/bash
251 mv -f "${ROOT}"/etc/bashrc "${ROOT}"/etc/bash/
252 fi
253
254 if [[ -L ${ROOT}/bin/sh ]]; then
255 # rewrite the symlink to ensure that its mtime changes. having /bin/sh
256 # missing even temporarily causes a fatal error with paludis.
257 local target=$(readlink "${ROOT}"/bin/sh)
258 local tmp=$(emktemp "${ROOT}"/bin)
259 ln -sf "${target}" "${tmp}"
260 mv -f "${tmp}" "${ROOT}"/bin/sh
261 fi
262 }
263
264 pkg_postinst() {
265 # If /bin/sh does not exist, provide it
266 if [[ ! -e ${ROOT}/bin/sh ]]; then
267 ln -sf bash "${ROOT}"/bin/sh
268 fi
269 }