From 398bd1a2f320a0be9ce75092654c2ece39e015f100bc7aa6b089a788f40c9163 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 14 Sep 2017 13:36:50 +0000 Subject: [PATCH] Fix build with java9 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-math?expand=0&rev=9 --- apache-commons-math.changes | 11 +++++++++++ apache-commons-math.spec | 12 +++++++----- commons-math3-3.6.1-notests.patch | 11 +++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 commons-math3-3.6.1-notests.patch diff --git a/apache-commons-math.changes b/apache-commons-math.changes index b939818..23ac2a6 100644 --- a/apache-commons-math.changes +++ b/apache-commons-math.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Sep 14 13:31:34 UTC 2017 - fstrba@suse.com + +- Fix build with jdk9 by specifying java source and target 1.6 +- Added patch: + * commons-math3-3.6.1-notests.patch + - Disable unit tests, since they are bound to fail. The new + methods of java.lang.StrictMath are not implemented in the + org.apache.commons.math3.utils.FastMath and the unit tests + bail out. + ------------------------------------------------------------------- Sun May 21 07:55:58 UTC 2017 - tchvatal@suse.com diff --git a/apache-commons-math.spec b/apache-commons-math.spec index d44aa25..aa21013 100644 --- a/apache-commons-math.spec +++ b/apache-commons-math.spec @@ -26,6 +26,7 @@ License: Apache-2.0 Group: Development/Libraries/Java Url: http://commons.apache.org/%{base_name}/ Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}3-%{version}-src.tar.gz +Patch0: commons-math3-3.6.1-notests.patch BuildRequires: ant BuildRequires: ant-junit BuildRequires: javapackages-local @@ -50,14 +51,15 @@ This package contains the API documentation for %{name}. %prep %setup -q -n %{short_name}3-%{version}-src +%patch0 -p1 %build export CLASSPATH=$(build-classpath ant-junit junit) -ant -Dant.build.javac.source=1.5 \ - -Dant.build.javac.target=1.5 \ - -Dmaven.mode.offline=true jar javadoc \ - -Dmaven.test.skip=true \ - -lib %{_datadir}/java -Dbuild.sysclasspath=first +ant -Dant.build.javac.source=1.6 -Dcompile.source=1.6 \ + -Dant.build.javac.target=1.6 -Dcompile.target=1.6 \ + -Dmaven.mode.offline=true -Dmaven.test.skip=true \ + -lib %{_datadir}/java -Dbuild.sysclasspath=first \ + jar javadoc %install # jars diff --git a/commons-math3-3.6.1-notests.patch b/commons-math3-3.6.1-notests.patch new file mode 100644 index 0000000..11caa6c --- /dev/null +++ b/commons-math3-3.6.1-notests.patch @@ -0,0 +1,11 @@ +--- commons-math3-3.6.1-src/build.xml 2016-03-17 13:14:52.000000000 +0100 ++++ commons-math3-3.6.1-src/build.xml 2017-09-14 15:29:12.339511947 +0200 +@@ -256,7 +256,7 @@ + + + +- ++ + + +