From: Mike Gilbert Date: Sun, 3 May 2020 21:10:34 +0000 (-0400) Subject: meson.eclass: export FLAGS for older versions on meson X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=436f24daa8a32cd36b7f78a3a203fdfb963e6157;p=gentoo.git meson.eclass: export FLAGS for older versions on meson Closes: https://bugs.gentoo.org/720860 Signed-off-by: Mike Gilbert --- diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 0dfdcdd03d6a..393286cbe5ea 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -43,6 +43,10 @@ if [[ -z ${_MESON_ECLASS} ]]; then inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs +if [[ ${EAPI} == 6 ]]; then + inherit eapi7-ver +fi + fi EXPORT_FUNCTIONS src_configure src_compile src_test src_install @@ -365,6 +369,17 @@ meson_src_configure() { # https://bugs.gentoo.org/720818 export -n {C,CPP,CXX,F,FC,OBJC,OBJCXX,LD}FLAGS PKG_CONFIG_{LIBDIR,PATH} + # https://bugs.gentoo.org/720860 + if ver_test "$(meson --version)" -lt "0.54"; then + local -x CFLAGS=${BUILD_CFLAGS} + local -x CPPFLAGS=${BUILD_CPPFLAGS} + local -x CXXFLAGS=${BUILD_CXXFLAGS} + local -x FFLAGS=${BUILD_FCFLAGS} + local -x OBJCFLAGS=${BUILD_OBJCFLAGS} + local -x OBJCXXFLAGS=${BUILD_OBJCXXFLAGS} + local -x LDFLAGS=${BUILD_LDFLAGS} + fi + echo "${mesonargs[@]}" >&2 "${mesonargs[@]}" || die }