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

Contents of /eclass/wxwidgets.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Aug 16 16:42:40 2004 UTC (9 years, 8 months ago) by pythonhead
Branch: MAIN
Changes since 1.2: +6 -1 lines
Updated wxwidgets with new variable WX_CONFIG_NAME

1 pythonhead 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 pythonhead 1.3 # $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.2 2004/08/07 03:40:19 pythonhead Exp $
4 pythonhead 1.1 #
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 pythonhead 1.3 export WX_CONFIG_NAME="${1}-${wxgtk_ver}-config"
46     export WXBASE_CONFIG_NAME="${1}-${wxgtk_ver}-config"
47     echo ${WX_CONFIG_NAME}
48 pythonhead 1.1 echo " * Using ${wxconfig}"
49     elif [ -e ${wxconfig_debug} ] ; then
50     export WX_CONFIG=${wxconfig_debug}
51 pythonhead 1.3 export WX_CONFIG_NAME="${1}d-${wxgtk_ver}-config"
52     export WXBASE_CONFIG_NAME="${1}d-${wxgtk_ver}-config"
53 pythonhead 1.1 echo " * Using ${wxconfig_debug}"
54     else
55     echo "!!! $FUNCNAME: Error: Can't find normal or debug version:"
56 pythonhead 1.2 echo "!!! $FUNCNAME: ${wxconfig} not found"
57     echo "!!! $FUNCNAME: ${wxconfig_debug} not found"
58     case $1 in
59     wxgtk) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
60     wxgtkd) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
61     wxgtk2) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
62     wxgtk2d) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
63     wxgtk2u) echo "!!! You need to emerge wxGTK with unicode in your USE";;
64     wxgtk2ud) echo "!!! You need to emerge wxGTK with unicode in your USE";;
65     esac
66 pythonhead 1.1 exit 1
67     fi
68     }

  ViewVC Help
Powered by ViewVC 1.1.20