public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: David Seifert <soap@gentoo.org>
Subject: [gentoo-dev] [PATCH 2/6] wxwidgets.eclass: Make WX_GTK_VER a PRE_INHERIT variable
Date: Sun, 25 Apr 2021 15:53:57 +0200	[thread overview]
Message-ID: <20210425135401.3397709-2-soap@gentoo.org> (raw)
In-Reply-To: <20210425135401.3397709-1-soap@gentoo.org>

Signed-off-by: David Seifert <soap@gentoo.org>
---
 eclass/wxwidgets.eclass | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
index 5d6d175392b..80c0fc5dea3 100644
--- a/eclass/wxwidgets.eclass
+++ b/eclass/wxwidgets.eclass
@@ -24,6 +24,19 @@
 if [[ -z ${_WXWIDGETS_ECLASS} ]]; then
 _WXWIDGETS_ECLASS=1
 
+# @ECLASS-VARIABLE: WX_GTK_VER
+# @PRE_INHERIT
+# @REQUIRED
+# @DESCRIPTION:
+# The SLOT of the x11-libs/wxGTK you're targeting.  Needs to be defined before
+# inheriting the eclass.  Can be either "3.0" or "3.0-gtk3".
+case ${WX_GTK_VER} in
+	3.0|3.0-gtk3) ;;
+	"")           die "WX_GTK_VER not declared" ;;
+	*)            die "Invalid WX_GTK_VER: must be set to a valid wxGTK SLOT ('3.0' or '3.0-gtk3')" ;;
+esac
+readonly WX_GTK_VER
+
 inherit flag-o-matic
 
 case ${EAPI:-0} in
@@ -83,9 +96,6 @@ esac
 setup-wxwidgets() {
 	local w wxtoolkit wxdebug wxconf
 
-	[[ -z ${WX_GTK_VER} ]] \
-		&& die "WX_GTK_VER must be set before calling $FUNCNAME."
-
 	case "${WX_GTK_VER}" in
 		3.0-gtk3)
 			wxtoolkit=gtk3
-- 
2.31.1



  reply	other threads:[~2021-04-25 13:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 13:53 [gentoo-dev] [PATCH 1/6] wxwidgets.eclass: Remove need-wxwidgets alias David Seifert
2021-04-25 13:53 ` David Seifert [this message]
2021-04-25 13:53 ` [gentoo-dev] [PATCH 3/6] wxwidgets.eclass: Remove dead SLOTs David Seifert
2021-04-25 13:53 ` [gentoo-dev] [PATCH 4/6] wxwidgets.eclass: Clean up setup-wxwidgets eclassdoc David Seifert
2021-04-25 13:54 ` [gentoo-dev] [PATCH 5/6] wxwidgets.eclass: Restrict to EAPI 7 David Seifert
2021-04-25 13:54 ` [gentoo-dev] [PATCH 6/6] wxwidgets.eclass: Add eqawarn for GTK 2 slot David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210425135401.3397709-2-soap@gentoo.org \
    --to=soap@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox