diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-11-27 12:53:38 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-11-27 12:54:27 -0500 |
commit | 87790852a5f6fd5ae2da6bc81fd7e499ea7536d6 (patch) | |
tree | 5d299a22813add557f30703c70a69b8e401f449a /app-shells | |
parent | media-libs/netpbm: handle more test failures when USE flags are disabled #600998 (diff) | |
download | gentoo-87790852a5f6fd5ae2da6bc81fd7e499ea7536d6.tar.gz gentoo-87790852a5f6fd5ae2da6bc81fd7e499ea7536d6.tar.bz2 gentoo-87790852a5f6fd5ae2da6bc81fd7e499ea7536d6.zip |
app-shells/bash: unify release version checking logic
Diffstat (limited to 'app-shells')
-rw-r--r-- | app-shells/bash/bash-4.4_p5-r1.ebuild | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/app-shells/bash/bash-4.4_p5-r1.ebuild b/app-shells/bash/bash-4.4_p5-r1.ebuild index d984d0592394..13d0e3e64517 100644 --- a/app-shells/bash/bash-4.4_p5-r1.ebuild +++ b/app-shells/bash/bash-4.4_p5-r1.ebuild @@ -11,6 +11,12 @@ 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}} @@ -32,10 +38,11 @@ READLINE_VER="7.0" DESCRIPTION="The standard GNU Bourne again shell" HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" -case ${PV} in -*_alpha*|*_beta*|*_rc*) SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" ;; -*) SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" ;; -esac +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" @@ -75,7 +82,7 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-4.4-popd-offset-overflow.patch #600174 # Clean out local libs so we know we use system ones w/releases. - if [[ ${PV} != *_rc* ]] ; then + if is_release ; then rm -rf lib/{readline,termcap}/* touch lib/{readline,termcap}/Makefile.in # for config.status sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die @@ -125,7 +132,7 @@ src_configure() { # is here because readline needs it. But bash itself calls # ncurses in one or two small places :(. - if [[ ${PV} != *_rc* ]] ; then + if is_release ; then # Use system readline only with released versions. myconf+=( --with-installed-readline=. ) fi |