summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorRob Cakebread <pythonhead@gentoo.org>2004-08-05 16:28:11 +0000
committerRob Cakebread <pythonhead@gentoo.org>2004-08-05 16:28:11 +0000
commit5647bad2694ce8e595601569c46db175f133a07a (patch)
tree27c4c4f7235c3cddcd6552271ef448b9586eb449 /eclass
parentstable on x86 (Manifest recommit) (diff)
downloadgentoo-2-5647bad2694ce8e595601569c46db175f133a07a.tar.gz
gentoo-2-5647bad2694ce8e595601569c46db175f133a07a.tar.bz2
gentoo-2-5647bad2694ce8e595601569c46db175f133a07a.zip
New eclass for wxGTK based packages
Diffstat (limited to 'eclass')
-rw-r--r--eclass/wxwidgets.eclass57
1 files changed, 57 insertions, 0 deletions
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass
new file mode 100644
index 000000000000..f4b98e251c46
--- /dev/null
+++ b/eclass/wxwidgets.eclass
@@ -0,0 +1,57 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.1 2004/08/05 16:28:11 pythonhead Exp $
+#
+# Author Rob Cakebread <pythonhead@gentoo.org>
+
+# This eclass helps you find the correct wx-config script so ebuilds
+# can use gtk, gtk2 or gtk2+unicode versions of wxGTK
+
+#FUNCTIONS:
+# need-wxwidgets:
+# Arguments: gtk, gtk2 or unicode
+#
+# set-wxconfig
+# Arguments wxgtk, wxgtk2, or wxgtk2u
+
+ECLASS=wxwidgets
+INHERITED="$INHERITED $ECLASS"
+
+need-wxwidgets() {
+
+ debug-print-function $FUNCNAME $*
+
+ case $1 in
+ gtk) set-wxconfig wxgtk;;
+ gtk2) set-wxconfig wxgtk2;;
+ unicode) set-wxconfig wxgtk2u;;
+ *) echo "!!! $FUNCNAME: Error: unrecognized wxconfig version $1 requested"
+ exit 1;;
+ esac
+
+}
+
+
+set-wxconfig() {
+
+ debug-print-function $FUNCNAME $*
+
+ local wxgtk_ver=`/usr/bin/wx-config --release`
+ local wxconfig="/usr/bin/${1}-${wxgtk_ver}-config"
+ local wxconfig_debug="/usr/bin/${1}d-${wxgtk_ver}-config"
+
+ if [ -e ${wxconfig} ] ; then
+ export WX_CONFIG=${wxconfig}
+ echo " * Using ${wxconfig}"
+ elif [ -e ${wxconfig_debug} ] ; then
+ export WX_CONFIG=${wxconfig_debug}
+ echo " * Using ${wxconfig_debug}"
+ else
+ echo "!!! $FUNCNAME: Error: Can't find normal or debug version:"
+ echo "!!! $FUNCNAME: !!! ${wxconfig} not found"
+ echo "!!! $FUNCNAME: !!! ${wxconfig_debug} not found"
+ exit 1
+ fi
+}
+
+