summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2020-05-03 18:11:54 -0400
committerMike Gilbert <floppym@gentoo.org>2020-05-03 18:17:09 -0400
commitdf84b838697926b5967a25c220d13ef2946cc5d9 (patch)
treecb5664a4dac027cf8b92cc86c7181501623f0a93 /eclass/meson.eclass
parentapp-vim/vimoutliner: keyworded 0.4.0_p20180301-r2 for ia64 (diff)
downloadgentoo-df84b838697926b5967a25c220d13ef2946cc5d9.tar.gz
gentoo-df84b838697926b5967a25c220d13ef2946cc5d9.tar.bz2
gentoo-df84b838697926b5967a25c220d13ef2946cc5d9.zip
meson.eclass: use a subshell to unexport variables temporarily
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass/meson.eclass')
-rw-r--r--eclass/meson.eclass34
1 files changed, 18 insertions, 16 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass
index 393286cbe5ea..5e50dd75705d 100644
--- a/eclass/meson.eclass
+++ b/eclass/meson.eclass
@@ -366,22 +366,24 @@ meson_src_configure() {
# https://bugs.gentoo.org/625396
python_export_utf8_locale
- # 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
+ (
+ # 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}
+ else
+ # https://bugs.gentoo.org/720818
+ export -n {C,CPP,CXX,F,OBJC,OBJCXX,LD}FLAGS PKG_CONFIG_{LIBDIR,PATH}
+ fi
+
+ echo "${mesonargs[@]}" >&2
+ "${mesonargs[@]}"
+ ) || die
}
# @FUNCTION: meson_src_compile