Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 21 Sep 2015 21:44:40
Message-Id: 1442871746.8af6f9fc1c787c3d31beb90ba113cf963d43020f.slyfox@gentoo
1 commit: 8af6f9fc1c787c3d31beb90ba113cf963d43020f
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 21 21:42:26 2015 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 21 21:42:26 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8af6f9fc
7
8 haskell-cabal.eclass: don't require haddock on ghc-7.10
9
10 While at it update default Cabal stub Setup code.
11
12 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
13
14 eclass/haskell-cabal.eclass | 10 ++++++++--
15 1 file changed, 8 insertions(+), 2 deletions(-)
16
17 diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
18 index 47a9e16..132c3a1 100644
19 --- a/eclass/haskell-cabal.eclass
20 +++ b/eclass/haskell-cabal.eclass
21 @@ -103,7 +103,13 @@ if [[ -n "${CABAL_USE_HADDOCK}" ]]; then
22 IUSE="${IUSE} doc"
23 # don't require depend on itself to build docs.
24 # ebuild bootstraps docs from just built binary
25 - [[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || DEPEND="${DEPEND} doc? ( dev-haskell/haddock )"
26 + #
27 + # starting from ghc-7.10.2 we install haddock bundled with
28 + # ghc to keep links to base and ghc library, otherwise
29 + # newer haddock versions change index format and can't
30 + # read index files for packages coming with ghc.
31 + [[ ${CATEGORY}/${PN} = "dev-haskell/haddock" ]] || \
32 + DEPEND="${DEPEND} doc? ( || ( dev-haskell/haddock >=dev-lang/ghc-7.10.2 ) )"
33 fi
34
35 if [[ -n "${CABAL_USE_HSCOLOUR}" ]]; then
36 @@ -240,7 +246,7 @@ cabal-mksetup() {
37 rm -vf "${setupdir}"/Setup.{lhs,hs}
38 elog "Creating 'Setup.hs' for 'Simple' build type."
39
40 - echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \
41 + echo 'import Distribution.Simple; main = defaultMain' \
42 > "${setup_src}" || die "failed to create default Setup.hs"
43 }