diff options
Diffstat (limited to 'sci-mathematics/agda')
-rw-r--r-- | sci-mathematics/agda/Manifest | 9 | ||||
-rw-r--r-- | sci-mathematics/agda/agda-2.4.2.5-r2.ebuild | 130 | ||||
-rw-r--r-- | sci-mathematics/agda/agda-2.5.2-r1.ebuild | 148 | ||||
-rw-r--r-- | sci-mathematics/agda/files/50agda2-gentoo.el | 10 | ||||
-rw-r--r-- | sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch | 13 | ||||
-rw-r--r-- | sci-mathematics/agda/metadata.xml | 23 |
6 files changed, 333 insertions, 0 deletions
diff --git a/sci-mathematics/agda/Manifest b/sci-mathematics/agda/Manifest new file mode 100644 index 000000000000..e8ee6cff1b76 --- /dev/null +++ b/sci-mathematics/agda/Manifest @@ -0,0 +1,9 @@ +AUX 50agda2-gentoo.el 317 SHA256 043797b8766a610c08a5aa10b4ea46b955f208b851f0baea4ba4dbff74fb3417 SHA512 55b7438896cb66b4b32b0ba0d9468bb2496df1f63a78f3f4b4e19cc038018605c9cbd7880d2be1b40d6d1509ac6df20304cdc8c2ccde69e89777acfc65a1ce8e WHIRLPOOL cba0b37c78d2e409081f90d7d68a2b5c21ad8cb79f51ff364c8ee9107c9f42a229d60b195a984acfcc45a9638b04bac0371e9eea4ef2bde1680983a85832329a +AUX agda-2.4.2.5-hashtables.patch 558 SHA256 e6a3fad604bd3908eae84b259a5c23c767101af0ee54f1d148f367f100b20115 SHA512 0297fc4605db3dc11f08ec068cfdce908d273c6d14f472e4d00b4416a8e5f671b3b77d4e0cb671671bafd07b39ec46e72eab6cab972145199b25b3c4cfb0b3a6 WHIRLPOOL ce15e62578cae8e3d6f218e12633cb0d695833195d3aaa27259745f6c5a1478426cc92a2be8c554515dcd2a83aca4e2d8f50063b805676b7e76d245e99e8ce69 +DIST Agda-2.4.2.5.tar.gz 1031427 SHA256 959658a372d93b735d92191b372d221461026c98de4f92e56d198b576dfb67ee SHA512 c2e090a42f699200854c20dad868b4b67e99107f0cdbba20ed268f4618fcf80068ee31db37e4b6637f73128d9f652ef9276d8f7adea54628da759d79f5e4f4a2 WHIRLPOOL dd2d579242b395835a25910409df1eacaa5c7253a43d7cd6fbeb51146df5252ef2f255d063d15c5cc6bd3fab9e568a60b798539c4f73747411f31919970dee1e +DIST Agda-2.5.2.tar.gz 1240885 SHA256 d812cec3bf7f03c4b27248572475c7e060154102771a8434cc11ba89f5691439 SHA512 39ec73316eb7409f7f2618e86a9a3a2c420c93470bf46a1c37a4c4753c6c831d2d6da9ba007086ddee9defd481a695bf142a0a7d360dfa01bdb1fb92467af164 WHIRLPOOL b85abca763117f8216dac5055ada3d8fd46d0efb7ed5bc32d7b491416c74213741822c798dbabdf227bf420776ad32423eac7e06ffe74196381b1fd4886255c4 +EBUILD agda-2.4.2.5-r2.ebuild 4430 SHA256 edf1f52e5be8c2227101842dd822e31143c426a7f7dee1579a4b6335668d9948 SHA512 5af62713f088922724bd2356bb3fe9602d5af59a512b06eedbe2ee113858e7368830c8135aa7f10bc76502c69282e6151d9a18a4869f035f2ea098a5823f04ea WHIRLPOOL 7e8ee8029cfe126f078524443236fae65719441e1891c8fe0cc871f86a2ce5996c143e3de11c1965d327233197c19410cadda66a617e53a52937f74553c401e0 +EBUILD agda-2.5.2-r1.ebuild 5264 SHA256 9930e1d0fccedc03749a7acd16f173e76d1cfc06504fcf1e2530046b595a9354 SHA512 4c8e7b1cc863ee0df7924659772b3fb7fad5088514f4731ac33849eb9c3a5f9cf0871686775e595fbe841147dab96e1980f8155a6df1f8418b7498974120144d WHIRLPOOL 45fa2bbc2addb17636aabb665ff001871aedac05294823347e869c40b7de39126fa9cfbc30f0fffb9736358429b81045d7fa401e04c85d464a2840744c0973f2 +MISC ChangeLog 5291 SHA256 8d3adab1f7acbe83b609e88a69bc56b2211a9adc16c073d13284e3b816243eb2 SHA512 409335c1d73e02bfe5de7707062208aa43d483ee72ee08da9f86ea950ae29b584d1731da85e8f309c4d3f94987adce4eb4f8926951a5d9ec4b37a8c36405e295 WHIRLPOOL 5d684b0f50d088a8579379bc87699908d6ef3c411b4f769ace5b66138cfb1ed60c8824345e8cfd209116f56eec65ae2bffbdb58d9212e33e254439f417f9d142 +MISC ChangeLog-2015 6423 SHA256 af74d03a5c5906f77c2e59945fd47daf25e0d7a64940b1f40e92acb784da75fd SHA512 27c98a52d2852db59cd966285c6f60da11acad3c546a59ac1681c164aa3c6269a07a7547fa34af384bd3ace7819c40f5e0927ee9bd69947d6a08478a618ff19c WHIRLPOOL 564e5e34757d8282dcbf3ee751b7b60f6ba5efa82c3803b5948553fbe69ce0f013e46bd2305c72daad3fc129c1d3fea470eb7e5775da44bf762a39e1cf3c17bb +MISC metadata.xml 907 SHA256 ed83e483c63850f224d6d7dd21a746524e15424b434b4b9e9c3be4999c365d9a SHA512 d48af119f929e739634165e1ece14ef2bf55eb996fd0852fd34783a18da04a156bf858b3f0a7ad3cd5c85e55c564bfb3e5552786161fd2ad66f86eb5d3d91426 WHIRLPOOL 1f323030980e834df9c7abd1fbdad038d3513a231813a1c59a6ab428f74e719b472c7f1559ace228eb03504a6aa3f22b61028a18e1edb4b8fa0f004ea8220e49 diff --git a/sci-mathematics/agda/agda-2.4.2.5-r2.ebuild b/sci-mathematics/agda/agda-2.4.2.5-r2.ebuild new file mode 100644 index 000000000000..04d8026b58b3 --- /dev/null +++ b/sci-mathematics/agda/agda-2.4.2.5-r2.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +# ebuild generated by hackport 0.4.6.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 emacs" + +RDEPEND=">=dev-haskell/binary-0.7.2.1:=[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/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] + >=dev-haskell/haskeline-0.7.1.3:=[profile?] <dev-haskell/haskeline-0.8:=[profile?] + >=dev-haskell/haskell-src-exts-1.16.0.1:=[profile?] <dev-haskell/haskell-src-exts-1.18:=[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.3.1:=[profile?] <dev-haskell/text-1.3:=[profile?] + >=dev-haskell/transformers-compat-0.3.3.3:=[profile?] + >=dev-haskell/unordered-containers-0.2.5.0:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?] + >=dev-haskell/void-0.5.4:=[profile?] <dev-haskell/void-0.9:=[profile?] + >=dev-haskell/xhtml-3000.2.1:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?] + >=dev-haskell/zlib-0.4.0.1:=[profile?] + >=dev-lang/ghc-7.6.2:= + >=dev-haskell/hashtables-1.0.1.8:=[profile?] <dev-haskell/hashtables-1.3:=[profile?] + >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?] + >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.5:=[profile?] +" +RDEPEND+=" + emacs? ( app-emacs/haskell-mode + virtual/emacs ) +" +PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${PV} )" +DEPEND="${RDEPEND} + dev-haskell/alex + >=dev-haskell/cabal-1.16.0 + dev-haskell/happy + cpphs? ( dev-haskell/cpphs ) +" +RDEPEND+="!sci-mathematics/agda-executable" + +SITEFILE="50${PN}2-gentoo.el" +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-hashtables.patch + + sed -e '/.*emacs-mode.*$/d' \ + -i "${S}/${MY_PN}.cabal" \ + || die "Could not remove agda-mode from ${MY_PN}.cabal" + sed -e '/^executable agda-mode$/a \ \ buildable: False' \ + -i "${S}/${MY_PN}.cabal" \ + || die "Could not remove agda-mode executable from ${MY_PN}.cabal" + + cabal_chdeps \ + 'zlib >= 0.4.0.1 && < 0.6.1' 'zlib >= 0.4.0.1' \ + 'transformers-compat >= 0.3.3.3 && < 0.5' 'transformers-compat >= 0.3.3.3' \ + 'build-tools: cpphs >= 1.19 && < 1.20' 'build-tools: cpphs >= 1.19' \ + 'alex >= 3.1.0 && < 3.2' 'alex >= 3.1.0' +} + +src_configure() { + haskell-cabal_src_configure \ + $(cabal_flag cpphs cpphs) +} + +src_compile() { + if use emacs; then + BYTECOMPFLAGS="-L ./src/data/emacs-mode" + elisp-compile src/data/emacs-mode/*.el \ + || die "Failed to compile emacs mode" + fi + 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 + + export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + # generate Primitive.agdai, emulate Setup.hs postinst phase + Agda_datadir="${add}" \ + "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda \ + || die "Failed to build 'Primitive.agdai'" + + if use emacs; then + 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" + fi +} + +pkg_postinst() { + haskell-cabal_pkg_postinst + if use emacs; then + elisp-site-regen + fi +} + +pkg_postrm() { + haskell-cabal_pkg_postrm + if use emacs; then + elisp-site-regen + fi +} diff --git a/sci-mathematics/agda/agda-2.5.2-r1.ebuild b/sci-mathematics/agda/agda-2.5.2-r1.ebuild new file mode 100644 index 000000000000..dcdb851153f5 --- /dev/null +++ b/sci-mathematics/agda/agda-2.5.2-r1.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# ebuild generated by hackport 0.5.1 + +CABAL_FEATURES="lib profile haddock hoogle hscolour" +inherit haskell-cabal elisp-common + +MY_PN="Agda" +MY_P="${MY_PN}-${PV}" + +## shared with sci-mathematics/agda-stdlib +# upstream does not maintain version ordering: +# https://github.com/agda/agda-stdlib/releases +# 0.11 -> 2.5.0.20160213 -> 2.5.0.20160412 -> 0.12 +# As Agda-stdlib is tied to Agda version we encode +# both versions in gentoo version. +## +MY_UPSTREAM_AGDA_STDLIB_V="0.13" +MY_GENTOO_AGDA_STDLIB_V="${PV}.${MY_UPSTREAM_AGDA_STDLIB_V}" + +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 debug uhc +stdlib emacs" + +RESTRICT=test # Unrecognized option: --test (did you mean any of --help --js --css ?) + +RDEPEND=">=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/edisoncore-1.3.1.1:=[profile?] <dev-haskell/edisoncore-1.3.2:=[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/fail-4.9:=[profile?] <dev-haskell/fail-4.10:=[profile?] + >=dev-haskell/geniplate-mirror-0.6.0.6:=[profile?] <dev-haskell/geniplate-mirror-0.8:=[profile?] + >=dev-haskell/gitrev-1.2:=[profile?] <dev-haskell/gitrev-2.0:=[profile?] + >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] + >=dev-haskell/haskeline-0.7.1.3:=[profile?] <dev-haskell/haskeline-0.8:=[profile?] + >=dev-haskell/ieee754-0.7.8:=[profile?] <dev-haskell/ieee754-0.8:=[profile?] + >=dev-haskell/monadplus-1.4:=[profile?] <dev-haskell/monadplus-1.5:=[profile?] + >=dev-haskell/murmur-hash-0.1:=[profile?] <dev-haskell/murmur-hash-0.2:=[profile?] + >=dev-haskell/parallel-3.2.0.4:=[profile?] <dev-haskell/parallel-3.3:=[profile?] + >=dev-haskell/regex-tdfa-1.2.2:=[profile?] <dev-haskell/regex-tdfa-1.3:=[profile?] + >=dev-haskell/semigroups-0.18:=[profile?] <dev-haskell/semigroups-0.19:=[profile?] + >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?] + >=dev-haskell/text-0.11.3.1:=[profile?] <dev-haskell/text-1.3:=[profile?] + >=dev-haskell/transformers-compat-0.3.3.3:=[profile?] <dev-haskell/transformers-compat-0.6:=[profile?] + >=dev-haskell/unordered-containers-0.2.5.0:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?] + >=dev-haskell/xhtml-3000.2.1:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?] + >=dev-haskell/zlib-0.4.0.1:=[profile?] + >=dev-lang/ghc-7.10.1:= + >=dev-haskell/hashtables-1.0.1.8:=[profile?] <dev-haskell/hashtables-1.3:=[profile?] + >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?] + uhc? ( >=dev-haskell/shuffle-0.1.3.3:=[profile?] + >=dev-haskell/uhc-light-1.1.9.2:=[profile?] <dev-haskell/uhc-light-1.2:=[profile?] + >=dev-haskell/uhc-util-0.1.6.7:=[profile?] <dev-haskell/uhc-util-0.1.7:=[profile?] + >=dev-haskell/uulib-0.9.20:=[profile?] ) +" +RDEPEND+=" + emacs? ( app-emacs/haskell-mode + virtual/emacs ) +" +PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${MY_GENTOO_AGDA_STDLIB_V} )" +DEPEND="${RDEPEND} + dev-haskell/alex + >=dev-haskell/cabal-1.22.2.0 + dev-haskell/happy + cpphs? ( dev-haskell/cpphs ) +" +RDEPEND+="!sci-mathematics/agda-executable" + +SITEFILE="50${PN}2-gentoo.el" +S="${WORKDIR}/${MY_P}" + +src_prepare() { + default + if ! use emacs; then + sed -e '/.*emacs-mode.*$/d' \ + -i "${S}/${MY_PN}.cabal" \ + || die "Could not remove agda-mode from ${MY_PN}.cabal" + fi +} + +src_configure() { + haskell-cabal_src_configure \ + $(cabal_flag cpphs cpphs) \ + $(cabal_flag debug debug) \ + $(cabal_flag uhc uhc) +} + +src_compile() { + if use emacs; then + BYTECOMPFLAGS="-L ./src/data/emacs-mode" + elisp-compile src/data/emacs-mode/*.el \ + || die "Failed to compile emacs mode" + fi + 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 + + export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" + # compile Agda.Primitive and Agda.Builtin modules, emulate Setup.hs postinst phase + Agda_datadir="${add}" \ + "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda \ + || die "Failed to build 'Primitive.agdai'" + for file in "${add}"/lib/prim/Agda/Builtin/*.agda; do + Agda_datadir="${add}" \ + "${ED}"/usr/bin/agda "${file}" \ + || die "Failed to build '${file}'" + done + + if use emacs; then + 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" + fi +} + +pkg_postinst() { + haskell-cabal_pkg_postinst + if use emacs; then + elisp-site-regen + fi +} + +pkg_postrm() { + haskell-cabal_pkg_postrm + if use emacs; then + elisp-site-regen + fi +} 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-2.4.2.5-hashtables.patch b/sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch new file mode 100644 index 000000000000..9bba347fa292 --- /dev/null +++ b/sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch @@ -0,0 +1,13 @@ +diff --git a/src/full/Agda/Utils/HashMap.hs b/src/full/Agda/Utils/HashMap.hs +index 5e1da8b..7c34548 100644 +--- a/src/full/Agda/Utils/HashMap.hs ++++ b/src/full/Agda/Utils/HashMap.hs +@@ -5,7 +5,7 @@ module Agda.Utils.HashMap + ) where + + import Data.Hashable +-import Data.HashMap.Strict as HashMap ++import Data.HashMap.Strict as HashMap (HashMap, filter, lookup, insert, delete, empty, insertWith, toList, adjust, union, unionWith, elems, fromList, (!), keys, map, unions, foldr) + import qualified Data.Maybe as Maybe + + -- | Like 'Data.Map.Strict.mapMaybe'. diff --git a/sci-mathematics/agda/metadata.xml b/sci-mathematics/agda/metadata.xml new file mode 100644 index 000000000000..057c778e5810 --- /dev/null +++ b/sci-mathematics/agda/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci-mathematics@gentoo.org</email> + <name>Gentoo Mathematics Project</name> + </maintainer> +<maintainer type="project"> + <email>haskell@gentoo.org</email> + <name>Gentoo Haskell</name> + </maintainer> +<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="stdlib">Install the standard library.</flag> + <flag name="uhc">Add support for the uhc backend.</flag> +</use> +</pkgmetadata> |