commit:     feb9bb100f1475ea9a8980afaaa4441d1640f394
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  8 23:47:48 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan  9 00:07:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=feb9bb10

app-shells/bash: slot old (5.1)

This is what we do for older bash slots once newer bash is stabled
(or at least has been for a while). Done via looking at
`diff -u bash-4.4_p23-r2.ebuild bash-5.0_p18-r2.ebuild` and then
`diff -u bash-5.0_p18-r3.ebuild bash-5.1_p16-r14.ebuild`.

Feels like the right time to do 5.1 as well given 5.2 has been stable
for a fair while now and 5.3 is on its way.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...-5.1_p16-r13.ebuild => bash-5.1_p16-r14.ebuild} | 120 ++-------------------
 1 file changed, 10 insertions(+), 110 deletions(-)

diff --git a/app-shells/bash/bash-5.1_p16-r13.ebuild 
b/app-shells/bash/bash-5.1_p16-r14.ebuild
similarity index 68%
rename from app-shells/bash/bash-5.1_p16-r13.ebuild
rename to app-shells/bash/bash-5.1_p16-r14.ebuild
index c760b90a57da..0a1dbe4b63a9 100644
--- a/app-shells/bash/bash-5.1_p16-r13.ebuild
+++ b/app-shells/bash/bash-5.1_p16-r14.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -63,7 +63,7 @@ fi
 S=${WORKDIR}/${MY_P}
 
 LICENSE="GPL-3+"
-SLOT="0"
+SLOT="${MY_PV}"
 if (( PLEVEL >= 0 )); then
        KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 
~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos 
~x64-macos ~x64-solaris"
 fi
@@ -248,115 +248,15 @@ src_compile() {
 }
 
 src_install() {
-       local d f
-
-       default
-
-       my_prefixify() {
-               while read -r; do
-                       if [[ $REPLY == *$1* ]]; then
-                               REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
-                       fi
-                       printf '%s\n' "${REPLY}" || ! break
-               done < "$2" || die
-       }
-
-       dodir /bin
-       mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
-       dosym bash /bin/rbash
-
-       insinto /etc/bash
-       doins "${FILESDIR}"/bash_logout
-       my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
-
-       insinto /etc/bash/bashrc.d
-       my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color.bash | 
newins - 10-gentoo-color.bash
-       doins "${FILESDIR}"/bashrc.d/10-gentoo-title.bash
-       if [[ ! ${EPREFIX} ]]; then
-               doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
-       fi
-
-       insinto /etc/skel
-       for f in bash{_logout,_profile,rc}; do
-               newins "${FILESDIR}/dot-${f}" ".${f}"
-       done
-
-       if use plugins; then
-               exeinto "/usr/$(get_libdir)/bash"
-               set -- examples/loadables/*.o
-               doexe "${@%.o}"
-
-               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|*README) ]]; then
-                                       doexe "${f}"
-                               else
-                                       dodoc "${f}"
-                               fi
-                       done
-               done
-       fi
-
-       # Install bash_builtins.1 and rbash.1.
-       emake -C doc DESTDIR="${D}" install_builtins
-       sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
-       doman "${T}"/rbash.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/ \
-               || die
-       fi
-}
-
-pkg_postinst() {
-       local old_ver
-
-       # If /bin/sh does not exist, provide it.
-       if [[ ! -e ${EROOT}/bin/sh ]]; then
-               ln -sf -- bash "${EROOT}"/bin/sh || die
-       fi
-
-       read -r old_ver <<<"${REPLACING_VERSIONS}"
-       if [[ ! $old_ver ]]; then
-               :
-       elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge 
"5.2_p26-r6"; then
-               return
-       elif ver_test "$old_ver" -lt "5.2" && ver_test "$old_ver" -ge 
"5.1_p16-r13"; then
-               return
-       fi
-
-       while read -r; do ewarn "${REPLY}"; done <<'EOF'
-Files situated under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
-
-Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
-characteristics of the operating environment, this array may contain a command
-to set the terminal's window title. Those already choosing to customise the
-PROMPT_COMMAND variable are now advised to append their commands like so:
-
-PROMPT_COMMAND+=('custom command goes here')
+       into /
+       newbin bash bash-${SLOT}
 
-Gentoo no longer defaults to having bash manipulate the window title in the 
case
-that the terminal is controlled by sshd(8), unless screen or tmux are in use.
-Those wanting to set the title unconditionally may adjust ~/.bashrc - or create
-a custom /etc/bash/bashrc.d drop-in - to set PROMPT_COMMMAND like so:
+       newman doc/bash.1 bash-${SLOT}.1
+       newman doc/builtins.1 builtins-${SLOT}.1
 
-PROMPT_COMMAND=(genfun_set_win_title)
+       insinto /usr/share/info
+       newins doc/bashref.info bash-${SLOT}.info
+       dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
 
-Those who would prefer for bash never to interfere with the window title may
-now opt out of the default title setting behaviour, either with the "unset -v
-PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
-EOF
+       dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
 }

Reply via email to