From dbbfb528cddab415f4ad5032880e4525a0468f69385518487fd24bf8b4b328ed Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 6 Sep 2017 17:53:01 +0000 Subject: [PATCH] Fix build with java 9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/ant?expand=0&rev=87 --- ant-antlr.changes | 9 +++++++++ ant-antlr.spec | 8 ++++++-- ant-junit.changes | 9 +++++++++ ant-junit.spec | 8 ++++++-- ant.changes | 9 +++++++++ ant.spec | 8 ++++++-- apache-ant-1.9.9-sourcetarget.patch | 13 +++++++++++++ 7 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 apache-ant-1.9.9-sourcetarget.patch diff --git a/ant-antlr.changes b/ant-antlr.changes index a1904aa..b9bd49d 100644 --- a/ant-antlr.changes +++ b/ant-antlr.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Sep 6 17:49:21 UTC 2017 - fstrba@suse.com + +- Added patch: + * apache-ant-1.9.9-sourcetarget.patch + + Change java source and target versions to 1.6 to allow build + with jdk9 +- For non-boostrap builds require java-devel >= 1.6 + ------------------------------------------------------------------- Fri Jun 9 09:05:31 UTC 2017 - tchvatal@suse.com diff --git a/ant-antlr.spec b/ant-antlr.spec index a0f6179..dd4d846 100644 --- a/ant-antlr.spec +++ b/ant-antlr.spec @@ -43,6 +43,7 @@ Patch0: apache-ant-no-test-jar.patch Patch1: apache-ant-class-path-in-manifest.patch #PATCH-FIX-UPSTREAM -- https://bz.apache.org/bugzilla/show_bug.cgi?id=61079 Patch3: reproducible.patch +Patch4: apache-ant-1.9.9-sourcetarget.patch %if %{with bootstrap} BuildRequires: java-1_5_0-gcj-compat-devel #!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel java-1_6_0-openjdk-headless @@ -50,7 +51,7 @@ BuildRequires: java-1_5_0-gcj-compat-devel #!BuildIgnore: java-1_8_0-openjdk java-1_8_0-openjdk-devel java-1_8_0-openjdk-headless #!BuildIgnore: java-9-openjdk java-9-openjdk-devel java-9-openjdk-headless %else -BuildRequires: java-devel >= 1.5.0 +BuildRequires: java-devel >= 1.6.0 %endif BuildRequires: antlr-bootstrap BuildRequires: javapackages-tools @@ -75,7 +76,7 @@ BuildRequires: xml-commons-apis BuildRequires: strip-nondeterminism %endif %if %{with bootstrap} -Requires: java-devel >= 1.5.0 +Requires: java-devel >= 1.6.0 Requires: javapackages-tools Requires: jaxp_parser_impl Requires: xml-commons-apis @@ -350,6 +351,9 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT// %endif %patch1 %patch3 -p1 +%if ! %{with bootstrap} +%patch4 -p1 +%endif # clean jar files %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t rm diff --git a/ant-junit.changes b/ant-junit.changes index a1904aa..b9bd49d 100644 --- a/ant-junit.changes +++ b/ant-junit.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Sep 6 17:49:21 UTC 2017 - fstrba@suse.com + +- Added patch: + * apache-ant-1.9.9-sourcetarget.patch + + Change java source and target versions to 1.6 to allow build + with jdk9 +- For non-boostrap builds require java-devel >= 1.6 + ------------------------------------------------------------------- Fri Jun 9 09:05:31 UTC 2017 - tchvatal@suse.com diff --git a/ant-junit.spec b/ant-junit.spec index 6af3cbb..e646f71 100644 --- a/ant-junit.spec +++ b/ant-junit.spec @@ -43,6 +43,7 @@ Patch0: apache-ant-no-test-jar.patch Patch1: apache-ant-class-path-in-manifest.patch #PATCH-FIX-UPSTREAM -- https://bz.apache.org/bugzilla/show_bug.cgi?id=61079 Patch3: reproducible.patch +Patch4: apache-ant-1.9.9-sourcetarget.patch %if %{with bootstrap} BuildRequires: java-1_5_0-gcj-compat-devel #!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel java-1_6_0-openjdk-headless @@ -50,7 +51,7 @@ BuildRequires: java-1_5_0-gcj-compat-devel #!BuildIgnore: java-1_8_0-openjdk java-1_8_0-openjdk-devel java-1_8_0-openjdk-headless #!BuildIgnore: java-9-openjdk java-9-openjdk-devel java-9-openjdk-headless %else -BuildRequires: java-devel >= 1.5.0 +BuildRequires: java-devel >= 1.6.0 %endif BuildRequires: antlr-bootstrap BuildRequires: javapackages-tools @@ -75,7 +76,7 @@ BuildRequires: xml-commons-apis BuildRequires: strip-nondeterminism %endif %if %{with bootstrap} -Requires: java-devel >= 1.5.0 +Requires: java-devel >= 1.6.0 Requires: javapackages-tools Requires: jaxp_parser_impl Requires: xml-commons-apis @@ -350,6 +351,9 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT// %endif %patch1 %patch3 -p1 +%if ! %{with bootstrap} +%patch4 -p1 +%endif # clean jar files %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t rm diff --git a/ant.changes b/ant.changes index a1904aa..b9bd49d 100644 --- a/ant.changes +++ b/ant.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Sep 6 17:49:21 UTC 2017 - fstrba@suse.com + +- Added patch: + * apache-ant-1.9.9-sourcetarget.patch + + Change java source and target versions to 1.6 to allow build + with jdk9 +- For non-boostrap builds require java-devel >= 1.6 + ------------------------------------------------------------------- Fri Jun 9 09:05:31 UTC 2017 - tchvatal@suse.com diff --git a/ant.spec b/ant.spec index e519c4c..365930d 100644 --- a/ant.spec +++ b/ant.spec @@ -42,6 +42,7 @@ Patch0: apache-ant-no-test-jar.patch Patch1: apache-ant-class-path-in-manifest.patch #PATCH-FIX-UPSTREAM -- https://bz.apache.org/bugzilla/show_bug.cgi?id=61079 Patch3: reproducible.patch +Patch4: apache-ant-1.9.9-sourcetarget.patch %if %{with bootstrap} BuildRequires: java-1_5_0-gcj-compat-devel #!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel java-1_6_0-openjdk-headless @@ -49,7 +50,7 @@ BuildRequires: java-1_5_0-gcj-compat-devel #!BuildIgnore: java-1_8_0-openjdk java-1_8_0-openjdk-devel java-1_8_0-openjdk-headless #!BuildIgnore: java-9-openjdk java-9-openjdk-devel java-9-openjdk-headless %else -BuildRequires: java-devel >= 1.5.0 +BuildRequires: java-devel >= 1.6.0 %endif BuildRequires: antlr-bootstrap BuildRequires: javapackages-tools @@ -74,7 +75,7 @@ BuildRequires: xml-commons-apis BuildRequires: strip-nondeterminism %endif %if %{with bootstrap} -Requires: java-devel >= 1.5.0 +Requires: java-devel >= 1.6.0 Requires: javapackages-tools Requires: jaxp_parser_impl Requires: xml-commons-apis @@ -349,6 +350,9 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT// %endif %patch1 %patch3 -p1 +%if ! %{with bootstrap} +%patch4 -p1 +%endif # clean jar files %{_bindir}/find . -name "*.jar" | %{_bindir}/xargs -t rm diff --git a/apache-ant-1.9.9-sourcetarget.patch b/apache-ant-1.9.9-sourcetarget.patch new file mode 100644 index 0000000..1587832 --- /dev/null +++ b/apache-ant-1.9.9-sourcetarget.patch @@ -0,0 +1,13 @@ +--- apache-ant-1.9.9/build.xml 2017-02-02 18:55:08.000000000 +0100 ++++ apache-ant-1.9.9/build.xml 2017-09-06 19:42:13.917021125 +0200 +@@ -104,8 +104,8 @@ + + + +- +- ++ ++ + + +