Gentoo Archives: gentoo-dev

From: "Marty E. Plummer" <hanetzer@×××××××××.com>
To: Ulrich Mueller <ulm@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7
Date: Mon, 21 May 2018 21:47:42
Message-Id: 20180521214702.l5pbc2nved4yfwsa@proprietary-killer
In Reply to: Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7 by Ulrich Mueller
1 On Tue, May 08, 2018 at 11:03:47AM +0200, Ulrich Mueller wrote:
2 > >>>>> On Tue, 8 May 2018, Marty E Plummer wrote:
3 >
4 > > ---
5 > > eclass/java-utils-2.eclass | 14 +++++++++++---
6 > > 1 file changed, 11 insertions(+), 3 deletions(-)
7 >
8 > > diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
9 > > index 25e35c33dd2..47bbb64ffd4 100644
10 > > --- a/eclass/java-utils-2.eclass
11 > > +++ b/eclass/java-utils-2.eclass
12 > > @@ -15,7 +15,7 @@
13 > > # you should inherit java-pkg-2 for Java packages or java-pkg-opt-2 for packages
14 > > # that have optional Java support. In addition you can inherit java-ant-2 for
15 > > # Ant-based packages.
16 > > -inherit eutils versionator multilib
17 > > +has "${EAPI:-0}" 0 1 2 3 4 5 6 && inherit eutils versionator multilib
18 >
19 > You could inherit eapi7-ver instead of versionator, which would save
20 > the conditional below.
21 >
22 I didn't realize that eapi7-ver now supports 0-6 instead of just 6. I
23 will rework this and the other patch I sent in for that reason, then.
24 > > IUSE="elibc_FreeBSD"
25 >
26 > > @@ -1526,8 +1526,16 @@ java-pkg_is-vm-version-eq() {
27 >
28 > > local vm_version="$(java-pkg_get-vm-version)"
29 >
30 > > - vm_version="$(get_version_component_range 1-2 "${vm_version}")"
31 > > - needed_version="$(get_version_component_range 1-2 "${needed_version}")"
32 > > + case ${EAPI} in
33 > > + 0|1|2|3|4|5|6)
34 > > + vm_version="$(get_version_component_range 1-2 "${vm_version}")"
35 > > + needed_version="$(get_version_component_range 1-2 "${needed_version}")"
36 > > + ;;
37 > > + 7)
38 > > + vm_version="$(ver_cut 1-2 "${vm_version}")"
39 > > + needed_version="$(ver_cut 1-2 "${needed_version}")"
40 > > + ;;
41 > > + esac
42 >
43 > > if [[ -z "${vm_version}" ]]; then
44 > > debug-print "Could not get JDK version from DEPEND"
45 > > --
46 > > 2.17.0

Replies

Subject Author
Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7 "Marty E. Plummer" <hanetzer@×××××××××.com>