Fix build with jdk9

OBS-URL: https://build.opensuse.org/package/show/Java:packages/rhino?expand=0&rev=36
This commit is contained in:
Fridrich Strba 2017-10-03 06:53:13 +00:00 committed by Git OBS Bridge
parent c6109b2841
commit 36c9801bbf
2 changed files with 11 additions and 15 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Oct 3 06:51:14 UTC 2017 - fstrba@suse.com
- Don't require java-1_5_0-gcj-compat-devel, since it is bound to
go
- Require java-devel >= 1.6
- Specify java source and target level 6 to allow buiding with jdk9
-------------------------------------------------------------------
Fri Sep 15 05:49:47 UTC 2017 - fstrba@suse.com

View File

@ -48,26 +48,13 @@ Patch3: rhino-288467.patch
Patch100: rhino-1.7-gcj.patch
BuildRequires: ant
BuildRequires: bea-stax-api
BuildRequires: java-1_5_0-gcj-compat-devel
BuildRequires: java-devel >= 1.6
BuildRequires: javapackages-tools
BuildRequires: jline
BuildRequires: xmlbeans-mini
#!BuildIgnore: antlr
#!BuildIgnore: antlr-java
#!BuildIgnore: java-1_6_0-openjdk
#!BuildIgnore: java-1_6_0-openjdk-devel
#!BuildIgnore: java-1_6_0-openjdk-headless
#!BuildIgnore: java-1_7_0-openjdk
#!BuildIgnore: java-1_7_0-openjdk-devel
#!BuildIgnore: java-1_7_0-openjdk-headless
#!BuildIgnore: java-1_8_0-openjdk
#!BuildIgnore: java-1_8_0-openjdk-devel
#!BuildIgnore: java-1_8_0-openjdk-headless
#!BuildIgnore: java-9-openjdk
#!BuildIgnore: java-9-openjdk-devel
#!BuildIgnore: java-9-openjdk-headless
#!BuildIgnore: xerces-j2
#BuildRequires: xerces-j2-bootstrap
#!BuildIgnore: xerces-j2-bootstrap
#!BuildIgnore: xml-commons
#!BuildIgnore: xml-commons-apis
@ -119,12 +106,13 @@ export OPT_JAR_LIST=:
%{ant} -v -d \
-Dxbean.jar=$(build-classpath xmlbeans/xbean | cut -d ':' -f 1) \
-Djsr173.jar=$(build-classpath bea-stax-api) \
-Dtarget-jvm=6 -Dsource-level=6 \
deepclean jar copy-all
export CLASSPATH=`pwd`/build/%{name}%{cvs_version}/js.jar:$(build-classpath xmlbeans/xbean 2>/dev/null)
SOURCEPATH=`pwd`/build/%{name}%{cvs_version}/src
pushd examples
javac -sourcepath ${SOURCEPATH} -source 1.5 -target 1.5 *.java
javac -sourcepath ${SOURCEPATH} -source 6 -target 6 *.java
jar cvf ../build/%{name}%{cvs_version}/%{name}-examples.jar *.class
popd