* [gentoo-commits] repo/gentoo:master commit in: dev-java/jython/files/, dev-java/jython/
@ 2016-02-09 18:45 Patrice Clement
0 siblings, 0 replies; 2+ messages in thread
From: Patrice Clement @ 2016-02-09 18:45 UTC (permalink / raw
To: gentoo-commits
commit: 0096ee21291b5aa9fbba4c6636a2dd529957d42a
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 7 19:48:09 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sun Feb 7 19:48:09 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0096ee21
dev-java/jython: Remove vulnerable versions. Fixes security bug 552452.
Package-Manager: portage-2.2.26
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
dev-java/jython/Manifest | 3 -
.../files/2.1-assert-SimpleCompiler.py.patch | 11 --
dev-java/jython/files/2.1-assert.patch | 50 -------
dev-java/jython/files/jython-2.2.1-build.patch | 76 -----------
dev-java/jython/files/jython-2.2.1-build.xml.patch | 92 -------------
dev-java/jython/files/jython-2.5.2-build.xml.patch | 27 ----
.../jython-2.5.2-distutils_byte_compilation.patch | 85 ------------
.../jython-2.5.2-sax-parser-class-not-found.patch | 39 ------
.../jython/files/jython-2.5.2-sax-parser-fix.patch | 94 -------------
.../python-2.5.5-distutils_byte_compilation.patch | 37 -----
dev-java/jython/jython-2.2.1-r2.ebuild | 135 -------------------
dev-java/jython/jython-2.5.3-r3.ebuild | 149 ---------------------
12 files changed, 798 deletions(-)
diff --git a/dev-java/jython/Manifest b/dev-java/jython/Manifest
index 98c97d0..a83f948 100644
--- a/dev-java/jython/Manifest
+++ b/dev-java/jython/Manifest
@@ -1,4 +1 @@
-DIST Python-2.2.3.tgz 6709556 SHA256 a8f92e6b89d47359fff0d1fbfe47f104afc77fd1cd5143e7332758b7bc100188 SHA512 2e2c881f8819ed3d91b3e98e7087b23ced9715c80eb9e5fe4144cca5b82220e035d0f50ac4a098b3bbdca3c588f70b8021f68a5d52f653c013470579342943e4 WHIRLPOOL dbef6f9f0545f4f4ddf6e4535b67bb936a2ef596f17a1ff6acca89755729420588d845bc291eed0d19b433b3eff017166c7d68a1a352a5612b00da2f8f0c20d7
DIST jython-2.7.0-sources.jar 15371691 SHA256 2b534595d4a08059ebb71b881c58ee830499bb6e9daba7c828a7f1f6c8943f7a SHA512 7583810245d694fd1d99a57ad504fcefdfbc1183def2cbb93ae3660f341104205c73041d846bdcf2b564b3cf4b770b481703c1dcdb1458396812c92d30ee9fa6 WHIRLPOOL e0dbd289c522b41ef2d3f54b01a2f6d44de8755e2eeb7863c8b807d1b179839f20d925e102db324cf85cd82503cd03106b5287ffa7a322a3902d6f24e9cd2a41
-DIST jython-installer-2.5.3.jar 18487200 SHA256 05405966cdfa57abc8e705dd6aab92b8240097ce709fb916c8a0dbcaa491f99e SHA512 92d00cc8d885806749c67d1dc820e7b402c807b9a40277073fc3ea1f3dd10e1e506dc241a342874db8109120e8f0031a8dc7a4db6a88dfdc6c89906eeb9d454d WHIRLPOOL e8e3adf741a35b5e4de6c67b8805582cabc8590afac28c2e4ae3b61c4bd38d41904d7d1e4a23de21e7870d628e33a52f540fc89780a4724403b0bd92e1159768
-DIST jython_installer-2.2.1.jar 4663097 SHA256 586858aa16a8b269eaaec59f5b64031ec504d33da35cba98ebac811b0e838e68 SHA512 d33262dec95dbecfc007a738ed8d8cd4844c215e451b7ab126940f1157079aa846a104f3587ad84c4a009249632e3aaa3c83479ee8f47c30c4b4833bcdd582b3 WHIRLPOOL bae264f67547a975bf648b3de0cc2becb5d51e14b2ca1a977f7c3d45ec96bd3fd4fd99b0ff6912fb38d54d57656225c51c4b8a474c6ca8fe7fc16e12ab4bbec8
diff --git a/dev-java/jython/files/2.1-assert-SimpleCompiler.py.patch b/dev-java/jython/files/2.1-assert-SimpleCompiler.py.patch
deleted file mode 100644
index 55e1549..0000000
--- a/dev-java/jython/files/2.1-assert-SimpleCompiler.py.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- jython-2.1/Tools/jythonc/SimpleCompiler.py.orig 2006-09-08 13:21:29.000000000 -0600
-+++ jython-2.1/Tools/jythonc/SimpleCompiler.py 2006-09-08 13:22:15.000000000 -0600
-@@ -577,7 +577,7 @@
- args.append(message.asAny())
-
- return jast.If(self.frame.getglobal("__debug__").nonzero(),
-- jast.InvokeStatic("Py", "assert", args))
-+ jast.InvokeStatic("Py", "assert_", args))
-
- def return_stmt(self, value=None):
- if value is None:
diff --git a/dev-java/jython/files/2.1-assert.patch b/dev-java/jython/files/2.1-assert.patch
deleted file mode 100644
index 1f06848..0000000
--- a/dev-java/jython/files/2.1-assert.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- jython-2.1/com/ziclix/python/sql/pipe/Pipe.java.orig 2006-07-29 21:31:34.000000000 +0200
-+++ jython-2.1/com/ziclix/python/sql/pipe/Pipe.java 2006-07-29 21:31:41.000000000 +0200
-@@ -93,7 +93,7 @@
- new Integer(sinkRunner.getCount()) };
- String msg = zxJDBC.getString("inconsistentRowCount", counts);
-
-- Py.assert(Py.Zero, Py.newString(msg));
-+ Py.assert_(Py.Zero, Py.newString(msg));
- }
-
- return Py.newInteger(sinkRunner.getCount());
---- jython-2.1/org/python/compiler/CodeCompiler.java.orig 2006-07-29 21:28:47.000000000 +0200
-+++ jython-2.1/org/python/compiler/CodeCompiler.java 2006-07-29 21:30:13.000000000 +0200
-@@ -817,14 +817,14 @@
- node.getChild(1).visit(this);
- if (mrefs.assert2 == 0) {
- mrefs.assert2 = code.pool.Methodref(
-- "org/python/core/Py", "assert",
-+ "org/python/core/Py", "assert_",
- "(" + $pyObj + $pyObj + ")V");
- }
- code.invokestatic(mrefs.assert2);
- } else {
- if (mrefs.assert1 == 0) {
- mrefs.assert1 = code.pool.Methodref(
-- "org/python/core/Py", "assert",
-+ "org/python/core/Py", "assert_",
- "(" + $pyObj + ")V");
- }
- code.invokestatic(mrefs.assert1);
---- jython-2.1/org/python/core/Py.java.orig 2006-07-29 21:29:19.000000000 +0200
-+++ jython-2.1/org/python/core/Py.java 2006-07-29 21:30:40.000000000 +0200
-@@ -986,14 +986,14 @@
-
-
- /* Equivalent to Python's assert statement */
-- public static void assert(PyObject test, PyObject message) {
-+ public static void assert_(PyObject test, PyObject message) {
- if (!test.__nonzero__()) {
- throw new PyException(Py.AssertionError, message);
- }
- }
-
-- public static void assert(PyObject test) {
-- assert(test, Py.None);
-+ public static void assert_(PyObject test) {
-+ assert_(test, Py.None);
- }
-
- /* Helpers to implement finally clauses */
diff --git a/dev-java/jython/files/jython-2.2.1-build.patch b/dev-java/jython/files/jython-2.2.1-build.patch
deleted file mode 100644
index 29df776..0000000
--- a/dev-java/jython/files/jython-2.2.1-build.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- build.xml.org 2008-02-26 22:35:07.000000000 +1300
-+++ build.xml 2008-02-26 22:35:48.000000000 +1300
-@@ -373,21 +373,13 @@
-
- <!-- create checkout directory if necessary -->
- <target name="prepare-checkout" if="do.checkout">
-- <mkdir dir="${svn.checkout.dir}" />
-+ <echo message="Removed by patch." />
- </target>
-
-
- <!-- checkout if so defined -->
- <target name="checkout" depends="prepare" if="do.checkout">
-- <svn javahl="${javahl.dir}" >
-- <checkout url="https://jython.svn.sourceforge.net/svnroot/jython/${svn.main.dir}/jython" revision="${svn.revision}" destPath="${svn.checkout.dir}/jython" />
-- <checkout url="https://jython.svn.sourceforge.net/svnroot/jython/${svn.main.dir}/installer" revision="${svn.revision}" destPath="${svn.checkout.dir}/installer" />
-- </svn>
--
-- <!-- checkout cpython license from the correct python maintenance branch -->
-- <svn javahl="${javahl.dir}" >
-- <checkout url="http://svn.python.org/projects/python/branches/release22-maint/" destPath="${svn.checkout.dir}/python" recurse="false" />
-- </svn>
-+ <echo message="removed by patch" />
- </target>
-
-
-@@ -551,28 +543,13 @@
-
-
- <!-- build the .html files using the ht2html tool -->
-- <target name="doc" depends="compile" if="full-build">
-- <fail unless="ht2html.dir" message="ht2html.dir is not set" />
-- <copy todir="${dist.dir}/Doc" preservelastmodified="true">
-- <fileset dir="Doc" includes="*.ht, **/*.gif" />
-- </copy>
-- <!-- Create .html files in Doc -->
-- <apply executable="${python.exe}" dir="Doc">
-- <env key="PYTHONPATH" path="${jython.base.dir}/Misc/htgen" />
-- <arg line="${ht2html.dir}/ht2html.py" />
-- <arg line="-s JyLocalGenerator" />
-- <fileset dir="${dist.dir}/Doc">
-- <include name="*.ht" />
-- </fileset>
-- </apply>
-- <delete>
-- <fileset dir="${dist.dir}/Doc" includes="*.ht" />
-- </delete>
-+ <target name="doc" depends="compile">
-+ <echo message="Functionality removed by gentoo patch" />
- </target>
-
-
- <!-- javadoc -->
-- <target name="javadoc" depends="compile" if="full-build">
-+ <target name="javadoc" depends="compile">
- <javadoc sourcepath="${source.dir}"
- destdir="${apidoc.dir}"
- source="${jdk.source.version}"
-@@ -588,7 +565,7 @@
-
-
- <!-- copy for full distribution -->
-- <target name="copy-full" if="full-build">
-+ <target name="copy-full">
- <!-- Misc files -->
- <echo>copy misc files from ${jython.base.dir}</echo>
- <copy todir="${dist.dir}" preservelastmodified="true">
-@@ -599,7 +576,7 @@
-
- <!-- copy the CPython license -->
- <echo>copy CPython LICENSE from ${svn.checkout.dir}/python</echo>
-- <copy file="${svn.checkout.dir}/python/LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
-+ <copy file="${python.lib}/../LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
-
- <!-- sources: todir has to correspond with installer/**/JarInstaller.java -->
- <echo>copy sources from ${jython.base.dir}</echo>
diff --git a/dev-java/jython/files/jython-2.2.1-build.xml.patch b/dev-java/jython/files/jython-2.2.1-build.xml.patch
deleted file mode 100644
index 8ea1974..0000000
--- a/dev-java/jython/files/jython-2.2.1-build.xml.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- build.xml.orig 2012-09-27 16:13:40.750930136 +0200
-+++ build.xml 2012-09-27 16:16:31.725093475 +0200
-@@ -373,21 +373,13 @@
-
- <!-- create checkout directory if necessary -->
- <target name="prepare-checkout" if="do.checkout">
-- <mkdir dir="${svn.checkout.dir}" />
-+ <echo message="Removed by patch." />
- </target>
-
-
- <!-- checkout if so defined -->
- <target name="checkout" depends="prepare" if="do.checkout">
-- <svn javahl="${javahl.dir}" >
-- <checkout url="https://jython.svn.sourceforge.net/svnroot/jython/${svn.main.dir}/jython" revision="${svn.revision}" destPath="${svn.checkout.dir}/jython" />
-- <checkout url="https://jython.svn.sourceforge.net/svnroot/jython/${svn.main.dir}/installer" revision="${svn.revision}" destPath="${svn.checkout.dir}/installer" />
-- </svn>
--
-- <!-- checkout cpython license from the correct python maintenance branch -->
-- <svn javahl="${javahl.dir}" >
-- <checkout url="http://svn.python.org/projects/python/branches/release22-maint/" destPath="${svn.checkout.dir}/python" recurse="false" />
-- </svn>
-+ <echo message="removed by patch" />
- </target>
-
-
-@@ -488,6 +480,7 @@
- />
-
- <!-- java files used by tests -->
-+<!--
- <javac srcdir="${jython.base.dir}/Lib/test/"
- includes="javatests/**"
- destdir="${output.dir}/"
-@@ -498,6 +491,7 @@
- deprecation="${deprecation}"
- nowarn="${nowarn}"
- />
-+-->
-
- <copy file="${source.dir}/org/python/modules/ucnhash.dat"
- todir="${output.dir}/org/python/modules"
-@@ -551,28 +545,13 @@
-
-
- <!-- build the .html files using the ht2html tool -->
-- <target name="doc" depends="compile" if="full-build">
-- <fail unless="ht2html.dir" message="ht2html.dir is not set" />
-- <copy todir="${dist.dir}/Doc" preservelastmodified="true">
-- <fileset dir="Doc" includes="*.ht, **/*.gif" />
-- </copy>
-- <!-- Create .html files in Doc -->
-- <apply executable="${python.exe}" dir="Doc">
-- <env key="PYTHONPATH" path="${jython.base.dir}/Misc/htgen" />
-- <arg line="${ht2html.dir}/ht2html.py" />
-- <arg line="-s JyLocalGenerator" />
-- <fileset dir="${dist.dir}/Doc">
-- <include name="*.ht" />
-- </fileset>
-- </apply>
-- <delete>
-- <fileset dir="${dist.dir}/Doc" includes="*.ht" />
-- </delete>
-+ <target name="doc" depends="compile">
-+ <echo message="Functionality removed by gentoo patch" />
- </target>
-
-
- <!-- javadoc -->
-- <target name="javadoc" depends="compile" if="full-build">
-+ <target name="javadoc" depends="compile">
- <javadoc sourcepath="${source.dir}"
- destdir="${apidoc.dir}"
- source="${jdk.source.version}"
-@@ -588,7 +567,7 @@
-
-
- <!-- copy for full distribution -->
-- <target name="copy-full" if="full-build">
-+ <target name="copy-full">
- <!-- Misc files -->
- <echo>copy misc files from ${jython.base.dir}</echo>
- <copy todir="${dist.dir}" preservelastmodified="true">
-@@ -599,7 +578,7 @@
-
- <!-- copy the CPython license -->
- <echo>copy CPython LICENSE from ${svn.checkout.dir}/python</echo>
-- <copy file="${svn.checkout.dir}/python/LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
-+ <copy file="${python.lib}/../LICENSE" tofile="${dist.dir}/LICENSE_CPython.txt" preservelastmodified="true" />
-
- <!-- sources: todir has to correspond with installer/**/JarInstaller.java -->
- <echo>copy sources from ${jython.base.dir}</echo>
diff --git a/dev-java/jython/files/jython-2.5.2-build.xml.patch b/dev-java/jython/files/jython-2.5.2-build.xml.patch
deleted file mode 100644
index fb5e46e..0000000
--- a/dev-java/jython/files/jython-2.5.2-build.xml.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- build.xml.orig 2012-07-13 14:06:40.965992853 +0200
-+++ build.xml 2012-07-13 14:07:29.595035840 +0200
-@@ -512,6 +512,7 @@
- </javac>
-
- <!-- java files used by tests -->
-+<!--
- <javac srcdir="${test.source.dir}"
- destdir="${compile.dir}"
- target="${jdk.target.version}"
-@@ -535,6 +536,7 @@
- <copy file="${source.dir}/org/python/modules/ucnhash.dat"
- todir="${compile.dir}/org/python/modules"
- preservelastmodified="true" />
-+-->
-
- <copy todir="${compile.dir}" preservelastmodified="true">
- <fileset dir="${source.dir}">
-@@ -758,7 +762,7 @@
- <jycompile srcdir="${dist.dir}/Lib" destdir="${dist.dir}/Lib" excludes="test/**"/>
- </target>
-
-- <target name="copy-lib" depends="init, copy-javalib, copy-cpythonlib">
-+ <target name="copy-lib" depends="init">
- <!-- XXX untested and most likely broken in 2.5
- <copy todir="${dist.dir}" preservelastmodified="true">
- <fileset dir="${jython.base.dir}" includes="Tools/**/*.py" />
diff --git a/dev-java/jython/files/jython-2.5.2-distutils_byte_compilation.patch b/dev-java/jython/files/jython-2.5.2-distutils_byte_compilation.patch
deleted file mode 100644
index db90e83..0000000
--- a/dev-java/jython/files/jython-2.5.2-distutils_byte_compilation.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- Lib/distutils/tests/test_build_py.py
-+++ Lib/distutils/tests/test_build_py.py
-@@ -92,6 +92,25 @@
- os.chdir(cwd)
- sys.stdout = sys.__stdout__
-
-+ def test_dont_write_bytecode(self):
-+ # makes sure byte_compile is not used
-+ pkg_dir, dist = self.create_dist()
-+ cmd = build_py(dist)
-+ cmd.compile = 1
-+ cmd.optimize = 1
-+
-+ old_dont_write_bytecode = os.environ.get("PYTHONDONTWRITEBYTECODE")
-+ os.environ["PYTHONDONTWRITEBYTECODE"] = "1"
-+ try:
-+ cmd.byte_compile([])
-+ finally:
-+ if old_dont_write_bytecode is None:
-+ del os.environ["PYTHONDONTWRITEBYTECODE"]
-+ else:
-+ os.environ["PYTHONDONTWRITEBYTECODE"] = old_dont_write_bytecode
-+
-+ self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
-+
- def test_suite():
- return unittest.makeSuite(BuildPyTestCase)
-
---- Lib/distutils/util.py
-+++ Lib/distutils/util.py
-@@ -11,6 +11,7 @@
- from distutils.dep_util import newer
- from distutils.spawn import spawn
- from distutils import log
-+from distutils.errors import DistutilsByteCompileError
-
- def get_platform ():
- """Return a string that identifies the current platform. This is used
-@@ -397,6 +398,9 @@
- generated in indirect mode; unless you know what you're doing, leave
- it set to None.
- """
-+ # nothing is done if PYTHONDONTWRITEBYTECODE environment variable is set
-+ if os.environ.get("PYTHONDONTWRITEBYTECODE") is not None:
-+ raise DistutilsByteCompileError('byte-compiling is disabled.')
-
- # First, if the caller didn't force us into direct or indirect mode,
- # figure out which mode we should be in. We take a conservative
---- Lib/distutils/command/build_py.py
-+++ Lib/distutils/command/build_py.py
-@@ -418,6 +418,10 @@
-
-
- def byte_compile (self, files):
-+ if os.environ.get("PYTHONDONTWRITEBYTECODE") is not None:
-+ self.warn('byte-compiling is disabled, skipping.')
-+ return
-+
- from distutils.util import byte_compile
- prefix = self.build_lib
- if prefix[-1] != os.sep:
---- Lib/distutils/command/install_lib.py
-+++ Lib/distutils/command/install_lib.py
-@@ -121,6 +121,10 @@
- return outfiles
-
- def byte_compile (self, files):
-+ if os.environ.get("PYTHONDONTWRITEBYTECODE") is not None:
-+ self.warn('byte-compiling is disabled, skipping.')
-+ return
-+
- from distutils.util import byte_compile
-
- # Get the "--root" directory supplied to the "install" command,
---- Lib/distutils/errors.py
-+++ Lib/distutils/errors.py
-@@ -76,6 +76,8 @@
- class DistutilsTemplateError (DistutilsError):
- """Syntax error in a file list template."""
-
-+class DistutilsByteCompileError(DistutilsError):
-+ """Byte compile error."""
-
- # Exception classes used by the CCompiler implementation classes
- class CCompilerError (Exception):
diff --git a/dev-java/jython/files/jython-2.5.2-sax-parser-class-not-found.patch b/dev-java/jython/files/jython-2.5.2-sax-parser-class-not-found.patch
deleted file mode 100644
index 7e9273c..0000000
--- a/dev-java/jython/files/jython-2.5.2-sax-parser-class-not-found.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-# HG changeset patch
-# User Alan Kennedy <alan@xhaus.com>
-# Date 1333300584 -3600
-# Node ID a972112ac1b155ef41b3f8ce195251bc6cc3ebce
-# Parent 920a60f5d5b5fdf46f4f26c75cab42e2a671be2f
-#1537: Fix for classloading issues with MATLAB/OpenJDK
-
-diff --git a/Lib/xml/parsers/expat.py b/Lib/xml/parsers/expat.py
---- a/Lib/xml/parsers/expat.py
-+++ b/Lib/xml/parsers/expat.py
-@@ -47,12 +47,8 @@ from org.xml.sax.helpers import XMLReade
- from org.xml.sax.ext import DefaultHandler2
-
- # Xerces
--try:
-- # Name mangled by jarjar?
-- import org.python.apache.xerces.parsers.SAXParser
-- _xerces_parser = "org.python.apache.xerces.parsers.SAXParser"
--except ImportError:
-- _xerces_parser = "org.apache.xerces.parsers.SAXParser"
-+_mangled_xerces_parser_name = "org.python.apache.xerces.parsers.SAXParser"
-+_xerces_parser_name = "org.apache.xerces.parsers.SAXParser"
-
-
- # @expat args registry
-@@ -88,7 +84,11 @@ class XMLParser(object):
- "not %s" % type(namespace_separator).__name__)
- raise TypeError(error)
-
-- self._reader = XMLReaderFactory.createXMLReader(_xerces_parser)
-+ # See http://bugs.jython.org/issue1537
-+ try:
-+ self._reader = XMLReaderFactory.createXMLReader(_mangled_xerces_parser_name)
-+ except:
-+ self._reader = XMLReaderFactory.createXMLReader(_xerces_parser_name)
-
- if self.namespace_separator is None:
- try:
-
diff --git a/dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch b/dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch
deleted file mode 100644
index 99abc2d..0000000
--- a/dev-java/jython/files/jython-2.5.2-sax-parser-fix.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-
-# HG changeset patch
-# User Alan Kennedy <jython-dev@xhaus.com>
-# Date 1319980040 0
-# Node ID 936bd1b132eb9c591cf915b060c6567ae8e16914
-# Parent 71b3f883f6c5f0f39f0ae8aff097a439d4970f46
-Fix for xml attribute namespaces issue
-http://bugs.jython.org/issue1768
-
-diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
---- a/Lib/test/test_sax.py
-+++ b/Lib/test/test_sax.py
-@@ -390,22 +390,23 @@ def test_expat_nsattrs_wattr():
- gather = AttrGatherer()
- parser.setContentHandler(gather)
-
-- parser.parse(StringIO("<doc xmlns:ns='%s' ns:attr='val'/>" % ns_uri))
-+ a_name = "id" ; a_val = "val"
-+ parser.parse(StringIO("<doc xmlns:ns='%s' ns:%s='%s'/>" % (ns_uri, a_name, a_val) ))
-
- attrs = gather._attrs
-
- return attrs.getLength() == 1 and \
-- attrs.getNames() == [(ns_uri, "attr")] and \
-- attrs.getQNames() == ["ns:attr"] and \
-+ attrs.getNames() == [(ns_uri, a_name)] and \
-+ attrs.getQNames() == ["ns:%s" % a_name] and \
- len(attrs) == 1 and \
-- attrs.has_key((ns_uri, "attr")) and \
-- attrs.keys() == [(ns_uri, "attr")] and \
-- attrs.get((ns_uri, "attr")) == "val" and \
-- attrs.get((ns_uri, "attr"), 25) == "val" and \
-- attrs.items() == [((ns_uri, "attr"), "val")] and \
-- attrs.values() == ["val"] and \
-- attrs.getValue((ns_uri, "attr")) == "val" and \
-- attrs[(ns_uri, "attr")] == "val"
-+ attrs.has_key((ns_uri, a_name)) and \
-+ attrs.keys() == [(ns_uri, a_name)] and \
-+ attrs.get((ns_uri, a_name)) == a_val and \
-+ attrs.get((ns_uri, a_name), 25) == a_val and \
-+ attrs.items() == [((ns_uri, a_name), a_val)] and \
-+ attrs.values() == [a_val] and \
-+ attrs.getValue((ns_uri, a_name)) == a_val and \
-+ attrs[(ns_uri, a_name)] == a_val
-
- def test_expat_nsattrs_no_namespace():
- parser = make_parser()
-@@ -413,22 +414,23 @@ def test_expat_nsattrs_no_namespace():
- gather = AttrGatherer()
- parser.setContentHandler(gather)
-
-- parser.parse(StringIO("<doc attr='val'/>"))
-+ a_name = "id" ; a_val = "val"
-+ parser.parse(StringIO("<doc %s='%s'/>" % (a_name, a_val) ))
-
- attrs = gather._attrs
-
- return attrs.getLength() == 1 and \
-- attrs.getNames() == [(None, "attr")] and \
-- attrs.getQNames() == ["attr"] and \
-+ attrs.getNames() == [(None, a_name)] and \
-+ attrs.getQNames() == [a_name] and \
- len(attrs) == 1 and \
-- attrs.has_key((None, "attr")) and \
-- attrs.keys() == [(None, "attr")] and \
-- attrs.get((None, "attr")) == "val" and \
-- attrs.get((None, "attr"), 25) == "val" and \
-- attrs.items() == [((None, "attr"), "val")] and \
-- attrs.values() == ["val"] and \
-- attrs.getValue((None, "attr")) == "val" and \
-- attrs[(None, "attr")] == "val"
-+ attrs.has_key((None, a_name)) and \
-+ attrs.keys() == [(None, a_name)] and \
-+ attrs.get((None, a_name)) == a_val and \
-+ attrs.get((None, a_name), 25) == a_val and \
-+ attrs.items() == [((None, a_name), a_val)] and \
-+ attrs.values() == [a_val] and \
-+ attrs.getValue((None, a_name)) == a_val and \
-+ attrs[(None, a_name)] == a_val
-
- # ===== InputSource support
-
-diff --git a/Lib/xml/sax/drivers2/drv_javasax.py b/Lib/xml/sax/drivers2/drv_javasax.py
---- a/Lib/xml/sax/drivers2/drv_javasax.py
-+++ b/Lib/xml/sax/drivers2/drv_javasax.py
-@@ -238,7 +238,7 @@ class JavaSAXParser(xmlreader.XMLReader,
- pass # TODO
-
- def _fixTuple(nsTuple, frm, to):
-- if len(nsTuple) == 2:
-+ if isinstance(nsTuple, tuple) and len(nsTuple) == 2:
- nsUri, localName = nsTuple
- if nsUri == frm:
- nsUri = to
diff --git a/dev-java/jython/files/python-2.5.5-distutils_byte_compilation.patch b/dev-java/jython/files/python-2.5.5-distutils_byte_compilation.patch
deleted file mode 100644
index d029247..0000000
--- a/dev-java/jython/files/python-2.5.5-distutils_byte_compilation.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- Lib/distutils/command/build_py.py
-+++ Lib/distutils/command/build_py.py
-@@ -418,6 +418,10 @@
-
-
- def byte_compile (self, files):
-+ if os.environ.get("PYTHONDONTWRITEBYTECODE") is not None:
-+ self.warn('byte-compiling is disabled, skipping.')
-+ return
-+
- from distutils.util import byte_compile
- prefix = self.build_lib
- if prefix[-1] != os.sep:
---- Lib/distutils/command/install_lib.py
-+++ Lib/distutils/command/install_lib.py
-@@ -121,6 +121,10 @@
- return outfiles
-
- def byte_compile (self, files):
-+ if os.environ.get("PYTHONDONTWRITEBYTECODE") is not None:
-+ self.warn('byte-compiling is disabled, skipping.')
-+ return
-+
- from distutils.util import byte_compile
-
- # Get the "--root" directory supplied to the "install" command,
---- Lib/distutils/errors.py
-+++ Lib/distutils/errors.py
-@@ -76,6 +76,8 @@
- class DistutilsTemplateError (DistutilsError):
- """Syntax error in a file list template."""
-
-+class DistutilsByteCompileError(DistutilsError):
-+ """Byte compile error."""
-
- # Exception classes used by the CCompiler implementation classes
- class CCompilerError (Exception):
diff --git a/dev-java/jython/jython-2.2.1-r2.ebuild b/dev-java/jython/jython-2.2.1-r2.ebuild
deleted file mode 100644
index 338dd9a..0000000
--- a/dev-java/jython/jython-2.2.1-r2.ebuild
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=4
-
-JAVA_PKG_IUSE="readline source doc servletapi mysql postgres examples oracle"
-#jdnc
-
-inherit base java-pkg-2 java-ant-2
-
-MY_PV="installer-2.2.1"
-PYVER="2.2.3"
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-SRC_URI="http://www.python.org/ftp/python/${PYVER%_*}/Python-${PYVER}.tgz
-mirror://sourceforge/${PN}/${PN}_${MY_PV}.jar"
-
-LICENSE="PSF-2"
-SLOT="0"
-KEYWORDS="amd64 ppc64 x86"
-IUSE=""
-
-CDEPEND="
- dev-java/jakarta-oro:2.0
- readline? ( >=dev-java/libreadline-java-0.8.0:0 )
- mysql? ( >=dev-java/jdbc-mysql-3.1:0 )
- postgres? ( dev-java/jdbc-postgresql:0 )
- oracle? ( dev-java/jdbc-oracle-bin:10.2 )
- servletapi? ( java-virtuals/servlet-api:2.5 )
- !<=dev-java/freemarker-2.3.10"
-RDEPEND="${CDEPEND}
- >=virtual/jre-1.5"
-DEPEND="${CDEPEND}
- >=virtual/jdk-1.5
- dev-java/javacc"
-
-S="${WORKDIR}"
-
-#Tests currently very broken. Need to investigate whether that
-#is jython's or gentoo's doing.
-RESTRICT="test"
-
-java_prepare() {
- epatch "${FILESDIR}/${P}-build.xml.patch"
-
- rm -Rfv org || die "Unable to remove class files."
- find . -iname '*.jar' | xargs rm -fv || die "Unable to remove bundled jars"
-
- echo javacc.jar="$(java-pkg_getjars --build-only javacc)" > ant.properties
-
- if use readline; then
- echo "readline.jar=$(java-pkg_getjars libreadline-java)" >> \
- ant.properties
- fi
- if use servletapi; then
- echo "servlet.jar=$(java-pkg_getjar --virtual servlet-api-2.5 servlet-api.jar)" \
- >> ant.properties
- fi
- if use mysql; then
- echo "mysql.jar=$(java-pkg_getjar jdbc-mysql jdbc-mysql.jar)" \
- >> ant.properties
- fi
-
- if use postgres; then
- echo \
- "postgresql.jar=$(java-pkg_getjar jdbc-postgresql jdbc-postgresql.jar)"\
- >> ant.properties
- fi
-
- if use oracle; then
- echo \
- "oracle.jar=$(java-pkg-getjar jdbc-oracle-bin-10.2 ojdbc14.jar)" \
- >> ant.properties
- fi
-}
-
-src_compile() {
- local antflags="-Dbase.path=src/java -Dsource.dir=src/java/src"
- local pylib="Python-${PYVER}/Lib"
- antflags="${antflags} -Dpython.lib=${pylib} -Dsvn.checkout.dir=."
- LC_ALL=C eant ${antflags} developer-build $(use_doc javadoc)
-}
-
-src_test() {
- local antflags="-Dbase.path=src/java -Dsource.dir=src/java/src"
- antflags="${antflags} -Dpython.home=dist"
- local pylib="Python-${PYVER}/Lib"
- antflags="${antflags} -Dpython.lib=${pylib}"
- eant ${antflags} bugtest
-}
-
-src_install() {
- java-pkg_dojar "dist/${PN}.jar"
-
- dodoc README.txt NEWS ACKNOWLEDGMENTS
- use doc && dohtml -r Doc/*
-
- local java_args="-Dpython.home=/usr/share/jython"
- java_args="${java_args} -Dpython.cachedir=\${HOME}/.jythoncachedir"
-
- java-pkg_dolauncher jythonc \
- --main "org.python.util.jython" \
- --java_args "${java_args}" \
- --pkg_args "${java_args} /usr/share/jython/tools/jythonc/jythonc.py"
-
- java-pkg_dolauncher jython \
- --main "org.python.util.jython" \
- --pkg_args "${java_args}"
-
- insinto /usr/share/${PN}
- doins -r dist/Lib registry
-
- insinto /usr/share/${PN}/tools
- doins -r dist/Tools/*
-
- use doc && java-pkg_dojavadoc dist/Doc/javadoc
- use source && java-pkg_dosrc src
- use examples && java-pkg_doexamples dist/Demo/*
-}
-
-pkg_postinst() {
- if use readline; then
- elog "To use readline you need to add the following to your registry"
- elog
- elog "python.console=org.python.util.ReadlineConsole"
- elog "python.console.readlinelib=GnuReadline"
- elog
- elog "The global registry can be found in /usr/share/${PN}/registry"
- elog "User registry in \$HOME/.jython"
- elog "See http://www.jython.org/docs/registry.html for more information"
- elog ""
- fi
-}
diff --git a/dev-java/jython/jython-2.5.3-r3.ebuild b/dev-java/jython/jython-2.5.3-r3.ebuild
deleted file mode 100644
index e455cff..0000000
--- a/dev-java/jython/jython-2.5.3-r3.ebuild
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-
-JAVA_PKG_IUSE="doc examples source"
-
-inherit eutils java-pkg-2 java-ant-2 python-utils-r1
-
-DESCRIPTION="An implementation of Python written in Java"
-HOMEPAGE="http://www.jython.org"
-SRC_URI="http://central.maven.org/maven2/org/python/${PN}-installer/${PV}/${PN}-installer-${PV}.jar"
-
-LICENSE="PSF-2"
-SLOT="2.5"
-KEYWORDS="amd64 x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
-IUSE="readline"
-
-# Missing in installer jar.
-RESTRICT="test"
-
-COMMON_DEP="
- !<=dev-java/freemarker-2.3.10
- dev-java/antlr:3
- dev-java/asm:3
- dev-java/guava:0
- >=dev-java/java-config-2.1.11-r3
- dev-java/jffi:1.0
- dev-java/jline:0
- dev-java/jnr-constants:0.8.2
- dev-java/jnr-posix:1.1
- java-virtuals/script-api:0
- java-virtuals/servlet-api:2.5
- readline? ( >=dev-java/libreadline-java-0.8.0:0 )"
-RDEPEND="${COMMON_DEP}
- >=virtual/jre-1.5"
-DEPEND="${COMMON_DEP}
- >=virtual/jdk-1.5
- app-arch/unzip"
-
-S="${WORKDIR}"
-
-java_prepare() {
- # src/META-INF/services missing - taking from prebuilt jar
- pushd src > /dev/null || die
- jar -xf ../${PN}.jar META-INF/services || die
- popd > /dev/null
-
- find \( -name '*.jar' -o -name '*.class' \
- -o -name '*.pyc' -o -name '*.exe' \) -delete
-
- epatch "${FILESDIR}/${PN}-2.5.2-build.xml.patch"
-
- epatch "${FILESDIR}/${PN}-2.5.2-distutils_byte_compilation.patch"
- epatch "${FILESDIR}/${PN}-2.5.2-distutils_scripts_location.patch"
- epatch "${FILESDIR}/${PN}-2.5.2-respect_PYTHONPATH.patch"
-
- if ! use readline; then
- rm -v src/org/python/util/ReadlineConsole.java || die
- fi
-}
-
-JAVA_ANT_REWRITE_CLASSPATH="yes"
-JAVA_ANT_CLASSPATH_TAGS+=" java"
-
-EANT_BUILD_TARGET="developer-build"
-EANT_GENTOO_CLASSPATH="asm-3,guava,jffi-1.0,jline,jnr-constants-0.8.2,script-api,servlet-api-2.5"
-
-# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
-# Uncomment and add to COMMON_DEP if you want either of them
-#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
-#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
-
-src_compile() {
- use readline && EANT_GENTOO_CLASSPATH+=",libreadline-java"
-
- EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-1.1)"
- EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
-
- sed -i -e "1 a\
- CLASSPATH=\"$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}\"" \
- bin/jython || die
-
- java-pkg-2_src_compile
-}
-
-EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
-
-src_test() {
- java-pkg-2_src_test
-}
-
-src_install() {
- java-pkg_newjar dist/${PN}-dev.jar
-
- java-pkg_register-optional-dependency jdbc-mysql
- java-pkg_register-optional-dependency jdbc-postgresql
-
- insinto /usr/share/${PN}-${SLOT}
- doins -r dist/{Lib,registry}
-
- dodoc ACKNOWLEDGMENTS NEWS README.txt
-
- use doc && java-pkg_dojavadoc dist/Doc/javadoc
- use source && java-pkg_dosrc src/*
- use examples && java-pkg_doexamples Demo/*
-
- local java_args=(
- -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
- -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
- -Dpython.cachedir="\${HOME}/.jythoncachedir"
- )
- java-pkg_dolauncher jython${SLOT} \
- --main org.python.util.jython \
- --java_args "${java_args[*]}"
-
- if use readline; then
- sed -i -e "/#python.console.readlinelib=JavaReadline/a \
- python.console=org.python.util.ReadlineConsole\npython.console.readlinelib=GnuReadline" \
- "${ED}"/usr/share/${PN}-${SLOT}/registry || die
- fi
-
- # the jvm opens classfiles rw ...
- dodir /etc/sandbox.d
- echo "SANDBOX_PREDICT=/usr/share/${PN}-${SLOT}" > "${ED}/etc/sandbox.d/20${P}-${SLOT}"
-
- # we need a wrapper to help python_optimize
- cat > "${T}"/jython <<_EOF_ || die
-exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
- -Dpython.home="${ED}"/usr/share/${PN}-${SLOT} \
- -Dpython.cachedir="${T}/.jythoncachedir" \
- -Duser.home="${T}" \
- org.python.util.jython "\${@}"
-_EOF_
- chmod +x "${T}"/jython || die
-
- local -x PYTHON="${T}"/jython
- python_export jython${SLOT} EPYTHON PYTHON_SITEDIR
-
- # compile tests (everything else is compiled already)
- # we're keeping it quiet since jython reports errors verbosely
- # and some of the tests are supposed to trigger compile errors
- python_optimize "${ED}"/usr/share/jython-${SLOT}/Lib/test &>/dev/null
-
- # for python-exec
- echo "EPYTHON='${EPYTHON}'" > epython.py || die
- python_domodule epython.py
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-java/jython/files/, dev-java/jython/
@ 2016-11-27 23:10 James Le Cuirot
0 siblings, 0 replies; 2+ messages in thread
From: James Le Cuirot @ 2016-11-27 23:10 UTC (permalink / raw
To: gentoo-commits
commit: 69029b5305a7dd70a86e3121b9de5a8893888a4d
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 27 23:01:30 2016 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sun Nov 27 23:09:49 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69029b53
dev-java/jython: Bump guava SLOT, drop readline, EAPI bump
guava:20 is needed so that Java 7 can be dropped from Gentoo.
Support for GNU Readline was dropped from Jython in an earlier version
so the flag and its associated code is of no use now.
There is no need to fix the CLASSPATH in src/shell/jython as this
script is not installed or used at all. I have verified this by
grepping the installed result and deleting the script before building.
Package-Manager: portage-2.3.2
.../jython-2.5.2-distutils_scripts_location.patch | 4 +-
.../files/jython-2.5.2-respect_PYTHONPATH.patch | 4 +-
dev-java/jython/files/jython-2.7.0-build.xml.patch | 4 +-
dev-java/jython/jython-2.7.0-r1.ebuild | 151 +++++++++++++++++++++
4 files changed, 157 insertions(+), 6 deletions(-)
diff --git a/dev-java/jython/files/jython-2.5.2-distutils_scripts_location.patch b/dev-java/jython/files/jython-2.5.2-distutils_scripts_location.patch
index 150d463..fc9a95b 100644
--- a/dev-java/jython/files/jython-2.5.2-distutils_scripts_location.patch
+++ b/dev-java/jython/files/jython-2.5.2-distutils_scripts_location.patch
@@ -1,5 +1,5 @@
---- Lib/distutils/command/install.py
-+++ Lib/distutils/command/install.py
+--- a/Lib/distutils/command/install.py
++++ b/Lib/distutils/command/install.py
@@ -70,7 +70,7 @@
'purelib': '$base/Lib/site-packages',
'platlib': '$base/Lib/site-packages',
diff --git a/dev-java/jython/files/jython-2.5.2-respect_PYTHONPATH.patch b/dev-java/jython/files/jython-2.5.2-respect_PYTHONPATH.patch
index 8d028d0..e695122 100644
--- a/dev-java/jython/files/jython-2.5.2-respect_PYTHONPATH.patch
+++ b/dev-java/jython/files/jython-2.5.2-respect_PYTHONPATH.patch
@@ -1,5 +1,5 @@
---- src/org/python/core/PySystemState.java
-+++ src/org/python/core/PySystemState.java
+--- a/src/org/python/core/PySystemState.java
++++ b/src/org/python/core/PySystemState.java
@@ -646,6 +646,12 @@
if (jythonpath != null) {
registry.setProperty("python.path", jythonpath);
diff --git a/dev-java/jython/files/jython-2.7.0-build.xml.patch b/dev-java/jython/files/jython-2.7.0-build.xml.patch
index 4e27af7..1f0be61 100644
--- a/dev-java/jython/files/jython-2.7.0-build.xml.patch
+++ b/dev-java/jython/files/jython-2.7.0-build.xml.patch
@@ -1,5 +1,5 @@
---- build.xml.orig 2015-06-27 16:12:08.442000000 +0000
-+++ build.xml 2015-06-27 16:12:15.684000000 +0000
+--- a/build.xml.orig 2015-06-27 16:12:08.442000000 +0000
++++ b/build.xml 2015-06-27 16:12:15.684000000 +0000
@@ -448,7 +448,7 @@
</target>
diff --git a/dev-java/jython/jython-2.7.0-r1.ebuild b/dev-java/jython/jython-2.7.0-r1.ebuild
new file mode 100644
index 00000000..db0069c
--- /dev/null
+++ b/dev-java/jython/jython-2.7.0-r1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils java-pkg-2 java-ant-2 python-utils-r1 flag-o-matic
+
+MY_PV=${PV/_beta/-b}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="An implementation of Python written in Java"
+HOMEPAGE="http://www.jython.org"
+SRC_URI="http://search.maven.org/remotecontent?filepath=org/python/${PN}/${MY_PV}/${MY_P}-sources.jar"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="~amd64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="examples test"
+
+CP_DEPEND="dev-java/antlr:3
+ dev-java/netty-transport:0
+ =dev-java/asm-5.0.3:4
+ dev-java/commons-compress:0
+ dev-java/guava:20
+ dev-java/jffi:1.2
+ dev-java/jline:2
+ dev-java/icu4j:52
+ dev-java/jnr-constants:0
+ dev-java/jnr-posix:3.0
+ dev-java/jnr-netdb:1.0
+ dev-java/stringtemplate:0
+ dev-java/xerces:2
+ java-virtuals/script-api:0
+ java-virtuals/servlet-api:3.0"
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.7"
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.7
+ app-arch/unzip
+ dev-java/ant-core:0
+ test? (
+ dev-java/junit:4
+ dev-java/ant-junit:0
+ )"
+
+S=${WORKDIR}
+
+RESTRICT="test"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+JAVA_ANT_CLASSPATH_TAGS+=" java"
+
+EANT_BUILD_TARGET="developer-build"
+EANT_TEST_EXTRA_ARGS="-Dpython.home=dist"
+
+# jdbc-informix and jdbc-oracle-bin (requires registration) aren't exposed.
+# Uncomment and add to CDEPEND if you want either of them
+#EANT_GENTOO_CLASSPATH+=",jdbc-informix" EANT_EXTRA_ARGS+=" -Dinformix.present"
+#EANT_GENTOO_CLASSPATH+=",jdbc-oracle-bin" EANT_EXTRA_ARGS+=" -Doracle.present"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.5.2-distutils_scripts_location.patch
+ "${FILESDIR}"/${PN}-2.5.2-respect_PYTHONPATH.patch
+ "${FILESDIR}"/${PN}-2.7_beta1-ant.patch
+ "${FILESDIR}"/${PN}-2.7_beta1-dont-always-recompile-classes.patch
+ "${FILESDIR}"/${PN}-2.7_beta2-maxrepeat-import.patch
+ "${FILESDIR}"/${PN}-2.7.0-build.xml.patch
+)
+
+src_prepare() {
+ default
+
+ find \( -name '*.jar' -o -name '*.class' \
+ -o -name '*.pyc' -o -name '*.exe' \) -delete
+
+ # needed for launchertest
+ chmod +x tests/shell/test-jython.sh || die
+
+ java-pkg-2_src_prepare
+}
+
+src_configure() {
+ # apparently this can cause problems
+ append-flags -fno-stack-protector
+
+ EANT_GENTOO_CLASSPATH_EXTRA="$(java-pkg_getjars --with-dependencies antlr-3,jnr-posix-3.0)"
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjars --build-only ant-core)"
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ local instdir=/usr/share/${PN}-${SLOT}
+
+ java-pkg_newjar dist/${PN}-dev.jar
+
+ java-pkg_register-optional-dependency jdbc-mysql
+ java-pkg_register-optional-dependency jdbc-postgresql
+
+ insinto ${instdir}
+ doins -r dist/{Lib,registry}
+
+ dodoc ACKNOWLEDGMENTS NEWS README.txt
+
+ use doc && java-pkg_dohtml -r dist/Doc/javadoc
+ use source && java-pkg_dosrc src/*
+ use examples && java-pkg_doexamples Demo/*
+
+ local java_args=(
+ -Dpython.home="${EPREFIX}"/usr/share/${PN}-${SLOT}
+ -Dpython.executable="${EPREFIX}"/usr/bin/jython${SLOT}
+ -Dpython.cachedir="\${HOME}/.jythoncachedir"
+ )
+
+ java-pkg_dolauncher jython${SLOT} \
+ --main org.python.util.jython \
+ --java_args "${java_args[*]}"
+
+ # we need a wrapper to help python_optimize
+ cat <<-EOF > "${T}"/jython
+ exec java -cp "$(java-pkg_getjars "${EANT_GENTOO_CLASSPATH}"):${EANT_GENTOO_CLASSPATH_EXTRA}:dist/${PN}-dev.jar" \
+ -Dpython.home="${ED}${instdir}" \
+ -Dpython.cachedir="${T}/.jythoncachedir" \
+ -Duser.home="${T}" \
+ org.python.util.jython "\${@}"
+ EOF
+ chmod +x "${T}"/jython || die
+
+ local -x PYTHON="${T}"/jython
+ # we can't get the path from the interpreter since it does some
+ # magic that fails on non-installed copy...
+ local PYTHON_SITEDIR=${EPREFIX}/usr/share/jython-${SLOT}/Lib/site-packages
+ python_export jython${SLOT} EPYTHON
+
+ # compile tests (everything else is compiled already)
+ # we're keeping it quiet since jython reports errors verbosely
+ # and some of the tests are supposed to trigger compile errors
+ python_optimize "${ED}${instdir}"/Lib/test &>/dev/null
+
+ # for python-exec
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # some of the class files end up with newer timestamps than the files they
+ # were generated from, make sure this doesn't happen
+ find "${ED}${instdir}"/Lib/ -name '*.class' | xargs touch
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-27 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 18:45 [gentoo-commits] repo/gentoo:master commit in: dev-java/jython/files/, dev-java/jython/ Patrice Clement
-- strict thread matches above, loose matches on Subject: below --
2016-11-27 23:10 James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox