From 8532ad674ade42fc256995fd94082778b648556d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 10 Aug 2019 22:43:05 +0200 Subject: [PATCH] ghc-deps.sh: only depend on ghc-prof(pkgid) if libHS*_p.a exists testcase: haskell-gi-overloading dummy package --- ghc-deps.sh | 13 ++++++++++++- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index ca86d9a..51916c8 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -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 ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 22a93ea..0985206 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -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 - 2.0.3-1 +- only depend on ghc-prof(pkgid) if libHSpkgid_p.a exists + * Tue Aug 6 2019 Jens Petersen - 2.0.2-1 - check if doc haddock dir exists