/[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.31 Revision 1.32
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.31 2012/04/14 20:22:23 slyfox Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.32 2012/04/19 17:33:19 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:
28# bin -- the package installs binaries 28# bin -- the package installs binaries
29# lib -- the package installs libraries 29# lib -- the package installs libraries
30# nocabaldep -- don't add dependency on cabal. 30# nocabaldep -- don't add dependency on cabal.
31# only used for packages that _must_ not pull the dependency 31# only used for packages that _must_ not pull the dependency
32# on cabal, but still use this eclass (e.g. haskell-updater). 32# on cabal, but still use this eclass (e.g. haskell-updater).
33# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
33 34
34inherit ghc-package multilib 35inherit ghc-package multilib
35 36
36# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS 37# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
37# @DESCRIPTION: 38# @DESCRIPTION:
74 profile) CABAL_USE_PROFILE=yes;; 75 profile) CABAL_USE_PROFILE=yes;;
75 bootstrap) CABAL_BOOTSTRAP=yes;; 76 bootstrap) CABAL_BOOTSTRAP=yes;;
76 bin) CABAL_HAS_BINARIES=yes;; 77 bin) CABAL_HAS_BINARIES=yes;;
77 lib) CABAL_HAS_LIBRARIES=yes;; 78 lib) CABAL_HAS_LIBRARIES=yes;;
78 nocabaldep) CABAL_FROM_GHC=yes;; 79 nocabaldep) CABAL_FROM_GHC=yes;;
80 test-suite) CABAL_TEST_SUITE=yes;;
79 *) CABAL_UNKNOWN="${CABAL_UNKNOWN} ${feature}";; 81 *) CABAL_UNKNOWN="${CABAL_UNKNOWN} ${feature}";;
80 esac 82 esac
81done 83done
82 84
83if [[ -n "${CABAL_USE_HADDOCK}" ]]; then 85if [[ -n "${CABAL_USE_HADDOCK}" ]]; then
108 DEPEND="${DEPEND} dev-haskell/cpphs" 110 DEPEND="${DEPEND} dev-haskell/cpphs"
109fi 111fi
110 112
111if [[ -n "${CABAL_USE_PROFILE}" ]]; then 113if [[ -n "${CABAL_USE_PROFILE}" ]]; then
112 IUSE="${IUSE} profile" 114 IUSE="${IUSE} profile"
115fi
116
117if [[ -n "${CABAL_TEST_SUITE}" ]]; then
118 IUSE="${IUSE} test"
113fi 119fi
114 120
115# We always use a standalone version of Cabal, rather than the one that comes 121# We always use a standalone version of Cabal, rather than the one that comes
116# with GHC. But of course we can't depend on cabal when building cabal itself. 122# with GHC. But of course we can't depend on cabal when building cabal itself.
117if [[ -z ${CABAL_MIN_VERSION} ]]; then 123if [[ -z ${CABAL_MIN_VERSION} ]]; then
245 cabalconf="${cabalconf} --with-c2hs=${EPREFIX}/usr/bin/c2hs" 251 cabalconf="${cabalconf} --with-c2hs=${EPREFIX}/usr/bin/c2hs"
246 fi 252 fi
247 if [[ -n "${CABAL_USE_CPPHS}" ]]; then 253 if [[ -n "${CABAL_USE_CPPHS}" ]]; then
248 cabalconf="${cabalconf} --with-cpphs=${EPREFIX}/usr/bin/cpphs" 254 cabalconf="${cabalconf} --with-cpphs=${EPREFIX}/usr/bin/cpphs"
249 fi 255 fi
256 if [[ -n "${CABAL_TEST_SUITE}" ]]; then
257 cabalconf="${cabalconf} $(use_enable test tests)"
258 fi
250 259
251 local option 260 local option
252 for option in ${HCFLAGS} 261 for option in ${HCFLAGS}
253 do 262 do
254 cabalconf+=" --ghc-option=$option" 263 cabalconf+=" --ghc-option=$option"

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

  ViewVC Help
Powered by ViewVC 1.1.20