summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-08-15 15:48:20 -1000
committerSam Bingner <sam@bingner.com>2018-08-15 15:48:20 -1000
commit0e4357fbe9c268ba7074b08f26d4a4384dd486ce (patch)
tree346f4ab74c16df40a477ec55f22955fbf29279ad
parentda5a7c574bfd315991cfd0e672ed76abeb06894a (diff)
Update pkg-config to support new flags
-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