public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marty E. Plummer" <hanetzer@startmail.com>
To: gentoo-dev@lists.gentoo.org
Cc: Ulrich Mueller <ulm@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7
Date: Wed, 23 May 2018 20:18:48 -0500	[thread overview]
Message-ID: <20180524011847.bjtbshi7p5brwcgs@proprietary-killer> (raw)
In-Reply-To: <20180523023359.ganmc2mdbn3rzwj2@proprietary-killer>

On Tue, May 22, 2018 at 09:33:59PM -0500, Marty E. Plummer wrote:
> On Mon, May 21, 2018 at 05:13:18PM -0500, Marty E. Plummer wrote:
> > On Mon, May 21, 2018 at 04:47:03PM -0500, Marty E. Plummer wrote:
> > > On Tue, May 08, 2018 at 11:03:47AM +0200, Ulrich Mueller wrote:
> > > > 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.
> > Here we go. The eapi != 7 conditional is needed as eapi7 is 'not
> > supported' by eapi7-ver because its contents are already there.
> 
> Once more, with changes suggested by [Arfrever] in #gentoo-java.

Should be the final iteration; added comments explaining why eclasses
were inherited, again suggested by [Arfrever].

---
 eclass/java-utils-2.eclass | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass
index 25e35c33dd2..0ecc5eb5a94 100644
--- a/eclass/java-utils-2.eclass
+++ b/eclass/java-utils-2.eclass
@@ -15,7 +15,12 @@
 # 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
+
+# Inherit multlib.eclass for get_libdir()
+[[ ${EAPI:-0} == [012345] ]] && inherit multilib
+# Inherit eapi7-ver.eclass for ver_cut()
+# Inherit eutils for eqawarn()
+[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver eutils
 
 IUSE="elibc_FreeBSD"
 
@@ -1526,8 +1531,8 @@ 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}")"
+	vm_version="$(ver_cut 1-2 "${vm_version}")"
+	needed_version="$(ver_cut 1-2 "${needed_version}")"
 
 	if [[ -z "${vm_version}" ]]; then
 		debug-print "Could not get JDK version from DEPEND"
-- 
2.17.0



  reply	other threads:[~2018-05-24  1:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  6:22 [gentoo-dev] [PATCH] java-utils-2.eclass: port to EAPI 7 Marty E. Plummer
2018-05-08  9:03 ` Ulrich Mueller
2018-05-21 21:47   ` Marty E. Plummer
2018-05-21 22:13     ` Marty E. Plummer
2018-05-23  2:33       ` Marty E. Plummer
2018-05-24  1:18         ` Marty E. Plummer [this message]
2018-06-04 21:30           ` Marty E. Plummer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180524011847.bjtbshi7p5brwcgs@proprietary-killer \
    --to=hanetzer@startmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=ulm@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox