Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/
Date: Wed, 16 Jan 2019 10:52:38
Message-Id: 1547635937.8d2ad1b6e0feb6dd673533a6914f7e3cef680070.zlogene@gentoo
1 commit: 8d2ad1b6e0feb6dd673533a6914f7e3cef680070
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 16 10:52:17 2019 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 16 10:52:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d2ad1b6
7
8 app-shells/bash: Drop old
9
10 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 app-shells/bash/bash-4.4_p23.ebuild | 259 ------------------------------------
14 1 file changed, 259 deletions(-)
15
16 diff --git a/app-shells/bash/bash-4.4_p23.ebuild b/app-shells/bash/bash-4.4_p23.ebuild
17 deleted file mode 100644
18 index acd7bdd3846..00000000000
19 --- a/app-shells/bash/bash-4.4_p23.ebuild
20 +++ /dev/null
21 @@ -1,259 +0,0 @@
22 -# Copyright 1999-2018 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -
27 -inherit flag-o-matic toolchain-funcs multilib prefix
28 -
29 -# Official patchlevel
30 -# See ftp://ftp.cwru.edu/pub/bash/bash-4.4-patches/
31 -PLEVEL=${PV##*_p}
32 -MY_PV=${PV/_p*}
33 -MY_PV=${MY_PV/_/-}
34 -MY_P=${PN}-${MY_PV}
35 -is_release() {
36 - case ${PV} in
37 - *_alpha*|*_beta*|*_rc*) return 1 ;;
38 - *) return 0 ;;
39 - esac
40 -}
41 -[[ ${PV} != *_p* ]] && PLEVEL=0
42 -patches() {
43 - local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
44 - [[ ${plevel} -eq 0 ]] && return 1
45 - eval set -- {1..${plevel}}
46 - set -- $(printf "${pn}${pv/\.}-%03d " "$@")
47 - if [[ ${opt} == -s ]] ; then
48 - echo "${@/#/${DISTDIR}/}"
49 - else
50 - local u
51 - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
52 - printf "${u}/${pn}-${pv}-patches/%s " "$@"
53 - done
54 - fi
55 -}
56 -
57 -# The version of readline this bash normally ships with.
58 -READLINE_VER="7.0"
59 -
60 -DESCRIPTION="The standard GNU Bourne again shell"
61 -HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html"
62 -if is_release ; then
63 - SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
64 -else
65 - SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz"
66 -fi
67 -
68 -LICENSE="GPL-3"
69 -SLOT="0"
70 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
71 -IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
72 -
73 -DEPEND="
74 - >=sys-libs/ncurses-5.2-r2:0=
75 - readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
76 - nls? ( virtual/libintl )
77 -"
78 -RDEPEND="
79 - ${DEPEND}
80 - !<sys-apps/portage-2.1.6.7_p1
81 -"
82 -# we only need yacc when the .y files get patched (bash42-005)
83 -#DEPEND+=" virtual/yacc"
84 -
85 -S="${WORKDIR}/${MY_P}"
86 -
87 -pkg_setup() {
88 - if is-flag -malign-double ; then #7332
89 - eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
90 - eerror "as it breaks LFS (struct stat64) on x86."
91 - die "remove -malign-double from your CFLAGS mr ricer"
92 - fi
93 - if use bashlogger ; then
94 - ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
95 - ewarn "This will log ALL output you enter into the shell, you have been warned."
96 - fi
97 -}
98 -
99 -src_unpack() {
100 - unpack ${MY_P}.tar.gz
101 -}
102 -
103 -src_prepare() {
104 - # Include official patches
105 - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
106 -
107 - eapply "${FILESDIR}/${PN}-4.4-jobs_overflow.patch" #644720
108 -
109 - # Clean out local libs so we know we use system ones w/releases.
110 - if is_release ; then
111 - rm -rf lib/{readline,termcap}/*
112 - touch lib/{readline,termcap}/Makefile.in # for config.status
113 - sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
114 - fi
115 -
116 - # Prefixify hardcoded path names. No-op for non-prefix.
117 - hprefixify pathnames.h.in
118 -
119 - # Avoid regenerating docs after patches #407985
120 - sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
121 - touch -r . doc/*
122 -
123 - eapply_user
124 -}
125 -
126 -src_configure() {
127 - local myconf=(
128 - --disable-profiling
129 - --docdir='$(datarootdir)'/doc/${PF}
130 - --htmldir='$(docdir)/html'
131 - --with-curses
132 - $(use_enable mem-scramble)
133 - $(use_enable net net-redirections)
134 - $(use_enable readline)
135 - $(use_enable readline bang-history)
136 - $(use_enable readline history)
137 - $(use_with afs)
138 - $(use_with mem-scramble bash-malloc)
139 - )
140 -
141 - # For descriptions of these, see config-top.h
142 - # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
143 - append-cppflags \
144 - -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \
145 - -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \
146 - -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
147 - -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
148 - -DNON_INTERACTIVE_LOGIN_SHELLS \
149 - -DSSH_SOURCE_BASHRC \
150 - $(use bashlogger && echo -DSYSLOG_HISTORY)
151 -
152 - # Don't even think about building this statically without
153 - # reading Bug 7714 first. If you still build it statically,
154 - # don't come crying to us with bugs ;).
155 - #use static && export LDFLAGS="${LDFLAGS} -static"
156 - use nls || myconf+=( --disable-nls )
157 -
158 - # Historically, we always used the builtin readline, but since
159 - # our handling of SONAME upgrades has gotten much more stable
160 - # in the PM (and the readline ebuild itself preserves the old
161 - # libs during upgrades), linking against the system copy should
162 - # be safe.
163 - # Exact cached version here doesn't really matter as long as it
164 - # is at least what's in the DEPEND up above.
165 - export ac_cv_rl_version=${READLINE_VER%%_*}
166 -
167 - # Force linking with system curses ... the bundled termcap lib
168 - # sucks bad compared to ncurses. For the most part, ncurses
169 - # is here because readline needs it. But bash itself calls
170 - # ncurses in one or two small places :(.
171 -
172 - if is_release ; then
173 - # Use system readline only with released versions.
174 - myconf+=( --with-installed-readline=. )
175 - fi
176 -
177 - if use plugins; then
178 - append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
179 - else
180 - # Disable the plugins logic by hand since bash doesn't
181 - # provide a way of doing it.
182 - export ac_cv_func_dl{close,open,sym}=no \
183 - ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
184 - sed -i \
185 - -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
186 - configure || die
187 - fi
188 - tc-export AR #444070
189 - econf "${myconf[@]}"
190 -}
191 -
192 -src_compile() {
193 - emake
194 -
195 - if use plugins ; then
196 - emake -C examples/loadables all others
197 - fi
198 -}
199 -
200 -src_install() {
201 - local d f
202 -
203 - default
204 -
205 - dodir /bin
206 - mv "${ED%/}"/usr/bin/bash "${ED%/}"/bin/ || die
207 - dosym bash /bin/rbash
208 -
209 - insinto /etc/bash
210 - doins "${FILESDIR}"/bash_logout
211 - doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
212 - keepdir /etc/bash/bashrc.d
213 - insinto /etc/skel
214 - for f in bash{_logout,_profile,rc} ; do
215 - newins "${FILESDIR}"/dot-${f} .${f}
216 - done
217 -
218 - local sed_args=(
219 - -e "s:#${USERLAND}#@::"
220 - -e '/#@/d'
221 - )
222 - if ! use readline ; then
223 - sed_args+=( #432338
224 - -e '/^shopt -s histappend/s:^:#:'
225 - -e 's:use_color=true:use_color=false:'
226 - )
227 - fi
228 - sed -i \
229 - "${sed_args[@]}" \
230 - "${ED%/}"/etc/skel/.bashrc \
231 - "${ED%/}"/etc/bash/bashrc || die
232 -
233 - if use plugins ; then
234 - exeinto /usr/$(get_libdir)/bash
235 - doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
236 - insinto /usr/include/bash-plugins
237 - doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
238 - fi
239 -
240 - if use examples ; then
241 - for d in examples/{functions,misc,scripts,startup-files} ; do
242 - exeinto /usr/share/doc/${PF}/${d}
243 - insinto /usr/share/doc/${PF}/${d}
244 - for f in ${d}/* ; do
245 - if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then
246 - doexe ${f}
247 - else
248 - doins ${f}
249 - fi
250 - done
251 - done
252 - fi
253 -
254 - doman doc/*.1
255 - newdoc CWRU/changelog ChangeLog
256 - dosym bash.info /usr/share/info/bashref.info
257 -}
258 -
259 -pkg_preinst() {
260 - if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
261 - mkdir -p "${EROOT}"/etc/bash
262 - mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
263 - fi
264 -
265 - if [[ -L ${EROOT}/bin/sh ]] ; then
266 - # rewrite the symlink to ensure that its mtime changes. having /bin/sh
267 - # missing even temporarily causes a fatal error with paludis.
268 - local target=$(readlink "${EROOT}"/bin/sh)
269 - local tmp=$(emktemp "${EROOT}"/bin)
270 - ln -sf "${target}" "${tmp}"
271 - mv -f "${tmp}" "${EROOT}"/bin/sh
272 - fi
273 -}
274 -
275 -pkg_postinst() {
276 - # If /bin/sh does not exist, provide it
277 - if [[ ! -e ${EROOT}/bin/sh ]] ; then
278 - ln -sf bash "${EROOT}"/bin/sh
279 - fi
280 -}