diff options
author | 2015-07-20 15:05:49 +0000 | |
---|---|---|
committer | 2015-07-20 15:05:49 +0000 | |
commit | cfd8fb39cd0a699e87f0aa9811177a794bc0bc51 (patch) | |
tree | 8a754dbd144d88652be5693a843fe479a6357cb8 /eclass | |
parent | version bump (diff) | |
download | gentoo-2-cfd8fb39cd0a699e87f0aa9811177a794bc0bc51.tar.gz gentoo-2-cfd8fb39cd0a699e87f0aa9811177a794bc0bc51.tar.bz2 gentoo-2-cfd8fb39cd0a699e87f0aa9811177a794bc0bc51.zip |
Workaround upstream cabal tests hangup bug #537500 by Michael Orlitzky; use ghc's haddock for doc generation.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/haskell-cabal.eclass | 22 |
2 files changed, 25 insertions, 3 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 09817635a702..44bc41f0936f 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1722 2015/07/19 15:46:03 mpagano Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1723 2015/07/20 15:05:49 slyfox Exp $ + + 20 Jul 2015; Sergei Trofimovich <slyfox@gentoo.org> haskell-cabal.eclass: + Workaround upstream cabal tests hangup bug #537500 by Michael Orlitzky; use + ghc's haddock for doc generation. 19 Jul 2015; Mike Pagano <mpagano@gentoo.org> kernel-2.eclass: Change kernel upgrade http link and remove reference to deblob in elog diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass index 7f733725af97..22239bb46eef 100644 --- a/eclass/haskell-cabal.eclass +++ b/eclass/haskell-cabal.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.51 2015/04/04 20:33:05 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.52 2015/07/20 15:05:49 slyfox Exp $ # @ECLASS: haskell-cabal.eclass # @MAINTAINER: @@ -172,6 +172,8 @@ cabal-version() { cabal-bootstrap() { local setupmodule local cabalpackage + local setup_bootstrap_args=() + if [[ -f "${S}/Setup.lhs" ]]; then setupmodule="${S}/Setup.lhs" elif [[ -f "${S}/Setup.hs" ]]; then @@ -192,8 +194,16 @@ cabal-bootstrap() { cabalpackage=Cabal-$(cabal-version) einfo "Using cabal-$(cabal-version)." + if $(ghc-supports-threaded-runtime); then + # Cabal has a bug that deadlocks non-threaded RTS: + # https://bugs.gentoo.org/537500 + # https://github.com/haskell/cabal/issues/2398 + setup_bootstrap_args+=(-threaded) + fi + make_setup() { set -- -package "${cabalpackage}" --make "${setupmodule}" \ + ${setup_bootstrap_args} \ ${HCFLAGS} \ ${GHC_BOOTSTRAP_FLAGS} \ "$@" \ @@ -311,7 +321,15 @@ cabal-configure() { has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= if [[ -n "${CABAL_USE_HADDOCK}" ]] && use doc; then - cabalconf+=(--with-haddock=${EPREFIX}/usr/bin/haddock) + # We use the bundled with GHC version if exists + # Haddock is very picky about index files + # it generates for ghc's base and other packages. + local p=${EPREFIX}/usr/bin/haddock-ghc-$(ghc-version) + if [[ -f $p ]]; then + cabalconf+=(--with-haddock="${p}") + else + cabalconf+=(--with-haddock=${EPREFIX}/usr/bin/haddock) + fi fi if [[ -n "${CABAL_USE_PROFILE}" ]] && use profile; then cabalconf+=(--enable-library-profiling) |