meson-0.54.0 introduced a regression in how meson treats the
PKG_CONFIG_PATH variable. Work around this by passing the value to meson
setup on the command line.
Also add sys_root and pkg_config_libdir to cross files per the upstream
documentation.
Bug: https://bugs.gentoo.org/719018
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
objcpp_args = $(_meson_env_array "${OBJCXXFLAGS} ${CPPFLAGS}")
objcpp_link_args = $(_meson_env_array "${OBJCXXFLAGS} ${LDFLAGS}")
needs_exe_wrapper = ${needs_exe_wrapper}
+ sys_root = '${SYSROOT}'
+ pkg_config_libdir = '${PKG_CONFIG_LIBDIR-${EPREFIX}/usr/$(get_libdir)/pkgconfig}'
[host_machine]
system = '${system}'
--prefix "${EPREFIX}/usr"
--sysconfdir "${EPREFIX}/etc"
--wrap-mode nodownload
+ --pkg-config-path="${PKG_CONFIG_PATH-${EPREFIX}/usr/share/pkgconfig}"
)
if tc-is-cross-compiler || [[ ${ABI} != ${DEFAULT_ABI-${ABI}} ]]; then