diff options
author | Repository mirror & CI <repomirrorci@gentoo.org> | 2021-10-24 16:36:44 +0000 |
---|---|---|
committer | Repository mirror & CI <repomirrorci@gentoo.org> | 2021-10-24 16:36:44 +0000 |
commit | 2799b4948c3620b8d098833d9377794a847871d3 (patch) | |
tree | 96cb7ec8f7e3b611cbcbba394fc0a12e115837ef | |
parent | Merge updates from master (diff) | |
parent | meson.eclass: add EMESON_BUILDTYPE variable (diff) | |
download | gentoo-2799b4948c3620b8d098833d9377794a847871d3.tar.gz gentoo-2799b4948c3620b8d098833d9377794a847871d3.tar.bz2 gentoo-2799b4948c3620b8d098833d9377794a847871d3.zip |
Merge updates from master
-rw-r--r-- | eclass/meson.eclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 4ba364924e40..5fab2f8df6be 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -64,6 +64,11 @@ fi # Build directory, location where all generated files should be placed. # If this isn't set, it defaults to ${WORKDIR}/${P}-build. +# @ECLASS-VARIABLE: EMESON_BUILDTYPE +# @DESCRIPTION: +# The buildtype value to pass to meson setup. +: ${EMESON_BUILDTYPE=plain} + # @ECLASS-VARIABLE: EMESON_SOURCE # @DEFAULT_UNSET # @DESCRIPTION: @@ -310,7 +315,6 @@ meson_src_configure() { local mesonargs=( meson setup - --buildtype plain --libdir "$(get_libdir)" --localstatedir "${EPREFIX}/var/lib" --prefix "${EPREFIX}/usr" @@ -321,6 +325,10 @@ meson_src_configure() { --native-file "$(_meson_create_native_file)" ) + if [[ -n ${EMESON_BUILDTYPE} ]]; then + mesonargs+=( --buildtype "${EMESON_BUILDTYPE}" ) + fi + if tc-is-cross-compiler; then mesonargs+=( --cross-file "$(_meson_create_cross_file)" ) fi |