--- /dev/null
+diff -urN tuprolog-3.1.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-3.1.0/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-3.1.0.orig/src/alice/tuprolog/LibraryManager.java 2017-10-08 17:06:55.710627376 +0200
++++ tuprolog-3.1.0/src/alice/tuprolog/LibraryManager.java 2017-10-08 17:18:20.817598723 +0200
+@@ -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;
+ }
+
+-}
+\ Manca newline alla fine del file
++}
+diff -urN tuprolog-3.1.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-3.1.0/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-3.1.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2017-10-08 17:06:55.796627373 +0200
++++ tuprolog-3.1.0/src/alice/tuprologx/ide/LibraryManager.java 2017-10-08 17:20:18.378593806 +0200
+@@ -19,7 +19,7 @@
+ \r
+ import alice.tuprolog.*;\r
+ import alice.tuprolog.InvalidLibraryException;\r
+-import alice.util.AssemblyCustomClassLoader;\r
++//import alice.util.AssemblyCustomClassLoader;\r
+ \r
+ import java.io.File;\r
+ import java.net.URL;\r
+@@ -27,7 +27,7 @@
+ import java.util.ArrayList;\r
+ import java.util.Hashtable;\r
+ import java.util.StringTokenizer;\r
+-import cli.System.Reflection.Assembly;\r
++//import cli.System.Reflection.Assembly;\r
+ \r
+ /**\r
+ * A dynamic manager for tuProlog libraries.\r
+@@ -156,10 +156,7 @@
+ // .NET\r
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))\r
+ {\r
+- Assembly asm = Assembly.LoadFrom(file.getPath());\r
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url});\r
+- libraryClassname = "cli." + libraryClassname.substring(0, \r
+- libraryClassname.indexOf(",")).trim();\r
++ throw new InvalidLibraryException(libraryClassname,-1,-1);\r
+ }\r
+ // JVM\r
+ else\r
+diff -urN tuprolog-3.1.0.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-3.1.0/src/alice/util/AssemblyCustomClassLoader.java
+--- tuprolog-3.1.0.orig/src/alice/util/AssemblyCustomClassLoader.java 2017-10-08 17:06:55.863627370 +0200
++++ tuprolog-3.1.0/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100
+@@ -1,21 +0,0 @@
+-package alice.util;\r
+-\r
+-import java.net.URL;\r
+-\r
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader\r
+-{\r
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls)\r
+- {\r
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm));\r
+- // explicitly calling addURL() is safer than passing it to the super constructor,\r
+- // because this class loader instance may be used during the URL construction.\r
+- for (URL url : urls) {\r
+- addURL(url);\r
+- } \r
+- }\r
+- \r
+- public void addUrl(URL url)\r
+- {\r
+- addURL(url);\r
+- }\r
+-}
+\ Manca newline alla fine del file
+diff -urN tuprolog-3.1.0.orig/src/alice/util/proxyGenerator/Generator.java tuprolog-3.1.0/src/alice/util/proxyGenerator/Generator.java
+--- tuprolog-3.1.0.orig/src/alice/util/proxyGenerator/Generator.java 2017-10-08 17:06:55.877627369 +0200
++++ tuprolog-3.1.0/src/alice/util/proxyGenerator/Generator.java 2017-10-08 17:18:20.819598723 +0200
+@@ -1,7 +1,7 @@
+ package alice.util.proxyGenerator;\r
+ import javax.tools.*;\r
+ \r
+-import cli.System.Reflection.Assembly;\r
++//import cli.System.Reflection.Assembly;\r
+ \r
+ import java.lang.reflect.*;\r
+ import java.util.*;\r
+@@ -29,7 +29,7 @@
+ }\r
+ \r
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))\r
+- ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("IKVM.OpenJDK.Tools"));\r
++ throw new UnsupportedOperationException("IKVM.NET not supported!");\r
+ \r
+ jc = ToolProvider.getSystemJavaCompiler();\r
+ if (jc == null) {\r
--- /dev/null
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND=">=virtual/jdk-1.8:=
+ dev-java/javassist:3
+ dev-java/commons-lang:3.1"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/junit:4
+ dev-java/hamcrest-core:1.3
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist:3,commons-lang-3.1"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-ikvm.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:1.3
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant test || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_dojar dist/2p.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
+}