summaryrefslogtreecommitdiff
path: root/util/pkg-config.sh
diff options
context:
space:
mode:
Diffstat (limited to 'util/pkg-config.sh')
-rwxr-xr-xutil/pkg-config.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/pkg-config.sh b/util/pkg-config.sh
index 05c31677d..cc70779b0 100755
--- a/util/pkg-config.sh
+++ b/util/pkg-config.sh
@@ -12,7 +12,7 @@ while [[ $# -ne 0 ]]; do case "$1" in
exec pkg-config "$1" "$2"
;;
- (--cflags|--libs|--variable=*)
+ (--cflags|--libs|--libs-only-l|--libs-only-L|--cflags-only-I|--variable=*)
dbpf=
args[${#args[@]}]=$1
;;
@@ -43,14 +43,16 @@ fi
outs=
for pkg in "${pkgs[@]}"; do
+ declare -a pkgspec
+ pkgspec=( ${pkg} )
args_=("${args[@]}")
if [[ ${dbpf+@} ]]; then
- dest=$(for dep in $(find -L "${PKG_DATA}"/_metadata -name '*.dep' | cut -d '/' -f -); do
+ dest=$(for dep in $(find -L "${PKG_DATA}"/_metadata -name '*.dep'); do
DEP_NAME=$(basename "${dep}" .dep)
DEP_DEST=$(PKG_DEST_ "${DEP_NAME}")
- find "${DEP_DEST}" -name "${pkg}.pc" -printf "${DEP_DEST}\n"
+ find "${DEP_DEST}" -name "${pkgspec}.pc" -printf "${DEP_DEST}\n"
done | head -n 1) && args_=(--define-variable=prefix="${dest}/usr" "${args_[@]}")
fi