summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2006-07-29 21:29:58 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2006-07-29 21:29:58 +0000
commita151a5ec5732c6f1064454fd6df8098ebf9d2dd4 (patch)
tree6be1795067ce96a957de1f58907cd3412bc110d7 /dev-java
parentStable on alpha. (diff)
downloadgentoo-2-a151a5ec5732c6f1064454fd6df8098ebf9d2dd4.tar.gz
gentoo-2-a151a5ec5732c6f1064454fd6df8098ebf9d2dd4.tar.bz2
gentoo-2-a151a5ec5732c6f1064454fd6df8098ebf9d2dd4.zip
Fixed bug #142099 so jython does not try to override the assert function introduced in 1.5. Thanks to Hanno Meyer-Thurow <h.mth@web.de> for the fix.
(Portage version: 2.1.1_pre4)
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/jython/ChangeLog9
-rw-r--r--dev-java/jython/files/2.1-assert.patch50
-rw-r--r--dev-java/jython/files/digest-jython-2.1-r83
-rw-r--r--dev-java/jython/jython-2.1-r8.ebuild93
4 files changed, 154 insertions, 1 deletions
diff --git a/dev-java/jython/ChangeLog b/dev-java/jython/ChangeLog
index 2fbde4ef571f..58e582a0c4e6 100644
--- a/dev-java/jython/ChangeLog
+++ b/dev-java/jython/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-java/jython
# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.31 2006/07/28 11:58:52 nelchael Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/ChangeLog,v 1.32 2006/07/29 21:29:58 betelgeuse Exp $
+
+*jython-2.1-r8 (29 Jul 2006)
+
+ 29 Jul 2006; Petteri Räty <betelgeuse@gentoo.org>
+ +files/2.1-assert.patch, +jython-2.1-r8.ebuild:
+ Fixed bug #142099 so jython does not try to override the assert function
+ introduced in 1.5. Thanks to Hanno Meyer-Thurow <h.mth@web.de> for the fix.
28 Jul 2006; Krzysiek Pawlik <nelchael@gentoo.org> jython-2.1-r7.ebuild:
Removed jikes.
diff --git a/dev-java/jython/files/2.1-assert.patch b/dev-java/jython/files/2.1-assert.patch
new file mode 100644
index 000000000000..1f06848f2328
--- /dev/null
+++ b/dev-java/jython/files/2.1-assert.patch
@@ -0,0 +1,50 @@
+--- 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/digest-jython-2.1-r8 b/dev-java/jython/files/digest-jython-2.1-r8
new file mode 100644
index 000000000000..430b21a5c3b2
--- /dev/null
+++ b/dev-java/jython/files/digest-jython-2.1-r8
@@ -0,0 +1,3 @@
+MD5 74f21a0185135396c71453bc279c179f jython-2.1.tar.bz2 1301528
+RMD160 94ae22604c1a816af7d066f2ed88b2abaf5c51d1 jython-2.1.tar.bz2 1301528
+SHA256 faa57a55d137268e80221cd628b234ca67de13504b813be1c0499c9f4d5872b2 jython-2.1.tar.bz2 1301528
diff --git a/dev-java/jython/jython-2.1-r8.ebuild b/dev-java/jython/jython-2.1-r8.ebuild
new file mode 100644
index 000000000000..d8af9ab7f8a7
--- /dev/null
+++ b/dev-java/jython/jython-2.1-r8.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jython/jython-2.1-r8.ebuild,v 1.1 2006/07/29 21:29:58 betelgeuse Exp $
+
+inherit base java-pkg-2
+
+DESCRIPTION="An implementation of Python written in Java"
+HOMEPAGE="http://www.jython.org"
+MY_PV="21"
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.class"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+LICENSE="JPython"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~ppc64"
+IUSE="readline source doc"
+# servlet
+
+RDEPEND=">=virtual/jre-1.2
+ readline? ( >=dev-java/libreadline-java-0.8.0 )"
+# servlet? ( >=net-www/tomcat-5.0 )
+DEPEND=">=virtual/jdk-1.2
+ source? ( app-arch/zip )
+ ${RDEPEND}"
+
+PATCHES="${FILESDIR}/${PV}-assert.patch"
+
+src_compile() {
+ local cp="."
+ local exclude=""
+
+ if use readline ; then
+ cp=${cp}:$(java-pkg_getjars libreadline-java)
+ else
+ exclude="${exclude} ! -name ReadlineConsole.java"
+ fi
+
+ #if use servlet; then
+ # cp=${cp}:$(java-pkg_getjars servlet)
+ #else
+ exclude="${exclude} ! -name PyServlet.java"
+ #fi
+
+ ejavac -classpath ${cp} -nowarn $(find org -name "*.java" ${exclude})
+
+ find org -name "*.class" | xargs jar cf ${PN}.jar
+}
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+
+ dodoc README.txt NEWS ACKNOWLEDGMENTS
+ use doc && java-pkg_dohtml -A .css .jpg .gif -r Doc/*
+
+ java-pkg_dolauncher jythonc \
+ --main "org.python.util.jython" \
+ --java_args '-Dpython.home=/usr/share/jython' \
+ --pkg_args '/usr/share/jython/tools/jythonc/jythonc.py'
+
+ java-pkg_dolauncher jython \
+ --main 'org.python.util.jython' \
+ --java_args '-Dpython.home="/usr/share/jython"'
+
+ dodir /usr/share/jython/cachedir
+ chmod a+rw ${D}/usr/share/jython/cachedir
+
+ rm Demo/jreload/example.jar
+ insinto /usr/share/${PN}
+ doins -r Lib Demo registry
+
+ insinto /usr/share/${PN}/tools
+ doins -r Tools/*
+
+ use source && java-pkg_dosrc com org
+}
+
+pkg_postinst() {
+ if use readline; then
+ einfo "To use readline you need to add the following to your registery"
+ einfo
+ einfo "python.console=org.python.util.ReadlineConsole"
+ einfo "python.console.readlinelib=GnuReadline"
+ einfo
+ einfo "The global registry can be found in /usr/share/${PN}/registry"
+ einfo "User registry in \$HOME/.jython"
+ einfo "See http://www.jython.org/docs/registry.html for more information"
+ einfo ""
+ fi
+
+ elog "This revision renames org.python.core.Py.assert to assert_."
+ elog "This is the solution that upstream will use in the next release."
+ elog "Just note that this revision is not API compatible with vanilla 2.1."
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=142099"
+}