From a3a41fd8da172a7db099c89107b2604a80b92e7517c15422638b6a45ff172c97 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 31 Oct 2023 22:31:41 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:Factory/javazic?expand=0&rev=7 --- javazic.changes | 6 ++++++ javazic.spec | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/javazic.changes b/javazic.changes index fd398ee..6288d8c 100644 --- a/javazic.changes +++ b/javazic.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 31 22:29:59 UTC 2023 - Fridrich Strba + +- Build with source/target 8 when using JDK that does not support + level 7 + ------------------------------------------------------------------- Fri Apr 8 13:48:45 UTC 2022 - Fridrich Strba diff --git a/javazic.spec b/javazic.spec index 3ed3d10..1988263 100644 --- a/javazic.spec +++ b/javazic.spec @@ -1,7 +1,7 @@ # # spec file for package javazic # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,7 +36,13 @@ derived from openjdk6 source code. %setup -q -c %{name}-%{version} %build -javac -source 7 -target 7 $(find build/ -iname '*.java') +javac \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 18}%{!?pkg_vcmp:0} + -source 8 -target 8 \ +%else + -source 7 -target 7 \ +%endif + $(find build/ -iname '*.java') echo "Main-Class: build.tools.javazic.Main" > manifest.txt jar -cfm %{name}-%{version}.jar manifest.txt $(find . -iname '*.class')