summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-04-08 16:25:28 -0400
committerMike Gilbert <floppym@gentoo.org>2020-04-12 11:20:11 -0400
commitf59fbba8c6617ec772a1803618695417f6d762ce (patch)
tree30b6ecc578d94d0855cef41a704473564d8bd9a6 /eclass
parentsys-devel/kgcc63: drop nonexistent blockers (diff)
downloadgentoo-f59fbba8c6617ec772a1803618695417f6d762ce.tar.gz
gentoo-f59fbba8c6617ec772a1803618695417f6d762ce.tar.bz2
gentoo-f59fbba8c6617ec772a1803618695417f6d762ce.zip
meson.eclass: clean up meson_src_configure
This mainly rearranges some code to make it easier to read. Also changes the bare 'meson' call to 'meson setup'. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/meson.eclass30
1 files changed, 20 insertions, 10 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 16e17dd4a384..3e3a2e2f7a2e 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -219,32 +219,42 @@ meson_feature() {
meson_src_configure() {
debug-print-function ${FUNCNAME} "$@"
- # Common args
local mesonargs=(
+ meson setup
--buildtype plain
--libdir "$(get_libdir)"
--localstatedir "${EPREFIX}/var/lib"
--prefix "${EPREFIX}/usr"
--sysconfdir "${EPREFIX}/etc"
--wrap-mode nodownload
- )
+ )
if tc-is-cross-compiler || [[ ${ABI} != ${DEFAULT_ABI-${ABI}} ]]; then
_meson_create_cross_file || die "unable to write meson cross file"
mesonargs+=( --cross-file "${T}/meson.${CHOST}.${ABI}" )
fi
+ BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
+
+ mesonargs+=(
+ # Arguments from ebuild
+ "${emesonargs[@]}"
+
+ # Arguments passed to this function
+ "$@"
+
+ # Source directory
+ "${EMESON_SOURCE:-${S}}"
+
+ # Build directory
+ "${BUILD_DIR}"
+ )
+
# https://bugs.gentoo.org/625396
python_export_utf8_locale
- # Append additional arguments from ebuild
- mesonargs+=("${emesonargs[@]}")
-
- BUILD_DIR="${BUILD_DIR:-${WORKDIR}/${P}-build}"
- set -- meson "${mesonargs[@]}" "$@" \
- "${EMESON_SOURCE:-${S}}" "${BUILD_DIR}"
- echo "$@"
- tc-env_build "$@" || die
+ echo "${mesonargs[@]}" >&2
+ tc-env_build "${mesonargs[@]}" || die
}
# @FUNCTION: meson_src_compile