Remove dependency on java-gcj-compat

OBS-URL: https://build.opensuse.org/package/show/Java:packages/xalan-j2?expand=0&rev=22
This commit is contained in:
Fridrich Strba 2017-10-03 12:09:15 +00:00 committed by Git OBS Bridge
parent 8afead7cd1
commit 213462cb8a
3 changed files with 288 additions and 7 deletions

271
openjdk-build.patch Normal file
View File

@ -0,0 +1,271 @@
--- xalan-j_2_7_2/build.xml 2014-03-26 16:21:31.000000000 +0100
+++ xalan-j_2_7_2/build.xml 2017-10-03 13:58:53.759678877 +0200
@@ -216,14 +216,12 @@
<pathelement location="${taglet.jar}" />
<pathelement location="${build.serializer.jar}" />
<pathelement location="${build.xalan.jar}" />
- <pathelement path="${java.class.path}" />
</path>
<path id="samples.class.path">
<pathelement location="${xmlapis.jar}" />
<pathelement location="${build.serializer.jar}" />
<pathelement location="${parser.jar}" />
<pathelement location="${build.xalan.jar}" />
- <pathelement path="${java.class.path}" />
</path>
<path id="compile.class.path">
<!-- Ensure the selected parser.jar file is used to compile against -->
@@ -232,7 +230,6 @@
<pathelement location="${xmlapis.jar}" />
<pathelement location="${build.serializer.jar}" />
<pathelement location="${parser.jar}" />
- <pathelement path="${java.class.path}" />
</path>
<path id="xslt.boot.class.path">
<!-- Put this version of xalan in front of the jdk's for JDK 1.4+ -->
@@ -392,7 +389,6 @@
<exclude name="**/IncrementalSAXSource_Xerces.java"
unless="xerces.present" />
<classpath refid="compile.class.path" />
- <bootclasspath refid="xslt.boot.class.path" />
</javac>
<!-- Copy needed properties, resource, etc. files to be put into .jar file -->
<copy todir="${build.classes}">
@@ -408,6 +404,12 @@
<!-- =================================================================== -->
<target name="xalan-interpretive.compile" depends="xml.compile"
description="Compile the Xalan interpretive classes (skips XSLTC)" >
+
+ <gunzip src="${xml-commons-srcs.tar.gz}" dest="${build.dir}" />
+ <untar src="${xml-commons-srcs.tar}"
+ dest="${src.dir}">
+ </untar>
+
<echo message="Compiling Xalan interpretive classes" />
<javac srcdir="${src.dir}"
destdir="${build.classes}"
@@ -418,7 +420,6 @@
<include name="${xalan.reldir}/**/*.java" />
<exclude name="${xsltc.reldir}/**/*.java" />
<classpath refid="compile.class.path" />
- <bootclasspath refid="xslt.boot.class.path" />
<sourcepath refid="compile.source.path" />
</javac>
<!-- Copy needed properties, resource, etc. files to be put into .jar file -->
@@ -447,7 +448,6 @@
<!-- build.classes needed for
org.apache.xalan.xsltc.util.JavaCupRedirect -->
<pathelement location="${build.classes}" />
- <pathelement path="${java.class.path}" />
</path>
<!-- Attempt to determine dependency info for generated sources -->
@@ -461,7 +461,6 @@
debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="xsltc.class.path" />
- <bootclasspath refid="xslt.boot.class.path" />
</javac>
<!-- These tricky uptodate statements hopefully determine if we
actually need to generate the java_cup and jlex files
@@ -525,7 +524,6 @@
debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="xsltc.class.path" />
- <bootclasspath refid="xslt.boot.class.path" />
</javac>
</target>
@@ -539,7 +537,6 @@
debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="xsltc.class.path" />
- <bootclasspath refid="xslt.boot.class.path" />
</javac>
</target>
@@ -738,90 +735,90 @@
<!-- Since the samples are packageless, they must be compiled separately. -->
<javac srcdir="${samples.dir}/SimpleTransform"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/UseStylesheetPI"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/UseStylesheetParam"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/SAX2SAX"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/DOM2DOM"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/Pipe"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path" >
+ debug="${build.debug}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/UseXMLFilters"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/Trace"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/ApplyXPath"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/ApplyXPathDOM"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/trax"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/extensions"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/Validate"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/TransformThread"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
<javac srcdir="${samples.dir}/XPathAPI"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
</javac>
@@ -864,7 +861,7 @@
<javac srcdir="${samples.dir}/servlet"
destdir="${build.servlet}/WEB-INF/classes"
debug="${build.debug}"
- bootclasspathref="xslt.boot.class.path"
+
target="${compiler.target}" source="${compiler.source}">
<classpath refid="samples.class.path" />
<classpath location="${servlet-api.jar}" />
@@ -904,13 +901,13 @@
<target name="xsltc.samples.nojardepends">
<mkdir dir="${build.samples}"/>
<javac srcdir="${samples.dir}/translets"
- classpath="${java.class.path}:${build.xalan.jar}"
+ classpath="${build.xalan.jar}"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}"/>
<javac srcdir="${samples.dir}/CompiledJAXP"
destdir="${build.samples}" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}"/>
</target>
@@ -923,7 +920,7 @@
<mkdir dir="${build.samples}/CompiledApplet"/>
<javac srcdir="${samples.dir}/CompiledApplet"
destdir="${build.samples}/CompiledApplet" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}"/>
<jar jarfile="${build.xsltc.applet.jar}"
basedir="${build.samples}/CompiledApplet"
@@ -939,7 +936,7 @@
<mkdir dir="${build.samples}/CompiledBrazil"/>
<javac srcdir="${samples.dir}/CompiledBrazil"
destdir="${build.samples}/CompiledBrazil" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath location="${brazil.jar}"/>
</javac>
@@ -959,7 +956,7 @@
<mkdir dir="${build.samples}/CompiledEJB"/>
<javac srcdir="${samples.dir}/CompiledEJB"
destdir="${build.samples}/CompiledEJB" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath location="${javaee-api.jar}"/>
</javac>
@@ -977,7 +974,7 @@
<mkdir dir="${build.samples}/CompiledServlet"/>
<javac srcdir="${samples.dir}/CompiledServlet"
destdir="${build.samples}/CompiledServlet" excludes="${exclude}"
- debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
+ debug="${build.debug}"
target="${compiler.target}" source="${compiler.source}">
<classpath location="${servlet-api.jar}"/>
</javac>
@@ -1554,7 +1551,7 @@
<!-- Use FOP to generate a pdf file (classpath may need updating! -sc 18-Apr-01)-->
<java fork="yes"
classname="org.apache.fop.apps.CommandLine"
- classpath="${java.class.path}:${build.xalan.jar}:${bin.dir}/fop.jar:${bin.dir}/w3c.jar">
+ classpath="${build.xalan.jar}:${bin.dir}/fop.jar:${bin.dir}/w3c.jar">
<arg line="${build.docs}/xalan-collate.fo build/docs/xalan.pdf"/>
</java>
</target>
@@ -1690,7 +1687,6 @@
target="${compiler.target}" source="${compiler.source}">
<include name="${serializer.reldir}/**/*.java" />
<classpath refid="compile.class.path" />
- <bootclasspath refid="xslt.boot.class.path" />
</javac>
<!-- Copy needed properties, resource, etc. files to be put into .jar file -->
<copy todir="${serializer.build.classes}">

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Oct 3 12:07:42 UTC 2017 - fstrba@suse.com
- Added patch:
* openjdk-build.patch
+ Fix build with different versions of OpenJDK
- Do not require gcc-java any more
- Run fdupes
-------------------------------------------------------------------
Mon Dec 8 14:56:54 UTC 2014 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package xalan-j2
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -28,11 +28,13 @@ Source0: http://www.apache.org/dist/xalan/xalan-j/source/xalan-j_%{cvs_ve
Patch0: %{name}-noxsltcdeps.patch
Patch1: %{name}-manifest.patch
Patch2: %{name}-crosslink.patch
Patch3: openjdk-build.patch
BuildRequires: ant
BuildRequires: bcel
BuildRequires: dos2unix
BuildRequires: java-1_5_0-gcj-compat-devel
BuildRequires: fdupes
BuildRequires: java-cup-bootstrap
BuildRequires: java-devel >= 1.6
BuildRequires: jlex
BuildRequires: servletapi5
BuildRequires: xml-commons-apis-bootstrap
@ -98,6 +100,7 @@ This package contains demonstration and sample files for Xalan.
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# Remove all binary libs, except ones needed to build docs and N/A elsewhere.
for j in $(find . -name "*.jar"); do
mv $j $j.no
@ -121,12 +124,9 @@ ln -sf $(build-classpath ant) ant.jar
ln -sf $(build-classpath jlex) JLex.jar
ln -sf $(build-classpath stylebook) stylebook-1.0-b3_xalan-2.jar
popd
export CLASSPATH=$(build-classpath servletapi5)
#
#
#export CLASSPATH=$(build-classpath servletapi5 java_cup java_cup-runtime jlex \
#bcel xerces-j2)
ant \
-Dservlet-api.jar=$(build-classpath servletapi5) \
-Dcompiler.source=1.6 -Dcompiler.target=1.6 \
-Djava.awt.headless=true \
-Dapi.j2se=%{_javadocdir}/java \
-Dbuild.xalan-interpretive.jar=build/xalan-interpretive.jar \
@ -154,6 +154,7 @@ install -p -m 644 build/xalansamples.jar \
install -p -m 644 build/xalanservlet.war \
%{buildroot}%{_datadir}/%{name}/%{name}-servlet.war
cp -pr samples %{buildroot}%{_datadir}/%{name}
%fdupes -s %{buildroot}%{_datadir}/%{name}
# alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives