diff options
author | David Seifert <soap@gentoo.org> | 2021-05-01 21:01:53 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2021-05-01 21:01:53 +0200 |
commit | 897fe9a5c1e0eb6de341346ec33b50d63fe146f6 (patch) | |
tree | 90e8026f713b2d4a889dc58962ace45c70084642 /eclass/wxwidgets.eclass | |
parent | wxwidgets.eclass: Remove need-wxwidgets alias (diff) | |
download | gentoo-897fe9a5c1e0eb6de341346ec33b50d63fe146f6.tar.gz gentoo-897fe9a5c1e0eb6de341346ec33b50d63fe146f6.tar.bz2 gentoo-897fe9a5c1e0eb6de341346ec33b50d63fe146f6.zip |
wxwidgets.eclass: Make WX_GTK_VER a PRE_INHERIT variable
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/wxwidgets.eclass')
-rw-r--r-- | eclass/wxwidgets.eclass | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass index 5d6d175392b2..80c0fc5dea30 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 |