ghc-deps.sh: only depend on ghc-prof(pkgid) if libHS*_p.a exists

testcase: haskell-gi-overloading dummy package
This commit is contained in:
Jens Petersen 2019-08-10 22:43:05 +02:00
parent a11ad68d65
commit 8532ad674a
2 changed files with 16 additions and 2 deletions

View File

@ -40,7 +40,18 @@ for i in $files; do
ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//")
for d in $ids; do
case $d in
*-*) echo "ghc-prof($d)" ;;
*-*)
case $field in
id)
echo "ghc-prof($d)"
;;
*)
if [ -f "$PKGBASEDIR/$pkgver/libHS${d}_p.a" -o -f "/usr/lib*/ghc-*/$pkgver/libHS${d}_p.a" ]; then
echo "ghc-prof($d)"
fi
;;
esac
;;
esac
done
;;

View File

@ -10,7 +10,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 2.0.2
Version: 2.0.3
Release: 1%{?dist}
Summary: RPM macros for building Haskell packages for GHC
@ -203,6 +203,9 @@ EOF
%changelog
* Sat Aug 10 2019 Jens Petersen <petersen@redhat.com> - 2.0.3-1
- only depend on ghc-prof(pkgid) if libHSpkgid_p.a exists
* Tue Aug 6 2019 Jens Petersen <petersen@redhat.com> - 2.0.2-1
- check if doc haddock dir exists