Gentoo Development Guide
HASKELL-CABAL.ECLASS
Section: portage (5)Updated: Jun 2013
Index Return to Main Contents
NAME
haskell-cabal.eclass - for packages that make use of the Haskell Common Architecture for Building Applications and Libraries (cabal)DESCRIPTION
Basic instructions:Before inheriting the eclass, set CABAL_FEATURES to reflect the tools and features that the package makes use of.
Currently supported features:
haddock -- for documentation generation
hscolour -- generation of colourised sources
hoogle -- generation of documentation search index
alex -- lexer/scanner generator
happy -- parser generator
c2hs -- C interface generator
cpphs -- C preprocessor clone written in Haskell
profile -- if package supports to build profiling-enabled libraries
bootstrap -- only used for the cabal package itself
bin -- the package installs binaries
lib -- the package installs libraries
nocabaldep -- don't add dependency on cabal.
only used for packages that _must_ not pull the dependency
on cabal, but still use this eclass (e.g. haskell-updater).
test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
FUNCTIONS
- cabal_flag
-
ebuild.sh:use_enable() taken as base
Usage examples:
CABAL_CONFIGURE_FLAGS=$(cabal_flag gui)
leads to "--flags=gui" or "--flags=-gui" (useflag 'gui')
CABAL_CONFIGURE_FLAGS=$(cabal_flag gtk gui)
also leads to "--flags=gui" or " --flags=-gui" (useflag 'gtk') - cabal_chdeps
-
Allows easier patching of $CABAL_FILE (${S}/${PN}.cabal by default)
depends
Accepts argument list as pairs of substitutions: <from-string> <to-string>...
Dies on error.
Usage examples:
src_prepare() {
cabal_chdeps 'base >= 4.2 && < 4.6' 'base >= 4.2 && < 4.7' 'containers ==0.4.*' 'containers >= 0.4 && < 0.6' } or src_prepare() {
CABAL_FILE=${S}/${MY_PN}.cabal cabal_chdeps 'base >= 4.2 && < 4.6' 'base >= 4.2 && < 4.7'
CABAL_FILE=${S}/${MY_PN}-tools.cabal cabal_chdeps 'base == 3.*' 'base >= 4.2 && < 4.7' }
ECLASS VARIABLES
- CABAL_EXTRA_CONFIGURE_FLAGS
- User-specified additional parameters passed to 'setup configure'. example: /etc/portage/make.conf: CABAL_EXTRA_CONFIGURE_FLAGS=--enable-shared
- CABAL_EXTRA_BUILD_FLAGS
- User-specified additional parameters passed to 'setup build'. example: /etc/portage/make.conf: CABAL_EXTRA_BUILD_FLAGS=-v
- GHC_BOOTSTRAP_FLAGS
- User-specified additional parameters for ghc when building _only_ 'setup' binary bootstrap. example: /etc/portage/make.conf: GHC_BOOTSTRAP_FLAGS=-dynamic to make linking 'setup' faster.
- CABAL_DEBUG_LOOSENING
- Show debug output for 'cabal_chdeps' function if set. Needs working 'diff'.
AUTHORS
Original author: Andres Loeh <kosmikus@gentoo.org> Original author: Duncan Coutts <dcoutts@gentoo.org>
MAINTAINERS
Haskell herd <haskell@gentoo.org>
REPORTING BUGS
Please report bugs via http://bugs.gentoo.org/FILES
/usr/portage/eclass/haskell-cabal.eclassSEE ALSO
ebuild(5)http://sources.gentoo.org/eclass/haskell-cabal.eclass?view=log
Index
This document was created by man2html, using the manual pages.
Time: 03:25:01 GMT, June 20, 2013