From 0e4357fbe9c268ba7074b08f26d4a4384dd486ce Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Wed, 15 Aug 2018 15:48:20 -1000 Subject: Update pkg-config to support new flags --- util/pkg-config.sh | 8 +++++--- 1 file 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 -- cgit v1.2.3