commit:     95ea0eaa51d21f9599664f7c7ceeda51f8ffff2e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  9 00:27:38 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan  9 00:27:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95ea0eaa

app-shells/bashdb: adjust ebuild for future bash-5.2 / non-slotted

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

 app-shells/bashdb/bashdb-5.1_pre20240617.ebuild | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/app-shells/bashdb/bashdb-5.1_pre20240617.ebuild 
b/app-shells/bashdb/bashdb-5.1_pre20240617.ebuild
index aa4a37d1a14e..2468ebc8a2a9 100644
--- a/app-shells/bashdb/bashdb-5.1_pre20240617.ebuild
+++ b/app-shells/bashdb/bashdb-5.1_pre20240617.ebuild
@@ -3,6 +3,14 @@
 
 EAPI=8
 
+# Set to 1 for older versions of bash (that are hence slotted)
+BASH_IS_SLOTTED=1
+
+if [[ ${BASH_IS_SLOTTED} == 1 ]] ; then
+       BASH_SLOT="${PV:0:3}"
+else
+       BASH_SLOT="0"
+fi
 MY_P="${PN}-${PV:0:3}-${PV:4}"
 DESCRIPTION="bash source code debugging"
 HOMEPAGE="http://bashdb.sourceforge.net/";
@@ -28,7 +36,7 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
 
-DEPEND="app-shells/bash:${PV:0:3}"
+DEPEND=">=app-shells/bash-${BASH_SLOT}:${BASH_SLOT}"
 RDEPEND="${DEPEND}"
 
 # test-bug-loc fails with formatting differences
@@ -44,9 +52,14 @@ src_prepare() {
 }
 
 src_configure() {
+       local bash_suffix
+       if [[ ${BASH_IS_SLOTTED} == 1 ]] ; then
+               bash_suffix="-${BASH_SLOT}"
+       fi
+
        # This path matches the bash sources.  If we ever change bash,
        # we'll probably have to change this to match (bug #591994).
        CONFIG_SHELL="${BROOT}"/bin/bash econf \
-               --with-bash="${EPREFIX}"/bin/bash-${PV:0:3} \
+               --with-bash="${EPREFIX}"/bin/bash${bash_suffix} \
                --with-dbg-main='$(PKGDATADIR)/bashdb-main.inc'
 }

Reply via email to