diff options
author | Ryan Hill <rhill@gentoo.org> | 2007-07-30 01:34:13 +0000 |
---|---|---|
committer | Ryan Hill <rhill@gentoo.org> | 2007-07-30 01:34:13 +0000 |
commit | aa481bdf2bb7d93d375a59808a04a443f3f1eb0b (patch) | |
tree | 81bcd67153c1f91729115bf02849ddc3e7f3c791 /eclass/wxwidgets.eclass | |
parent | Version bump for bug #181324 (diff) | |
download | historical-aa481bdf2bb7d93d375a59808a04a443f3f1eb0b.tar.gz historical-aa481bdf2bb7d93d375a59808a04a443f3f1eb0b.tar.bz2 historical-aa481bdf2bb7d93d375a59808a04a443f3f1eb0b.zip |
Add check_wxuse, a small utility fuction to make checking wxGTK USE flags consistent.
Diffstat (limited to 'eclass/wxwidgets.eclass')
-rw-r--r-- | eclass/wxwidgets.eclass | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass index fcd7a408a1c1..97f0fef3900b 100644 --- a/eclass/wxwidgets.eclass +++ b/eclass/wxwidgets.eclass @@ -1,8 +1,9 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.18 2007/01/02 08:10:31 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.19 2007/07/30 01:34:13 dirtyepic Exp $ # -# Author Rob Cakebread <pythonhead@gentoo.org> +# Original Author: Rob Cakebread <pythonhead@gentoo.org> +# Current Maintainers: wxWidgets team <wxwidgets@gentoo.org> # This eclass helps you find the correct wx-config script so ebuilds # can use gtk, gtk2 or gtk2+unicode versions of wxGTK @@ -13,11 +14,15 @@ # 2.4: gtk gtk2 unicode !!! 2.4 is being removed from the tree !!! # 2.6: gtk2 unicode base base-unicode mac mac-unicode # -# # set-wxconfig # Arguments: (wxGTK 2.4) wxgtk, wxgtk2, or wxgtk2u # Arguments: (wxGTK 2.6) gtk-ansi gtk2-ansi unicode base-ansi base-unicode mac-ansi mac-unicode # Note: Don't call this function directly from ebuilds +# +# check_wxuse +# Check if wxGTK was built with the specified USE flag. +# Usage: check_wxuse <USE flag> +# Note: for now, requires WX_GTK_VER to be set. inherit multilib flag-o-matic @@ -51,7 +56,6 @@ need-wxwidgets() { fi } - set-wxconfig() { debug-print-function $FUNCNAME $* @@ -106,3 +110,23 @@ set-wxconfig() { fi } +check_wxuse() { + if [[ -z ${WX_GTK_VER} ]]; then + echo + eerror "You need to set WX_GTK_VER before calling ${FUNCNAME}." + die "Missing WX_GTK_VER." + fi + + ebegin "Checking wxGTK-${WX_GTK_VER} for ${1} support" + if $(built_with_use =x11-libs/wxGTK-${WX_GTK_VER}* ${1}); then + eend 0 + else + eend 1 + echo + eerror "${FUNCNAME} - You have requested functionality that requires ${1} support to" + eerror "have been built into x11-libs/wxGTK." + eerror + eerror "Please re-merge =x11-libs/wxGTK-${WX_GTK_VER}* with the ${1} USE flag enabled." + die "Missing USE flags." + fi +} |