commit:     bab4730083c7ec9c337f166ec73035312a333e28
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  4 15:48:50 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov  4 15:49:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab47300

app-shells/bash: Bump to version 5.1_rc2

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 app-shells/bash/Manifest            |   1 +
 app-shells/bash/bash-5.1_rc2.ebuild | 261 ++++++++++++++++++++++++++++++++++++
 2 files changed, 262 insertions(+)

diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest
index 8161a673532..429fcec7cb5 100644
--- a/app-shells/bash/Manifest
+++ b/app-shells/bash/Manifest
@@ -8,6 +8,7 @@ DIST bash-4.2.tar.gz 7009201 BLAKE2B 
52a4432ae401121ff187487a75a6541ce001c24d7d2
 DIST bash-4.3.tar.gz 7955839 BLAKE2B 
398461e90a1ab6fd726b1a9db41c4c2a1e184034e3b96029bd17097338f1f9869d1c2216bde0b5b3c8e561629824348a0da3045cc425914e8e024180a175efe4
 SHA512 
a852b8e46ee55568dce9d23a30a9dbd1c770c2d2a4bc91e1c3177d723b31b32c5d69d19704a93f165891b409b9dd2cc65723372044e2bd0ee49ed59a11512651
 DIST bash-4.4.tar.gz 9377313 BLAKE2B 
ac0e481dd4f2d5b91eea4f0156f1fc398ef8bd1ccd941366aa9b041be576114c51e1ff1431ec871e96fb72257c2a05a0ebcbd88c43c221610fef7dfdb2502fc0
 SHA512 
73de3b425faaac55e45456b0f6f6d8077b5dfa7bb76e0d1894a19361b4a2b6bd4fbbe182117ddbfe9b07b4d898fba03537c261badc9533dd3c0da891764c7f29
 DIST bash-5.0.tar.gz 10135110 BLAKE2B 
a6c4d79144aa0c0f4a9433d618085c0d46b792b1de429b161f9f0266b55c099e13e44416c0886758a6f29411f5ceb79bfb0ec4eda47473f2713ae0b8081d6d3e
 SHA512 
bb4519f06e278f271d08722b531e49d2e842cc3e0b02a6b3eee422e2efcb5b6226111af43f5e5eae56beb85ac8bfebcd6a4aacbabb8f609e529aa4d571890864
+DIST bash-5.1-rc2.tar.gz 10401614 BLAKE2B 
691d5213084b01fa17f5dad31116c9549ca33eddfa1e44db3fe694b808badb5f70f51c008d31b616d444d02a4d1683473b442a8dd9a56b602069a166a3017cf1
 SHA512 
35b11357a0c3d00bc0c6383411ea3efe7fbc77ed39dea6b69c6a0ad57e844cec8ba9ee19a1df29bca08d26596e98d8090673e8d934e5189278fb13de701b8b98
 DIST bash205b-001 1132 BLAKE2B 
0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6
 SHA512 
5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071
 DIST bash205b-002 755 BLAKE2B 
6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d
 SHA512 
46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883
 DIST bash205b-003 2356 BLAKE2B 
b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7
 SHA512 
74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399

