From b53bceaa34473018f6d0cd854651c8b8c6a48b715f586c694923f176563e5801 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 10 Sep 2017 19:32:03 +0000 Subject: [PATCH] Fix build with java 9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jython?expand=0&rev=18 --- jython-compareto.patch | 14 ++++++++++++++ jython-javadoc.patch | 10 ++++++++++ jython-module.patch | 11 +++++++++++ jython-sourcetarget.patch | 13 +++++++++++++ jython.changes | 16 ++++++++++++++++ jython.spec | 12 +++++++++++- 6 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 jython-compareto.patch create mode 100644 jython-javadoc.patch create mode 100644 jython-module.patch create mode 100644 jython-sourcetarget.patch diff --git a/jython-compareto.patch b/jython-compareto.patch new file mode 100644 index 0000000..4e11ec6 --- /dev/null +++ b/jython-compareto.patch @@ -0,0 +1,14 @@ +--- jython-svn-Release_2_2_1/Lib/test/javatests/AnonInner.java 2006-04-09 18:14:16.000000000 +0200 ++++ jython-svn-Release_2_2_1/Lib/test/javatests/AnonInner.java 2017-09-08 11:14:45.116655838 +0200 +@@ -9,11 +9,6 @@ + public int hashCode() { + return 2000; + } +- //XXX: stuck compareTo to make the compiler happier. +- // hopefully this doesn't mess up the test. +- public int compareTo(Object x) { +- return 0; +- } + }; + return d.hashCode(); + } diff --git a/jython-javadoc.patch b/jython-javadoc.patch new file mode 100644 index 0000000..a7e8d1e --- /dev/null +++ b/jython-javadoc.patch @@ -0,0 +1,10 @@ +--- jython-svn-Release_2_2_1/build.xml 2007-10-13 20:44:01.000000000 +0200 ++++ jython-svn-Release_2_2_1/build.xml 2017-09-10 21:20:45.286417750 +0200 +@@ -581,6 +581,7 @@ + packagenames="org.python.core, org.python.util, com.ziclix.python.sql" + windowtitle="Jython API documentation" + bottom="<a href='http://www.jython.org' target='_top'>Jython homepage</a>" ++ additionalparam="-Xdoclint:none" + > + + diff --git a/jython-module.patch b/jython-module.patch new file mode 100644 index 0000000..9d6eb3a --- /dev/null +++ b/jython-module.patch @@ -0,0 +1,11 @@ +--- jython-svn-Release_2_2_1/src/org/python/parser/TreeBuilder.java 2007-06-30 10:57:09.000000000 +0200 ++++ jython-svn-Release_2_2_1/src/org/python/parser/TreeBuilder.java 2017-09-08 11:05:27.462211440 +0200 +@@ -111,7 +111,7 @@ + case JJTSINGLE_INPUT: + return new Interactive(makeStmts(arity)); + case JJTFILE_INPUT: +- return new Module(makeStmts(arity)); ++ return new org.python.parser.ast.Module(makeStmts(arity)); + case JJTEVAL_INPUT: + return new Expression(makeExpr()); + diff --git a/jython-sourcetarget.patch b/jython-sourcetarget.patch new file mode 100644 index 0000000..17d51b2 --- /dev/null +++ b/jython-sourcetarget.patch @@ -0,0 +1,13 @@ +--- jython-svn-Release_2_2_1/build.xml 2007-10-13 20:44:01.000000000 +0200 ++++ jython-svn-Release_2_2_1/build.xml 2017-09-08 11:01:08.947884132 +0200 +@@ -174,8 +174,8 @@ + + + +- +- ++ ++ + + + diff --git a/jython.changes b/jython.changes index 5411d94..a613aa9 100644 --- a/jython.changes +++ b/jython.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Sun Sep 10 19:26:18 UTC 2017 - fstrba@suse.com + +- Added patches: + * jython-compareto.patch + * jython-module.patch + + Fix build breakages with jdk9 + * jython-javadoc.patch + + Disable doclint in order not to die on javadoc formatting + errors + * jython-sourcetarget.patch + + Specify java target and source level 1.6 in order to allow + building with jdk9 +- Depend on jline + * Fixes missing symbols with javadoc and jdk9 + ------------------------------------------------------------------- Wed Jun 28 07:21:39 UTC 2017 - tchvatal@suse.com diff --git a/jython.spec b/jython.spec index 8e6fc07..5867635 100644 --- a/jython.spec +++ b/jython.spec @@ -46,8 +46,13 @@ Patch1: %{name}-nofullbuildpath.patch Patch3: %{name}-cacheperms.patch Patch4: %{name}-makeCompiledFilename.patch Patch5: %{name}-cached-classes.patch +Patch6: %{name}-sourcetarget.patch +Patch7: %{name}-module.patch +Patch8: %{name}-compareto.patch +Patch9: %{name}-javadoc.patch Requires: jakarta-oro Requires: javapackages-tools +Requires: jline Requires: libreadline-java >= 0.8.0 Requires: python >= %{cpython_version} Requires: servletapi5 @@ -56,6 +61,7 @@ Requires: java >= 1.6.0 BuildRequires: ant BuildRequires: jakarta-oro BuildRequires: java-devel >= 1.6.0 +BuildRequires: jline BuildRequires: libreadline-java >= 0.8.0 BuildRequires: mysql-connector-java BuildRequires: python >= %{cpython_version} @@ -172,9 +178,13 @@ development and in shipping products. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 %build -export CLASSPATH=$(build-classpath mysql-connector-java oro servlet) +export CLASSPATH=$(build-classpath mysql-connector-java oro servlet jline) # FIXME: fix jpackage-utils to handle multilib correctly export CLASSPATH=$CLASSPATH:%{_libdir}/libreadline-java/libreadline-java.jar