From 568a62a39776e5b3e1023235c2db74c41d1cccc6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 20 Sep 2012 12:10:07 +0900 Subject: [PATCH] fix building haskell-platform when installed locally; require hscolour; build for hoogle - fix broken duplicate hash output for haskell-platform binaries buildhack when haskell-platform locally installed - ghc-rpm-macros now requires hscolour so packages no longer need to BR it - this can be disabled for bootstrapping by setting without_hscolour - make haddock build hoogle files --- ghc-deps.sh | 2 +- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 27 +++++++++++++++++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 69a2d51..761cb5f 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -73,7 +73,7 @@ for i in $files; do PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi for p in ${BIN_DEPS}; do - HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//") + HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//" | uniq) echo "ghc($HASH)" done fi diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 379b132..76fc65e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -258,7 +258,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %ghc_lib_build()\ %ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ -%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\ +%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ %endif\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c2a4117..04dea32 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -2,9 +2,12 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc +# uncomment to bootstrap without hscolour +#%%global without_hscolour 1 + Name: ghc-rpm-macros -Version: 0.95.6 -Release: 2%{?dist} +Version: 0.95.7 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -21,6 +24,11 @@ Source2: AUTHORS Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Requires: redhat-rpm-config +%if %{undefined without_hscolour} +ExclusiveArch: %{ghc_arches} +BuildRequires: ghc-rpm-macros +Requires: hscolour +%endif %description A set of macros for building GHC packages following the Haskell Guidelines @@ -55,6 +63,14 @@ cat >> %{buildroot}/%{macros_file} <> %{buildroot}/%{macros_file} < - 0.95.7-1 +- fix broken duplicate hash output for haskell-platform binaries buildhack + when haskell-platform locally installed +- ghc-rpm-macros now requires hscolour so packages no longer need to BR it +- this can be disabled for bootstrapping by setting without_hscolour +- make haddock build hoogle files + * Thu Jul 19 2012 Fedora Release Engineering - 0.95.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild