Skip to content

Commit

Permalink
haskell-cabal.eclass: don't require haddock on ghc-7.10
Browse files Browse the repository at this point in the history
While at it update default Cabal stub Setup code.

Signed-off-by: Sergei Trofimovich <[email protected]>
  • Loading branch information
Sergei Trofimovich committed Sep 21, 2015
1 parent 3dcb885 commit 8af6f9f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions eclass/haskell-cabal.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
}

Expand Down

0 comments on commit 8af6f9f

Please sign in to comment.