On Tue, 14 Jun 2016 22:56:12 -0400 NP-Hardass <[email protected]> wrote:
> diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass
> index 5f92c4f..c57528d 100644
> --- a/eclass/mate-desktop.org.eclass
> +++ b/eclass/mate-desktop.org.eclass
> @@ -12,22 +12,16 @@
> # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
> # exporting some useful values like the MATE_BRANCH
>
> -# Old EAPIs are banned.
> -case "${EAPI:-0}" in
> - 5|6) ;;
> - *) die "EAPI=${EAPI} is not supported" ;;
> -esac
> +# EAPIs < 6 are banned.
> +if [[ "${EAPI:-0}" != "6" ]]; then
> + die "EAPI=${EAPI:-0} is not supported"
> +fi
case is recommended to make adding EAPIs easier.
> diff --git a/eclass/mate.eclass b/eclass/mate.eclass
> index a0209bf..074ed8d 100644
> --- a/eclass/mate.eclass
> +++ b/eclass/mate.eclass
> @@ -15,10 +15,9 @@
> # fact that MATE is a GNOME fork. For additional functions, see
> gnome2-utils.eclass.
>
> # Check EAPI only
> -case "${EAPI:-0}" in
> - 5|6) ;;
> - *) die "EAPI=${EAPI} is not supported" ;;
> -esac
> +if [[ "${EAPI:-0}" != "6" ]]; then
> + die "EAPI=${EAPI:-0} is not supported"
> +fi
Likewise.
>
> # Inherit happens below after declaration of GNOME2_LA_PUNT
>
> @@ -33,20 +32,19 @@ GNOME2_LA_PUNT=${MATE_LA_PUNT:-""}
>
> inherit gnome2 autotools mate-desktop.org
>
> -case "${EAPI:-0}" in
> - 5|6)
> - EXPORT_FUNCTIONS src_prepare src_configure src_install
> pkg_preinst pkg_postinst pkg_postrm
> - ;;
> - *) die "EAPI=${EAPI} is not supported" ;;
> -esac
> +if [[ "${EAPI:-0}" == "6" ]]; then
> + EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst
> pkg_postinst pkg_postrm
> +fi
Why the conditional? It can't have any other value at this point.
I will try to find some time to review the whole thing again
in the next 30 days ;-).
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
pgpxmRUXHwH1o.pgp
Description: OpenPGP digital signature
