1 |
# Copyright 1999-2012 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/agda/agda-2.3.0.1.ebuild,v 1.5 2012/06/02 09:21:19 gienah Exp $ |
4 |
|
5 |
EAPI="4" |
6 |
|
7 |
CABAL_FEATURES="lib profile" |
8 |
inherit haskell-cabal eutils elisp-common |
9 |
|
10 |
MY_PN="Agda" |
11 |
MY_P="${MY_PN}-${PV}" |
12 |
|
13 |
DESCRIPTION="A dependently typed functional programming language and proof assistant" |
14 |
HOMEPAGE="http://wiki.portal.chalmers.se/agda/" |
15 |
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz" |
16 |
|
17 |
LICENSE="MIT" |
18 |
SLOT="0" |
19 |
KEYWORDS="~amd64 ~x86" |
20 |
IUSE="epic +stdlib" |
21 |
|
22 |
RDEPEND=">=dev-haskell/binary-0.4.4[profile?] |
23 |
<dev-haskell/binary-0.6[profile?] |
24 |
epic? ( dev-lang/epic[profile?] ) |
25 |
=dev-haskell/hashable-1.1*[profile?] |
26 |
=dev-haskell/hashtables-1.0*[profile?] |
27 |
>=dev-haskell/haskeline-0.6.3.2[profile?] |
28 |
<dev-haskell/haskeline-0.7[profile?] |
29 |
>=dev-haskell/haskell-src-exts-1.9.6[profile?] |
30 |
<dev-haskell/haskell-src-exts-1.14[profile?] |
31 |
>=dev-haskell/mtl-2.0[profile?] |
32 |
<dev-haskell/mtl-2.2[profile?] |
33 |
=dev-haskell/quickcheck-2.4*[profile?] |
34 |
>=dev-haskell/syb-0.1[profile?] |
35 |
<dev-haskell/syb-0.4[profile?] |
36 |
=dev-haskell/xhtml-3000.2*[profile?] |
37 |
>=dev-haskell/zlib-0.4.0.1[profile?] |
38 |
<dev-haskell/zlib-0.6[profile?] |
39 |
>=dev-lang/ghc-6.10.4 |
40 |
virtual/emacs |
41 |
app-emacs/haskell-mode" |
42 |
PDEPEND="stdlib? ( sci-mathematics/agda-stdlib )" |
43 |
DEPEND="${RDEPEND} |
44 |
dev-haskell/alex |
45 |
>=dev-haskell/cabal-1.8 |
46 |
dev-haskell/happy" |
47 |
|
48 |
SITEFILE="50${PN}2-gentoo.el" |
49 |
S="${WORKDIR}/${MY_P}" |
50 |
|
51 |
src_prepare() { |
52 |
epatch "${FILESDIR}"/${P}-emacs.patch |
53 |
epatch "${FILESDIR}"/${PN}-2.3.0.1-haskell-src-exts-1.13.patch |
54 |
epatch "${FILESDIR}"/${PN}-2.3.0.1-mtl-2.1.patch |
55 |
cabal-mksetup |
56 |
} |
57 |
|
58 |
src_configure() { |
59 |
cabal_src_configure $(cabal_flag epic) |
60 |
} |
61 |
|
62 |
src_install() { |
63 |
haskell-cabal_src_install |
64 |
elisp-install ${PN} src/data/emacs-mode/*.el \ |
65 |
|| die "Failed to install emacs mode" |
66 |
elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ |
67 |
|| die "Failed to install elisp site file" |
68 |
} |
69 |
|
70 |
pkg_postinst() { |
71 |
ghc-package_pkg_postinst |
72 |
elisp-site-regen |
73 |
} |
74 |
|
75 |
pkg_postrm() { |
76 |
ghc-package_pkg_prerm |
77 |
elisp-site-regen |
78 |
} |