petersen pushed to ghc-rpm-macros (f22). "fix ghc-deps.sh for ghc builds: use .a files again instead of .conf (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Mar 30 03:43:37 UTC 2015


>From 0c236fe8e5ff5b8a2f13b64f15f198badeb444a0 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen at redhat.com>
Date: Mon, 23 Mar 2015 17:49:30 +0900
Subject: fix ghc-deps.sh for ghc builds: use .a files again instead of .conf

- .conf handling broke since ghc .conf filenames include hash
- now extract pkg-ver from filename rather than dir (for 7.10 support)
- ignore prof libs

diff --git a/ghc-deps.sh b/ghc-deps.sh
index 68498ff..7efd52f 100755
--- a/ghc-deps.sh
+++ b/ghc-deps.sh
@@ -42,13 +42,14 @@ for i in $files; do
     SELF=""
     case $i in
         */libHSrts.*) ;;
+        */libHS*_p.a) ;;
         */libHS*.so)
             META=ghc
-	    PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%")
+	    PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?-ghc${GHC_VER}\.so%\1%")
             ;;
-        */package.conf.d/*.conf)
+        */libHS*.a)
             META=ghc-devel
-	    PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\).conf%\1%")
+	    PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?\.a%\1%")
 	    if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-ghc${GHC_VER}.so ]; then
 		SELF=ghc
 	    fi
@@ -70,7 +71,7 @@ for i in $files; do
 	fi
     elif [ "$MODE" = "--requires" ]; then
 	if file $i | grep -q 'executable, .* dynamically linked'; then
-	    BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%")
+	    BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}\.so%\1%")
 	    if [ -d "$PKGCONFDIR" ]; then
 		PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR"
 	    fi
diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec
index e923541..0899c05 100644
--- a/ghc-rpm-macros.spec
+++ b/ghc-rpm-macros.spec
@@ -6,7 +6,7 @@
 #%%global without_hscolour 1
 
 Name:           ghc-rpm-macros
-Version:        1.4.12
+Version:        1.4.13
 Release:        1%{?dist}
 Summary:        RPM macros for building packages for GHC
 
@@ -112,7 +112,11 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag
 
 
 %changelog
-* Fri Mar 20 2015 Jens Petersen <petersen at redhat.com>
+* Mon Mar 23 2015 Jens Petersen <petersen at redhat.com> - 1.4.13-1
+- fix ghc-deps.sh for ghc builds:
+- use .a files again instead of .conf for devel deps
+- extract pkg-ver from library filename rather than directory
+  (should also work for 7.10)
 - introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier
 
 * Sat Mar  7 2015 Jens Petersen <petersen at fedoraproject.org> - 1.4.12-1
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/ghc-rpm-macros.git/commit/?h=f22&id=0c236fe8e5ff5b8a2f13b64f15f198badeb444a0


More information about the scm-commits mailing list