* [gentoo-dev] [PATCH] udev.eclass: support EAPI 7
@ 2018-09-23 15:20 Mike Gilbert
2018-09-23 19:33 ` M. J. Everitt
0 siblings, 1 reply; 3+ messages in thread
From: Mike Gilbert @ 2018-09-23 15:20 UTC (permalink / raw
To: gentoo-dev; +Cc: udev-bugs
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
eclass/udev.eclass | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/eclass/udev.eclass b/eclass/udev.eclass
index 4f23c9ebbdf8..baf60584938f 100644
--- a/eclass/udev.eclass
+++ b/eclass/udev.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: udev.eclass
# @MAINTAINER:
# udev-bugs@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
+# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
# @BLURB: Default eclass for determining udev directories.
# @DESCRIPTION:
# Default eclass for determining udev directories.
@@ -34,12 +34,16 @@ _UDEV_ECLASS=1
inherit toolchain-funcs
case ${EAPI:-0} in
- 0|1|2|3|4|5|6) ;;
+ 0|1|2|3|4|5|6|7) ;;
*) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
esac
-RDEPEND=""
-DEPEND="virtual/pkgconfig"
+if [[ ${EAPI:-0} == [0123456] ]]; then
+ RDEPEND=""
+ DEPEND="virtual/pkgconfig"
+else
+ BDEPEND="virtual/pkgconfig"
+fi
# @FUNCTION: _udev_get_udevdir
# @INTERNAL
--
2.19.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] [PATCH] udev.eclass: support EAPI 7
2018-09-23 15:20 [gentoo-dev] [PATCH] udev.eclass: support EAPI 7 Mike Gilbert
@ 2018-09-23 19:33 ` M. J. Everitt
2018-09-24 0:45 ` Mike Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: M. J. Everitt @ 2018-09-23 19:33 UTC (permalink / raw
To: gentoo-dev, Mike Gilbert; +Cc: udev-bugs
[-- Attachment #1.1: Type: text/plain, Size: 1507 bytes --]
On 23/09/18 16:20, Mike Gilbert wrote:
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
> eclass/udev.eclass | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/eclass/udev.eclass b/eclass/udev.eclass
> index 4f23c9ebbdf8..baf60584938f 100644
> --- a/eclass/udev.eclass
> +++ b/eclass/udev.eclass
> @@ -1,10 +1,10 @@
> -# Copyright 1999-2014 Gentoo Foundation
> +# Copyright 1999-2018 Gentoo Authors
> # Distributed under the terms of the GNU General Public License v2
>
> # @ECLASS: udev.eclass
> # @MAINTAINER:
> # udev-bugs@gentoo.org
> -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
> +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
> # @BLURB: Default eclass for determining udev directories.
> # @DESCRIPTION:
> # Default eclass for determining udev directories.
> @@ -34,12 +34,16 @@ _UDEV_ECLASS=1
> inherit toolchain-funcs
>
> case ${EAPI:-0} in
> - 0|1|2|3|4|5|6) ;;
> + 0|1|2|3|4|5|6|7) ;;
> *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
> esac
>
> -RDEPEND=""
> -DEPEND="virtual/pkgconfig"
> +if [[ ${EAPI:-0} == [0123456] ]]; then
> + RDEPEND=""
> + DEPEND="virtual/pkgconfig"
> +else
> + BDEPEND="virtual/pkgconfig"
> +fi
>
> # @FUNCTION: _udev_get_udevdir
> # @INTERNAL
Hate to nit-pick, but this *is* Gentoo .. the last IF, if EAPI <> 7 then
BDEPEND could also be dragged in, probably better to explicitly mention '7'.
Cheers,
Michael.
Replying off-list due to black-listing.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-dev] [PATCH] udev.eclass: support EAPI 7
2018-09-23 19:33 ` M. J. Everitt
@ 2018-09-24 0:45 ` Mike Gilbert
0 siblings, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2018-09-24 0:45 UTC (permalink / raw
To: Gentoo Dev; +Cc: udev-bugs
On Sun, Sep 23, 2018 at 3:33 PM M. J. Everitt <m.j.everitt@iee.org> wrote:
>
> On 23/09/18 16:20, Mike Gilbert wrote:
> > Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> > ---
> > eclass/udev.eclass | 14 +++++++++-----
> > 1 file changed, 9 insertions(+), 5 deletions(-)
> >
> > diff --git a/eclass/udev.eclass b/eclass/udev.eclass
> > index 4f23c9ebbdf8..baf60584938f 100644
> > --- a/eclass/udev.eclass
> > +++ b/eclass/udev.eclass
> > @@ -1,10 +1,10 @@
> > -# Copyright 1999-2014 Gentoo Foundation
> > +# Copyright 1999-2018 Gentoo Authors
> > # Distributed under the terms of the GNU General Public License v2
> >
> > # @ECLASS: udev.eclass
> > # @MAINTAINER:
> > # udev-bugs@gentoo.org
> > -# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6
> > +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
> > # @BLURB: Default eclass for determining udev directories.
> > # @DESCRIPTION:
> > # Default eclass for determining udev directories.
> > @@ -34,12 +34,16 @@ _UDEV_ECLASS=1
> > inherit toolchain-funcs
> >
> > case ${EAPI:-0} in
> > - 0|1|2|3|4|5|6) ;;
> > + 0|1|2|3|4|5|6|7) ;;
> > *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet established."
> > esac
> >
> > -RDEPEND=""
> > -DEPEND="virtual/pkgconfig"
> > +if [[ ${EAPI:-0} == [0123456] ]]; then
> > + RDEPEND=""
> > + DEPEND="virtual/pkgconfig"
> > +else
> > + BDEPEND="virtual/pkgconfig"
> > +fi
> >
> > # @FUNCTION: _udev_get_udevdir
> > # @INTERNAL
> Hate to nit-pick, but this *is* Gentoo .. the last IF, if EAPI <> 7 then
> BDEPEND could also be dragged in, probably better to explicitly mention '7'.
That's by design: future EAPIs will probably have BDEPEND, and I don't
want to have to update this if statement for every new EAPI.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-24 0:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-23 15:20 [gentoo-dev] [PATCH] udev.eclass: support EAPI 7 Mike Gilbert
2018-09-23 19:33 ` M. J. Everitt
2018-09-24 0:45 ` Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox