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