1 |
commit: 23afff670e90583ba9206f37e7b7dfc772b585db |
2 |
Author: Guillaume Horel <guillaume.horel <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Mar 2 05:55:32 2012 +0000 |
4 |
Commit: Guillaume Horel <guillaume.horel <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Mar 2 06:01:21 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=23afff67 |
7 |
|
8 |
[dev-ml/zarith] new ebuild |
9 |
|
10 |
--- |
11 |
dev-ml/zarith/ChangeLog | 11 ++++ |
12 |
dev-ml/zarith/files/zarith-1.0-bytecode.patch | 31 ++++++++++ |
13 |
.../zarith/files/zarith-1.0-optnotrequired.patch | 22 +++++++ |
14 |
dev-ml/zarith/metadata.xml | 11 ++++ |
15 |
dev-ml/zarith/zarith-1.0.ebuild | 62 ++++++++++++++++++++ |
16 |
5 files changed, 137 insertions(+), 0 deletions(-) |
17 |
|
18 |
diff --git a/dev-ml/zarith/ChangeLog b/dev-ml/zarith/ChangeLog |
19 |
new file mode 100644 |
20 |
index 0000000..7c3b19f |
21 |
--- /dev/null |
22 |
+++ b/dev-ml/zarith/ChangeLog |
23 |
@@ -0,0 +1,11 @@ |
24 |
+# ChangeLog for dev-ml/zarith |
25 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
26 |
+# $Header: $ |
27 |
+ |
28 |
+*zarith-1.0 (02 Mar 2012) |
29 |
+ |
30 |
+ 02 Mar 2012; Guillaume Horel <guillaume.horel@×××××.com> +zarith-1.0.ebuild, |
31 |
+ +files/zarith-1.0-bytecode.patch, +files/zarith-1.0-optnotrequired.patch, |
32 |
+ +metadata.xml: |
33 |
+ initial import |
34 |
+ |
35 |
|
36 |
diff --git a/dev-ml/zarith/files/zarith-1.0-bytecode.patch b/dev-ml/zarith/files/zarith-1.0-bytecode.patch |
37 |
new file mode 100644 |
38 |
index 0000000..2de6772 |
39 |
--- /dev/null |
40 |
+++ b/dev-ml/zarith/files/zarith-1.0-bytecode.patch |
41 |
@@ -0,0 +1,31 @@ |
42 |
+--- project.mak.orig 2011-11-14 18:18:05.702705850 -0500 |
43 |
++++ project.mak 2011-11-14 18:18:58.142704311 -0500 |
44 |
+@@ -23,12 +23,14 @@ |
45 |
+ |
46 |
+ CMIOBJ = $(MLISRC:%.mli=%.cmi) |
47 |
+ TOINSTALL = zarith.a zarith.cma zarith.cmxa zarith.cmxs libzarith.a $(MLISRC) $(CMIOBJ) |
48 |
+- |
49 |
++TOINSTALLbyte = zarith.cma libzarith.a $(MLISRC) $(CMIOBJ) |
50 |
+ |
51 |
+ # build targets |
52 |
+ ############### |
53 |
+ |
54 |
+-all: $(TOINSTALL) test |
55 |
++all: $(TOINSTALL) |
56 |
++ |
57 |
++all-byte: $(TOINSTALLbyte) |
58 |
+ |
59 |
+ zarith.cma: $(MLSRC:%.ml=%.cmo) |
60 |
+ $(OCAMLMKLIB) -o zarith $+ $(LIBS) |
61 |
+@@ -80,8 +82,9 @@ |
62 |
+ |
63 |
+ ifeq ($(INSTMETH),findlib) |
64 |
+ install: |
65 |
+- $(OCAMLFIND) install -destdir $(INSTALLDIR) zarith META $(TOINSTALL) dllzarith.so |
66 |
+- |
67 |
++ $(OCAMLFIND) install zarith META $(TOINSTALL) dllzarith.so |
68 |
++install-byte: |
69 |
++ $(OCAMLFIND) install zarith META $(TOINSTALLbyte) dllzarith.so |
70 |
+ uninstall: |
71 |
+ $(OCAMLFIND) remove -destdir $(INSTALLDIR) zarith |
72 |
+ endif |
73 |
|
74 |
diff --git a/dev-ml/zarith/files/zarith-1.0-optnotrequired.patch b/dev-ml/zarith/files/zarith-1.0-optnotrequired.patch |
75 |
new file mode 100644 |
76 |
index 0000000..2bd1b4d |
77 |
--- /dev/null |
78 |
+++ b/dev-ml/zarith/files/zarith-1.0-optnotrequired.patch |
79 |
@@ -0,0 +1,22 @@ |
80 |
+From: Mehdi Dogguy <mehdi@××××××.org> |
81 |
+Date: Sun, 2 Oct 2011 11:53:22 +0200 |
82 |
+Subject: [PATCH] ocamlopt is not really required |
83 |
+ |
84 |
+--- |
85 |
+ configure | 2 +- |
86 |
+ 1 files changed, 1 insertions(+), 1 deletions(-) |
87 |
+ |
88 |
+diff --git a/configure b/configure |
89 |
+index 5bd80d3..980aedd 100755 |
90 |
+--- a/configure |
91 |
++++ b/configure |
92 |
+@@ -186,7 +186,7 @@ checkcc() |
93 |
+ |
94 |
+ searchbinreq $ocaml |
95 |
+ searchbinreq $ocamlc |
96 |
+-searchbinreq $ocamlopt |
97 |
++searchbin $ocamlopt |
98 |
+ searchbinreq $ocamldep |
99 |
+ searchbinreq $ocamlmklib |
100 |
+ searchbinreq $ocamldoc |
101 |
+-- |
102 |
|
103 |
diff --git a/dev-ml/zarith/metadata.xml b/dev-ml/zarith/metadata.xml |
104 |
new file mode 100644 |
105 |
index 0000000..a87c2ac |
106 |
--- /dev/null |
107 |
+++ b/dev-ml/zarith/metadata.xml |
108 |
@@ -0,0 +1,11 @@ |
109 |
+<?xml version="1.0" encoding="UTF-8"?> |
110 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
111 |
+<pkgmetadata> |
112 |
+<herd>sci</herd> |
113 |
+<longdescription lang='en'> |
114 |
+Arithmetic and logic operations over arbitrary-precision integers in Ocaml |
115 |
+</longdescription> |
116 |
+<use> |
117 |
+<flag name='mpir'>Use mpir library instead of gmp</flag> |
118 |
+</use> |
119 |
+</pkgmetadata> |
120 |
|
121 |
diff --git a/dev-ml/zarith/zarith-1.0.ebuild b/dev-ml/zarith/zarith-1.0.ebuild |
122 |
new file mode 100644 |
123 |
index 0000000..49a1b3c |
124 |
--- /dev/null |
125 |
+++ b/dev-ml/zarith/zarith-1.0.ebuild |
126 |
@@ -0,0 +1,62 @@ |
127 |
+# Copyright 1999-2012 Gentoo Foundation |
128 |
+# Distributed under the terms of the GNU General Public License v2 |
129 |
+# $Header: $ |
130 |
+ |
131 |
+EAPI="4" |
132 |
+ |
133 |
+inherit findlib eutils |
134 |
+ |
135 |
+DESCRIPTION="Arithmetic and logic operations over arbitrary-precision integers" |
136 |
+HOMEPAGE="https://forge.ocamlcore.org/projects/zarith/" |
137 |
+SRC_URI="http://forge.ocamlcore.org/frs/download.php/683/${P}.tgz" |
138 |
+ |
139 |
+LICENSE="LGPL-2.1-linking-exception" |
140 |
+SLOT="0" |
141 |
+KEYWORDS="~amd64 ~x86" |
142 |
+IUSE="debug doc mpir +ocamlopt" |
143 |
+ |
144 |
+RDEPEND=">=dev-lang/ocaml-3.12.1[ocamlopt?] |
145 |
+!mpir? ( dev-libs/gmp ) |
146 |
+mpir? ( sci-libs/mpir )" |
147 |
+ |
148 |
+DEPEND="${DEPEND} |
149 |
+dev-lang/perl" |
150 |
+ |
151 |
+src_prepare() { |
152 |
+ epatch "${FILESDIR}/${P}-optnotrequired.patch" |
153 |
+ epatch "${FILESDIR}/${P}-bytecode.patch" |
154 |
+} |
155 |
+ |
156 |
+src_configure() { |
157 |
+ MY_OPTS="-ocamllibdir /usr/$(get_libdir) -installdir ${D}" |
158 |
+ use mpir && MY_OPTS="${MY_OPTS} -mpir" |
159 |
+ ./configure ${MY_OPTS}|| die |
160 |
+} |
161 |
+ |
162 |
+src_compile() { |
163 |
+ if use ocamlopt; then |
164 |
+ emake all |
165 |
+ else |
166 |
+ emake all-byte |
167 |
+ fi |
168 |
+ use doc && emake doc |
169 |
+} |
170 |
+ |
171 |
+src_test() { |
172 |
+ if use ocamlopt; then |
173 |
+ emake test;LD_LIBRARY_PATH="." ./test || die |
174 |
+ else |
175 |
+ emake test.b;LD_LIBRARY_PATH="." ./test.b || die |
176 |
+ fi |
177 |
+} |
178 |
+ |
179 |
+src_install() { |
180 |
+ findlib_src_preinst |
181 |
+ if use ocamlopt; then |
182 |
+ emake install |
183 |
+ else |
184 |
+ emake install-byte |
185 |
+ fi |
186 |
+ dodoc README |
187 |
+ use doc && dodoc -r html/ |
188 |
+} |