浏览代码

tools: pkgconf: provide prefix for host and hostpkg stagind directory

Some package might require to fix their pkg-config file to point to host
or hostpkg file. This is the case for glib2 library that provides with
pkg-config variables, tools to generates files from xml. Those tools
should use the host binary instead of the targets one to correctly build
packages that makes use of such tools.

Link: https://github.com/openwrt/openwrt/pull/15134
Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 1 年之前
父节点
当前提交
49a64c9541
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      tools/pkgconf/files/pkg-config

+ 2 - 0
tools/pkgconf/files/pkg-config

@@ -4,6 +4,8 @@ ${STAGING_DIR_HOST}/bin/pkg-config.real \
 --keep-system-cflags \
 --keep-system-cflags \
 --keep-system-libs \
 --keep-system-libs \
 --define-variable=prefix="${STAGING_PREFIX}" \
 --define-variable=prefix="${STAGING_PREFIX}" \
+--define-variable=prefix_host="${STAGING_DIR_HOST}" \
+--define-variable=prefix_hostpkg="${STAGING_DIR_HOSTPKG}" \
 --define-variable=exec_prefix="${STAGING_PREFIX}" \
 --define-variable=exec_prefix="${STAGING_PREFIX}" \
 --define-variable=bindir="${STAGING_PREFIX}/bin" \
 --define-variable=bindir="${STAGING_PREFIX}/bin" \
 $PKG_CONFIG_EXTRAARGS "$@"
 $PKG_CONFIG_EXTRAARGS "$@"