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

Contents of /eclass/wxwidgets.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sat Nov 13 02:50:53 2004 UTC (9 years, 10 months ago) by pythonhead
Branch: MAIN
Changes since 1.3: +52 -22 lines
Updated to work with wxGTK 2.5.3

1 pythonhead 1.1 # Copyright 1999-2004 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 pythonhead 1.4 # $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.3 2004/08/16 16:42:40 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 pythonhead 1.4 # FUNCTIONS:
11 pythonhead 1.1 # need-wxwidgets:
12     # Arguments: gtk, gtk2 or unicode
13     #
14 pythonhead 1.4 #
15 pythonhead 1.1 # set-wxconfig
16 pythonhead 1.4 # Arguments: (wxGTK 2.4) wxgtk, wxgtk2, or wxgtk2u
17     # Arguments: (wxGTK 2.5 and 2.6) gtk, gtk2, or unicode
18     # Note: Don't call this function directly from ebuilds
19 pythonhead 1.1
20     ECLASS=wxwidgets
21     INHERITED="$INHERITED $ECLASS"
22    
23     need-wxwidgets() {
24     debug-print-function $FUNCNAME $*
25 pythonhead 1.4 #If you want to use wxGTK-2.5* export WX_GTK_VER in your ebuild:
26     if [ "${WX_GTK_VER}" = "2.5" ]; then
27     case $1 in
28     gtk) set-wxconfig gtk-ansi;;
29     gtk2) set-wxconfig gtk2-ansi;;
30     unicode) set-wxconfig gtk2-unicode;;
31     *) echo "!!! $FUNCNAME: Error: unrecognized wxconfig version $1 requested"
32     exit 1;;
33     esac
34 pythonhead 1.1
35 pythonhead 1.4 else
36     WX_GTK_VER="2.4"
37     case $1 in
38     gtk) set-wxconfig wxgtk;;
39     gtk2) set-wxconfig wxgtk2;;
40     unicode) set-wxconfig wxgtk2u;;
41     *) echo "!!! $FUNCNAME: Error: unrecognized wxconfig version $1 requested"
42     exit 1;;
43     esac
44     fi
45 pythonhead 1.1 }
46    
47    
48     set-wxconfig() {
49    
50     debug-print-function $FUNCNAME $*
51    
52 pythonhead 1.4 if [ "${WX_GTK_VER}" = "2.5" ] ; then
53     wxconfig_prefix="/usr/lib/wx/config"
54     wxconfig_name="${1}-release-${WX_GTK_VER}"
55     wxconfig="${wxconfig_prefix}/${wxconfig_name}"
56     wxconfig_debug_name="${1}d-release-${WX_GTK_VER}"
57     wxconfig_debug="${wxconfig_prefix}/${wxconfig_debug_name}"
58     else
59     # Default is 2.4:
60     wxconfig_prefix="/usr/bin"
61     wxconfig_name="${1}-${WX_GTK_VER}-config"
62     wxconfig="${wxconfig_prefix}/${wxconfig_name}"
63     wxconfig_debug_name="${1}d-${WX_GTK_VER}-config"
64     wxconfig_debug="${wxconfig_prefix}/${wxconfig_debug_name}"
65     fi
66 pythonhead 1.1
67     if [ -e ${wxconfig} ] ; then
68     export WX_CONFIG=${wxconfig}
69 pythonhead 1.4 export WX_CONFIG_NAME=${wxconfig_name}
70     export WXBASE_CONFIG_NAME=${wxconfig_name}
71 pythonhead 1.1 echo " * Using ${wxconfig}"
72     elif [ -e ${wxconfig_debug} ] ; then
73     export WX_CONFIG=${wxconfig_debug}
74 pythonhead 1.4 export WX_CONFIG_NAME=${wxconfig_debug_name}
75     export WXBASE_CONFIG_NAME=${wxconfig_debug_name}
76 pythonhead 1.1 echo " * Using ${wxconfig_debug}"
77     else
78     echo "!!! $FUNCNAME: Error: Can't find normal or debug version:"
79 pythonhead 1.2 echo "!!! $FUNCNAME: ${wxconfig} not found"
80     echo "!!! $FUNCNAME: ${wxconfig_debug} not found"
81     case $1 in
82     wxgtk) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
83     wxgtkd) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
84 pythonhead 1.4 gtk-ansi) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
85     gtkd-ansi) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";;
86    
87 pythonhead 1.2 wxgtk2) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
88     wxgtk2d) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
89 pythonhead 1.4 gtk2-ansi) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
90     gtk2d-ansi) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
91    
92     wxgtk2u) echo "!!! You need to emerge wxGTK with unicode in your USE";;
93 pythonhead 1.2 wxgtk2ud) echo "!!! You need to emerge wxGTK with unicode in your USE";;
94 pythonhead 1.4 gtk2-unicode) echo "!!! You need to emerge wxGTK with unicode in your USE";;
95     gtk2d-unicode) echo "!!! You need to emerge wxGTK with unicode in your USE";;
96 pythonhead 1.2 esac
97 pythonhead 1.1 exit 1
98     fi
99     }

  ViewVC Help
Powered by ViewVC 1.1.20