| Index: build/linux/pkg-config-wrapper
|
| diff --git a/build/linux/pkg-config-wrapper b/build/linux/pkg-config-wrapper
|
| index 2afb22ba7c5ed0aa3c952b106887f6fc002d2566..2512b38837394e235eacd0edbf99cbcbdb6d8c20 100755
|
| --- a/build/linux/pkg-config-wrapper
|
| +++ b/build/linux/pkg-config-wrapper
|
| @@ -15,6 +15,9 @@
|
| # the PKG_CONFIG_PATH environment variable- these will be prepended to the
|
| # generated paths.
|
|
|
| +set -o nounset
|
| +set -o errexit
|
| +
|
| root="$1"
|
| shift
|
| target_arch="$1"
|
| @@ -31,13 +34,7 @@ fi
|
| rewrite=`dirname $0`/rewrite_dirs.py
|
| package=${!#}
|
|
|
| -config_path=$root/usr/$libpath/pkgconfig:$root/usr/share/pkgconfig
|
| -
|
| -# prepend any paths specified by the environment
|
| -if [ -n "$PKG_CONFIG_PATH" ]
|
| -then
|
| - config_path="$PKG_CONFIG_PATH:$config_path"
|
| -fi
|
| +libdir=$root/usr/$libpath/pkgconfig:$root/usr/share/pkgconfig
|
|
|
| set -e
|
| # Some sysroots, like the Chromium OS ones, may generate paths that are not
|
| @@ -47,6 +44,6 @@ set -e
|
| # relative to /path/to/chroot/build/x86-generic (i.e prefix=/usr).
|
| # To support this correctly, it's necessary to extract the prefix to strip from
|
| # pkg-config's |prefix| variable.
|
| -prefix=`PKG_CONFIG_PATH=$config_path pkg-config --variable=prefix "$package" | sed -e 's|/usr$||'`
|
| -result=`PKG_CONFIG_PATH=$config_path pkg-config "$@"`
|
| +prefix=`PKG_CONFIG_LIBDIR=$libdir pkg-config --variable=prefix "$package" | sed -e 's|/usr$||'`
|
| +result=`PKG_CONFIG_LIBDIR=$libdir pkg-config "$@"`
|
| echo "$result"| $rewrite --sysroot "$root" --strip-prefix "$prefix"
|
|
|