/[gentoo-x86]/eclass/wxwidgets.eclass
Gentoo

Contents of /eclass/wxwidgets.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Thu Aug 5 16:28:11 2004 UTC (10 years, 1 month ago) by pythonhead
Branch: MAIN
New eclass for wxGTK based packages

1 pythonhead 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: Exp $
4     #
5     # Author Rob Cakebread <pythonhead@gentoo.org>
6    
7     # This eclass helps you find the correct wx-config script so ebuilds
8     # can use gtk, gtk2 or gtk2+unicode versions of wxGTK
9    
10     #FUNCTIONS:
11     # need-wxwidgets:
12     # Arguments: gtk, gtk2 or unicode
13     #
14     # set-wxconfig
15     # Arguments wxgtk, wxgtk2, or wxgtk2u
16    
17     ECLASS=wxwidgets
18     INHERITED="$INHERITED $ECLASS"
19    
20     need-wxwidgets() {
21    
22     debug-print-function $FUNCNAME $*
23    
24     case $1 in
25     gtk) set-wxconfig wxgtk;;
26     gtk2) set-wxconfig wxgtk2;;
27     unicode) set-wxconfig wxgtk2u;;
28     *) echo "!!! $FUNCNAME: Error: unrecognized wxconfig version $1 requested"
29     exit 1;;
30     esac
31    
32     }
33    
34    
35     set-wxconfig() {
36    
37     debug-print-function $FUNCNAME $*
38    
39     local wxgtk_ver=`/usr/bin/wx-config --release`
40     local wxconfig="/usr/bin/${1}-${wxgtk_ver}-config"
41     local wxconfig_debug="/usr/bin/${1}d-${wxgtk_ver}-config"
42    
43     if [ -e ${wxconfig} ] ; then
44     export WX_CONFIG=${wxconfig}
45     echo " * Using ${wxconfig}"
46     elif [ -e ${wxconfig_debug} ] ; then
47     export WX_CONFIG=${wxconfig_debug}
48     echo " * Using ${wxconfig_debug}"
49     else
50     echo "!!! $FUNCNAME: Error: Can't find normal or debug version:"
51     echo "!!! $FUNCNAME: !!! ${wxconfig} not found"
52     echo "!!! $FUNCNAME: !!! ${wxconfig_debug} not found"
53     exit 1
54     fi
55     }

  ViewVC Help
Powered by ViewVC 1.1.20