summaryrefslogtreecommitdiffstats
path: root/build/linux/pkg-config-wrapper
blob: 6ce9e2aa7e8f398acd014719540531253e91ac00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

root="$1"
if [ -z "$root" ]
then
  echo "usage: $0 /path/to/sysroot [pkg-config-arguments]" >&2
  exit 1
fi

rewrite=`dirname $0`/rewrite_dirs.py

shift
config_path=$root/usr/lib/pkgconfig:$root/usr/share/pkgconfig
PKG_CONFIG_PATH=$config_path pkg-config --define-variable=prefix=/usr --define-variable=libdir=/usr/lib "$@" | $rewrite $root