Navigation Menu

Skip to content

Commit

Permalink
haskell-cabal.eclass: move 'cabal' santy check out from 'pkg_setup'
Browse files Browse the repository at this point in the history
It will allow merging binary packages (.tbz2 not providing any
haskell libraries) without any cabal or ghc installed.

Reported-by: Matthias Maier
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information
Sergei Trofimovich committed Apr 14, 2012
1 parent 7382132 commit 741d8f7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions eclass/haskell-cabal.eclass
Expand Up @@ -163,6 +163,13 @@ cabal-bootstrap() {
die "No Setup.lhs or Setup.hs found"
fi

if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]] && ! ghc-sanecabal "${CABAL_MIN_VERSION}"; then
eerror "The package dev-haskell/cabal is not correctly installed for"
eerror "the currently active version of ghc ($(ghc-version)). Please"
eerror "run haskell-updater or re-build dev-haskell/cabal."
die "cabal is not correctly installed"
fi

# We build the setup program using the latest version of
# cabal that we have installed
cabalpackage=Cabal-$(cabal-version)
Expand Down Expand Up @@ -369,12 +376,6 @@ cabal-is-dummy-lib() {
# exported function: check if cabal is correctly installed for
# the currently active ghc (we cannot guarantee this with portage)
haskell-cabal_pkg_setup() {
if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]] && ! ghc-sanecabal "${CABAL_MIN_VERSION}"; then
eerror "The package dev-haskell/cabal is not correctly installed for"
eerror "the currently active version of ghc ($(ghc-version)). Please"
eerror "run haskell-updater or re-build dev-haskell/cabal."
die "cabal is not correctly installed"
fi
if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]]; then
eqawarn "QA Notice: Neither bin nor lib are in CABAL_FEATURES."
fi
Expand Down

0 comments on commit 741d8f7

Please sign in to comment.