1 |
commit: 6c5210c2c89fea8b5462ad4ea1c6070c75c9b52b |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 27 17:54:38 2015 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 27 17:54:38 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c5210c2 |
7 |
|
8 |
sci-mathematics/agda: fix .agdai file generation on install, bug #559326 |
9 |
|
10 |
As we build dynamically linked binaries now we need to |
11 |
add LD_LIBRARY_PATH to temporary llibrary localtions |
12 |
to generate .agdai files. |
13 |
|
14 |
Reported-by: Toralf Förster |
15 |
Bug: https://bugs.gentoo.org/559326 |
16 |
|
17 |
Package-Manager: portage-2.2.22 |
18 |
|
19 |
sci-mathematics/agda/agda-2.4.2.3-r2.ebuild | 119 ++++++++++++++++++++++++++++ |
20 |
1 file changed, 119 insertions(+) |
21 |
|
22 |
diff --git a/sci-mathematics/agda/agda-2.4.2.3-r2.ebuild b/sci-mathematics/agda/agda-2.4.2.3-r2.ebuild |
23 |
new file mode 100644 |
24 |
index 0000000..b163a57 |
25 |
--- /dev/null |
26 |
+++ b/sci-mathematics/agda/agda-2.4.2.3-r2.ebuild |
27 |
@@ -0,0 +1,119 @@ |
28 |
+# Copyright 1999-2015 Gentoo Foundation |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+# $Id$ |
31 |
+ |
32 |
+EAPI=5 |
33 |
+ |
34 |
+# ebuild generated by hackport 0.4.5.9999 |
35 |
+ |
36 |
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour" |
37 |
+inherit haskell-cabal elisp-common |
38 |
+ |
39 |
+MY_PN="Agda" |
40 |
+MY_P="${MY_PN}-${PV}" |
41 |
+ |
42 |
+DESCRIPTION="A dependently typed functional programming language and proof assistant" |
43 |
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/" |
44 |
+SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="MIT" |
47 |
+SLOT="0/${PV}" |
48 |
+KEYWORDS="~amd64 ~x86" |
49 |
+IUSE="+cpphs +stdlib" |
50 |
+ |
51 |
+RDEPEND=">=dev-haskell/base-orphans-0.3.1:=[profile?] <dev-haskell/base-orphans-0.5:=[profile?] |
52 |
+ >=dev-haskell/binary-0.6:=[profile?] <dev-haskell/binary-0.8:=[profile?] |
53 |
+ >=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?] |
54 |
+ >=dev-haskell/data-hash-0.2.0.0:=[profile?] <dev-haskell/data-hash-0.3:=[profile?] |
55 |
+ >=dev-haskell/edit-distance-0.2.1.2:=[profile?] <dev-haskell/edit-distance-0.3:=[profile?] |
56 |
+ >=dev-haskell/equivalence-0.2.5:=[profile?] <dev-haskell/equivalence-0.4:=[profile?] |
57 |
+ >=dev-haskell/geniplate-mirror-0.6.0.6:=[profile?] <dev-haskell/geniplate-mirror-0.8:=[profile?] |
58 |
+ >=dev-haskell/haskeline-0.7:=[profile?] <dev-haskell/haskeline-0.8:=[profile?] |
59 |
+ >=dev-haskell/haskell-src-exts-1.16.0.1:=[profile?] <dev-haskell/haskell-src-exts-1.17:=[profile?] |
60 |
+ >=dev-haskell/old-time-1.1.0.0:=[profile?] <dev-haskell/old-time-1.2:=[profile?] |
61 |
+ >=dev-haskell/parallel-3.2.0.4:=[profile?] <dev-haskell/parallel-3.3:=[profile?] |
62 |
+ >=dev-haskell/quickcheck-2.8:2=[profile?] <dev-haskell/quickcheck-2.9:2=[profile?] |
63 |
+ >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?] |
64 |
+ >=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-1.3:=[profile?] |
65 |
+ >=dev-haskell/transformers-compat-0.3.3.2:=[profile?] <dev-haskell/transformers-compat-0.5:=[profile?] |
66 |
+ >=dev-haskell/unordered-containers-0.2:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?] |
67 |
+ >=dev-haskell/xhtml-3000.2:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?] |
68 |
+ >=dev-haskell/zlib-0.4.0.1:=[profile?] <dev-haskell/zlib-0.7:=[profile?] |
69 |
+ >=dev-lang/ghc-7.4.1:= |
70 |
+ || ( ( >=dev-haskell/hashable-1.1.2.3:=[profile?] <dev-haskell/hashable-1.2:=[profile?] ) |
71 |
+ ( >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?] ) ) |
72 |
+ || ( ( >=dev-haskell/hashtables-1.0:=[profile?] <dev-haskell/hashtables-1.2:=[profile?] ) |
73 |
+ ( >=dev-haskell/hashtables-1.2.0.2:=[profile?] <dev-haskell/hashtables-1.3:=[profile?] ) ) |
74 |
+ || ( ( >=dev-haskell/mtl-2.1.1:=[profile?] <=dev-haskell/mtl-2.1.3.1:=[profile?] ) |
75 |
+ ( >=dev-haskell/mtl-2.2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?] ) ) |
76 |
+ || ( ( >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.4:=[profile?] ) |
77 |
+ ( >=dev-haskell/transformers-0.4.1.0:=[profile?] <dev-haskell/transformers-0.5:=[profile?] ) ) |
78 |
+" |
79 |
+RDEPEND+=" |
80 |
+ app-emacs/haskell-mode |
81 |
+ virtual/emacs |
82 |
+" |
83 |
+PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${PV} )" |
84 |
+DEPEND="${RDEPEND} |
85 |
+ dev-haskell/alex |
86 |
+ >=dev-haskell/cabal-1.8 |
87 |
+ dev-haskell/happy |
88 |
+ cpphs? ( dev-haskell/cpphs ) |
89 |
+" |
90 |
+RDEPEND+="!sci-mathematics/agda-executable" |
91 |
+ |
92 |
+SITEFILE="50${PN}2-gentoo.el" |
93 |
+S="${WORKDIR}/${MY_P}" |
94 |
+ |
95 |
+src_prepare() { |
96 |
+ cabal_chdeps \ |
97 |
+ 'base-orphans >= 0.3.1 && < 0.4' 'base-orphans >= 0.3.1 && < 0.5' \ |
98 |
+ 'data-hash == 0.2.0.0' 'data-hash >= 0.2.0.0 && < 0.3' \ |
99 |
+ 'geniplate-mirror >= 0.6.0.6 && < 0.7' 'geniplate-mirror >= 0.6.0.6 && < 0.8' |
100 |
+ sed -e '/.*emacs-mode.*$/d' \ |
101 |
+ -i "${S}/${MY_PN}.cabal" \ |
102 |
+ || die "Could not remove agda-mode from ${MY_PN}.cabal" |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ haskell-cabal_src_configure \ |
107 |
+ $(cabal_flag cpphs cpphs) |
108 |
+} |
109 |
+ |
110 |
+src_compile() { |
111 |
+ BYTECOMPFLAGS="-L ./src/data/emacs-mode" |
112 |
+ elisp-compile src/data/emacs-mode/*.el \ |
113 |
+ || die "Failed to compile emacs mode" |
114 |
+ haskell-cabal_src_compile |
115 |
+} |
116 |
+ |
117 |
+src_test() { |
118 |
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
119 |
+ |
120 |
+ dist/build/agda/agda --test +RTS -M1g || die |
121 |
+} |
122 |
+ |
123 |
+src_install() { |
124 |
+ local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)" |
125 |
+ |
126 |
+ haskell-cabal_src_install |
127 |
+ |
128 |
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" |
129 |
+ # generate Primitive.agdai, emulate Setup.hs postinst phase |
130 |
+ Agda_datadir="${add}" \ |
131 |
+ "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda \ |
132 |
+ || die "Failed to build 'Primitive.agdai'" |
133 |
+ |
134 |
+ elisp-install ${PN} src/data/emacs-mode/*.el \ |
135 |
+ || die "Failed to install emacs mode" |
136 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \ |
137 |
+ || die "Failed to install elisp site file" |
138 |
+} |
139 |
+ |
140 |
+pkg_postinst() { |
141 |
+ elisp-site-regen |
142 |
+} |
143 |
+ |
144 |
+pkg_postrm() { |
145 |
+ elisp-site-regen |
146 |
+} |