diff --git a/app-shells/bash/bash-5.1_rc2.ebuild 
b/app-shells/bash/bash-5.1_rc2.ebuild
new file mode 100644
index 00000000000..218a51579c9
--- /dev/null
+++ b/app-shells/bash/bash-5.1_rc2.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs multilib prefix
+
+# Official patchlevel
+# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/
+PLEVEL="${PV##*_p}"
+MY_PV="${PV/_p*}"
+MY_PV="${MY_PV/_/-}"
+MY_P="${PN}-${MY_PV}"
+is_release() {
+       case ${PV} in
+       *_alpha*|*_beta*|*_rc*) return 1 ;;
+       *) return 0 ;;
+       esac
+}
+[[ ${PV} != *_p* ]] && PLEVEL=0
+patches() {
+       local opt=${1} plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}}
+       [[ ${plevel} -eq 0 ]] && return 1
+       eval set -- {1..${plevel}}
+       set -- $(printf "${pn}${pv/\.}-%03d " "$@")
+       if [[ ${opt} == -s ]] ; then
+               echo "${@/#/${DISTDIR}/}"
+       else
+               local u
+               for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do
+                       printf "${u}/${pn}-${pv}-patches/%s " "$@"
+               done
+       fi
+}
+
+# The version of readline this bash normally ships with.
+READLINE_VER="8.1_rc2"
+
+DESCRIPTION="The standard GNU Bourne again shell"
+HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html";
+if is_release ; then
+       SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
+else
+       SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz";
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+[[ "${PV}" == *_rc* ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris 
~x86-solaris"
+IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
+
+DEPEND="
+       >=sys-libs/ncurses-5.2-r2:0=
+       nls? ( virtual/libintl )
+       readline? ( >=sys-libs/readline-${READLINE_VER}:0= )
+"
+RDEPEND="
+       ${DEPEND}
+"
+# we only need yacc when the .y files get patched (bash42-005)
+#BDEPEND="virtual/yacc"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+       # Patches from Chet sent to bashbug ml
+       "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch
+)
+
+pkg_setup() {
+       if is-flag -malign-double ; then #7332
+               eerror "Detected bad CFLAGS '-malign-double'.  Do not use this"
+               eerror "as it breaks LFS (struct stat64) on x86."
+               die "remove -malign-double from your CFLAGS mr ricer"
+       fi
+       if use bashlogger ; then
+               ewarn "The logging patch should ONLY be used in restricted 
(i.e. honeypot) envs."
+               ewarn "This will log ALL output you enter into the shell, you 
have been warned."
+       fi
+}
+
+src_unpack() {
+       unpack ${MY_P}.tar.gz
+}
+
+src_prepare() {
+       # Include official patches
+       [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s)
+
+       # Clean out local libs so we know we use system ones w/releases.
+       if is_release ; then
+               rm -rf lib/{readline,termcap}/* || die
+               touch lib/{readline,termcap}/Makefile.in || die # for 
config.status
+               sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' 
Makefile.in || die
+       fi
+
+       # Prefixify hardcoded path names. No-op for non-prefix.
+       hprefixify pathnames.h.in
+
+       # Avoid regenerating docs after patches #407985
+       sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
+       touch -r . doc/* || die
+
+       eapply -p0 "${PATCHES[@]}"
+       eapply_user
+}
+
+src_configure() {
+       local myconf=(
+               --disable-profiling
+               --with-curses
+               $(use_enable mem-scramble)
+               $(use_enable net net-redirections)
+               $(use_enable readline)
+               $(use_enable readline bang-history)
+               $(use_enable readline history)
+               $(use_with afs)
+               $(use_with mem-scramble bash-malloc)
+       )
+
+       # For descriptions of these, see config-top.h
+       # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
+       append-cppflags \
+               
-DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\'
 \
+               
-DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\'
 \
+               -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \
+               -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \
+               -DNON_INTERACTIVE_LOGIN_SHELLS \
+               -DSSH_SOURCE_BASHRC \
+               $(use bashlogger && echo -DSYSLOG_HISTORY)
+
+       # Don't even think about building this statically without
+       # reading Bug 7714 first.  If you still build it statically,
+       # don't come crying to us with bugs ;).
+       #use static && export LDFLAGS="${LDFLAGS} -static"
+       use nls || myconf+=( --disable-nls )
+
+       # Historically, we always used the builtin readline, but since
+       # our handling of SONAME upgrades has gotten much more stable
+       # in the PM (and the readline ebuild itself preserves the old
+       # libs during upgrades), linking against the system copy should
+       # be safe.
+       # Exact cached version here doesn't really matter as long as it
+       # is at least what's in the DEPEND up above.
+       export ac_cv_rl_version=${READLINE_VER%%_*}
+
+       # Force linking with system curses ... the bundled termcap lib
+       # sucks bad compared to ncurses.  For the most part, ncurses
+       # is here because readline needs it.  But bash itself calls
+       # ncurses in one or two small places :(.
+
+       if is_release ; then
+               # Use system readline only with released versions.
+               myconf+=( --with-installed-readline=. )
+       fi
+
+       if use plugins; then
+               append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash
+       else
+               # Disable the plugins logic by hand since bash doesn't
+               # provide a way of doing it.
+               export ac_cv_func_dl{close,open,sym}=no \
+                       ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
+               sed -i \
+                       -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \
+                       configure || die
+       fi
+       tc-export AR #444070
+       econf "${myconf[@]}"
+}
+
+src_compile() {
+       emake
+
+       if use plugins ; then
+               emake -C examples/loadables all others
+       fi
+}
+
+src_install() {
+       local d f
+
+       default
+
+       dodir /bin
+       mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
+       dosym bash /bin/rbash
+
+       insinto /etc/bash
+       doins "${FILESDIR}"/bash_logout
+       doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
+       keepdir /etc/bash/bashrc.d
+       insinto /etc/skel
+       for f in bash{_logout,_profile,rc} ; do
+               newins "${FILESDIR}"/dot-${f} .${f}
+       done
+
+       local sed_args=(
+               -e "s:#${USERLAND}#@::"
+               -e '/#@/d'
+       )
+       if ! use readline ; then
+               sed_args+=( #432338
+                       -e '/^shopt -s histappend/s:^:#:'
+                       -e 's:use_color=true:use_color=false:'
+               )
+       fi
+       sed -i \
+               "${sed_args[@]}" \
+               "${ED}"/etc/skel/.bashrc \
+               "${ED}"/etc/bash/bashrc || die
+
+       if use plugins ; then
+               exeinto /usr/$(get_libdir)/bash
+               doexe $(echo examples/loadables/*.o | sed 's:\.o::g')
+               insinto /usr/include/bash-plugins
+               doins *.h builtins/*.h include/*.h 
lib/{glob/glob.h,tilde/tilde.h}
+       fi
+
+       if use examples ; then
+               for d in examples/{functions,misc,scripts,startup-files} ; do
+                       exeinto /usr/share/doc/${PF}/${d}
+                       docinto ${d}
+                       for f in ${d}/* ; do
+                               if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} 
!= *README ]] ; then
+                                       doexe ${f}
+                               else
+                                       dodoc ${f}
+                               fi
+                       done
+               done
+       fi
+
+       doman doc/*.1
+       newdoc CWRU/changelog ChangeLog
+       dosym bash.info /usr/share/info/bashref.info
+}
+
+pkg_preinst() {
+       if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then
+               mkdir -p "${EROOT}"/etc/bash
+               mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/
+       fi
+
+       if [[ -L ${EROOT}/bin/sh ]] ; then
+               # rewrite the symlink to ensure that its mtime changes. having 
/bin/sh
+               # missing even temporarily causes a fatal error with paludis.
+               local target=$(readlink "${EROOT}"/bin/sh)
+               local tmp=$(emktemp "${EROOT}"/bin)
+               ln -sf "${target}" "${tmp}"
+               mv -f "${tmp}" "${EROOT}"/bin/sh
+       fi
+}
+
+pkg_postinst() {
+       # If /bin/sh does not exist, provide it
+       if [[ ! -e ${EROOT}/bin/sh ]] ; then
+               ln -sf bash "${EROOT}"/bin/sh
+       fi
+}

Reply via email to