Fix build with java 9

OBS-URL: https://build.opensuse.org/package/show/Java:packages/ant?expand=0&rev=87
This commit is contained in:
Fridrich Strba 2017-09-06 17:53:01 +00:00 committed by Git OBS Bridge
parent 8cc69f2cd9
commit e26da1a879
7 changed files with 58 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 @@
<property name="chmod.maxparallel" value="250"/>
<property name="deprecation" value="false"/>
<property name="optimize" value="true"/>
- <property name="javac.target" value="1.5"/>
- <property name="javac.source" value="1.5"/>
+ <property name="javac.target" value="1.6"/>
+ <property name="javac.source" value="1.6"/>
<property name="junit.filtertrace" value="off"/>
<property name="junit.summary" value="no"/>
<property name="test.haltonfailure" value="false"/>