public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH v2 1/3] virtualx.eclass: Support EAPI-8
@ 2021-08-04  9:25 Andreas Sturmlechner
  2021-08-04  9:26 ` [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8 Andreas Sturmlechner
  2021-08-04  9:27 ` [gentoo-dev] [PATCH v2 3/3] virtualx.eclass: Remove leftover variable VIRTUALX_COMMAND Andreas Sturmlechner
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-08-04  9:25 UTC (permalink / raw
  To: gentoo-dev

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

Standardise include guard, fix minor typo.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 eclass/virtualx.eclass | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index ca52e8d2815..155d611e66e 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -6,17 +6,16 @@
 # x11@gentoo.org
 # @AUTHOR:
 # Original author: Martin Schlemmer <azarah@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7
-# @BLURB: This eclass can be used for packages that needs a working X environment to build.
+# @SUPPORTED_EAPIS: 6 7 8
+# @BLURB: This eclass can be used for packages that need a working X environment to build.
 
-case ${EAPI:-0} in
-	[0-5]) die "virtualx.eclass: EAPI ${EAPI} is too old." ;;
-	6|7) ;;
-	*) die "virtualx.eclass: EAPI ${EAPI} is not supported yet." ;;
+case ${EAPI} in
+	6|7|8) ;;
+	*) die "${ECLASS}: EAPI ${EAPI:-0} is not supported." ;;
 esac
 
-if [[ ! ${_VIRTUAL_X} ]]; then
-_VIRTUAL_X=1
+if [[ ! ${_VIRTUALX_ECLASS} ]]; then
+_VIRTUALX_ECLASS=1
 
 # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
 # @PRE_INHERIT
-- 
2.32.0


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

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

