From 1d14f3ac45cc7d5dabfd1354feb4545676bd3207c344f5b7b3920dbbcede526a Mon Sep 17 00:00:00 2001 From: Denny Beyer Date: Fri, 8 Apr 2022 13:51:55 +0000 Subject: [PATCH] Accepting request 967833 from home:fstrba:branches:science Fix build in factory with jdk17 OBS-URL: https://build.opensuse.org/request/show/967833 OBS-URL: https://build.opensuse.org/package/show/science/imagej?expand=0&rev=16 --- imagej-nosourcetarget.patch | 11 +++++++++++ imagej.changes | 10 ++++++++++ imagej.spec | 8 +++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 imagej-nosourcetarget.patch diff --git a/imagej-nosourcetarget.patch b/imagej-nosourcetarget.patch new file mode 100644 index 0000000..bf6ed84 --- /dev/null +++ b/imagej-nosourcetarget.patch @@ -0,0 +1,11 @@ +--- source/build.xml 2022-04-08 15:40:02.598001218 +0200 ++++ source/build.xml 2022-04-08 15:43:15.611177038 +0200 +@@ -6,7 +6,7 @@ + + + +- ++ + + + diff --git a/imagej.changes b/imagej.changes index d9bafdd..aef634f 100644 --- a/imagej.changes +++ b/imagej.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Apr 8 13:44:13 UTC 2022 - Fridrich Strba + +- Build with java source and target levels 8 + * Fixes build in Factory with jdk17 +- Added patch: + * imagej-nosourcetarget.patch + + Do not hardcode source and target levels, but allow them to + be specified on ant's command-line + ------------------------------------------------------------------- Wed Dec 2 18:37:15 UTC 2020 - andy great diff --git a/imagej.spec b/imagej.spec index 874a014..486148d 100644 --- a/imagej.spec +++ b/imagej.spec @@ -28,12 +28,13 @@ Url: http://rsbweb.nih.gov/ij/ Source: http://rsbweb.nih.gov/ij/download/src/ij%{SrcVersion}-src.zip Source1: %{name}.in Source2: %{name}.desktop +Patch0: imagej-nosourcetarget.patch BuildRequires: ImageMagick BuildRequires: ant -BuildRequires: java-devel +BuildRequires: java-devel >= 1.8 BuildRequires: unzip BuildRequires: update-desktop-files -Requires: java >= 1.6.0 +Requires: java >= 1.8 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -60,9 +61,10 @@ compiler. %prep %setup -n source +%patch0 -p1 %build -%ant build +%ant -Dant.build.javac.source=1.8 -Dant.build.javac.target=1.8 build %install install -d -m 755 %{buildroot}%{_datadir}/%{name}