commit: f59fbba8c6617ec772a1803618695417f6d762ce Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Wed Apr 8 20:25:28 2020 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Sun Apr 12 15:20:11 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f59fbba8
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 <AT> gentoo.org> eclass/meson.eclass | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 16e17dd4a38..3e3a2e2f7a2 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