diff options
author | Keri Harris <keri@gentoo.org> | 2016-02-17 15:39:24 +0100 |
---|---|---|
committer | Keri Harris <keri@gentoo.org> | 2016-02-17 15:41:01 +0100 |
commit | 1783cde98b4ce290b6c2aaf5f474fe56af354177 (patch) | |
tree | 6a7651b453efdc933e364ccb6ea494f90f5bb5cc /dev-lang/tuprolog | |
parent | dev-cpp/antlr-cpp: hard block isn't needed, use soft block (diff) | |
download | gentoo-1783cde98b4ce290b6c2aaf5f474fe56af354177.tar.gz gentoo-1783cde98b4ce290b6c2aaf5f474fe56af354177.tar.bz2 gentoo-1783cde98b4ce290b6c2aaf5f474fe56af354177.zip |
dev-lang/tuprolog: version bump
Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-lang/tuprolog')
-rw-r--r-- | dev-lang/tuprolog/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/tuprolog/files/build-2.9.2.xml | 108 | ||||
-rw-r--r-- | dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch | 20 | ||||
-rw-r--r-- | dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch | 116 | ||||
-rw-r--r-- | dev-lang/tuprolog/tuprolog-2.9.2.ebuild | 67 |
5 files changed, 312 insertions, 0 deletions
diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest index 5e5accb7c2b0..99ab7861c14a 100644 --- a/dev-lang/tuprolog/Manifest +++ b/dev-lang/tuprolog/Manifest @@ -1,3 +1,4 @@ DIST 2p-2.4.0.zip 2421675 SHA256 f674b282bd7bc60e92ea417f8766e635979366d84d48634dd622e60ad1aa78c6 SHA512 20c86f736efe526dfffe603b19648394aaeaadf326034bba4f5717a193d7f76a99c6f3cb7bb93e2f1b608abd4e4af30341a2727f61e60e60289c2a964da782e9 WHIRLPOOL 7a353f5c6df2dba877d6880fc91ff0356639900767eb346a2eba97773303e125d0d2ffeead35e83cb61ffd013b49d4a05498861207de228e208a3f690a65ec4b DIST tuprolog-2.7.2.tar.gz 9104934 SHA256 8b0c653d3c9d701197f13d8dec6e45548565cddfd052a5bec9578f4e6a50f21e SHA512 c327893e0fcf777b6ad8951b3baf88bc9527bf88e9d06ac54af04e777e6c0fc255b15f492c2cf483859d3a1966897d5969e1496370b88287b96e83d92babc722 WHIRLPOOL cf5082d0ca07f8bc59e678c27b1fb8aaa8879f6b15dc887949cb61760dfd721ba4a6fd5b05fb979ea94e6ab607dfcff5707be47d5ac657623556426e734ca395 DIST tuprolog-2.9.0.tar.gz 4841110 SHA256 e789c7f1777a4f57698ac4756d03574f8fd5be4cebb1d5226722c35df75e163f SHA512 be15c99c40f750f3d1d4b70ae7ced9fe3792e8747876b6190ec1a01dd287e0fa34f88671f99f9e3fd7249e6fd44da7c4dadce0cd111b44b24e0e43d31c85165e WHIRLPOOL ada10ff775dc5e55d5c55c4dc920f5a4e7f8654891a10cf815734649e384fe6351921b807c54f6a6e8503fcbd0cbd9ee7f1569140bb5eba7e77e4da85f907203 +DIST tuprolog-2.9.2.tar.gz 6262268 SHA256 4205dff584b492e10f214c71ce7bc0e81297a915156ca1e10cfac8b34c8c0a6e SHA512 831c7390fe33fc57cb01d4b1d61485ac5df1aa8ebf386d5aae5c5d32f7677d46aa5aa6cc0eb1d3bb79989a54f8484ad8b97754b7f75fc21af6116ae170a28316 WHIRLPOOL 18dceea5e95be3e60b10fa8692970e61d9b16b2f518ac342de271ac7c6cb8313e8e9ca359fb93753d43a2c09780e47f212776ce560f9c2fefdb21d44f3316c77 diff --git a/dev-lang/tuprolog/files/build-2.9.2.xml b/dev-lang/tuprolog/files/build-2.9.2.xml new file mode 100644 index 000000000000..0e585bd4369c --- /dev/null +++ b/dev-lang/tuprolog/files/build-2.9.2.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" ?><project default="jar" name="tuprolog"> + + <!-- some properties --> + <property name="src.dir" value="src"/> + <property name="build.dir" value="build"/> + <property name="docs.dir" value="docs"/> + <property name="dist.dir" value="dist"/> + <property name="test.dir" value="test"/> + <property name="test.build.dir" value="test.build"/> + <property name="jarfile" value="${ant.project.name}.jar"/> + <property file="build.properties"/> + + <path id="compile.classpath"> + <fileset dir="lib" includes="*.jar"/> + <pathelement path="${gentoo.classpath}"/> + </path> + + <!-- init --> + <target name="init"> + <tstamp/> + <mkdir dir="${dist.dir}"/> + <mkdir dir="${build.dir}"/> + <mkdir dir="${docs.dir}"/> + <mkdir dir="${test.build.dir}"/> + </target> + + <!-- compile everything --> + <target depends="init" name="compile"> + <javac deprecation="off" + destdir="${build.dir}" + encoding="ISO-8859-1" + srcdir="${src.dir}" + target="1.7"> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </javac> + <copy todir="${build.dir}"> + <fileset dir="${src.dir}"> + <exclude name="**/*.java"/> + </fileset> + </copy> + </target> + + <!-- build the jar file --> + <target depends="compile" name="jar"> + <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/> + <jar basedir="${build.dir}" jarfile="${dist.dir}/2p.jar"> + <manifest> + <attribute name="Main-Class" value="alice.tuprologx.ide.GUILauncher"/> + </manifest> + </jar> + </target> + + <!-- generate javadocs --> + <target depends="init" name="javadoc"> + <javadoc + author="false" + destdir="${docs.dir}" + encoding="ISO-8859-1" + breakiterator="yes" + packagenames="alice.*" + sourcepath="${src.dir}" + use="true" + version="true" + verbose="no" + windowtitle="${ant.project.name} API"> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </javadoc> + </target> + + <!-- clean up --> + <target name="clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> + <delete dir="${docs.dir}"/> + <delete dir="${test.build.dir}"/> + </target> + + <!-- run testsuite --> + <target name="test"> + <path id="dist.classpath"> + <fileset dir="${dist.dir}"> + <include name="*.jar"/> + </fileset> + </path> + <javac classpathref="dist.classpath" + deprecation="off" + destdir="${test.build.dir}" + encoding="ISO-8859-1" + srcdir="${test.dir}/unit" + target="1.7"/> + <junit haltonfailure="on" showoutput="no" printsummary="yes"> + <classpath> + <path refid="dist.classpath"/> + <pathelement path="${test.build.dir}"/> + </classpath> + <formatter type="xml"/> + <batchtest todir="${test.build.dir}"> + <fileset dir="${test.build.dir}"> + <include name="**/*TestCase.class"/> + </fileset> + </batchtest> + </junit> + </target> +</project> 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 new file mode 100644 index 000000000000..0416258e9e14 --- /dev/null +++ b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch @@ -0,0 +1,20 @@ +--- tuprolog-2.9.2.orig/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2015-02-27 14:02:49.000000000 +0100 ++++ tuprolog-2.9.2/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2016-02-17 15:24:47.000000000 +0100 +@@ -39,7 +39,7 @@ + SolveInfo goal = engine.solve(new Struct("demo", t));
+ assertFalse(goal.isSuccess());
+ }
+-
++/*
+ public void testDynamicObjectsRetrival() throws PrologException {
+ Prolog engine = new Prolog();
+ JavaLibrary lib = (JavaLibrary) engine.getLibrary("alice.tuprolog.lib.JavaLibrary");
+@@ -53,7 +53,7 @@ + TestCounter counter = (TestCounter) lib.getRegisteredDynamicObject(id);
+ assertEquals(2, counter.getValue());
+ }
+-
++*/
+
+ public void test_java_object() throws PrologException, IOException
+ {
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 new file mode 100644 index 000000000000..d94dc66bbac5 --- /dev/null +++ b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch @@ -0,0 +1,116 @@ +diff -urN tuprolog-2.9.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.9.0/src/alice/tuprolog/LibraryManager.java +--- tuprolog-2.9.0.orig/src/alice/tuprolog/LibraryManager.java 2014-09-29 18:14:21.000000000 +0200 ++++ tuprolog-2.9.0/src/alice/tuprolog/LibraryManager.java 2015-01-11 14:48:57.000000000 +0100 +@@ -9,11 +9,11 @@ + import java.net.URL; + import java.net.URLClassLoader; + import java.util.*; +-import cli.System.Reflection.Assembly; ++//import cli.System.Reflection.Assembly; + + import alice.tuprolog.event.LibraryEvent; + import alice.tuprolog.event.WarningEvent; +-import alice.util.AssemblyCustomClassLoader; ++//import alice.util.AssemblyCustomClassLoader; + + /** + * @author Alex Benini +@@ -179,31 +179,7 @@ + } else + // .NET + { +- Assembly asm = null; +- boolean classFound = false; +- className = "cli." +- + className.substring(0, className.indexOf(",")) +- .trim(); +- for (int i = 0; i < paths.length; i++) +- { +- try +- { +- asm = Assembly.LoadFrom(paths[i]); +- loader = new AssemblyCustomClassLoader(asm, urls); +- lib = (Library) Class.forName(className, true, loader).newInstance(); +- if (lib != null) +- { +- classFound = true; +- break; +- } +- } catch (Exception e) +- { +- e.printStackTrace(); +- continue; +- } +- } +- if (!classFound) +- throw new InvalidLibraryException(className, -1, -1); ++ throw new InvalidLibraryException(className, -1, -1); + } + } + +@@ -462,4 +438,4 @@ + return optimizedDirectory; + } + +-} +\ No newline at end of file ++} +diff -urN tuprolog-2.9.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.9.0/src/alice/tuprologx/ide/LibraryManager.java +--- tuprolog-2.9.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2014-09-29 18:14:21.000000000 +0200 ++++ tuprolog-2.9.0/src/alice/tuprologx/ide/LibraryManager.java 2015-01-11 14:46:23.000000000 +0100 +@@ -18,7 +18,7 @@ + package alice.tuprologx.ide;
+
+ import alice.tuprolog.*;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ import java.io.File;
+ import java.net.URL;
+@@ -26,7 +26,7 @@ + import java.util.ArrayList;
+ import java.util.Hashtable;
+ import java.util.StringTokenizer;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ /**
+ * A dynamic manager for tuProlog libraries.
+@@ -155,10 +155,7 @@ + // .NET
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+ {
+- Assembly asm = Assembly.LoadFrom(file.getPath());
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url});
+- libraryClassname = "cli." + libraryClassname.substring(0,
+- libraryClassname.indexOf(",")).trim();
++ throw new InvalidLibraryException(libraryClassname,-1,-1);
+ }
+ // JVM
+ else
+diff -urN tuprolog-2.9.0.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-2.9.0/src/alice/util/AssemblyCustomClassLoader.java +--- tuprolog-2.9.0.orig/src/alice/util/AssemblyCustomClassLoader.java 2014-09-29 18:14:21.000000000 +0200 ++++ tuprolog-2.9.0/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100 +@@ -1,21 +0,0 @@ +-package alice.util;
+-
+-import java.net.URL;
+-
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader
+-{
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls)
+- {
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm));
+- // explicitly calling addURL() is safer than passing it to the super constructor,
+- // because this class loader instance may be used during the URL construction.
+- for (URL url : urls) {
+- addURL(url);
+- }
+- }
+-
+- public void addUrl(URL url)
+- {
+- addURL(url);
+- }
+-} +\ No newline at end of file diff --git a/dev-lang/tuprolog/tuprolog-2.9.2.ebuild b/dev-lang/tuprolog/tuprolog-2.9.2.ebuild new file mode 100644 index 000000000000..c562b3f5ed5b --- /dev/null +++ b/dev-lang/tuprolog/tuprolog-2.9.2.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures" +HOMEPAGE="http://tuprolog.unibo.it/" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples test" + +RDEPEND=">=virtual/jdk-1.7:= + >=dev-java/javassist-3" + +DEPEND="${RDEPEND} + dev-java/ant-core + test? ( + dev-java/ant-junit4 + dev-java/hamcrest-core + )" + +S="${WORKDIR}"/${P} + +EANT_GENTOO_CLASSPATH="javassist-3" + +src_prepare() { + epatch "${FILESDIR}"/${P}-no-ikvm.patch + epatch "${FILESDIR}"/${P}-no-dynamic-object-test.patch + + cp "${FILESDIR}"/build-${PV}.xml "${S}"/build.xml || die +} + +src_compile() { + eant jar $(use_doc) +} + +src_test() { + cd "${S}"/dist + java-pkg_jar-from junit-4 + java-pkg_jar-from hamcrest-core + cd "${S}" + ANT_TASKS="ant-junit4" eant -Djunit.jar=junit.jar test \ + || die "eant test failed" +} + +src_install() { + java-pkg_dojar dist/${PN}.jar + java-pkg_dojar dist/2p.jar + java-pkg_dojar lib/autocomplete.jar + java-pkg_dojar lib/rsyntaxtextarea.jar + + if use doc ; then + java-pkg_dohtml -r docs/* || die + dodoc doc/tuprolog-guide.pdf + fi + + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins doc/examples/*.pl + fi +} |