| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: $
|
| 4 |
|
| 5 |
EAPI=5
|
| 6 |
|
| 7 |
# ebuild generated by hackport 0.3.9999
|
| 8 |
|
| 9 |
CABAL_FEATURES="lib profile"
|
| 10 |
inherit haskell-cabal eutils elisp-common
|
| 11 |
|
| 12 |
MY_PN="Agda"
|
| 13 |
MY_P="${MY_PN}-${PV}"
|
| 14 |
|
| 15 |
DESCRIPTION="A dependently typed functional programming language and proof assistant"
|
| 16 |
HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
|
| 17 |
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
|
| 18 |
|
| 19 |
LICENSE="MIT"
|
| 20 |
SLOT="0/${PV}"
|
| 21 |
KEYWORDS="~amd64 ~x86"
|
| 22 |
IUSE="epic +stdlib"
|
| 23 |
|
| 24 |
RDEPEND=">=dev-haskell/binary-0.4.4:=[profile?]
|
| 25 |
<dev-haskell/binary-0.6:=[profile?]
|
| 26 |
=dev-haskell/deepseq-1.3*:=[profile?]
|
| 27 |
epic? ( dev-lang/epic:=[profile?] )
|
| 28 |
>=dev-haskell/geniplate-0.6.0.3:=[profile?]
|
| 29 |
<dev-haskell/geniplate-0.7:=[profile?]
|
| 30 |
>=dev-haskell/hashable-1.1.2.3:=[profile?]
|
| 31 |
<dev-haskell/hashable-1.2:=[profile?]
|
| 32 |
=dev-haskell/hashtables-1.0*:=[profile?]
|
| 33 |
>=dev-haskell/haskeline-0.6.3.2:=[profile?]
|
| 34 |
<dev-haskell/haskeline-0.8:=[profile?]
|
| 35 |
>=dev-haskell/haskell-src-exts-1.9.6:=[profile?]
|
| 36 |
<dev-haskell/haskell-src-exts-1.14:=[profile?]
|
| 37 |
>=dev-haskell/mtl-2.0:=[profile?]
|
| 38 |
<dev-haskell/mtl-2.2:=[profile?]
|
| 39 |
<dev-haskell/parallel-3.3:=[profile?]
|
| 40 |
>=dev-haskell/quickcheck-2.3:=[profile?]
|
| 41 |
<dev-haskell/quickcheck-2.6:=[profile?]
|
| 42 |
=dev-haskell/text-0.11*:=[profile?]
|
| 43 |
=dev-haskell/unordered-containers-0.2*:=[profile?]
|
| 44 |
=dev-haskell/xhtml-3000.2*:=[profile?]
|
| 45 |
>=dev-haskell/zlib-0.4.0.1:=[profile?]
|
| 46 |
<dev-haskell/zlib-0.6:=[profile?]
|
| 47 |
>=dev-lang/ghc-6.12.1:=
|
| 48 |
virtual/emacs
|
| 49 |
app-emacs/haskell-mode"
|
| 50 |
PDEPEND="stdlib? ( sci-mathematics/agda-stdlib )"
|
| 51 |
DEPEND="${RDEPEND}
|
| 52 |
dev-haskell/alex
|
| 53 |
>=dev-haskell/cabal-1.8
|
| 54 |
dev-haskell/happy"
|
| 55 |
|
| 56 |
SITEFILE="50${PN}2-gentoo.el"
|
| 57 |
S="${WORKDIR}/${MY_P}"
|
| 58 |
|
| 59 |
src_prepare() {
|
| 60 |
sed -e '/.*emacs-mode.*$/d' \
|
| 61 |
-e '/^executable agda/,$d' \
|
| 62 |
-i "${S}/${MY_PN}.cabal" \
|
| 63 |
|| die "Could not remove agda and agda-mode from ${MY_PN}.cabal"
|
| 64 |
cabal-mksetup
|
| 65 |
if use epic && use stdlib; then
|
| 66 |
ewarn "Note that the agda-stdlib README:"
|
| 67 |
ewarn "http://www.cse.chalmers.se/~nad/listings/lib/README.html"
|
| 68 |
ewarn 'says: "Currently the library does not support the Epic or JavaScript compiler'
|
| 69 |
ewarn 'backends." Hence you may wish to remove the epic use flag if you wish to use'
|
| 70 |
ewarn "the Agda standard library."
|
| 71 |
fi
|
| 72 |
}
|
| 73 |
|
| 74 |
src_configure() {
|
| 75 |
cabal_src_configure $(cabal_flag epic)
|
| 76 |
}
|
| 77 |
|
| 78 |
src_install() {
|
| 79 |
haskell-cabal_src_install
|
| 80 |
elisp-install ${PN} src/data/emacs-mode/*.el \
|
| 81 |
|| die "Failed to install emacs mode"
|
| 82 |
elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
|
| 83 |
|| die "Failed to install elisp site file"
|
| 84 |
}
|
| 85 |
|
| 86 |
pkg_postinst() {
|
| 87 |
ghc-package_pkg_postinst
|
| 88 |
elisp-site-regen
|
| 89 |
}
|
| 90 |
|
| 91 |
pkg_postrm() {
|
| 92 |
ghc-package_pkg_prerm
|
| 93 |
elisp-site-regen
|
| 94 |
}
|