/[gentoo-x86]/sci-mathematics/agda/agda-2.4.0.1.ebuild
Gentoo

Contents of /sci-mathematics/agda/agda-2.4.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Jul 2 15:25:38 2014 UTC (4 years, 5 months ago) by gienah
Branch: MAIN
CVS Tags: HEAD
Bump agda to 2.4.0.1

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 618E971F)

1 # Copyright 1999-2014 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.4.2.9999
8
9 CABAL_FEATURES="lib profile haddock hoogle hscolour"
10 inherit haskell-cabal 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.6:=[profile?] <dev-haskell/binary-0.8:=[profile?]
25 >=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
26 ~dev-haskell/data-hash-0.2.0.0:=[profile?]
27 >=dev-haskell/equivalence-0.2.3:=[profile?] <dev-haskell/equivalence-0.3:=[profile?]
28 >=dev-haskell/geniplate-0.6.0.3:=[profile?] <dev-haskell/geniplate-0.7:=[profile?]
29 >=dev-haskell/hashtables-1.0:=[profile?] <dev-haskell/hashtables-1.2:=[profile?]
30 >=dev-haskell/haskeline-0.7:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
31 >=dev-haskell/haskell-src-exts-1.9.6:=[profile?] <dev-haskell/haskell-src-exts-1.16:=[profile?]
32 >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
33 <dev-haskell/parallel-3.3:=[profile?]
34 >=dev-haskell/quickcheck-2.7.5:2=[profile?] <dev-haskell/quickcheck-2.8:2=[profile?]
35 >=dev-haskell/stmonadtrans-0.3.2:=[profile?] <dev-haskell/stmonadtrans-0.4:=[profile?]
36 >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
37 >=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-1.2:=[profile?]
38 >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.5:=[profile?]
39 >=dev-haskell/unordered-containers-0.2:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
40 >=dev-haskell/xhtml-3000.2:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
41 >=dev-haskell/zlib-0.4.0.1:=[profile?] <dev-haskell/zlib-0.6:=[profile?]
42 >=dev-lang/ghc-7.4.1:=
43 || ( ( >=dev-haskell/hashable-1.1.2.3:=[profile?] <dev-haskell/hashable-1.2:=[profile?] )
44 ( >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] ) )
45 epic? ( >=dev-lang/epic-0.1.13:=[profile?] <dev-lang/epic-0.10:=[profile?] )
46 "
47 RDEPEND+="
48 app-emacs/haskell-mode
49 virtual/emacs
50 "
51 PDEPEND="stdlib? ( sci-mathematics/agda-stdlib )"
52 DEPEND="${RDEPEND}
53 dev-haskell/alex
54 >=dev-haskell/cabal-1.8
55 dev-haskell/happy
56 "
57
58 SITEFILE="50${PN}2-gentoo.el"
59 S="${WORKDIR}/${MY_P}"
60
61 src_prepare() {
62 cabal_chdeps \
63 'mtl >= 2.1.1 && < 2.2' 'mtl >= 2.1.1 && < 2.3' \
64 'transformers == 0.3.*' 'transformers >= 0.3 && < 0.5'
65
66 sed -e '/.*emacs-mode.*$/d' \
67 -i "${S}/${MY_PN}.cabal" \
68 || die "Could not remove agda-mode from ${MY_PN}.cabal"
69
70 if use epic && use stdlib; then
71 ewarn "Note that the agda-stdlib README:"
72 ewarn "http://www.cse.chalmers.se/~nad/listings/lib/README.html"
73 ewarn 'says: "Currently the library does not support the Epic or JavaScript compiler'
74 ewarn 'backends." Hence you may wish to remove the epic use flag if you wish to use'
75 ewarn "the Agda standard library."
76 fi
77 sed -e 's@-Werror@@g' \
78 -i "${S}/${MY_PN}.cabal" \
79 || die "sed to remove -Werror failed"
80 sed -e '/, "-Werror"/d' \
81 -i "${S}/src/full/Agda/Compiler/MAlonzo/Compiler.hs" \
82 || die "sed to remove -Werror from Compiler.hs failed"
83 }
84
85 src_configure() {
86 haskell-cabal_src_configure \
87 $(cabal_flag epic epic)
88 }
89
90 src_compile() {
91 BYTECOMPFLAGS="-L ./src/data/emacs-mode"
92 elisp-compile src/data/emacs-mode/*.el \
93 || die "Failed to compile emacs mode"
94 haskell-cabal_src_compile
95 }
96
97 src_install() {
98 local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
99
100 haskell-cabal_src_install
101
102 # generate Primitive.agdai, emulate Setup.hs postinst phase
103 Agda_datadir="${add}" \
104 "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda
105
106 rm "${ED}"/usr/bin/agda-mode || die
107 # lives in sci-mathematics/agda-executable
108 rm "${ED}"/usr/bin/agda || die
109
110 elisp-install ${PN} src/data/emacs-mode/*.el \
111 || die "Failed to install emacs mode"
112 elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
113 || die "Failed to install elisp site file"
114 }
115
116 pkg_postinst() {
117 ghc-package_pkg_postinst
118 elisp-site-regen
119 }
120
121 pkg_postrm() {
122 ghc-package_pkg_prerm
123 elisp-site-regen
124 }

  ViewVC Help
Powered by ViewVC 1.1.20