Skip to content

Commit

Permalink
wxwidgets.eclass: Make WX_GTK_VER a PRE_INHERIT variable
Browse files Browse the repository at this point in the history
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed May 1, 2021
1 parent d38c8e3 commit 897fe9a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions eclass/wxwidgets.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 897fe9a

Please sign in to comment.