commit:     c6541a10d387eeb502fc2c9a05c21db8b50c4e02
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 18:48:29 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 18:58:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6541a10

app-shells/bash: add 9999

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

 app-shells/bash/bash-5.2_beta.ebuild               | 21 ++++++++++-------
 .../{bash-5.2_beta.ebuild => bash-9999.ebuild}     | 26 +++++++++++++---------
 2 files changed, 28 insertions(+), 19 deletions(-)

diff --git a/app-shells/bash/bash-5.2_beta.ebuild 
b/app-shells/bash/bash-5.2_beta.ebuild
index 9c0db54a6049..c5b8657f7f0d 100644
--- a/app-shells/bash/bash-5.2_beta.ebuild
+++ b/app-shells/bash/bash-5.2_beta.ebuild
@@ -20,7 +20,7 @@ MY_PV="${MY_PV/_/-}"
 MY_P="${PN}-${MY_PV}"
 is_release() {
        case ${PV} in
-       *_alpha*|*_beta*|*_rc*) return 1 ;;
+       9999|*_alpha*|*_beta*|*_rc*) return 1 ;;
        *) return 0 ;;
        esac
 }
@@ -46,7 +46,10 @@ READLINE_VER="8.2_beta"
 
 DESCRIPTION="The standard GNU Bourne again shell"
 HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html";
-if is_release ; then
+if [[ ${PV} == 9999 ]] ; then
+       EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git";
+       inherit git-r3
+elif is_release ; then
        SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
        SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
 else
@@ -56,7 +59,7 @@ fi
 
 LICENSE="GPL-3"
 SLOT="0"
-if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
+if is_release ; then
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 fi
 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
@@ -95,9 +98,12 @@ pkg_setup() {
 }
 
 src_unpack() {
-       verify-sig_src_unpack
-
-       unpack ${MY_P}.tar.gz
+       if [[ ${PV} == 9999 ]] ; then
+               git-r3_src_unpack
+       else
+               verify-sig_src_unpack
+               unpack ${MY_P}.tar.gz
+       fi
 }
 
 src_prepare() {
@@ -167,8 +173,7 @@ src_configure() {
        # is at least what's in the DEPEND up above.
        export ac_cv_rl_version=${READLINE_VER%%_*}
 
-       # TODO: Clean this up before 5.2 release
-       if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]] || 
is_release ; then
+       if is_release ; then
                # Use system readline only with released versions.
                myconf+=( --with-installed-readline=. )
        fi

diff --git a/app-shells/bash/bash-5.2_beta.ebuild 
b/app-shells/bash/bash-9999.ebuild
similarity index 94%
copy from app-shells/bash/bash-5.2_beta.ebuild
copy to app-shells/bash/bash-9999.ebuild
index 9c0db54a6049..c93d31e357b8 100644
--- a/app-shells/bash/bash-5.2_beta.ebuild
+++ b/app-shells/bash/bash-9999.ebuild
@@ -5,8 +5,6 @@ EAPI=7
 
 # TODO on release:
 # - check READLINE_VER, obviously
-# - remove autotools/eautoreconf from readline ebuild
-# - tidy up is_release check in this ebuild for using system readline
 # (presumably there weren't always readline releases for bash RCs etc)
 
 VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/chetramey.asc
@@ -20,8 +18,8 @@ MY_PV="${MY_PV/_/-}"
 MY_P="${PN}-${MY_PV}"
 is_release() {
        case ${PV} in
-       *_alpha*|*_beta*|*_rc*) return 1 ;;
-       *) return 0 ;;
+               9999|*_alpha*|*_beta*|*_rc*) return 1 ;;
+               *) return 0 ;;
        esac
 }
 [[ ${PV} != *_p* ]] && PLEVEL=0
@@ -46,7 +44,11 @@ READLINE_VER="8.2_beta"
 
 DESCRIPTION="The standard GNU Bourne again shell"
 HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html";
-if is_release ; then
+if [[ ${PV} == 9999 ]] ; then
+       EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git";
+       EGIT_BRANCH=devel
+       inherit git-r3
+elif is_release ; then
        SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)"
        SRC_URI+=" verify-sig? ( mirror://gnu/bash/${MY_P}.tar.gz.sig )"
 else
@@ -56,7 +58,7 @@ fi
 
 LICENSE="GPL-3"
 SLOT="0"
-if [[ ${PV} != *_alpha* && ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
+if is_release ; then
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos 
~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 fi
 IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline"
@@ -95,9 +97,12 @@ pkg_setup() {
 }
 
 src_unpack() {
-       verify-sig_src_unpack
-
-       unpack ${MY_P}.tar.gz
+       if [[ ${PV} == 9999 ]] ; then
+               git-r3_src_unpack
+       else
+               verify-sig_src_unpack
+               unpack ${MY_P}.tar.gz
+       fi
 }
 
 src_prepare() {
@@ -167,8 +172,7 @@ src_configure() {
        # is at least what's in the DEPEND up above.
        export ac_cv_rl_version=${READLINE_VER%%_*}
 
-       # TODO: Clean this up before 5.2 release
-       if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]] || 
is_release ; then
+       if is_release ; then
                # Use system readline only with released versions.
                myconf+=( --with-installed-readline=. )
        fi

Reply via email to