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

Contents of /eclass/wxwidgets.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Aug 7 03:40:19 2004 UTC (10 years, 3 months ago) by pythonhead
Branch: MAIN
Changes since 1.1: +10 -2 lines
Claified error messages

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 case $1 in
54 wxgtk) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
55 wxgtkd) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
56 wxgtk2) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
57 wxgtk2d) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
58 wxgtk2u) echo "!!! You need to emerge wxGTK with unicode in your USE";;
59 wxgtk2ud) echo "!!! You need to emerge wxGTK with unicode in your USE";;
60 esac
61 exit 1
62 fi
63 }

  ViewVC Help
Powered by ViewVC 1.1.20