[ghc-rpm-macros/f19] sync ghc-deps.sh with f20/epel7

Jens Petersen petersen at fedoraproject.org
Wed Sep 3 09:35:14 UTC 2014


commit b463e9b89875040dd4ded1f7b72548cf721c96ef
Author: Jens Petersen <petersen at redhat.com>
Date:   Wed Sep 3 18:35:03 2014 +0900

    sync ghc-deps.sh with f20/epel7
    
    should allow building ghc-7.8 correctly

 ghc-deps.sh         |    7 +++++--
 ghc-rpm-macros.spec |    7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/ghc-deps.sh b/ghc-deps.sh
index 85c4488..a9a929b 100755
--- a/ghc-deps.sh
+++ b/ghc-deps.sh
@@ -15,7 +15,10 @@ PKGBASEDIR=$2
 PKGCONFDIR=$PKGBASEDIR/package.conf.d
 GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//)
 
-if [ -x "$PKGBASEDIR/ghc-pkg" ]; then
+if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then
+    # ghc-7.8
+    GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR"
+elif [ -x "$PKGBASEDIR/ghc-pkg" ]; then
     GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR"
 else
     GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}"
@@ -34,7 +37,7 @@ fi
 files=$(cat)
 
 for i in $files; do
-    LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS")
+    LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts")
     if [ "$LIB_FILE" ]; then
 	if [ -d "$PKGCONFDIR" ]; then
 	    META=""
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index da92656..0432f58 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -6,8 +6,8 @@
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        0.98.7
-Release:        3%{?dist}
+Version:        0.98.8
+Release:        1%{?dist}
 Summary:        RPM macros for building packages for GHC
 
 License:        GPLv3+
@@ -80,6 +80,9 @@ EOF
 
 
 %changelog
+* Wed Sep  3 2014 Jens Petersen <petersen at redhat.com> - 0.98.8-1
+- backport ghc-dep.sh support for ghc-pkg 7.8 from F20
+
 * Sat Aug  2 2014 Jens Petersen <petersen at redhat.com> - 0.98.7-3
 - provide ghc-rpm-macros-extra
 


More information about the scm-commits mailing list