summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-05-03 17:10:34 -0400
committerMike Gilbert <floppym@gentoo.org>2020-05-03 17:10:34 -0400
commit436f24daa8a32cd36b7f78a3a203fdfb963e6157 (patch)
tree1c7d7a3e982877668b6f3c729da596d20e3d1625 /eclass/meson.eclass
parentapp-admin/helm: 3.2.0 bump (diff)
downloadgentoo-436f24daa8a32cd36b7f78a3a203fdfb963e6157.tar.gz
gentoo-436f24daa8a32cd36b7f78a3a203fdfb963e6157.tar.bz2
gentoo-436f24daa8a32cd36b7f78a3a203fdfb963e6157.zip
meson.eclass: export FLAGS for older versions on meson
Closes: https://bugs.gentoo.org/720860 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass/meson.eclass')
-rw-r--r--eclass/meson.eclass15
1 files changed, 15 insertions, 0 deletions
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
}