From 0cc079600d74abd858347bae747b39f342abe3f0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 6 Aug 2023 12:15:54 +0200 Subject: [PATCH] fixup! ghc-deps.sh: correctly map library id to internal package .conf handle internal library case separately --- ghc-deps.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 3acb041..79278ab 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -46,9 +46,14 @@ for i in $files; do done ;; */libHS*_p.a) - 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-[^ ]\+//") + pkgver=$(basename "$(dirname "$i")") + if [ -e "$BUILDROOT$PKGCONFDIR/$pkgver.conf" ]; then + ids=$($GHC_PKG field "$pkgver" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") + else + conf=$(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-[^ ]\+//") + fi for d in $ids; do case $d in *-*-internal) ;;