* [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8
@ 2021-07-18 20:46 Andreas Sturmlechner
2021-07-18 21:24 ` Ulrich Mueller
2021-07-19 5:57 ` Michał Górny
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2021-07-18 20:46 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
Standardise include guard, fix minor typo.
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
eclass/virtualx.eclass | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
index ca52e8d2815..f362327cf77 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." ;;
+ 6|7|8) ;;
+ *) die "virtualx.eclass: EAPI ${EAPI:-0} is not supported." ;;
esac
-if [[ ! ${_VIRTUAL_X} ]]; then
-_VIRTUAL_X=1
+if [[ ! ${_VIRTUAL_X_ECLASS} ]]; then
+_VIRTUAL_X_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] 3+ messages in thread
* Re: [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8
2021-07-18 20:46 [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8 Andreas Sturmlechner
@ 2021-07-18 21:24 ` Ulrich Mueller
2021-07-19 5:57 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Ulrich Mueller @ 2021-07-18 21:24 UTC (permalink / raw
To: Andreas Sturmlechner; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 430 bytes --]
>>>>> On Sun, 18 Jul 2021, Andreas Sturmlechner wrote:
> case ${EAPI:-0} in
This could be just ${EAPI} now (same for check-reqs.eclass).
> - [0-5]) die "virtualx.eclass: EAPI ${EAPI} is too old." ;;
> - 6|7) ;;
> - *) die "virtualx.eclass: EAPI ${EAPI} is not supported yet." ;;
> + 6|7|8) ;;
> + *) die "virtualx.eclass: EAPI ${EAPI:-0} is not supported." ;;
Use ${ECLASS} instead of explicit name?
> esac
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8
2021-07-18 20:46 [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8 Andreas Sturmlechner
2021-07-18 21:24 ` Ulrich Mueller
@ 2021-07-19 5:57 ` Michał Górny
1 sibling, 0 replies; 3+ messages in thread
From: Michał Górny @ 2021-07-19 5:57 UTC (permalink / raw
To: gentoo-dev
On Sun, 2021-07-18 at 22:46 +0200, Andreas Sturmlechner wrote:
> Standardise include guard, fix minor typo.
>
> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
> ---
> eclass/virtualx.eclass | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
> index ca52e8d2815..f362327cf77 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." ;;
> + 6|7|8) ;;
> + *) die "virtualx.eclass: EAPI ${EAPI:-0} is not supported." ;;
> esac
>
> -if [[ ! ${_VIRTUAL_X} ]]; then
> -_VIRTUAL_X=1
> +if [[ ! ${_VIRTUAL_X_ECLASS} ]]; then
> +_VIRTUAL_X_ECLASS=1
>
> # @ECLASS-VARIABLE: VIRTUALX_REQUIRED
> # @PRE_INHERIT
Things to consider changing:
1. The dual-function of VIRTUALX_DEPEND is ugly (and I don't think it
meets global variable invariancy requirements; not that the assignment
variant is used anywhere).
2. Maybe VIRTUALX_DEPEND can be exported conditionally to
VIRTUALX_REQUIRED!=always, to avoid some mistakes.
3. The eclass is leaving stray BDEPEND in global scope in EAPI 6.
--
Best regards,
Michał Górny
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-19 5:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-18 20:46 [gentoo-dev] [PATCH] virtualx.eclass: Support EAPI-8 Andreas Sturmlechner
2021-07-18 21:24 ` Ulrich Mueller
2021-07-19 5:57 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox