/[gentoo-x86]/dev-haskell/happy/happy-1.18.4.ebuild
Gentoo

Contents of /dev-haskell/happy/happy-1.18.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Sep 14 07:06:28 2012 UTC (21 months, 4 weeks ago) by qnikst
Branch: MAIN
Changes since 1.5: +4 -4 lines
adding mirror://hackage

(Portage version: 2.2.0_alpha125/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-haskell/happy/happy-1.18.4.ebuild,v 1.5 2010/11/14 18:38:14 slyfox Exp $
4
5 CABAL_FEATURES="bin"
6 inherit haskell-cabal autotools
7
8 # we bundle mtl as we want fewer dependencies for haddock, which require happy
9 # mtl needs haddock to be compiled with USE=doc
10 MTL_PN="mtl"
11 MTL_PV="1.1.0.2"
12 MTL_P="${MTL_PN}-${MTL_PV}"
13
14 DESCRIPTION="Happy is a parser generator for Haskell"
15 HOMEPAGE="http://www.haskell.org/happy/"
16 SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz
17 mirror://hackage/packages/archive/${MTL_PN}/${MTL_PV}/${MTL_P}.tar.gz"
18
19 LICENSE="BSD"
20 SLOT="0"
21 KEYWORDS="alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
22 IUSE="doc"
23
24 DEPEND=">=dev-lang/ghc-6.6.1
25 >=dev-haskell/cabal-1.2.3
26 doc? ( ~app-text/docbook-xml-dtd-4.2
27 app-text/docbook-xsl-stylesheets )"
28 RDEPEND=""
29
30 src_unpack() {
31 unpack ${A}
32 cd "${S}/doc" && eautoconf
33
34 # change happy.cabal to use bundled mtl
35 # remove dep on mtl, add path
36 sed -e "s|, mtl >= 1.0||" \
37 -e "s|hs-source-dirs: src|hs-source-dirs: src, ../mtl-1.1.0.2|" \
38 -i "${S}/${PN}.cabal"
39 # compile happy with the extensions mtl uses (safe?)
40 # this gives repoman whitespace warnings, ignore them
41 cat >> "${S}/${PN}.cabal" << EOF
42 extensions: MultiParamTypeClasses,
43 FunctionalDependencies,
44 FlexibleInstances,
45 TypeSynonymInstances
46 EOF
47 }
48
49 src_compile() {
50 cabal_src_compile
51 if use doc; then
52 cd doc
53 econf || die "econf failed in /doc"
54 emake -j1 || die "emake failed in /doc"
55 fi
56 }
57
58 src_install() {
59 cabal_src_install
60 use doc && cd doc && dohtml -r happy/*
61 }

  ViewVC Help
Powered by ViewVC 1.1.20