From db486c2fbbfae7944df448c052f603e8fb7af8d7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 9 Sep 2013 22:55:47 +0900 Subject: [PATCH] use objdump -p instead of ldd to read executable dependencies hopefully more robust against ghc-7.7's relocatable dynamic linking --- ghc-deps.sh | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 93cc992..67f90d4 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -68,7 +68,7 @@ for i in $files; do fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so => .*%\1%") + BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ NEEDED *libHS\(.*\)-ghc${GHCVERSION}.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 76c391d..c9f989e 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.1 +Version: 1.1.1 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Mon Sep 9 2013 Jens Petersen - 1.1.1-1 +- use objdump -p instead of ldd to read executable dependencies + * Sat Sep 7 2013 Jens Petersen - 1.1-1 - update ghc-deps.sh to handling ghc-7.8 rts