Fix build with jdk9

OBS-URL: https://build.opensuse.org/package/show/Java:packages/jlatexmath?expand=0&rev=5
This commit is contained in:
Fridrich Strba 2017-09-19 08:32:58 +00:00 committed by Git OBS Bridge
parent 89133bd5d1
commit fd94ce2ae3
3 changed files with 37 additions and 8 deletions

View File

@ -0,0 +1,19 @@
--- jlatexmath-1.0.3/plugin/fop/build.xml 2014-02-09 18:30:10.000000000 +0100
+++ jlatexmath-1.0.3/plugin/fop/build.xml 2017-09-19 10:27:38.975496694 +0200
@@ -62,14 +62,14 @@
<!-- Compile source files -->
<target name="compile" depends="init,buildJLM,checkXGC,checkFOP">
- <javac srcdir="${project.src.dir}" destdir="${project.bin.dir}" debug="on" source="5" target="5">
+ <javac srcdir="${project.src.dir}" destdir="${project.bin.dir}" debug="on" source="${java_version}" target="${java_version}">
<!--compilerarg value="-Xlint"/-->
<classpath refid="libs-build-classpath"/>
</javac>
</target>
<target name="embedded" depends="init,checkXGC,checkFOP">
- <javac srcdir="${project.src.dir}" destdir="${jlm.base.dir}/bin" debug="on" source="5" target="5">
+ <javac srcdir="${project.src.dir}" destdir="${jlm.base.dir}/bin" debug="on" source="${java_version}" target="${java_version}">
<!--compilerarg value="-Xlint"/-->
<classpath refid="libs-build-classpath"/>
</javac>

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Sep 19 08:31:24 UTC 2017 - fstrba@suse.com
- Fix build with jdk9: specify java source and target level 1.6
- Added patch:
* jlatexmath-1.0.3-nosource.patch
+ Don't hardcode java source and target level; we specify them
on command-line
-------------------------------------------------------------------
Fri Jun 27 14:26:28 UTC 2014 - tchvatal@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package jlatexmath
#
# 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
@ -20,19 +20,21 @@ Name: jlatexmath
Version: 1.0.3
Release: 0
Summary: Java API to display mathematical formulas written in LaTeX
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
License: GPL-2.0+
Group: Development/Libraries
Url: http://forge.scilab.org/index.php/p/jlatexmath/
Source0: http://forge.scilab.org/index.php/p/jlatexmath/downloads/get/%{name}-src-all-%{version}.zip
Source1: patched_fop.properties
Patch0: jlatexmath-1.0.3-nosource.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: java-devel
BuildRequires: javapackages-tools
BuildRequires: unzip
BuildRequires: xmlgraphics-fop
Requires: java
Requires: javapackages-tools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
@ -43,6 +45,7 @@ JLaTeXMath is a fork of the excellent project JMathTeX.
%package fop
Summary: FOP plug-in for %{name}
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: javapackages-tools
@ -53,6 +56,7 @@ This package contains the FOP plug-in for %{name}.
%package javadoc
Summary: API Documentation for %{name}
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group: Documentation
Requires: %{name} = %{version}-%{release}
@ -61,6 +65,7 @@ This package contains the API documentation for %{name}.
%prep
%setup -q
%patch0 -p1
rm fop.properties
cp -a %{SOURCE1} fop.properties
@ -72,9 +77,7 @@ find -name '*.jar' -exec rm -f '{}' \;
sed -i '/class-path/I d' plugin/fop/MANIFEST.MF
%build
ant buildJar
ant fop
ant doc
ant -Djava_version=1.6 buildJar fop doc
%install
@ -84,22 +87,20 @@ cp -p dist/%{name}-fop-%{version}.jar %{buildroot}%{_javadir}/%{name}-fop.jar
mkdir -p %{buildroot}%{_javadocdir}/%{name}
cp -rp doc/ %{buildroot}%{_javadocdir}/%{name}
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
%files
%defattr(-,root,root)
%{_javadir}/%{name}.jar
%doc README
%doc COPYING
%doc LICENSE
%files fop
%defattr(-,root,root)
%{_javadir}/%{name}-fop.jar
%doc plugin/fop/COPYING
%doc plugin/fop/LICENSE
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}
%changelog