Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/agda/
Date: Mon, 23 Dec 2019 22:59:24
Message-Id: 1577141952.861844514f824a9220319ba16520dc9654bd7af3.slyfox@gentoo
1 commit: 861844514f824a9220319ba16520dc9654bd7af3
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 23 22:56:44 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 23 22:59:12 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86184451
7
8 sci-mathematics/agda: allow edisoncore-1.3.2
9
10 Reported-by: Toralf Förster
11 Closes: https://bugs.gentoo.org/703418
12 Package-Manager: Portage-2.3.82, Repoman-2.3.20
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 sci-mathematics/agda/agda-2.5.2-r2.ebuild | 150 ++++++++++++++++++++++++++++++
16 1 file changed, 150 insertions(+)
17
18 diff --git a/sci-mathematics/agda/agda-2.5.2-r2.ebuild b/sci-mathematics/agda/agda-2.5.2-r2.ebuild
19 new file mode 100644
20 index 00000000000..2f77831b072
21 --- /dev/null
22 +++ b/sci-mathematics/agda/agda-2.5.2-r2.ebuild
23 @@ -0,0 +1,150 @@
24 +# Copyright 1999-2019 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +# ebuild generated by hackport 0.5.1
30 +
31 +CABAL_FEATURES="lib profile haddock hoogle hscolour"
32 +inherit haskell-cabal elisp-common
33 +
34 +MY_PN="Agda"
35 +MY_P="${MY_PN}-${PV}"
36 +
37 +## shared with sci-mathematics/agda-stdlib
38 +# upstream does not maintain version ordering:
39 +# https://github.com/agda/agda-stdlib/releases
40 +# 0.11 -> 2.5.0.20160213 -> 2.5.0.20160412 -> 0.12
41 +# As Agda-stdlib is tied to Agda version we encode
42 +# both versions in gentoo version.
43 +##
44 +MY_UPSTREAM_AGDA_STDLIB_V="0.13"
45 +MY_GENTOO_AGDA_STDLIB_V="${PV}.${MY_UPSTREAM_AGDA_STDLIB_V}"
46 +
47 +DESCRIPTION="A dependently typed functional programming language and proof assistant"
48 +HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
49 +SRC_URI="https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz"
50 +
51 +LICENSE="MIT"
52 +SLOT="0/${PV}"
53 +KEYWORDS="~amd64 ~x86"
54 +IUSE="+cpphs debug uhc +stdlib emacs"
55 +
56 +RESTRICT=test # Unrecognized option: --test (did you mean any of --help --js --css ?)
57 +
58 +RDEPEND=">=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
59 + >=dev-haskell/data-hash-0.2.0.0:=[profile?] <dev-haskell/data-hash-0.3:=[profile?]
60 + >=dev-haskell/edisoncore-1.3.1.1:=[profile?]
61 + >=dev-haskell/edit-distance-0.2.1.2:=[profile?] <dev-haskell/edit-distance-0.3:=[profile?]
62 + >=dev-haskell/equivalence-0.2.5:=[profile?] <dev-haskell/equivalence-0.4:=[profile?]
63 + >=dev-haskell/fail-4.9:=[profile?] <dev-haskell/fail-4.10:=[profile?]
64 + >=dev-haskell/geniplate-mirror-0.6.0.6:=[profile?] <dev-haskell/geniplate-mirror-0.8:=[profile?]
65 + >=dev-haskell/gitrev-1.2:=[profile?] <dev-haskell/gitrev-2.0:=[profile?]
66 + >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?]
67 + >=dev-haskell/haskeline-0.7.1.3:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
68 + >=dev-haskell/ieee754-0.7.8:=[profile?] <dev-haskell/ieee754-0.8:=[profile?]
69 + >=dev-haskell/monadplus-1.4:=[profile?] <dev-haskell/monadplus-1.5:=[profile?]
70 + >=dev-haskell/murmur-hash-0.1:=[profile?] <dev-haskell/murmur-hash-0.2:=[profile?]
71 + >=dev-haskell/parallel-3.2.0.4:=[profile?] <dev-haskell/parallel-3.3:=[profile?]
72 + >=dev-haskell/regex-tdfa-1.2.2:=[profile?] <dev-haskell/regex-tdfa-1.3:=[profile?]
73 + >=dev-haskell/semigroups-0.18:=[profile?] <dev-haskell/semigroups-0.19:=[profile?]
74 + >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
75 + >=dev-haskell/text-0.11.3.1:=[profile?] <dev-haskell/text-1.3:=[profile?]
76 + >=dev-haskell/transformers-compat-0.3.3.3:=[profile?] <dev-haskell/transformers-compat-0.6:=[profile?]
77 + >=dev-haskell/unordered-containers-0.2.5.0:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
78 + >=dev-haskell/xhtml-3000.2.1:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
79 + >=dev-haskell/zlib-0.4.0.1:=[profile?]
80 + >=dev-lang/ghc-7.10.1:=
81 + >=dev-haskell/hashtables-1.0.1.8:=[profile?] <dev-haskell/hashtables-1.3:=[profile?]
82 + >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
83 + uhc? ( >=dev-haskell/shuffle-0.1.3.3:=[profile?]
84 + >=dev-haskell/uhc-light-1.1.9.2:=[profile?] <dev-haskell/uhc-light-1.2:=[profile?]
85 + >=dev-haskell/uhc-util-0.1.6.7:=[profile?] <dev-haskell/uhc-util-0.1.7:=[profile?]
86 + >=dev-haskell/uulib-0.9.20:=[profile?] )
87 +"
88 +RDEPEND+="
89 + emacs? ( >=app-editors/emacs-23.1:*
90 + app-emacs/haskell-mode )
91 +"
92 +PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${MY_GENTOO_AGDA_STDLIB_V} )"
93 +DEPEND="${RDEPEND}
94 + dev-haskell/alex
95 + >=dev-haskell/cabal-1.22.2.0
96 + dev-haskell/happy
97 + cpphs? ( dev-haskell/cpphs )
98 +"
99 +RDEPEND+="!sci-mathematics/agda-executable"
100 +
101 +SITEFILE="50${PN}2-gentoo.el"
102 +S="${WORKDIR}/${MY_P}"
103 +
104 +src_prepare() {
105 + default
106 + if ! use emacs; then
107 + sed -e '/.*emacs-mode.*$/d' \
108 + -i "${S}/${MY_PN}.cabal" \
109 + || die "Could not remove agda-mode from ${MY_PN}.cabal"
110 + fi
111 + cabal_chdeps \
112 + 'EdisonCore >= 1.3.1.1 && < 1.3.2' 'EdisonCore >= 1.3.1.1'
113 +}
114 +
115 +src_configure() {
116 + haskell-cabal_src_configure \
117 + $(cabal_flag cpphs cpphs) \
118 + $(cabal_flag debug debug) \
119 + $(cabal_flag uhc uhc)
120 +}
121 +
122 +src_compile() {
123 + if use emacs; then
124 + BYTECOMPFLAGS="-L ./src/data/emacs-mode"
125 + elisp-compile src/data/emacs-mode/*.el \
126 + || die "Failed to compile emacs mode"
127 + fi
128 + haskell-cabal_src_compile
129 +}
130 +
131 +src_test() {
132 + export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
133 +
134 + dist/build/agda/agda --test +RTS -M1g || die
135 +}
136 +
137 +src_install() {
138 + local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
139 +
140 + haskell-cabal_src_install
141 +
142 + export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
143 + # compile Agda.Primitive and Agda.Builtin modules, emulate Setup.hs postinst phase
144 + Agda_datadir="${add}" \
145 + "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda \
146 + || die "Failed to build 'Primitive.agdai'"
147 + for file in "${add}"/lib/prim/Agda/Builtin/*.agda; do
148 + Agda_datadir="${add}" \
149 + "${ED}"/usr/bin/agda "${file}" \
150 + || die "Failed to build '${file}'"
151 + done
152 +
153 + if use emacs; then
154 + elisp-install ${PN} src/data/emacs-mode/*.el \
155 + || die "Failed to install emacs mode"
156 + elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
157 + || die "Failed to install elisp site file"
158 + fi
159 +}
160 +
161 +pkg_postinst() {
162 + haskell-cabal_pkg_postinst
163 + if use emacs; then
164 + elisp-site-regen
165 + fi
166 +}
167 +
168 +pkg_postrm() {
169 + haskell-cabal_pkg_postrm
170 + if use emacs; then
171 + elisp-site-regen
172 + fi
173 +}