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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri Sep 14 13:00:49 2012 UTC (23 months ago) by gienah
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +10 -2 lines
Patch happy 1.18.9 build for ghc 7.6.1

(Portage version: 2.1.11.17/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.9.ebuild,v 1.7 2012/09/14 07:06:28 qnikst Exp $
4
5 # ebuild generated by hackport 0.2.9
6
7 EAPI="4"
8
9 CABAL_FEATURES="bin"
10 inherit base eutils haskell-cabal autotools
11
12 DESCRIPTION="Happy is a parser generator for Haskell"
13 HOMEPAGE="http://www.haskell.org/happy/"
14 SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
19 IUSE="doc"
20
21 RDEPEND=""
22 DEPEND="${RDEPEND}
23 >=dev-haskell/cabal-1.2.3
24 >=dev-haskell/mtl-1.0
25 >=dev-lang/ghc-6.8.2
26 doc? ( ~app-text/docbook-xml-dtd-4.2
27 app-text/docbook-xsl-stylesheets )"
28
29 PATCHES=("${FILESDIR}/${PN}-1.18.6-man.patch"
30 "${FILESDIR}/${PN}-1.18.9-missing-tests.patch")
31
32 src_prepare() {
33 base_src_prepare
34
35 # ghc 7.5 removed System.IO.try and Control.OldException.
36 # Conditional patch is required, as it is to the file Setup.lhs, so can not
37 # use LANGUAGE: CPP, and ghc 6.10.4 and 6.12.3 do not have
38 # System.IO.Error.tryIOError.
39 if has_version ">=dev-lang/ghc-7.5"; then
40 epatch "${FILESDIR}/${PN}-1.18.9-ghc-7.5.patch"
41 fi
42
43 use doc && cd doc && eautoconf
44 }
45
46 src_configure() {
47 cabal_src_configure
48
49 if use doc; then
50 cd doc && econf || die "econf failed in /doc"
51 fi
52 }
53
54 src_compile() {
55 cabal_src_compile
56
57 if use doc; then
58 cd doc && emake -j1 || die "emake failed in /doc"
59 fi
60 }
61
62 src_test() {
63 if has_version "dev-haskell/monads-fd"; then
64 sed -e 's@HC=ghc@HC=ghc -hide-package monads-fd@' \
65 -i "${S}/tests/Makefile" || die "Could not patch tests Makefile"
66 fi
67 if has_version "dev-haskell/monads-tf"; then
68 sed -e 's@HC=ghc@HC=ghc -hide-package monads-tf@' \
69 -i "${S}/tests/Makefile" || die "Could not patch tests Makefile"
70 fi
71 emake -C "${S}/tests/" || die "emake for tests failed"
72 }
73
74 src_install() {
75 cabal_src_install
76 if use doc; then
77 cd doc
78 dohtml -r happy/*
79 doman "${S}/doc/happy.1"
80 fi
81 }

  ViewVC Help
Powered by ViewVC 1.1.20