Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: NP-Hardass <NP-Hardass@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] New eclass: mate
Date: Fri, 01 Jul 2016 13:46:06
Message-Id: 20160701154542.32966a03.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] New eclass: mate by NP-Hardass
1 On Tue, 14 Jun 2016 22:56:12 -0400
2 NP-Hardass <NP-Hardass@g.o> wrote:
3
4 > diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass
5 > index 5f92c4f..c57528d 100644
6 > --- a/eclass/mate-desktop.org.eclass
7 > +++ b/eclass/mate-desktop.org.eclass
8 > @@ -12,22 +12,16 @@
9 > # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
10 > # exporting some useful values like the MATE_BRANCH
11 >
12 > -# Old EAPIs are banned.
13 > -case "${EAPI:-0}" in
14 > - 5|6) ;;
15 > - *) die "EAPI=${EAPI} is not supported" ;;
16 > -esac
17 > +# EAPIs < 6 are banned.
18 > +if [[ "${EAPI:-0}" != "6" ]]; then
19 > + die "EAPI=${EAPI:-0} is not supported"
20 > +fi
21
22 case is recommended to make adding EAPIs easier.
23
24 > diff --git a/eclass/mate.eclass b/eclass/mate.eclass
25 > index a0209bf..074ed8d 100644
26 > --- a/eclass/mate.eclass
27 > +++ b/eclass/mate.eclass
28 > @@ -15,10 +15,9 @@
29 > # fact that MATE is a GNOME fork. For additional functions, see gnome2-utils.eclass.
30 >
31 > # Check EAPI only
32 > -case "${EAPI:-0}" in
33 > - 5|6) ;;
34 > - *) die "EAPI=${EAPI} is not supported" ;;
35 > -esac
36 > +if [[ "${EAPI:-0}" != "6" ]]; then
37 > + die "EAPI=${EAPI:-0} is not supported"
38 > +fi
39
40 Likewise.
41
42 >
43 > # Inherit happens below after declaration of GNOME2_LA_PUNT
44 >
45 > @@ -33,20 +32,19 @@ GNOME2_LA_PUNT=${MATE_LA_PUNT:-""}
46 >
47 > inherit gnome2 autotools mate-desktop.org
48 >
49 > -case "${EAPI:-0}" in
50 > - 5|6)
51 > - EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
52 > - ;;
53 > - *) die "EAPI=${EAPI} is not supported" ;;
54 > -esac
55 > +if [[ "${EAPI:-0}" == "6" ]]; then
56 > + EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
57 > +fi
58
59 Why the conditional? It can't have any other value at this point.
60
61 I will try to find some time to review the whole thing again
62 in the next 30 days ;-).
63
64 --
65 Best regards,
66 Michał Górny
67 <http://dev.gentoo.org/~mgorny/>