From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1707322-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id F418D15813A
	for <garchives@archives.gentoo.org>; Thu, 09 Jan 2025 00:08:28 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 01306E077F;
	Thu, 09 Jan 2025 00:08:28 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id DB1CFE077D
	for <gentoo-commits@lists.gentoo.org>; Thu, 09 Jan 2025 00:08:27 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id D399A342FAB
	for <gentoo-commits@lists.gentoo.org>; Thu, 09 Jan 2025 00:08:26 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 0A5081BA2
	for <gentoo-commits@lists.gentoo.org>; Thu, 09 Jan 2025 00:08:25 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1736381248.c2b39c96f76eaf9352341e5ee801b56747050988.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/bash/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-shells/bash/bash-5.0_p18-r2.ebuild app-shells/bash/bash-5.0_p18-r3.ebuild
X-VCS-Directories: app-shells/bash/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: c2b39c96f76eaf9352341e5ee801b56747050988
X-VCS-Branch: master
Date: Thu, 09 Jan 2025 00:08:25 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: bdb3519d-144d-4819-8c23-a2eac6252415
X-Archives-Hash: b058cb745c5d8ee9a12a911ece9ce1de

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

app-shells/bash: slot old (5.0)

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`.

This will also let us get app-shells/bashdb installable again.

Also, while here, build with -std=gnu89 as a configure test gets
confused otherwise with GCC 15 at least.

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

 ...sh-5.0_p18-r2.ebuild => bash-5.0_p18-r3.ebuild} | 87 +++-------------------
 1 file changed, 11 insertions(+), 76 deletions(-)

diff --git a/app-shells/bash/bash-5.0_p18-r2.ebuild b/app-shells/bash/bash-5.0_p18-r3.ebuild
similarity index 78%
rename from app-shells/bash/bash-5.0_p18-r2.ebuild
rename to app-shells/bash/bash-5.0_p18-r3.ebuild
index 8b51f3570ada..2fa356b7fac0 100644
--- a/app-shells/bash/bash-5.0_p18-r2.ebuild
+++ b/app-shells/bash/bash-5.0_p18-r3.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=7
@@ -53,7 +53,7 @@ if [[ -n ${GENTOO_PATCH_VER} ]] ; then
 fi
 
 LICENSE="GPL-3"
-SLOT="0"
+SLOT="${MY_PV}"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
 
@@ -130,7 +130,7 @@ src_configure() {
 
 	# bash 5.3 drops unprototyped functions, earlier versions are
 	# incompatible with C23.
-	append-cflags $(test-flags-CC -std=gnu17)
+	append-cflags $(test-flags-CC -std=gnu89)
 
 	local myconf=(
 		--disable-profiling
@@ -209,80 +209,15 @@ src_compile() {
 }
 
 src_install() {
-	local d f
+	into /
+	newbin bash bash-${SLOT}
 
-	default
+	newman doc/bash.1 bash-${SLOT}.1
+	newman doc/builtins.1 builtins-${SLOT}.1
 
-	dodir /bin
-	mv "${ED}"/usr/bin/bash "${ED}"/bin/ || die
-	dosym bash /bin/rbash
+	insinto /usr/share/info
+	newins doc/bashref.info bash-${SLOT}.info
+	dosym bash-${SLOT}.info /usr/share/info/bashref-${SLOT}.info
 
-	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:#GNU#@::'
-		-e '/#@/d'
-	)
-
-	if ! use readline ; then
-		# bug #432338
-		sed_args+=(
-			-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
-}
-
-pkg_postinst() {
-	# If /bin/sh does not exist, provide it
-	if [[ ! -e ${EROOT}/bin/sh ]] ; then
-		ln -sf bash "${EROOT}"/bin/sh
-	fi
+	dodoc README NEWS AUTHORS CHANGES COMPAT Y2K doc/FAQ doc/INTRO
 }