From e0969bcd81d248aaf99058a53d344aaa4cb8c6d4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 12 Nov 2023 15:40:59 +0800 Subject: [PATCH] ghc-deps.sh: ghc-9.8 prof fixes from opensuse (mimi1vx) --- ghc-deps.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index cb28edc..c3a0c95 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -45,9 +45,16 @@ for i in $files; do esac done ;; - */libHS*_p.a) - pkgver=$(basename "$(dirname "$i")") - if [ -e "$BUILDROOT$PKGCONFDIR/$pkgver.conf" ]; then + $BUILDROOT$PKGBASELIB/*/libHS*_p.a) + pkgverhash=$(basename "$(dirname "$i")") + case $i in + $BUILDROOT$PKGBASELIB/*-linux-ghc-9.8.*) + pkgver=$(echo $pkgverhash | sed -e "s/\(.*\)-.*/\\1/") + ;; + *) pkgver=$pkgverhash + ;; + esac + if [ -e "$BUILDROOT$PKGCONFDIR/$pkgverhash.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%') @@ -64,7 +71,7 @@ for i in $files; do ;; *) for f in "$PKGBASELIB"/*/libHS"${d}"_p.a "$BUILDROOT$PKGBASELIB"/*/libHS"${d}"_p.a "$PKGBASELIB"/*/*/libHS"${d}"_p.a "$BUILDROOT$PKGBASELIB"/*/*/libHS"${d}"_p.a; do - if [ -f $f ]; then + if [ -f "$f" ]; then echo "$GHCPREFIX-prof($d)" break fi