1 |
commit: 436f24daa8a32cd36b7f78a3a203fdfb963e6157 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 3 21:10:34 2020 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 3 21:10:34 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=436f24da |
7 |
|
8 |
meson.eclass: export FLAGS for older versions on meson |
9 |
|
10 |
Closes: https://bugs.gentoo.org/720860 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
eclass/meson.eclass | 15 +++++++++++++++ |
14 |
1 file changed, 15 insertions(+) |
15 |
|
16 |
diff --git a/eclass/meson.eclass b/eclass/meson.eclass |
17 |
index 0dfdcdd03d6..393286cbe5e 100644 |
18 |
--- a/eclass/meson.eclass |
19 |
+++ b/eclass/meson.eclass |
20 |
@@ -43,6 +43,10 @@ if [[ -z ${_MESON_ECLASS} ]]; then |
21 |
|
22 |
inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs |
23 |
|
24 |
+if [[ ${EAPI} == 6 ]]; then |
25 |
+ inherit eapi7-ver |
26 |
+fi |
27 |
+ |
28 |
fi |
29 |
|
30 |
EXPORT_FUNCTIONS src_configure src_compile src_test src_install |
31 |
@@ -365,6 +369,17 @@ meson_src_configure() { |
32 |
# https://bugs.gentoo.org/720818 |
33 |
export -n {C,CPP,CXX,F,FC,OBJC,OBJCXX,LD}FLAGS PKG_CONFIG_{LIBDIR,PATH} |
34 |
|
35 |
+ # https://bugs.gentoo.org/720860 |
36 |
+ if ver_test "$(meson --version)" -lt "0.54"; then |
37 |
+ local -x CFLAGS=${BUILD_CFLAGS} |
38 |
+ local -x CPPFLAGS=${BUILD_CPPFLAGS} |
39 |
+ local -x CXXFLAGS=${BUILD_CXXFLAGS} |
40 |
+ local -x FFLAGS=${BUILD_FCFLAGS} |
41 |
+ local -x OBJCFLAGS=${BUILD_OBJCFLAGS} |
42 |
+ local -x OBJCXXFLAGS=${BUILD_OBJCXXFLAGS} |
43 |
+ local -x LDFLAGS=${BUILD_LDFLAGS} |
44 |
+ fi |
45 |
+ |
46 |
echo "${mesonargs[@]}" >&2 |
47 |
"${mesonargs[@]}" || die |
48 |
} |