From 10d6e38a6fd76a31603e8f686b34f9b738024d07 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Aug 04 2023 09:05:54 +0000 Subject: ghc-deps.sh: correctly map library id to internal package .conf eg map libHSpandoc-3.0.1-9rZJwJUtmvf8o1sPc2tHH1-xml-light_p.a to z-pandoc-z-xml-light --- diff --git a/ghc-deps.sh b/ghc-deps.sh index 7e5cd6f..3acb041 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -46,8 +46,9 @@ for i in $files; do done ;; */libHS*_p.a) - pkgver=$(basename "$(dirname "$i")") - ids=$($GHC_PKG field "$pkgver" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") + conf=$(echo $(basename "$i") | sed -e "s%libHS%$BUILDROOT$PKGCONFDIR/%" -e 's%_p.a%.conf%') + name=$(grep "^name: " "$conf" | sed -e "s/name: *//") + ids=$($GHC_PKG field "$name" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;;