/[gentoo-x86]/eclass/haskell-cabal.eclass
Gentoo

Diff of /eclass/haskell-cabal.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.30 Revision 1.31
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.30 2012/04/14 19:30:53 slyfox Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.31 2012/04/14 20:22:23 slyfox Exp $
4 4
5# @ECLASS: haskell-cabal.eclass 5# @ECLASS: haskell-cabal.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Haskell herd <haskell@gentoo.org> 7# Haskell herd <haskell@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
156 setupmodule="${S}/Setup.hs" 156 setupmodule="${S}/Setup.hs"
157 else 157 else
158 die "No Setup.lhs or Setup.hs found" 158 die "No Setup.lhs or Setup.hs found"
159 fi 159 fi
160 160
161 if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]] && ! ghc-sanecabal "${CABAL_MIN_VERSION}"; then
162 eerror "The package dev-haskell/cabal is not correctly installed for"
163 eerror "the currently active version of ghc ($(ghc-version)). Please"
164 eerror "run haskell-updater or re-build dev-haskell/cabal."
165 die "cabal is not correctly installed"
166 fi
167
161 # We build the setup program using the latest version of 168 # We build the setup program using the latest version of
162 # cabal that we have installed 169 # cabal that we have installed
163 cabalpackage=Cabal-$(cabal-version) 170 cabalpackage=Cabal-$(cabal-version)
164 einfo "Using cabal-$(cabal-version)." 171 einfo "Using cabal-$(cabal-version)."
165 172
342} 349}
343 350
344# exported function: check if cabal is correctly installed for 351# exported function: check if cabal is correctly installed for
345# the currently active ghc (we cannot guarantee this with portage) 352# the currently active ghc (we cannot guarantee this with portage)
346haskell-cabal_pkg_setup() { 353haskell-cabal_pkg_setup() {
347 if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]] && ! ghc-sanecabal "${CABAL_MIN_VERSION}"; then
348 eerror "The package dev-haskell/cabal is not correctly installed for"
349 eerror "the currently active version of ghc ($(ghc-version)). Please"
350 eerror "run haskell-updater or re-build dev-haskell/cabal."
351 die "cabal is not correctly installed"
352 fi
353 if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]]; then 354 if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]]; then
354 eqawarn "QA Notice: Neither bin nor lib are in CABAL_FEATURES." 355 eqawarn "QA Notice: Neither bin nor lib are in CABAL_FEATURES."
355 fi 356 fi
356 if [[ -n "${CABAL_UNKNOWN}" ]]; then 357 if [[ -n "${CABAL_UNKNOWN}" ]]; then
357 eqawarn "QA Notice: Unknown entry in CABAL_FEATURES: ${CABAL_UNKNOWN}" 358 eqawarn "QA Notice: Unknown entry in CABAL_FEATURES: ${CABAL_UNKNOWN}"

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20