diff options
author | 2017-12-01 21:53:38 +0100 | |
---|---|---|
committer | 2017-12-31 18:24:11 +0100 | |
commit | 3f6d39816bdb2cbd544779d82591b0e9e1a9877f (patch) | |
tree | 5f2a842a3e5ce830937f3a7eedb90f06f48a0410 /package/pkgconf/pkg-config.in | |
parent | 290b4cfe17042f1345e45363d1ce09f04e32f12a (diff) | |
download | buildroot-3f6d39816bdb2cbd544779d82591b0e9e1a9877f.tar.gz buildroot-3f6d39816bdb2cbd544779d82591b0e9e1a9877f.tar.bz2 |
pkgconf: use relative path to STAGING_DIR instead of absolute path
The pkg-config wrapper script is currently generated with absolute
paths to $(STAGING_DIR). However, this will not work properly with
per-package SDK, and each package will be built with a different
STAGING_DIR value.
In order to fix this, we adjust how the pkg-config wrapper script is
generated, so that it uses a relative path to itself: the sysroot (i.e
STAGING_DIR) is always located in $(path of
pkg-config)/../$(STAGING_SUBDIR).
This change is independent from the per-package SDK work, and could be
applied independently from it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/pkgconf/pkg-config.in')
-rw-r--r-- | package/pkgconf/pkg-config.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in index 4dec48789a..b9ce0935cc 100644 --- a/package/pkgconf/pkg-config.in +++ b/package/pkgconf/pkg-config.in @@ -1,2 +1,5 @@ #!/bin/sh -PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-@PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-@STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@ +PKGCONFDIR=$(dirname $0) +DEFAULT_PKG_CONFIG_LIBDIR=${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/lib/pkgconfig:${PKGCONFDIR}/../@STAGING_SUBDIR@/usr/share/pkgconfig +DEFAULT_PKG_CONFIG_SYSROOT_DIR=${PKGCONFDIR}/../@STAGING_SUBDIR@ +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${DEFAULT_PKG_CONFIG_LIBDIR}} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-${DEFAULT_PKG_CONFIG_SYSROOT_DIR}} ${PKGCONFDIR}/pkgconf @STATIC@ $@ |