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