Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 01 May 2021 19:02:32
Message-Id: 1619895713.897fe9a5c1e0eb6de341346ec33b50d63fe146f6.soap@gentoo
1 commit: 897fe9a5c1e0eb6de341346ec33b50d63fe146f6
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 1 19:01:53 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat May 1 19:01:53 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=897fe9a5
7
8 wxwidgets.eclass: Make WX_GTK_VER a PRE_INHERIT variable
9
10 Signed-off-by: David Seifert <soap <AT> gentoo.org>
11
12 eclass/wxwidgets.eclass | 16 +++++++++++++---
13 1 file changed, 13 insertions(+), 3 deletions(-)
14
15 diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
16 index 5d6d175392b..80c0fc5dea3 100644
17 --- a/eclass/wxwidgets.eclass
18 +++ b/eclass/wxwidgets.eclass
19 @@ -24,6 +24,19 @@
20 if [[ -z ${_WXWIDGETS_ECLASS} ]]; then
21 _WXWIDGETS_ECLASS=1
22
23 +# @ECLASS-VARIABLE: WX_GTK_VER
24 +# @PRE_INHERIT
25 +# @REQUIRED
26 +# @DESCRIPTION:
27 +# The SLOT of the x11-libs/wxGTK you're targeting. Needs to be defined before
28 +# inheriting the eclass. Can be either "3.0" or "3.0-gtk3".
29 +case ${WX_GTK_VER} in
30 + 3.0|3.0-gtk3) ;;
31 + "") die "WX_GTK_VER not declared" ;;
32 + *) die "Invalid WX_GTK_VER: must be set to a valid wxGTK SLOT ('3.0' or '3.0-gtk3')" ;;
33 +esac
34 +readonly WX_GTK_VER
35 +
36 inherit flag-o-matic
37
38 case ${EAPI:-0} in
39 @@ -83,9 +96,6 @@ esac
40 setup-wxwidgets() {
41 local w wxtoolkit wxdebug wxconf
42
43 - [[ -z ${WX_GTK_VER} ]] \
44 - && die "WX_GTK_VER must be set before calling $FUNCNAME."
45 -
46 case "${WX_GTK_VER}" in
47 3.0-gtk3)
48 wxtoolkit=gtk3