1 |
This mainly rearranges some code to make it easier to read. |
2 |
Also changes the bare 'meson' call to 'meson setup'. |
3 |
|
4 |
Signed-off-by: Mike Gilbert <floppym@g.o> |
5 |
--- |
6 |
eclass/meson.eclass | 30 ++++++++++++++++++++---------- |
7 |
1 file changed, 20 insertions(+), 10 deletions(-) |
8 |
|
9 |
diff --git a/eclass/meson.eclass b/eclass/meson.eclass |
10 |
index 16e17dd4a384..3e3a2e2f7a2e 100644 |
11 |
--- a/eclass/meson.eclass |
12 |
+++ b/eclass/meson.eclass |
13 |
@@ -219,32 +219,42 @@ meson_feature() { |
14 |
meson_src_configure() { |
15 |
debug-print-function ${FUNCNAME} "$@" |
16 |
|
17 |
- # Common args |
18 |
local mesonargs=( |
19 |
+ meson setup |
20 |
--buildtype plain |
21 |
--libdir "$(get_libdir)" |
22 |
--localstatedir "${EPREFIX}/var/lib" |
23 |
--prefix "${EPREFIX}/usr" |
24 |
--sysconfdir "${EPREFIX}/etc" |
25 |
--wrap-mode nodownload |
26 |
- ) |
27 |
+ ) |
28 |
|
29 |
if tc-is-cross-compiler || [[ ${ABI} != ${DEFAULT_ABI-${ABI}} ]]; then |
30 |
_meson_create_cross_file || die "unable to write meson cross file" |
31 |
mesonargs+=( --cross-file "${T}/meson.${CHOST}.${ABI}" ) |
32 |
fi |
33 |
|
34 |
+ BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}" |
35 |
+ |
36 |
+ mesonargs+=( |
37 |
+ # Arguments from ebuild |
38 |
+ "${emesonargs[@]}" |
39 |
+ |
40 |
+ # Arguments passed to this function |
41 |
+ "$@" |
42 |
+ |
43 |
+ # Source directory |
44 |
+ "${EMESON_SOURCE:-${S}}" |
45 |
+ |
46 |
+ # Build directory |
47 |
+ "${BUILD_DIR}" |
48 |
+ ) |
49 |
+ |
50 |
# https://bugs.gentoo.org/625396 |
51 |
python_export_utf8_locale |
52 |
|
53 |
- # Append additional arguments from ebuild |
54 |
- mesonargs+=("${emesonargs[@]}") |
55 |
- |
56 |
- BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}" |
57 |
- set -- meson "${mesonargs[@]}" "$@" \ |
58 |
- "${EMESON_SOURCE:-${S}}" "${BUILD_DIR}" |
59 |
- echo "$@" |
60 |
- tc-env_build "$@" || die |
61 |
+ echo "${mesonargs[@]}" >&2 |
62 |
+ tc-env_build "${mesonargs[@]}" || die |
63 |
} |
64 |
|
65 |
# @FUNCTION: meson_src_compile |
66 |
-- |
67 |
2.26.0 |