public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] virtualx.eclass: support EAPI 7
@ 2018-07-26 19:23 Virgil Dupras
  2018-07-27  5:39 ` Ulrich Mueller
  0 siblings, 1 reply; 3+ messages in thread
From: Virgil Dupras @ 2018-07-26 19:23 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

The only adjustment made here is setting BDEPEND instead of DEPEND when
under EAPI 7.

(first time trying this, guidance/reviews appreciated, took mgorny's
git-r3 patch as a model)
---
 eclass/virtualx.eclass | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 38e629eef4f..cd0447a518c 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -14,7 +14,7 @@ case "${EAPI:-0}" in
 	0|1|2|3)
 		die "virtualx.eclass: EAPI ${EAPI} is too old."
 		;;
-	4|5|6)
+	4|5|6|7)
 		;;
 	*)
 		die "virtualx.eclass: EAPI ${EAPI} is not supported
yet." @@ -53,7 +53,11 @@ case ${VIRTUALX_REQUIRED} in
 	manual)
 		;;
 	always)
-		DEPEND="${VIRTUALX_DEPEND}"
+		if [[ ${EAPI:-0} != [0123456] ]]; then
+			BDEPEND="${VIRTUALX_DEPEND}"
+		else
+			DEPEND="${VIRTUALX_DEPEND}"
+		fi
 		RDEPEND=""
 		;;
 	optional|tests)
@@ -77,7 +81,11 @@ case ${VIRTUALX_REQUIRED} in
 		IUSE="${VIRTUALX_USE}"
 		;;
 	*)
-		DEPEND="${VIRTUALX_REQUIRED}? ( ${VIRTUALX_DEPEND} )"
+		if [[ ${EAPI:-0} != [0123456] ]]; then
+			BDEPEND="${VIRTUALX_REQUIRED}? ( $
{VIRTUALX_DEPEND} )"
+		else
+			DEPEND="${VIRTUALX_REQUIRED}? ( $
{VIRTUALX_DEPEND} )"
+		fi
 		RDEPEND=""
 		IUSE="${VIRTUALX_REQUIRED}"
 		;;
-- 
2.16.4

[-- Attachment #2: Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] [PATCH] virtualx.eclass: support EAPI 7
  2018-07-26 19:23 [gentoo-dev] [PATCH] virtualx.eclass: support EAPI 7 Virgil Dupras
@ 2018-07-27  5:39 ` Ulrich Mueller
  2018-07-27 10:31   ` Virgil Dupras
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrich Mueller @ 2018-07-27  5:39 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

>>>>> On Thu, 26 Jul 2018, Virgil Dupras wrote:

> The only adjustment made here is setting BDEPEND instead of DEPEND
> when under EAPI 7.

There's a third DEPEND assignment which you've missed, at the end of
the optional|tests case.

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] [PATCH] virtualx.eclass: support EAPI 7
  2018-07-27  5:39 ` Ulrich Mueller
@ 2018-07-27 10:31   ` Virgil Dupras
  0 siblings, 0 replies; 3+ messages in thread
From: Virgil Dupras @ 2018-07-27 10:31 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

On Fri, 27 Jul 2018 07:39:10 +0200
Ulrich Mueller <ulm@gentoo.org> wrote:

> >>>>> On Thu, 26 Jul 2018, Virgil Dupras wrote:
> 
> > The only adjustment made here is setting BDEPEND instead of DEPEND
> > when under EAPI 7.
> 
> There's a third DEPEND assignment which you've missed, at the end of
> the optional|tests case.
> 
> Ulrich

I skipped it because this case branch is EAPI 4/5 only and BDEPEND
doesn't apply.

Virgil

[-- Attachment #2: Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-27 10:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26 19:23 [gentoo-dev] [PATCH] virtualx.eclass: support EAPI 7 Virgil Dupras
2018-07-27  5:39 ` Ulrich Mueller
2018-07-27 10:31   ` Virgil Dupras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox