summaryrefslogtreecommitdiffstats
path: root/build/linux/pkg-config-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'build/linux/pkg-config-wrapper')
-rwxr-xr-xbuild/linux/pkg-config-wrapper14
1 files changed, 14 insertions, 0 deletions
diff --git a/build/linux/pkg-config-wrapper b/build/linux/pkg-config-wrapper
new file mode 100755
index 0000000..fa76c2e
--- /dev/null
+++ b/build/linux/pkg-config-wrapper
@@ -0,0 +1,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 "$@" | $rewrite $root