1 |
Signed-off-by: David Seifert <soap@g.o> |
2 |
--- |
3 |
eclass/wxwidgets.eclass | 56 +++++++++-------------------------------- |
4 |
1 file changed, 12 insertions(+), 44 deletions(-) |
5 |
|
6 |
diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass |
7 |
index 019bc75ee79..5e9d569a16a 100644 |
8 |
--- a/eclass/wxwidgets.eclass |
9 |
+++ b/eclass/wxwidgets.eclass |
10 |
@@ -4,14 +4,14 @@ |
11 |
# @ECLASS: wxwidgets.eclass |
12 |
# @MAINTAINER: |
13 |
# wxwidgets@g.o |
14 |
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 |
15 |
+# @SUPPORTED_EAPIS: 7 |
16 |
# @BLURB: Manages build configuration for wxGTK-using packages. |
17 |
# @DESCRIPTION: |
18 |
# This eclass sets up the proper environment for ebuilds using the wxGTK |
19 |
# libraries. Ebuilds using wxPython do not need to inherit this eclass. |
20 |
# |
21 |
# More specifically, this eclass controls the configuration chosen by the |
22 |
-# /usr/bin/wx-config wrapper. |
23 |
+# ${ESYSROOT}/usr/bin/wx-config wrapper. |
24 |
# |
25 |
# Using the eclass is simple: |
26 |
# |
27 |
@@ -21,6 +21,12 @@ |
28 |
# The configuration chosen is based on the version required and the flags |
29 |
# wxGTK was built with. |
30 |
|
31 |
+case ${EAPI:-0} in |
32 |
+ [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; |
33 |
+ 7) ;; |
34 |
+ *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; |
35 |
+esac |
36 |
+ |
37 |
if [[ -z ${_WXWIDGETS_ECLASS} ]]; then |
38 |
_WXWIDGETS_ECLASS=1 |
39 |
|
40 |
@@ -39,44 +45,6 @@ readonly WX_GTK_VER |
41 |
|
42 |
inherit flag-o-matic |
43 |
|
44 |
-case ${EAPI:-0} in |
45 |
- 0|1|2|3|4|5) |
46 |
- inherit eutils multilib |
47 |
- |
48 |
- # This was used to set up a sane default for ebuilds so they could |
49 |
- # avoid calling need-wxwidgets if they didn't need a particular build. |
50 |
- # This was a bad idea for a couple different reasons, and because |
51 |
- # get_libdir() is now illegal in global scope in EAPI 6 we can't do it |
52 |
- # anymore. All ebuilds must now use setup-wxwidgets and this code is |
53 |
- # only here for backwards compatability. |
54 |
- if [[ -z ${WX_CONFIG} ]]; then |
55 |
- if [[ -n ${WX_GTK_VER} ]]; then |
56 |
- for _wxtoolkit in mac gtk2 base; do |
57 |
- # newer versions don't have a seperate debug config |
58 |
- for _wxdebug in xxx release- debug-; do |
59 |
- _wxconf="${_wxtoolkit}-unicode-${_wxdebug/xxx/}${WX_GTK_VER}" |
60 |
- |
61 |
- [[ -f ${EPREFIX}/usr/$(get_libdir)/wx/config/${_wxconf} ]] \ |
62 |
- || continue |
63 |
- |
64 |
- WX_CONFIG="${EPREFIX}/usr/$(get_libdir)/wx/config/${_wxconf}" |
65 |
- WX_ECLASS_CONFIG="${WX_CONFIG}" |
66 |
- break |
67 |
- done |
68 |
- [[ -n ${WX_CONFIG} ]] && break |
69 |
- done |
70 |
- [[ -n ${WX_CONFIG} ]] && export WX_CONFIG WX_ECLASS_CONFIG |
71 |
- fi |
72 |
- fi |
73 |
- unset _wxtoolkit |
74 |
- unset _wxdebug |
75 |
- unset _wxconf |
76 |
- ;; |
77 |
- 6) inherit multilib ;; # compatibility only, not needed by eclass |
78 |
- 7) ;; |
79 |
- *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;; |
80 |
-esac |
81 |
- |
82 |
# @FUNCTION: setup-wxwidgets |
83 |
# @DESCRIPTION: |
84 |
# Call this in your ebuild to set up the environment for wxGTK in src_configure. |
85 |
@@ -104,18 +72,18 @@ setup-wxwidgets() { |
86 |
fi |
87 |
|
88 |
# toolkit overrides |
89 |
- if has_version "x11-libs/wxGTK:${WX_GTK_VER}[aqua]"; then |
90 |
+ if has_version -d "x11-libs/wxGTK:${WX_GTK_VER}[aqua]"; then |
91 |
wxtoolkit="mac" |
92 |
- elif ! has_version "x11-libs/wxGTK:${WX_GTK_VER}[X]"; then |
93 |
+ elif ! has_version -d "x11-libs/wxGTK:${WX_GTK_VER}[X]"; then |
94 |
wxtoolkit="base" |
95 |
fi |
96 |
|
97 |
wxconf="${wxtoolkit}-unicode-${WX_GTK_VER}" |
98 |
for w in "${CHOST:-${CBUILD}}-${wxconf}" "${wxconf}"; do |
99 |
- [[ -f ${ESYSROOT:-${EPREFIX}}/usr/$(get_libdir)/wx/config/${w} ]] && wxconf=${w} && break |
100 |
+ [[ -f ${ESYSROOT}/usr/$(get_libdir)/wx/config/${w} ]] && wxconf=${w} && break |
101 |
done || die "Failed to find configuration ${wxconf}" |
102 |
|
103 |
- export WX_CONFIG="${ESYSROOT:-${EPREFIX}}/usr/$(get_libdir)/wx/config/${wxconf}" |
104 |
+ export WX_CONFIG="${ESYSROOT}/usr/$(get_libdir)/wx/config/${wxconf}" |
105 |
export WX_ECLASS_CONFIG="${WX_CONFIG}" |
106 |
|
107 |
einfo |
108 |
-- |
109 |
2.31.1 |