• [gentoo-dev] [PATCH] app-alternatives.eclass: New eclass to streamline

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Dec 3 08:10:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/app-alternatives.eclass | 84 ++++++++++++++++++++++++++++++++++
    1 file changed, 84 insertions(+)
    create mode 100644 eclass/app-alternatives.eclass

    PR with examples: https://github.com/gentoo/gentoo/pull/28515

    diff --git a/eclass/app-alternatives.eclass b/eclass/app-alternatives.eclass new file mode 100644
    index 000000000000..69315e4bc985
    --- /dev/null
    +++ b/eclass/app-alternatives.eclass
    @@ -0,0 +1,84 @@
    +# Copyright 2022 Gentoo Authors
    +# Distributed under the terms of the GNU General Public License v2
    +
    +# @ECLASS: app-alternatives.eclass
    +# @MAINTAINER:
    +# Michał Górny <mgorny@gentoo.org>
    +# @AUTHOR:
    +# Michał Górny <mgorny@gentoo.org>
    +# @SUPPORTED_EAPIS: 8
    +# @BLURB: Common logic for app-alternatives/*
    +# @DESCRIPTION:
    +# This eclass provides common logic shared by app-alternatives/*
    +# ebuilds. A global ALTERNATIVES variable needs to be declared
    +# that lists available options and their respective dependencies.
    +# HOMEPAGE, S, LICENSE, SLOT, IUSE, REQUIRED