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

Diff of /eclass/wxwidgets.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.5 Revision 1.9
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.5 2005/01/11 00:02:00 pythonhead Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.9 2005/05/11 23:45:18 pythonhead Exp $
4# 4#
5# Author Rob Cakebread <pythonhead@gentoo.org> 5# Author Rob Cakebread <pythonhead@gentoo.org>
6 6
7# This eclass helps you find the correct wx-config script so ebuilds 7# This eclass helps you find the correct wx-config script so ebuilds
8# can use gtk, gtk2 or gtk2+unicode versions of wxGTK 8# can use gtk, gtk2 or gtk2+unicode versions of wxGTK
9 9
10# FUNCTIONS: 10# FUNCTIONS:
11# need-wxwidgets: 11# need-wxwidgets:
12# Arguments: gtk, gtk2 or unicode 12# Arguments:
13# 2.4: gtk gtk2 unicode
14# 2.6: gtk gtk2 unicode base base-unicode mac mac-unicode
13# 15#
14# 16#
15# set-wxconfig 17# set-wxconfig
16# Arguments: (wxGTK 2.4) wxgtk, wxgtk2, or wxgtk2u 18# Arguments: (wxGTK 2.4) wxgtk, wxgtk2, or wxgtk2u
17# Arguments: (wxGTK 2.5 and 2.6) gtk, gtk2, or unicode 19# Arguments: (wxGTK 2.6) gtk-ansi gtk2-ansi unicode base-ansi base-unicode mac-ansi mac-unicode
18# Note: Don't call this function directly from ebuilds 20# Note: Don't call this function directly from ebuilds
19 21
20ECLASS=wxwidgets 22ECLASS=wxwidgets
21INHERITED="$INHERITED $ECLASS" 23INHERITED="$INHERITED $ECLASS"
22 24
23need-wxwidgets() { 25need-wxwidgets() {
24 debug-print-function $FUNCNAME $* 26 debug-print-function $FUNCNAME $*
25 #If you want to use wxGTK-2.5* export WX_GTK_VER in your ebuild: 27 #If you want to use wxGTK-2.6* export WX_GTK_VER in your ebuild:
26 if [ "${WX_GTK_VER}" = "2.5" ]; then 28 if [ "${WX_GTK_VER}" = "2.6" ]; then
27 case $1 in 29 case $1 in
28 gtk) set-wxconfig gtk-ansi;; 30 gtk) set-wxconfig gtk-ansi;;
29 gtk2) set-wxconfig gtk2-ansi;; 31 gtk2) set-wxconfig gtk2-ansi;;
30 unicode) set-wxconfig gtk2-unicode;; 32 unicode) set-wxconfig gtk2-unicode;;
31 *) echo "!!! $FUNCNAME: Error: unrecognized wxconfig version $1 requested" 33 base) set-wxconfig base-ansi;;
34 base-unicode) set-wxconfig base-unicode;;
35 mac) set-wxconfig mac-ansi;;
36 mac-unicode) set-wxconfig mac-unicode;;
37 *) echo "!!! $FUNCNAME: Error: wxGTK was not comipled with $1."
38 echo "!!! Adjust your USE flags or re-emerge wxGTK with version you want."
32 exit 1;; 39 exit 1;;
33 esac 40 esac
34 41
35 else 42 else
36 WX_GTK_VER="2.4" 43 WX_GTK_VER="2.4"
37 case $1 in 44 case $1 in
38 gtk) set-wxconfig wxgtk;; 45 gtk) set-wxconfig wxgtk;;
39 gtk2) set-wxconfig wxgtk2;; 46 gtk2) set-wxconfig wxgtk2;;
40 unicode) set-wxconfig wxgtk2u;; 47 unicode) set-wxconfig wxgtk2u;;
41 *) echo "!!! $FUNCNAME: Error: unrecognized wxconfig version $1 requested" 48 *) echo "!!! $FUNCNAME: Error: wxGTK was not comipled with $1."
49 echo "!!! Adjust your USE flags or re-emerge wxGTK with version you want."
42 exit 1;; 50 exit 1;;
43 esac 51 esac
44 fi 52 fi
45} 53}
46 54
47 55
48set-wxconfig() { 56set-wxconfig() {
49 57
50 debug-print-function $FUNCNAME $* 58 debug-print-function $FUNCNAME $*
51 59
52 if [ "${WX_GTK_VER}" = "2.5" ] ; then 60 if [ "${WX_GTK_VER}" = "2.6" ] ; then
53 wxconfig_prefix="/usr/lib/wx/config" 61 wxconfig_prefix="/usr/lib/wx/config"
54 wxconfig_name="${1}-release-${WX_GTK_VER}" 62 wxconfig_name="${1}-release-${WX_GTK_VER}"
55 wxconfig="${wxconfig_prefix}/${wxconfig_name}" 63 wxconfig="${wxconfig_prefix}/${wxconfig_name}"
56 wxconfig_debug_name="${1}-debug-${WX_GTK_VER}" 64 wxconfig_debug_name="${1}-debug-${WX_GTK_VER}"
57 wxconfig_debug="${wxconfig_prefix}/${wxconfig_debug_name}" 65 wxconfig_debug="${wxconfig_prefix}/${wxconfig_debug_name}"
77 else 85 else
78 echo "!!! $FUNCNAME: Error: Can't find normal or debug version:" 86 echo "!!! $FUNCNAME: Error: Can't find normal or debug version:"
79 echo "!!! $FUNCNAME: ${wxconfig} not found" 87 echo "!!! $FUNCNAME: ${wxconfig} not found"
80 echo "!!! $FUNCNAME: ${wxconfig_debug} not found" 88 echo "!!! $FUNCNAME: ${wxconfig_debug} not found"
81 case $1 in 89 case $1 in
82 wxgtk) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";; 90 wxgtk) echo "!!! You need to emerge wxGTK with wxgtk1 in your USE";;
83 wxgtkd) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";; 91 wxgtkd) echo "!!! You need to emerge wxGTK with wxgtk1 in your USE";;
84 gtk-ansi) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";; 92 gtk-ansi) echo "!!! You need to emerge wxGTK with wxgtk1 in your USE";;
85 gtkd-ansi) echo "!!! You need to emerge wxGTK with -no_wxgtk1 in your USE";; 93 gtkd-ansi) echo "!!! You need to emerge wxGTK with wxgtk1 in your USE";;
86 94
87 wxgtk2) echo "!!! You need to emerge wxGTK with gtk2 in your USE";; 95 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";; 96 wxgtk2d) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;
89 gtk2-ansi) echo "!!! You need to emerge wxGTK with gtk2 in your USE";; 97 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";; 98 gtk2d-ansi) echo "!!! You need to emerge wxGTK with gtk2 in your USE";;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20