Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 2/6] wxwidgets.eclass: Make WX_GTK_VER a PRE_INHERIT variable
Date: Sun, 25 Apr 2021 13:55:04
Message-Id: 20210425135401.3397709-2-soap@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/6] wxwidgets.eclass: Remove need-wxwidgets alias by David Seifert
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/wxwidgets.eclass | 16 +++++++++++++---
4 1 file changed, 13 insertions(+), 3 deletions(-)
5
6 diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
7 index 5d6d175392b..80c0fc5dea3 100644
8 --- a/eclass/wxwidgets.eclass
9 +++ b/eclass/wxwidgets.eclass
10 @@ -24,6 +24,19 @@
11 if [[ -z ${_WXWIDGETS_ECLASS} ]]; then
12 _WXWIDGETS_ECLASS=1
13
14 +# @ECLASS-VARIABLE: WX_GTK_VER
15 +# @PRE_INHERIT
16 +# @REQUIRED
17 +# @DESCRIPTION:
18 +# The SLOT of the x11-libs/wxGTK you're targeting. Needs to be defined before
19 +# inheriting the eclass. Can be either "3.0" or "3.0-gtk3".
20 +case ${WX_GTK_VER} in
21 + 3.0|3.0-gtk3) ;;
22 + "") die "WX_GTK_VER not declared" ;;
23 + *) die "Invalid WX_GTK_VER: must be set to a valid wxGTK SLOT ('3.0' or '3.0-gtk3')" ;;
24 +esac
25 +readonly WX_GTK_VER
26 +
27 inherit flag-o-matic
28
29 case ${EAPI:-0} in
30 @@ -83,9 +96,6 @@ esac
31 setup-wxwidgets() {
32 local w wxtoolkit wxdebug wxconf
33
34 - [[ -z ${WX_GTK_VER} ]] \
35 - && die "WX_GTK_VER must be set before calling $FUNCNAME."
36 -
37 case "${WX_GTK_VER}" in
38 3.0-gtk3)
39 wxtoolkit=gtk3
40 --
41 2.31.1