On Tue, May 08, 2018 at 11:03:47AM +0200, Ulrich Mueller wrote:
> >>>>> On Tue, 8 May 2018, Marty E Plummer wrote:
> 
> > ---
> >  eclass/java-utils-2.eclass | 14 +++++++++++---
> >  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> > diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
> > index 25e35c33dd2..47bbb64ffd4 100644
> > --- a/eclass/java-utils-2.eclass
> > +++ b/eclass/java-utils-2.eclass
> > @@ -15,7 +15,7 @@
> >  # you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for 
> > packages
> >  # that have optional Java support. In addition you can inherit java-ant-2 
> > for
> >  # Ant-based packages.
> > -inherit eutils versionator multilib
> > +has "${EAPI:-0}" 0 1 2 3 4 5 6 && inherit eutils versionator multilib
>  
> You could inherit eapi7-ver instead of versionator, which would save
> the conditional below.
> 
I didn't realize that eapi7-ver now supports 0-6 instead of just 6. I
will rework this and the other patch I sent in for that reason, then.
> >  IUSE="elibc_FreeBSD"
>  
> > @@ -1526,8 +1526,16 @@ java-pkg_is-vm-version-eq() {
>  
> >     local vm_version="$(java-pkg_get-vm-version)"
>  
> > -   vm_version="$(get_version_component_range 1-2 "${vm_version}")"
> > -   needed_version="$(get_version_component_range 1-2 "${needed_version}")"
> > +   case ${EAPI} in
> > +   0|1|2|3|4|5|6)
> > +           vm_version="$(get_version_component_range 1-2 "${vm_version}")"
> > +           needed_version="$(get_version_component_range 1-2 
> > "${needed_version}")"
> > +           ;;
> > +   7)
> > +           vm_version="$(ver_cut 1-2 "${vm_version}")"
> > +           needed_version="$(ver_cut 1-2 "${needed_version}")"
> > +           ;;
> > +   esac
>  
> >     if [[ -z "${vm_version}" ]]; then
> >             debug-print "Could not get JDK version from DEPEND"
> > -- 
> > 2.17.0



Reply via email to