summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2015-09-21 22:42:26 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2015-09-21 22:42:26 +0100
commit8af6f9fc1c787c3d31beb90ba113cf963d43020f (patch)
tree2a40d006fde65ec1508e70d0d980a186ef3f3104 /eclass
parentsci-visualization/paraview: drop version 4.2.0-r1 (diff)
downloadgentoo-8af6f9fc1c787c3d31beb90ba113cf963d43020f.tar.gz
gentoo-8af6f9fc1c787c3d31beb90ba113cf963d43020f.tar.bz2
gentoo-8af6f9fc1c787c3d31beb90ba113cf963d43020f.zip
haskell-cabal.eclass: don't require haddock on ghc-7.10
While at it update default Cabal stub Setup code. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/haskell-cabal.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 47a9e1631a93..132c3a1073b8 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -103,7 +103,13 @@ if [[ -n "${CABAL_USE_HADDOCK}" ]]; then
IUSE="${IUSE} doc"
# don't require depend on itself to build docs.
# ebuild bootstraps docs from just built binary
- [[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || DEPEND="${DEPEND} doc? ( dev-haskell/haddock )"
+ #
+ # starting from ghc-7.10.2 we install haddock bundled with
+ # ghc to keep links to base and ghc library, otherwise
+ # newer haddock versions change index format and can't
+ # read index files for packages coming with ghc.
+ [[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || \
+ DEPEND="${DEPEND} doc? ( || ( dev-haskell/haddock >=dev-lang/ghc-7.10.2 ) )"
fi
if [[ -n "${CABAL_USE_HSCOLOUR}" ]]; then
@@ -240,7 +246,7 @@ cabal-mksetup() {
rm -vf "${setupdir}"/Setup.{lhs,hs}
elog "Creating 'Setup.hs' for 'Simple' build type."
- echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \
+ echo 'import Distribution.Simple; main = defaultMain' \
> "${setup_src}" || die "failed to create default Setup.hs"
}