1 |
Signed-off-by: David Michael <fedora.dm0@×××××.com> |
2 |
--- |
3 |
|
4 |
Hi, |
5 |
|
6 |
This updates meson.eclass to conform to conventions that other eclasses |
7 |
seem to follow. E.g. conditional inherits are first (presumably for |
8 |
function precedence), and defining the inherit guard at the end. It |
9 |
also removes the split inherit guard. The only reason I saw for it is |
10 |
https://bugs.gentoo.org/619178#c4 with no further details. Are there |
11 |
actually any examples of this being a problem? A couple Python eclasses |
12 |
seem to be the only other instances of this. |
13 |
|
14 |
Thanks. |
15 |
|
16 |
David |
17 |
|
18 |
eclass/meson.eclass | 23 ++++++++--------------- |
19 |
1 file changed, 8 insertions(+), 15 deletions(-) |
20 |
|
21 |
diff --git a/eclass/meson.eclass b/eclass/meson.eclass |
22 |
index c9a5e0b5956..583cc30c8c3 100644 |
23 |
--- a/eclass/meson.eclass |
24 |
+++ b/eclass/meson.eclass |
25 |
@@ -5,7 +5,7 @@ |
26 |
# @MAINTAINER: |
27 |
# William Hubbs <williamh@g.o> |
28 |
# Mike Gilbert <floppym@g.o> |
29 |
-# @SUPPORTED_EAPIS: 6 7 |
30 |
+# @SUPPORTED_EAPIS: 6 7 8 |
31 |
# @BLURB: common ebuild functions for meson-based packages |
32 |
# @DESCRIPTION: |
33 |
# This eclass contains the default phase functions for packages which |
34 |
@@ -15,7 +15,7 @@ |
35 |
# Typical ebuild using meson.eclass: |
36 |
# |
37 |
# @CODE |
38 |
-# EAPI=6 |
39 |
+# EAPI=8 |
40 |
# |
41 |
# inherit meson |
42 |
# |
43 |
@@ -23,7 +23,7 @@ |
44 |
# |
45 |
# src_configure() { |
46 |
# local emesonargs=( |
47 |
-# $(meson_use qt4) |
48 |
+# $(meson_use qt5) |
49 |
# $(meson_feature threads) |
50 |
# $(meson_use bindist official_branding) |
51 |
# ) |
52 |
@@ -35,31 +35,23 @@ |
53 |
# @CODE |
54 |
|
55 |
case ${EAPI:-0} in |
56 |
- 6|7) ;; |
57 |
- *) die "EAPI=${EAPI} is not supported" ;; |
58 |
+ 6|7|8) ;; |
59 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
60 |
esac |
61 |
|
62 |
if [[ -z ${_MESON_ECLASS} ]]; then |
63 |
|
64 |
+[[ ${EAPI} == 6 ]] && inherit eapi7-ver |
65 |
inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs |
66 |
|
67 |
-if [[ ${EAPI} == 6 ]]; then |
68 |
- inherit eapi7-ver |
69 |
-fi |
70 |
- |
71 |
-fi |
72 |
- |
73 |
EXPORT_FUNCTIONS src_configure src_compile src_test src_install |
74 |
|
75 |
-if [[ -z ${_MESON_ECLASS} ]]; then |
76 |
-_MESON_ECLASS=1 |
77 |
- |
78 |
MESON_DEPEND=">=dev-util/meson-0.56.0 |
79 |
>=dev-util/ninja-1.8.2 |
80 |
dev-util/meson-format-array |
81 |
" |
82 |
|
83 |
-if [[ ${EAPI:-0} == [6] ]]; then |
84 |
+if [[ ${EAPI} == 6 ]]; then |
85 |
DEPEND=${MESON_DEPEND} |
86 |
else |
87 |
BDEPEND=${MESON_DEPEND} |
88 |
@@ -426,4 +418,5 @@ meson_src_install() { |
89 |
popd > /dev/null || die |
90 |
} |
91 |
|
92 |
+_MESON_ECLASS=1 |
93 |
fi |
94 |
-- |
95 |
2.31.1 |