public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Keri Harris" <keri@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/tuprolog/files/, dev-lang/tuprolog/
Date: Sun,  8 Oct 2017 16:18:45 +0000 (UTC)	[thread overview]
Message-ID: <1507479501.4a5ca9e29e15e0e6c141fe6ce9522426c74f2280.keri@gentoo> (raw)

commit:     4a5ca9e29e15e0e6c141fe6ce9522426c74f2280
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  8 16:17:55 2017 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 16:18:21 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a5ca9e2

dev-lang/tuprolog: version bump

Package-Manager: Portage-2.3.8, Repoman-2.3.1

 dev-lang/tuprolog/Manifest                         |   1 +
 .../tuprolog/files/tuprolog-3.1.0-no-ikvm.patch    | 137 +++++++++++++++++++++
 dev-lang/tuprolog/tuprolog-3.1.0.ebuild            |  64 ++++++++++
 3 files changed, 202 insertions(+)

diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest
index 8751d389cc9..1f022adf12c 100644
--- a/dev-lang/tuprolog/Manifest
+++ b/dev-lang/tuprolog/Manifest
@@ -1,3 +1,4 @@
 DIST tuprolog-2.9.2.tar.gz 6262268 SHA256 4205dff584b492e10f214c71ce7bc0e81297a915156ca1e10cfac8b34c8c0a6e SHA512 831c7390fe33fc57cb01d4b1d61485ac5df1aa8ebf386d5aae5c5d32f7677d46aa5aa6cc0eb1d3bb79989a54f8484ad8b97754b7f75fc21af6116ae170a28316 WHIRLPOOL 18dceea5e95be3e60b10fa8692970e61d9b16b2f518ac342de271ac7c6cb8313e8e9ca359fb93753d43a2c09780e47f212776ce560f9c2fefdb21d44f3316c77
 DIST tuprolog-3.0.0.tar.gz 6275327 SHA256 1c7a423cbd3faa626f8398a48ec6396c2d17431a77b1f22179d713cc76aeeb09 SHA512 7998dadb04b1314d096a33c54d11977534565accb3811b93a22f606fd838d2f9b0a6defe882992977a093832e1565283d3951dcc791809620deb61d3511c02d3 WHIRLPOOL 915a21632a2c86f33de25cc05ec75f3e40b33a0ba80f73219cfab6d06f69af07bc9d143a3d1cd80fbfd27fdeba9d4259f389f1a33704bfac2151403b26424e12
 DIST tuprolog-3.0.1.tar.gz 6326591 SHA256 e4ed2689dd5496175cddcfe299b442d92d580d778a0fd9a4c7beededa20dfbb7 SHA512 56fa96f717b5c8e56fd2979f2953744964d844e5abf215456e31309d3d92bde142f9bff55e6442b6de55f219c7f143a275ccf89359ff2f2944459bbc94770afa WHIRLPOOL 81d8421242ce8308418b7c40b7db6554cdbd92a4966aef4d73c414b675fca9148f5fce52ec2ef2a0c62025eda1c790013fb1b6bd20ac53a16f7be3fc61149004
+DIST tuprolog-3.1.0.tar.gz 7201383 SHA256 be2ecf38acb74e35cd19e507cb15e698fe5a9bd6373487a668fccbe38628bba2 SHA512 1093e29a79964cb3991326da14f020cdc8ff64f2444c84dbb6b22aa5c4ecbf48f74dbc26af0af949ccc31020573ce5908684af794db4654fb475efa697a82cbf WHIRLPOOL 6aac4962fa499efbc95d6e86b654b6a0f5cfbec8cd569f6525006fd0255a08e0bcd7f3826b5c3070fe524e3d752f7aaa6434a1851d61d140597d604ae8e65a07

diff --git a/dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch
new file mode 100644
index 00000000000..eb20dacd443
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch
@@ -0,0 +1,137 @@
+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 @@
+ 
+ import alice.tuprolog.*;
+ import alice.tuprolog.InvalidLibraryException;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+ 
+ import java.io.File;
+ import java.net.URL;
+@@ -27,7 +27,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.
+@@ -156,10 +156,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-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;
+-
+-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);
+-  }
+-}
+\ 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;
+ import javax.tools.*;
+ 
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+ 
+ import java.lang.reflect.*;
+ import java.util.*;
+@@ -29,7 +29,7 @@
+     }
+     
+     if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+-    	ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("IKVM.OpenJDK.Tools"));
++    	throw new UnsupportedOperationException("IKVM.NET not supported!");
+     
+     jc = ToolProvider.getSystemJavaCompiler();
+     if (jc == null) {

diff --git a/dev-lang/tuprolog/tuprolog-3.1.0.ebuild b/dev-lang/tuprolog/tuprolog-3.1.0.ebuild
new file mode 100644
index 00000000000..3da80e1506c
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-3.1.0.ebuild
@@ -0,0 +1,64 @@
+# 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
+}


             reply	other threads:[~2017-10-08 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08 16:18 Keri Harris [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-26  9:34 [gentoo-commits] repo/gentoo:master commit in: dev-lang/tuprolog/files/, dev-lang/tuprolog/ Keri Harris
2017-09-28  8:57 Keri Harris
2017-09-27 17:40 Keri Harris
2016-10-09  9:27 Keri Harris
2016-02-17 14:42 Keri Harris
2016-02-15 18:28 Keri Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1507479501.4a5ca9e29e15e0e6c141fe6ce9522426c74f2280.keri@gentoo \
    --to=keri@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox