1 |
commit: 1783cde98b4ce290b6c2aaf5f474fe56af354177 |
2 |
Author: Keri Harris <keri <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Feb 17 14:39:24 2016 +0000 |
4 |
Commit: Keri Harris <keri <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Feb 17 14:41:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1783cde9 |
7 |
|
8 |
dev-lang/tuprolog: version bump |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
|
12 |
dev-lang/tuprolog/Manifest | 1 + |
13 |
dev-lang/tuprolog/files/build-2.9.2.xml | 108 +++++++++++++++++++ |
14 |
.../tuprolog-2.9.2-no-dynamic-object-test.patch | 20 ++++ |
15 |
.../tuprolog/files/tuprolog-2.9.2-no-ikvm.patch | 116 +++++++++++++++++++++ |
16 |
dev-lang/tuprolog/tuprolog-2.9.2.ebuild | 67 ++++++++++++ |
17 |
5 files changed, 312 insertions(+) |
18 |
|
19 |
diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest |
20 |
index 5e5accb..99ab786 100644 |
21 |
--- a/dev-lang/tuprolog/Manifest |
22 |
+++ b/dev-lang/tuprolog/Manifest |
23 |
@@ -1,3 +1,4 @@ |
24 |
DIST 2p-2.4.0.zip 2421675 SHA256 f674b282bd7bc60e92ea417f8766e635979366d84d48634dd622e60ad1aa78c6 SHA512 20c86f736efe526dfffe603b19648394aaeaadf326034bba4f5717a193d7f76a99c6f3cb7bb93e2f1b608abd4e4af30341a2727f61e60e60289c2a964da782e9 WHIRLPOOL 7a353f5c6df2dba877d6880fc91ff0356639900767eb346a2eba97773303e125d0d2ffeead35e83cb61ffd013b49d4a05498861207de228e208a3f690a65ec4b |
25 |
DIST tuprolog-2.7.2.tar.gz 9104934 SHA256 8b0c653d3c9d701197f13d8dec6e45548565cddfd052a5bec9578f4e6a50f21e SHA512 c327893e0fcf777b6ad8951b3baf88bc9527bf88e9d06ac54af04e777e6c0fc255b15f492c2cf483859d3a1966897d5969e1496370b88287b96e83d92babc722 WHIRLPOOL cf5082d0ca07f8bc59e678c27b1fb8aaa8879f6b15dc887949cb61760dfd721ba4a6fd5b05fb979ea94e6ab607dfcff5707be47d5ac657623556426e734ca395 |
26 |
DIST tuprolog-2.9.0.tar.gz 4841110 SHA256 e789c7f1777a4f57698ac4756d03574f8fd5be4cebb1d5226722c35df75e163f SHA512 be15c99c40f750f3d1d4b70ae7ced9fe3792e8747876b6190ec1a01dd287e0fa34f88671f99f9e3fd7249e6fd44da7c4dadce0cd111b44b24e0e43d31c85165e WHIRLPOOL ada10ff775dc5e55d5c55c4dc920f5a4e7f8654891a10cf815734649e384fe6351921b807c54f6a6e8503fcbd0cbd9ee7f1569140bb5eba7e77e4da85f907203 |
27 |
+DIST tuprolog-2.9.2.tar.gz 6262268 SHA256 4205dff584b492e10f214c71ce7bc0e81297a915156ca1e10cfac8b34c8c0a6e SHA512 831c7390fe33fc57cb01d4b1d61485ac5df1aa8ebf386d5aae5c5d32f7677d46aa5aa6cc0eb1d3bb79989a54f8484ad8b97754b7f75fc21af6116ae170a28316 WHIRLPOOL 18dceea5e95be3e60b10fa8692970e61d9b16b2f518ac342de271ac7c6cb8313e8e9ca359fb93753d43a2c09780e47f212776ce560f9c2fefdb21d44f3316c77 |
28 |
|
29 |
diff --git a/dev-lang/tuprolog/files/build-2.9.2.xml b/dev-lang/tuprolog/files/build-2.9.2.xml |
30 |
new file mode 100644 |
31 |
index 0000000..0e585bd |
32 |
--- /dev/null |
33 |
+++ b/dev-lang/tuprolog/files/build-2.9.2.xml |
34 |
@@ -0,0 +1,108 @@ |
35 |
+<?xml version="1.0" ?><project default="jar" name="tuprolog"> |
36 |
+ |
37 |
+ <!-- some properties --> |
38 |
+ <property name="src.dir" value="src"/> |
39 |
+ <property name="build.dir" value="build"/> |
40 |
+ <property name="docs.dir" value="docs"/> |
41 |
+ <property name="dist.dir" value="dist"/> |
42 |
+ <property name="test.dir" value="test"/> |
43 |
+ <property name="test.build.dir" value="test.build"/> |
44 |
+ <property name="jarfile" value="${ant.project.name}.jar"/> |
45 |
+ <property file="build.properties"/> |
46 |
+ |
47 |
+ <path id="compile.classpath"> |
48 |
+ <fileset dir="lib" includes="*.jar"/> |
49 |
+ <pathelement path="${gentoo.classpath}"/> |
50 |
+ </path> |
51 |
+ |
52 |
+ <!-- init --> |
53 |
+ <target name="init"> |
54 |
+ <tstamp/> |
55 |
+ <mkdir dir="${dist.dir}"/> |
56 |
+ <mkdir dir="${build.dir}"/> |
57 |
+ <mkdir dir="${docs.dir}"/> |
58 |
+ <mkdir dir="${test.build.dir}"/> |
59 |
+ </target> |
60 |
+ |
61 |
+ <!-- compile everything --> |
62 |
+ <target depends="init" name="compile"> |
63 |
+ <javac deprecation="off" |
64 |
+ destdir="${build.dir}" |
65 |
+ encoding="ISO-8859-1" |
66 |
+ srcdir="${src.dir}" |
67 |
+ target="1.7"> |
68 |
+ <classpath> |
69 |
+ <path refid="compile.classpath"/> |
70 |
+ </classpath> |
71 |
+ </javac> |
72 |
+ <copy todir="${build.dir}"> |
73 |
+ <fileset dir="${src.dir}"> |
74 |
+ <exclude name="**/*.java"/> |
75 |
+ </fileset> |
76 |
+ </copy> |
77 |
+ </target> |
78 |
+ |
79 |
+ <!-- build the jar file --> |
80 |
+ <target depends="compile" name="jar"> |
81 |
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/> |
82 |
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/2p.jar"> |
83 |
+ <manifest> |
84 |
+ <attribute name="Main-Class" value="alice.tuprologx.ide.GUILauncher"/> |
85 |
+ </manifest> |
86 |
+ </jar> |
87 |
+ </target> |
88 |
+ |
89 |
+ <!-- generate javadocs --> |
90 |
+ <target depends="init" name="javadoc"> |
91 |
+ <javadoc |
92 |
+ author="false" |
93 |
+ destdir="${docs.dir}" |
94 |
+ encoding="ISO-8859-1" |
95 |
+ breakiterator="yes" |
96 |
+ packagenames="alice.*" |
97 |
+ sourcepath="${src.dir}" |
98 |
+ use="true" |
99 |
+ version="true" |
100 |
+ verbose="no" |
101 |
+ windowtitle="${ant.project.name} API"> |
102 |
+ <classpath> |
103 |
+ <path refid="compile.classpath"/> |
104 |
+ </classpath> |
105 |
+ </javadoc> |
106 |
+ </target> |
107 |
+ |
108 |
+ <!-- clean up --> |
109 |
+ <target name="clean"> |
110 |
+ <delete dir="${build.dir}"/> |
111 |
+ <delete dir="${dist.dir}"/> |
112 |
+ <delete dir="${docs.dir}"/> |
113 |
+ <delete dir="${test.build.dir}"/> |
114 |
+ </target> |
115 |
+ |
116 |
+ <!-- run testsuite --> |
117 |
+ <target name="test"> |
118 |
+ <path id="dist.classpath"> |
119 |
+ <fileset dir="${dist.dir}"> |
120 |
+ <include name="*.jar"/> |
121 |
+ </fileset> |
122 |
+ </path> |
123 |
+ <javac classpathref="dist.classpath" |
124 |
+ deprecation="off" |
125 |
+ destdir="${test.build.dir}" |
126 |
+ encoding="ISO-8859-1" |
127 |
+ srcdir="${test.dir}/unit" |
128 |
+ target="1.7"/> |
129 |
+ <junit haltonfailure="on" showoutput="no" printsummary="yes"> |
130 |
+ <classpath> |
131 |
+ <path refid="dist.classpath"/> |
132 |
+ <pathelement path="${test.build.dir}"/> |
133 |
+ </classpath> |
134 |
+ <formatter type="xml"/> |
135 |
+ <batchtest todir="${test.build.dir}"> |
136 |
+ <fileset dir="${test.build.dir}"> |
137 |
+ <include name="**/*TestCase.class"/> |
138 |
+ </fileset> |
139 |
+ </batchtest> |
140 |
+ </junit> |
141 |
+ </target> |
142 |
+</project> |
143 |
|
144 |
diff --git a/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch |
145 |
new file mode 100644 |
146 |
index 0000000..0416258 |
147 |
--- /dev/null |
148 |
+++ b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch |
149 |
@@ -0,0 +1,20 @@ |
150 |
+--- tuprolog-2.9.2.orig/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2015-02-27 14:02:49.000000000 +0100 |
151 |
++++ tuprolog-2.9.2/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2016-02-17 15:24:47.000000000 +0100 |
152 |
+@@ -39,7 +39,7 @@ |
153 |
+ SolveInfo goal = engine.solve(new Struct("demo", t)); |
154 |
+ assertFalse(goal.isSuccess()); |
155 |
+ } |
156 |
+- |
157 |
++/* |
158 |
+ public void testDynamicObjectsRetrival() throws PrologException { |
159 |
+ Prolog engine = new Prolog(); |
160 |
+ JavaLibrary lib = (JavaLibrary) engine.getLibrary("alice.tuprolog.lib.JavaLibrary"); |
161 |
+@@ -53,7 +53,7 @@ |
162 |
+ TestCounter counter = (TestCounter) lib.getRegisteredDynamicObject(id); |
163 |
+ assertEquals(2, counter.getValue()); |
164 |
+ } |
165 |
+- |
166 |
++*/ |
167 |
+ |
168 |
+ public void test_java_object() throws PrologException, IOException |
169 |
+ { |
170 |
|
171 |
diff --git a/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch |
172 |
new file mode 100644 |
173 |
index 0000000..d94dc66 |
174 |
--- /dev/null |
175 |
+++ b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch |
176 |
@@ -0,0 +1,116 @@ |
177 |
+diff -urN tuprolog-2.9.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.9.0/src/alice/tuprolog/LibraryManager.java |
178 |
+--- tuprolog-2.9.0.orig/src/alice/tuprolog/LibraryManager.java 2014-09-29 18:14:21.000000000 +0200 |
179 |
++++ tuprolog-2.9.0/src/alice/tuprolog/LibraryManager.java 2015-01-11 14:48:57.000000000 +0100 |
180 |
+@@ -9,11 +9,11 @@ |
181 |
+ import java.net.URL; |
182 |
+ import java.net.URLClassLoader; |
183 |
+ import java.util.*; |
184 |
+-import cli.System.Reflection.Assembly; |
185 |
++//import cli.System.Reflection.Assembly; |
186 |
+ |
187 |
+ import alice.tuprolog.event.LibraryEvent; |
188 |
+ import alice.tuprolog.event.WarningEvent; |
189 |
+-import alice.util.AssemblyCustomClassLoader; |
190 |
++//import alice.util.AssemblyCustomClassLoader; |
191 |
+ |
192 |
+ /** |
193 |
+ * @author Alex Benini |
194 |
+@@ -179,31 +179,7 @@ |
195 |
+ } else |
196 |
+ // .NET |
197 |
+ { |
198 |
+- Assembly asm = null; |
199 |
+- boolean classFound = false; |
200 |
+- className = "cli." |
201 |
+- + className.substring(0, className.indexOf(",")) |
202 |
+- .trim(); |
203 |
+- for (int i = 0; i < paths.length; i++) |
204 |
+- { |
205 |
+- try |
206 |
+- { |
207 |
+- asm = Assembly.LoadFrom(paths[i]); |
208 |
+- loader = new AssemblyCustomClassLoader(asm, urls); |
209 |
+- lib = (Library) Class.forName(className, true, loader).newInstance(); |
210 |
+- if (lib != null) |
211 |
+- { |
212 |
+- classFound = true; |
213 |
+- break; |
214 |
+- } |
215 |
+- } catch (Exception e) |
216 |
+- { |
217 |
+- e.printStackTrace(); |
218 |
+- continue; |
219 |
+- } |
220 |
+- } |
221 |
+- if (!classFound) |
222 |
+- throw new InvalidLibraryException(className, -1, -1); |
223 |
++ throw new InvalidLibraryException(className, -1, -1); |
224 |
+ } |
225 |
+ } |
226 |
+ |
227 |
+@@ -462,4 +438,4 @@ |
228 |
+ return optimizedDirectory; |
229 |
+ } |
230 |
+ |
231 |
+-} |
232 |
+\ No newline at end of file |
233 |
++} |
234 |
+diff -urN tuprolog-2.9.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.9.0/src/alice/tuprologx/ide/LibraryManager.java |
235 |
+--- tuprolog-2.9.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2014-09-29 18:14:21.000000000 +0200 |
236 |
++++ tuprolog-2.9.0/src/alice/tuprologx/ide/LibraryManager.java 2015-01-11 14:46:23.000000000 +0100 |
237 |
+@@ -18,7 +18,7 @@ |
238 |
+ package alice.tuprologx.ide; |
239 |
+ |
240 |
+ import alice.tuprolog.*; |
241 |
+-import alice.util.AssemblyCustomClassLoader; |
242 |
++//import alice.util.AssemblyCustomClassLoader; |
243 |
+ |
244 |
+ import java.io.File; |
245 |
+ import java.net.URL; |
246 |
+@@ -26,7 +26,7 @@ |
247 |
+ import java.util.ArrayList; |
248 |
+ import java.util.Hashtable; |
249 |
+ import java.util.StringTokenizer; |
250 |
+-import cli.System.Reflection.Assembly; |
251 |
++//import cli.System.Reflection.Assembly; |
252 |
+ |
253 |
+ /** |
254 |
+ * A dynamic manager for tuProlog libraries. |
255 |
+@@ -155,10 +155,7 @@ |
256 |
+ // .NET |
257 |
+ if(System.getProperty("java.vm.name").equals("IKVM.NET")) |
258 |
+ { |
259 |
+- Assembly asm = Assembly.LoadFrom(file.getPath()); |
260 |
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url}); |
261 |
+- libraryClassname = "cli." + libraryClassname.substring(0, |
262 |
+- libraryClassname.indexOf(",")).trim(); |
263 |
++ throw new InvalidLibraryException(libraryClassname,-1,-1); |
264 |
+ } |
265 |
+ // JVM |
266 |
+ else |
267 |
+diff -urN tuprolog-2.9.0.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-2.9.0/src/alice/util/AssemblyCustomClassLoader.java |
268 |
+--- tuprolog-2.9.0.orig/src/alice/util/AssemblyCustomClassLoader.java 2014-09-29 18:14:21.000000000 +0200 |
269 |
++++ tuprolog-2.9.0/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100 |
270 |
+@@ -1,21 +0,0 @@ |
271 |
+-package alice.util; |
272 |
+- |
273 |
+-import java.net.URL; |
274 |
+- |
275 |
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader |
276 |
+-{ |
277 |
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls) |
278 |
+- { |
279 |
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm)); |
280 |
+- // explicitly calling addURL() is safer than passing it to the super constructor, |
281 |
+- // because this class loader instance may be used during the URL construction. |
282 |
+- for (URL url : urls) { |
283 |
+- addURL(url); |
284 |
+- } |
285 |
+- } |
286 |
+- |
287 |
+- public void addUrl(URL url) |
288 |
+- { |
289 |
+- addURL(url); |
290 |
+- } |
291 |
+-} |
292 |
+\ No newline at end of file |
293 |
|
294 |
diff --git a/dev-lang/tuprolog/tuprolog-2.9.2.ebuild b/dev-lang/tuprolog/tuprolog-2.9.2.ebuild |
295 |
new file mode 100644 |
296 |
index 0000000..c562b3f |
297 |
--- /dev/null |
298 |
+++ b/dev-lang/tuprolog/tuprolog-2.9.2.ebuild |
299 |
@@ -0,0 +1,67 @@ |
300 |
+# Copyright 1999-2016 Gentoo Foundation |
301 |
+# Distributed under the terms of the GNU General Public License v2 |
302 |
+# $Id$ |
303 |
+ |
304 |
+EAPI=5 |
305 |
+ |
306 |
+inherit eutils java-pkg-2 java-ant-2 |
307 |
+ |
308 |
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures" |
309 |
+HOMEPAGE="http://tuprolog.unibo.it/" |
310 |
+SRC_URI="mirror://gentoo/${P}.tar.gz" |
311 |
+ |
312 |
+LICENSE="LGPL-3" |
313 |
+SLOT="0" |
314 |
+KEYWORDS="~amd64 ~x86" |
315 |
+IUSE="doc examples test" |
316 |
+ |
317 |
+RDEPEND=">=virtual/jdk-1.7:= |
318 |
+ >=dev-java/javassist-3" |
319 |
+ |
320 |
+DEPEND="${RDEPEND} |
321 |
+ dev-java/ant-core |
322 |
+ test? ( |
323 |
+ dev-java/ant-junit4 |
324 |
+ dev-java/hamcrest-core |
325 |
+ )" |
326 |
+ |
327 |
+S="${WORKDIR}"/${P} |
328 |
+ |
329 |
+EANT_GENTOO_CLASSPATH="javassist-3" |
330 |
+ |
331 |
+src_prepare() { |
332 |
+ epatch "${FILESDIR}"/${P}-no-ikvm.patch |
333 |
+ epatch "${FILESDIR}"/${P}-no-dynamic-object-test.patch |
334 |
+ |
335 |
+ cp "${FILESDIR}"/build-${PV}.xml "${S}"/build.xml || die |
336 |
+} |
337 |
+ |
338 |
+src_compile() { |
339 |
+ eant jar $(use_doc) |
340 |
+} |
341 |
+ |
342 |
+src_test() { |
343 |
+ cd "${S}"/dist |
344 |
+ java-pkg_jar-from junit-4 |
345 |
+ java-pkg_jar-from hamcrest-core |
346 |
+ cd "${S}" |
347 |
+ ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar test \ |
348 |
+ || die "eant test failed" |
349 |
+} |
350 |
+ |
351 |
+src_install() { |
352 |
+ java-pkg_dojar dist/${PN}.jar |
353 |
+ java-pkg_dojar dist/2p.jar |
354 |
+ java-pkg_dojar lib/autocomplete.jar |
355 |
+ java-pkg_dojar lib/rsyntaxtextarea.jar |
356 |
+ |
357 |
+ if use doc ; then |
358 |
+ java-pkg_dohtml -r docs/* || die |
359 |
+ dodoc doc/tuprolog-guide.pdf |
360 |
+ fi |
361 |
+ |
362 |
+ if use examples ; then |
363 |
+ insinto /usr/share/doc/${PF}/examples |
364 |
+ doins doc/examples/*.pl |
365 |
+ fi |
366 |
+} |