/[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.37 Revision 1.38
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 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.37 2012/11/19 21:27:56 slyfox Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.38 2013/01/06 13:06:35 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:
130if [[ -z ${CABAL_MIN_VERSION} ]]; then 130if [[ -z ${CABAL_MIN_VERSION} ]]; then
131 CABAL_MIN_VERSION=1.1.4 131 CABAL_MIN_VERSION=1.1.4
132fi 132fi
133if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]]; then 133if [[ -z "${CABAL_BOOTSTRAP}" && -z "${CABAL_FROM_GHC}" ]]; then
134 DEPEND="${DEPEND} >=dev-haskell/cabal-${CABAL_MIN_VERSION}" 134 DEPEND="${DEPEND} >=dev-haskell/cabal-${CABAL_MIN_VERSION}"
135fi
136
137# Libraries require GHC to be installed.
138if [[ -n "${CABAL_HAS_LIBRARIES}" ]]; then
139 RDEPEND="${RDEPEND} dev-lang/ghc"
140fi 135fi
141 136
142# returns the version of cabal currently in use 137# returns the version of cabal currently in use
143_CABAL_VERSION_CACHE="" 138_CABAL_VERSION_CACHE=""
144cabal-version() { 139cabal-version() {
382} 377}
383 378
384# exported function: check if cabal is correctly installed for 379# exported function: check if cabal is correctly installed for
385# the currently active ghc (we cannot guarantee this with portage) 380# the currently active ghc (we cannot guarantee this with portage)
386haskell-cabal_pkg_setup() { 381haskell-cabal_pkg_setup() {
382 if [[ -n ${CABAL_HAS_LIBRARIES} ]]; then
383 [[ ${RDEPEND} == *dev-lang/ghc* ]] || eqawarn "QA Notice: A library does not have runtime dependency on dev-lang/ghc."
384 fi
387 if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]]; then 385 if [[ -z "${CABAL_HAS_BINARIES}" ]] && [[ -z "${CABAL_HAS_LIBRARIES}" ]]; then
388 eqawarn "QA Notice: Neither bin nor lib are in CABAL_FEATURES." 386 eqawarn "QA Notice: Neither bin nor lib are in CABAL_FEATURES."
389 fi 387 fi
390 if [[ -n "${CABAL_UNKNOWN}" ]]; then 388 if [[ -n "${CABAL_UNKNOWN}" ]]; then
391 eqawarn "QA Notice: Unknown entry in CABAL_FEATURES: ${CABAL_UNKNOWN}" 389 eqawarn "QA Notice: Unknown entry in CABAL_FEATURES: ${CABAL_UNKNOWN}"
512 cabal_src_install 510 cabal_src_install
513 511
514 popd > /dev/null 512 popd > /dev/null
515} 513}
516 514
515# @FUNCTION: cabal_flag
516# @DESCRIPTION:
517# ebuild.sh:use_enable() taken as base 517# ebuild.sh:use_enable() taken as base
518# 518#
519# Usage examples: 519# Usage examples:
520# 520#
521# CABAL_CONFIGURE_FLAGS=$(cabal_flag gui) 521# CABAL_CONFIGURE_FLAGS=$(cabal_flag gui)

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20