From d0562177a506a22f4e3ba7bb293cdb6cea547fdd Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sun, 9 Sep 2018 20:25:54 -0300 Subject: [PATCH] build-style/meson: define PKG_CONFIG for host usage. PKG_CONFIG environment variable should point to the pkg-config executable to be used to fetch dependencies that use 'native: true' (indicate to build against host libraries not cross-compiled ones) To meet those requirements we set an absolute path to the host pkg-config since the relative path to pkg-config is taken by the wrapper. This currently requires a patch that is a milestone of meson-0.48 that was generated by the issue: https://github.com/mesonbuild/meson/issues/1736 --- common/build-style/meson.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index c83b5c17f72..31231fa469a 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -65,6 +65,12 @@ EOF # are set to (C|CXX)FLAGS_host export CFLAGS=${CFLAGS_host} CXXFLAGS=${CXXFLAGS_host} + # Meson tries to use our wrapped cross-only pkg-config to find + # libraries even when 'native: true' (build against the host platform) + # is set, so set the PKG_CONFIG variable to tell Meson which pkg-config + # it should use when searching for stuff in the build machine + export PKG_CONFIG="/usr/bin/pkg-config" + unset _MESON_CPU_FAMILY _MESON_TARGET_CPU _MESON_TARGET_ENDIAN fi