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

Diff of /eclass/wxwidgets.eclass

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

Revision 1.7 Revision 1.15
1# Copyright 1999-2005 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.7 2005/05/02 16:43:58 pythonhead Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/wxwidgets.eclass,v 1.15 2006/03/18 16:43:20 flameeyes 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: 12# Arguments:
13# 2.4: gtk gtk2 unicode 13# 2.4: gtk gtk2 unicode
14# 2.6: gtk gtk2 gtk2-unicode base base-unicode mac mac-unicode 14# 2.6: gtk gtk2 unicode base base-unicode mac mac-unicode
15# 15#
16# 16#
17# set-wxconfig 17# set-wxconfig
18# Arguments: (wxGTK 2.4) wxgtk, wxgtk2, or wxgtk2u 18# Arguments: (wxGTK 2.4) wxgtk, wxgtk2, or wxgtk2u
19# Arguments: (wxGTK 2.6) gtk-ansi gtk2-ansi gtk2-unicode base-ansi base-unicode mac-ansi mac-unicode 19# Arguments: (wxGTK 2.6) gtk-ansi gtk2-ansi unicode base-ansi base-unicode mac-ansi mac-unicode
20# Note: Don't call this function directly from ebuilds 20# Note: Don't call this function directly from ebuilds
21 21
22ECLASS=wxwidgets 22inherit multilib flag-o-matic
23INHERITED="$INHERITED $ECLASS"
24 23
25need-wxwidgets() { 24need-wxwidgets() {
26 debug-print-function $FUNCNAME $* 25 debug-print-function $FUNCNAME $*
27 #If you want to use wxGTK-2.6* export WX_GTK_VER in your ebuild: 26 #If you want to use wxGTK-2.6* export WX_GTK_VER in your ebuild:
28 if [ "${WX_GTK_VER}" = "2.6" ]; then 27 if [ "${WX_GTK_VER}" = "2.6" ]; then
29 case $1 in 28 case $1 in
30 gtk) set-wxconfig gtk-ansi;; 29 gtk) set-wxconfig gtk-ansi;;
31 gtk2) set-wxconfig gtk2-ansi;; 30 gtk2) set-wxconfig gtk2-ansi;;
32 gtk2-unicode) set-wxconfig gtk2-unicode;; 31 unicode) set-wxconfig gtk2-unicode;;
33 base) set-wxconfig base-ansi;; 32 base) set-wxconfig base-ansi;;
34 base-unicode) set-wxconfig base-unicode;; 33 base-unicode) set-wxconfig base-unicode;;
35 mac) set-wxconfig mac-ansi;; 34 mac) set-wxconfig mac-ansi;;
36 mac-unicode) set-wxconfig mac-unicode;; 35 mac-unicode) set-wxconfig mac-unicode;;
37 *) echo "!!! $FUNCNAME: Error: wxGTK was not comipled with $1." 36 *) echo "!!! $FUNCNAME: Error: wxGTK was not comipled with $1."
43 WX_GTK_VER="2.4" 42 WX_GTK_VER="2.4"
44 case $1 in 43 case $1 in
45 gtk) set-wxconfig wxgtk;; 44 gtk) set-wxconfig wxgtk;;
46 gtk2) set-wxconfig wxgtk2;; 45 gtk2) set-wxconfig wxgtk2;;
47 unicode) set-wxconfig wxgtk2u;; 46 unicode) set-wxconfig wxgtk2u;;
48 *) echo "!!! $FUNCNAME: Error: wxGTK was not comipled with $1." 47 *) echo "!!! $FUNCNAME: Error: wxGTK was not compiled with $1."
49 echo "!!! Adjust your USE flags or re-emerge wxGTK with version you want." 48 echo "!!! Adjust your USE flags or re-emerge wxGTK with the version you want."
50 exit 1;; 49 exit 1;;
51 esac 50 esac
52 fi 51 fi
52
53 filter-ldflags -Wl,--as-needed --as-needed
54 filter-flags -Wl,--as-needed --as-needed
53} 55}
54 56
55 57
56set-wxconfig() { 58set-wxconfig() {
57 59
58 debug-print-function $FUNCNAME $* 60 debug-print-function $FUNCNAME $*
59 61
60 if [ "${WX_GTK_VER}" = "2.6" ] ; then 62 if [ "${WX_GTK_VER}" = "2.6" ] ; then
61 wxconfig_prefix="/usr/lib/wx/config" 63 wxconfig_prefix="/usr/$(get_libdir)/wx/config"
62 wxconfig_name="${1}-release-${WX_GTK_VER}" 64 wxconfig_name="${1}-release-${WX_GTK_VER}"
63 wxconfig="${wxconfig_prefix}/${wxconfig_name}" 65 wxconfig="${wxconfig_prefix}/${wxconfig_name}"
64 wxconfig_debug_name="${1}-debug-${WX_GTK_VER}" 66 wxconfig_debug_name="${1}-debug-${WX_GTK_VER}"
65 wxconfig_debug="${wxconfig_prefix}/${wxconfig_debug_name}" 67 wxconfig_debug="${wxconfig_prefix}/${wxconfig_debug_name}"
66 else 68 else

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20