summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/agda
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/agda')
-rw-r--r--sci-mathematics/agda/Manifest3
-rw-r--r--sci-mathematics/agda/agda-2.4.0.1.ebuild124
-rw-r--r--sci-mathematics/agda/agda-2.4.2.2-r1.ebuild128
-rw-r--r--sci-mathematics/agda/agda-2.4.2.3-r1.ebuild116
-rw-r--r--sci-mathematics/agda/files/50agda2-gentoo.el10
-rw-r--r--sci-mathematics/agda/files/agda-make_install.patch14
-rw-r--r--sci-mathematics/agda/metadata.xml17
7 files changed, 412 insertions, 0 deletions
diff --git a/sci-mathematics/agda/Manifest b/sci-mathematics/agda/Manifest
new file mode 100644
index 000000000000..913d70848612
--- /dev/null
+++ b/sci-mathematics/agda/Manifest
@@ -0,0 +1,3 @@
+DIST Agda-2.4.0.1.tar.gz 906887 SHA256 58e678b9d193e19d4e69d8899129d9ae16df08a394873af850797f03cc2cbe86 SHA512 edd56ecea83241f3cb1aca4ac1e17970acf122c323a4ff38e2b5d8e46e46b1afd90fbbd460a6674a51cbb13a7cbf3a57b489e91a92ce3e709b2fc3d659013601 WHIRLPOOL 4e94c4277e8be99bd5a513c274fd5712f1d4a3e99d1e626a3b195b9cf83f9216de62220cfb5e8298cc0f11560a9c32dc0116db3bd67c2240842fa798f733065c
+DIST Agda-2.4.2.2.tar.gz 963302 SHA256 2344107654d0cb2a18dcf179ed3ea0f427839e058771ed628da64fbaed55bbc3 SHA512 62376775255099570d9eb7814de77a239d0806669ee0993283429a400c7c45ca756c6735bab85b4d3a4b82defae544364ac9107fd622f2df1ebcbded3113204d WHIRLPOOL dd220346109b7e137cca2e3b091c581b0b4ed0e23340209c7eebc48b39d807a569c984fbe1aee813d18a7f953db86e82b6a6aa7e197e6a2c5569dc311625f45f
+DIST Agda-2.4.2.3.tar.gz 990268 SHA256 bc6def45e32498f51863d67acfbe048c039d630c6a36761ed27e99a5f68d7b27 SHA512 84c24c517c830128032af8de9c8ce9ed8d5333becf65e6c96d67104caae1b66fb37ae9bcdff8f42a3e2997f4dcef2f4ea5addd7c94c45a0533c833da9af4d55a WHIRLPOOL ccef337495a5bc6d4272821700126a793ac0cac8b0ebbef44be478b725545797959c0edba910b5e2b68076e7c5c01e98580ea40016d02b268960dfba5f62a24a
diff --git a/sci-mathematics/agda/agda-2.4.0.1.ebuild b/sci-mathematics/agda/agda-2.4.0.1.ebuild
new file mode 100644
index 000000000000..a278e74af5d6
--- /dev/null
+++ b/sci-mathematics/agda/agda-2.4.0.1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.2.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal elisp-common
+
+MY_PN="Agda"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A dependently typed functional programming language and proof assistant"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="epic +stdlib"
+
+RDEPEND=">=dev-haskell/binary-0.6:=[profile?] <dev-haskell/binary-0.8:=[profile?]
+ >=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
+ ~dev-haskell/data-hash-0.2.0.0:=[profile?]
+ >=dev-haskell/equivalence-0.2.3:=[profile?] <dev-haskell/equivalence-0.3:=[profile?]
+ >=dev-haskell/geniplate-0.6.0.3:=[profile?] <dev-haskell/geniplate-0.7:=[profile?]
+ >=dev-haskell/hashtables-1.0:=[profile?] <dev-haskell/hashtables-1.2:=[profile?]
+ >=dev-haskell/haskeline-0.7:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
+ >=dev-haskell/haskell-src-exts-1.9.6:=[profile?] <dev-haskell/haskell-src-exts-1.16:=[profile?]
+ >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
+ <dev-haskell/parallel-3.3:=[profile?]
+ >=dev-haskell/quickcheck-2.7.5:2=[profile?] <dev-haskell/quickcheck-2.8:2=[profile?]
+ >=dev-haskell/stmonadtrans-0.3.2:=[profile?] <dev-haskell/stmonadtrans-0.4:=[profile?]
+ >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
+ >=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-1.2:=[profile?]
+ >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.5:=[profile?]
+ >=dev-haskell/unordered-containers-0.2:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
+ >=dev-haskell/xhtml-3000.2:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-haskell/zlib-0.4.0.1:=[profile?] <dev-haskell/zlib-0.6:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+ || ( ( >=dev-haskell/hashable-1.1.2.3:=[profile?] <dev-haskell/hashable-1.2:=[profile?] )
+ ( >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] ) )
+ epic? ( >=dev-lang/epic-0.1.13:=[profile?] <dev-lang/epic-0.10:=[profile?] )
+"
+RDEPEND+="
+ app-emacs/haskell-mode
+ virtual/emacs
+"
+PDEPEND="stdlib? ( sci-mathematics/agda-stdlib )"
+DEPEND="${RDEPEND}
+ dev-haskell/alex
+ >=dev-haskell/cabal-1.8
+ dev-haskell/happy
+"
+
+SITEFILE="50${PN}2-gentoo.el"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ cabal_chdeps \
+ 'mtl >= 2.1.1 && < 2.2' 'mtl >= 2.1.1 && < 2.3' \
+ 'transformers == 0.3.*' 'transformers >= 0.3 && < 0.5'
+
+ sed -e '/.*emacs-mode.*$/d' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "Could not remove agda-mode from ${MY_PN}.cabal"
+
+ if use epic && use stdlib; then
+ ewarn "Note that the agda-stdlib README:"
+ ewarn "http://www.cse.chalmers.se/~nad/listings/lib/README.html"
+ ewarn 'says: "Currently the library does not support the Epic or JavaScript compiler'
+ ewarn 'backends." Hence you may wish to remove the epic use flag if you wish to use'
+ ewarn "the Agda standard library."
+ fi
+ sed -e 's@-Werror@@g' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "sed to remove -Werror failed"
+ sed -e '/, "-Werror"/d' \
+ -i "${S}/src/full/Agda/Compiler/MAlonzo/Compiler.hs" \
+ || die "sed to remove -Werror from Compiler.hs failed"
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag epic epic)
+}
+
+src_compile() {
+ BYTECOMPFLAGS="-L ./src/data/emacs-mode"
+ elisp-compile src/data/emacs-mode/*.el \
+ || die "Failed to compile emacs mode"
+ haskell-cabal_src_compile
+}
+
+src_install() {
+ local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
+
+ haskell-cabal_src_install
+
+ # generate Primitive.agdai, emulate Setup.hs postinst phase
+ Agda_datadir="${add}" \
+ "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda
+
+ rm "${ED}"/usr/bin/agda-mode || die
+ # lives in sci-mathematics/agda-executable
+ rm "${ED}"/usr/bin/agda || die
+
+ elisp-install ${PN} src/data/emacs-mode/*.el \
+ || die "Failed to install emacs mode"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "Failed to install elisp site file"
+}
+
+pkg_postinst() {
+ ghc-package_pkg_postinst
+ elisp-site-regen
+}
+
+pkg_postrm() {
+ ghc-package_pkg_prerm
+ elisp-site-regen
+}
diff --git a/sci-mathematics/agda/agda-2.4.2.2-r1.ebuild b/sci-mathematics/agda/agda-2.4.2.2-r1.ebuild
new file mode 100644
index 000000000000..06034efa7e6a
--- /dev/null
+++ b/sci-mathematics/agda/agda-2.4.2.2-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.4.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal elisp-common
+
+MY_PN="Agda"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A dependently typed functional programming language and proof assistant"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cpphs epic +stdlib"
+
+RDEPEND=">=dev-haskell/binary-0.6:=[profile?] <dev-haskell/binary-0.8:=[profile?]
+ >=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
+ ~dev-haskell/data-hash-0.2.0.0:=[profile?]
+ >=dev-haskell/equivalence-0.2.5:=[profile?] <dev-haskell/equivalence-0.3:=[profile?]
+ >=dev-haskell/geniplate-0.6.0.3:=[profile?] <dev-haskell/geniplate-0.7:=[profile?]
+ >=dev-haskell/hashtables-1.0:=[profile?] <dev-haskell/hashtables-1.3:=[profile?]
+ >=dev-haskell/haskeline-0.7:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
+ >=dev-haskell/haskell-src-exts-1.9.6:=[profile?] <dev-haskell/haskell-src-exts-1.17:=[profile?]
+ <dev-haskell/parallel-3.3:=[profile?]
+ >=dev-haskell/quickcheck-2.7.5:2=[profile?] <dev-haskell/quickcheck-2.8:2=[profile?]
+ >=dev-haskell/stmonadtrans-0.3.2:=[profile?] <dev-haskell/stmonadtrans-0.4:=[profile?]
+ >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
+ >=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-1.3:=[profile?]
+ >=dev-haskell/unordered-containers-0.2:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
+ >=dev-haskell/xhtml-3000.2:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-haskell/zlib-0.4.0.1:=[profile?] <dev-haskell/zlib-0.6:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+ || ( ( >=dev-haskell/hashable-1.1.2.3:=[profile?] <dev-haskell/hashable-1.2:=[profile?] )
+ ( >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] ) )
+ || ( ( >=dev-haskell/mtl-2.1.1:=[profile?] <=dev-haskell/mtl-2.1.3.1:=[profile?] )
+ ( >=dev-haskell/mtl-2.2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?] ) )
+ || ( ( >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.4:=[profile?] )
+ ( >=dev-haskell/transformers-0.4.1.0:=[profile?] <dev-haskell/transformers-0.5:=[profile?] ) )
+ epic? ( >=dev-lang/epic-0.1.13:=[profile?] <dev-lang/epic-0.10:=[profile?] )
+"
+RDEPEND+="
+ app-emacs/haskell-mode
+ virtual/emacs
+"
+PDEPEND="stdlib? ( sci-mathematics/agda-stdlib )"
+DEPEND="${RDEPEND}
+ dev-haskell/alex
+ >=dev-haskell/cabal-1.8
+ dev-haskell/happy
+ cpphs? ( dev-haskell/cpphs )
+"
+
+SITEFILE="50${PN}2-gentoo.el"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ cabal_chdeps \
+ 'hashtables >= 1.0 && < 1.2' 'hashtables >= 1.0 && < 1.3' \
+ 'cpphs >= 1.18.6 && < 1.19' 'cpphs >= 1.18.6 && < 1.20'
+
+ sed -e '/.*emacs-mode.*$/d' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "Could not remove agda-mode from ${MY_PN}.cabal"
+
+ if use epic && use stdlib; then
+ ewarn "Note that the agda-stdlib README:"
+ ewarn "http://www.cse.chalmers.se/~nad/listings/lib/README.html"
+ ewarn 'says: "Currently the library does not support the Epic or JavaScript compiler'
+ ewarn 'backends." Hence you may wish to remove the epic use flag if you wish to use'
+ ewarn "the Agda standard library."
+ fi
+ sed -e 's@-Werror@@g' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "sed to remove -Werror failed"
+ sed -e '/, "-Werror"/d' \
+ -i "${S}/src/full/Agda/Compiler/MAlonzo/Compiler.hs" \
+ || die "sed to remove -Werror from Compiler.hs failed"
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag cpphs cpphs) \
+ $(cabal_flag epic epic)
+}
+
+src_compile() {
+ BYTECOMPFLAGS="-L ./src/data/emacs-mode"
+ elisp-compile src/data/emacs-mode/*.el \
+ || die "Failed to compile emacs mode"
+ haskell-cabal_src_compile
+}
+
+src_install() {
+ local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
+
+ haskell-cabal_src_install
+
+ # generate Primitive.agdai, emulate Setup.hs postinst phase
+ Agda_datadir="${add}" \
+ "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda
+
+ rm "${ED}"/usr/bin/agda-mode || die
+ # lives in sci-mathematics/agda-executable
+ rm "${ED}"/usr/bin/agda || die
+
+ elisp-install ${PN} src/data/emacs-mode/*.el \
+ || die "Failed to install emacs mode"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "Failed to install elisp site file"
+}
+
+pkg_postinst() {
+ ghc-package_pkg_postinst
+ elisp-site-regen
+}
+
+pkg_postrm() {
+ ghc-package_pkg_prerm
+ elisp-site-regen
+}
diff --git a/sci-mathematics/agda/agda-2.4.2.3-r1.ebuild b/sci-mathematics/agda/agda-2.4.2.3-r1.ebuild
new file mode 100644
index 000000000000..b6457e53505a
--- /dev/null
+++ b/sci-mathematics/agda/agda-2.4.2.3-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.5.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal elisp-common
+
+MY_PN="Agda"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A dependently typed functional programming language and proof assistant"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cpphs +stdlib"
+
+RDEPEND=">=dev-haskell/base-orphans-0.3.1:=[profile?] <dev-haskell/base-orphans-0.4:=[profile?]
+ >=dev-haskell/binary-0.6:=[profile?] <dev-haskell/binary-0.8:=[profile?]
+ >=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
+ >=dev-haskell/data-hash-0.2.0.0:=[profile?] <dev-haskell/data-hash-0.3:=[profile?]
+ >=dev-haskell/edit-distance-0.2.1.2:=[profile?] <dev-haskell/edit-distance-0.3:=[profile?]
+ >=dev-haskell/equivalence-0.2.5:=[profile?] <dev-haskell/equivalence-0.4:=[profile?]
+ >=dev-haskell/geniplate-mirror-0.6.0.6:=[profile?] <dev-haskell/geniplate-mirror-0.8:=[profile?]
+ >=dev-haskell/haskeline-0.7:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
+ >=dev-haskell/haskell-src-exts-1.16.0.1:=[profile?] <dev-haskell/haskell-src-exts-1.17:=[profile?]
+ >=dev-haskell/old-time-1.1.0.0:=[profile?] <dev-haskell/old-time-1.2:=[profile?]
+ >=dev-haskell/parallel-3.2.0.4:=[profile?] <dev-haskell/parallel-3.3:=[profile?]
+ >=dev-haskell/quickcheck-2.8:2=[profile?] <dev-haskell/quickcheck-2.9:2=[profile?]
+ >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
+ >=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-1.3:=[profile?]
+ >=dev-haskell/transformers-compat-0.3.3.2:=[profile?] <dev-haskell/transformers-compat-0.5:=[profile?]
+ >=dev-haskell/unordered-containers-0.2:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
+ >=dev-haskell/xhtml-3000.2:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-haskell/zlib-0.4.0.1:=[profile?] <dev-haskell/zlib-0.7:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+ || ( ( >=dev-haskell/hashable-1.1.2.3:=[profile?] <dev-haskell/hashable-1.2:=[profile?] )
+ ( >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] ) )
+ || ( ( >=dev-haskell/hashtables-1.0:=[profile?] <dev-haskell/hashtables-1.2:=[profile?] )
+ ( >=dev-haskell/hashtables-1.2.0.2:=[profile?] <dev-haskell/hashtables-1.3:=[profile?] ) )
+ || ( ( >=dev-haskell/mtl-2.1.1:=[profile?] <=dev-haskell/mtl-2.1.3.1:=[profile?] )
+ ( >=dev-haskell/mtl-2.2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?] ) )
+ || ( ( >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.4:=[profile?] )
+ ( >=dev-haskell/transformers-0.4.1.0:=[profile?] <dev-haskell/transformers-0.5:=[profile?] ) )
+"
+RDEPEND+="
+ app-emacs/haskell-mode
+ virtual/emacs
+"
+PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${PV} )"
+DEPEND="${RDEPEND}
+ dev-haskell/alex
+ >=dev-haskell/cabal-1.8
+ dev-haskell/happy
+ cpphs? ( dev-haskell/cpphs )
+"
+RDEPEND+="!sci-mathematics/agda-executable"
+
+SITEFILE="50${PN}2-gentoo.el"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ cabal_chdeps \
+ 'data-hash == 0.2.0.0' 'data-hash >= 0.2.0.0 && < 0.3' \
+ 'geniplate-mirror >= 0.6.0.6 && < 0.7' 'geniplate-mirror >= 0.6.0.6 && < 0.8'
+ sed -e '/.*emacs-mode.*$/d' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "Could not remove agda-mode from ${MY_PN}.cabal"
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag cpphs cpphs)
+}
+
+src_compile() {
+ BYTECOMPFLAGS="-L ./src/data/emacs-mode"
+ elisp-compile src/data/emacs-mode/*.el \
+ || die "Failed to compile emacs mode"
+ haskell-cabal_src_compile
+}
+
+src_test() {
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+
+ dist/build/agda/agda --test +RTS -M1g || die
+}
+
+src_install() {
+ local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
+
+ haskell-cabal_src_install
+
+ # generate Primitive.agdai, emulate Setup.hs postinst phase
+ Agda_datadir="${add}" \
+ "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda
+
+ elisp-install ${PN} src/data/emacs-mode/*.el \
+ || die "Failed to install emacs mode"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "Failed to install elisp site file"
+}
+
+pkg_postinst() {
+ elisp-site-regen
+}
+
+pkg_postrm() {
+ elisp-site-regen
+}
diff --git a/sci-mathematics/agda/files/50agda2-gentoo.el b/sci-mathematics/agda/files/50agda2-gentoo.el
new file mode 100644
index 000000000000..fd1367f727e6
--- /dev/null
+++ b/sci-mathematics/agda/files/50agda2-gentoo.el
@@ -0,0 +1,10 @@
+;;; agda site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'agda2-mode "agda2.el"
+ "Major mode for Agda files" t)
+(unless (assoc "\\.agda" auto-mode-alist)
+ (setq auto-mode-alist
+ (nconc '(("\\.agda" . agda2-mode)
+ ("\\.alfa" . agda2-mode)) auto-mode-alist)))
+
diff --git a/sci-mathematics/agda/files/agda-make_install.patch b/sci-mathematics/agda/files/agda-make_install.patch
new file mode 100644
index 000000000000..0d008acd436b
--- /dev/null
+++ b/sci-mathematics/agda/files/agda-make_install.patch
@@ -0,0 +1,14 @@
+--- Agda-1.1-cvs20050601/src/Makefile.in.old 2006-07-12 14:47:06.000000000 +0200
++++ Agda-1.1-cvs20050601/src/Makefile.in 2006-07-12 14:47:25.000000000 +0200
+@@ -74,10 +74,9 @@
+
+ install_bin: emacsagda agdachecker
+ ${INSTALL} -d ${destdir}/bin/
++ ${INSTALL} -d ${bindir}
+ cp emacsagda ${destdir}/bin/emacsagda-${VERSION}
+- -rm ${destdir}/bin/emacsagda
+ (cd ${destdir}/bin; ln -s emacsagda-${VERSION} emacsagda)
+- -(cd ${bindir}; ln -s ${destdir}/bin/emacsagda emacsagda)
+ # No more energy to create variants
+ ${INSTALL} agdachecker ${bindir}
+
diff --git a/sci-mathematics/agda/metadata.xml b/sci-mathematics/agda/metadata.xml
new file mode 100644
index 000000000000..11b2cbcae0bb
--- /dev/null
+++ b/sci-mathematics/agda/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-mathematics</herd>
+ <herd>haskell</herd>
+<longdescription lang="en">
+ Agda is an interactive proof editor, or proof assistant. Its input language,
+ called Agda language (or simply Agda), is based on a constructive type
+ theory á la Martin-Löf, extended with dependent record types,
+ inductive definitions, module structures and a class hierarchy mechanism.
+</longdescription>
+<use>
+ <flag name='cpphs'>Use cpphs instead of cpp.</flag>
+ <flag name='epic'>Add support for the epic compiler.</flag>
+ <flag name='stdlib'>Install the standard library.</flag>
+</use>
+</pkgmetadata>