* [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8
  2021-08-04  9:25 [gentoo-dev] [PATCH v2 1/3] virtualx.eclass: Support EAPI-8 Andreas Sturmlechner
@ 2021-08-04  9:26 ` Andreas Sturmlechner
  2021-08-04 10:29   ` Ulrich Mueller
  2021-08-04  9:27 ` [gentoo-dev] [PATCH v2 3/3] virtualx.eclass: Remove leftover variable VIRTUALX_COMMAND Andreas Sturmlechner
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-08-04  9:26 UTC (permalink / raw
  To: gentoo-dev

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

Any additional dependencies shall be defined inside ebuilds instead.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 eclass/virtualx.eclass | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index 155d611e66e..ad376c497ac 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -29,14 +29,18 @@ _VIRTUALX_ECLASS=1
 : ${VIRTUALX_REQUIRED:=test}
 
 # @ECLASS-VARIABLE: VIRTUALX_DEPEND
+# @DEFAULT_UNSET
 # @DESCRIPTION:
-# Dep string available for use outside of eclass, in case a more
-# complicated dep is needed.
-# You can specify the variable BEFORE inherit to add more dependencies.
-VIRTUALX_DEPEND="${VIRTUALX_DEPEND}
+# Standard dependencies string that is automatically added to BDEPEND
+# (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual".
+# DEPRECATED: Pre-EAPI-8 you can specify the variable BEFORE inherit
+# to add more dependencies.
+[[ ${EAPI} == [67] ]] || VIRTUALX_DEPEND=""
+VIRTUALX_DEPEND+="
 	x11-base/xorg-server[xvfb]
 	x11-apps/xhost
 "
+[[ ${EAPI} == [67] ]] || readonly VIRTUALX_DEPEND
 
 # @ECLASS-VARIABLE: VIRTUALX_COMMAND
 # @DESCRIPTION:
-- 
2.32.0


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

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

* [gentoo-dev] [PATCH v2 3/3] virtualx.eclass: Remove leftover variable VIRTUALX_COMMAND
  2021-08-04  9:25 [gentoo-dev] [PATCH v2 1/3] virtualx.eclass: Support EAPI-8 Andreas Sturmlechner
  2021-08-04  9:26 ` [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8 Andreas Sturmlechner
@ 2021-08-04  9:27 ` Andreas Sturmlechner
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-08-04  9:27 UTC (permalink / raw
  To: gentoo-dev

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

Follow-up to commit 11fb990.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 eclass/virtualx.eclass | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index ad376c497ac..9e2e9f00b78 100644
--- a/eclass/virtualx.eclass
+++ b/eclass/virtualx.eclass
@@ -42,11 +42,7 @@ VIRTUALX_DEPEND+="
 "
 [[ ${EAPI} == [67] ]] || readonly VIRTUALX_DEPEND
 
-# @ECLASS-VARIABLE: VIRTUALX_COMMAND
-# @DESCRIPTION:
-# Command (or eclass function call) to be run in the X11 environment
-# (within virtualmake function).
-: ${VIRTUALX_COMMAND:="emake"}
+[[ ${VIRTUALX_COMMAND} ]] && die "VIRTUALX_COMMAND has been removed and is a 
no-op"
 
 case ${VIRTUALX_REQUIRED} in
 	manual)
-- 
2.32.0


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

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

* Re: [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8
  2021-08-04  9:26 ` [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8 Andreas Sturmlechner
@ 2021-08-04 10:29   ` Ulrich Mueller
  2021-08-04 11:13     ` Andreas Sturmlechner
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Mueller @ 2021-08-04 10:29 UTC (permalink / raw
  To: Andreas Sturmlechner; +Cc: gentoo-dev

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

>>>>> On Wed, 04 Aug 2021, Andreas Sturmlechner wrote:
> +# Standard dependencies string that is automatically added to BDEPEND
> +# (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual".
> +# DEPRECATED: Pre-EAPI-8 you can specify the variable BEFORE inherit
> +# to add more dependencies.
> +[[ ${EAPI} == [67] ]] || VIRTUALX_DEPEND=""
> +VIRTUALX_DEPEND+="
>  	x11-base/xorg-server[xvfb]
>  	x11-apps/xhost
>  "
> +[[ ${EAPI} == [67] ]] || readonly VIRTUALX_DEPEND

I wonder about this one, because the *DEPEND variables are automatically
accumulated across eclasses and ebuild. What is the advantage of the
ebuild specifying VIRTUALX_DEPEND, instead of specifying BDEPEND
directly?

Ulrich

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

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

* Re: [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8
  2021-08-04 10:29   ` Ulrich Mueller
@ 2021-08-04 11:13     ` Andreas Sturmlechner
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Sturmlechner @ 2021-08-04 11:13 UTC (permalink / raw
  To: gentoo-dev

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

On Mittwoch, 4. August 2021 12:29:40 CEST Ulrich Mueller wrote:
> >>>>> On Wed, 04 Aug 2021, Andreas Sturmlechner wrote:
> > +# Standard dependencies string that is automatically added to BDEPEND
> > +# (in EAPI-6: DEPEND) unless VIRTUALX_REQUIRED is set to "manual".
> > +# DEPRECATED: Pre-EAPI-8 you can specify the variable BEFORE inherit
> > +# to add more dependencies.
> > +[[ ${EAPI} == [67] ]] || VIRTUALX_DEPEND=""
> > +VIRTUALX_DEPEND+="
> > 
> >  	x11-base/xorg-server[xvfb]
> >  	x11-apps/xhost
> >  
> >  "
> > 
> > +[[ ${EAPI} == [67] ]] || readonly VIRTUALX_DEPEND
> 
> I wonder about this one, because the *DEPEND variables are automatically
> accumulated across eclasses and ebuild. What is the advantage of the
> ebuild specifying VIRTUALX_DEPEND, instead of specifying BDEPEND
> directly?
> 

The answer is in the updated description in this patch: ebuilds/eclasses 
specifying VIRTUALX_REQUIRED=manual have (so far) been relying on the content 
of VIRTUALX_DEPEND to add the standard dependencies from within the ebuild 
instead of having virtualx.eclass do it for them, for whatever complex 
dependency situation they might have.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

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

end of thread, other threads:[~2021-08-04 11:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-04  9:25 [gentoo-dev] [PATCH v2 1/3] virtualx.eclass: Support EAPI-8 Andreas Sturmlechner
2021-08-04  9:26 ` [gentoo-dev] [PATCH v2 2/3] virtualx.eclass: Make VIRTUALX_DEPEND readonly in EAPI-8 Andreas Sturmlechner
2021-08-04 10:29   ` Ulrich Mueller
2021-08-04 11:13     ` Andreas Sturmlechner
2021-08-04  9:27 ` [gentoo-dev] [PATCH v2 3/3] virtualx.eclass: Remove leftover variable VIRTUALX_COMMAND Andreas Sturmlechner

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