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