Accepting request 1121515 from Java:Factory

Fix build with JDK21

OBS-URL: https://build.opensuse.org/request/show/1121515
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javazic?expand=0&rev=15
This commit is contained in:
Dominique Leuenberger 2023-11-01 21:09:57 +00:00 committed by Git OBS Bridge
commit 57b0527490
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Oct 31 22:29:59 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Build with source/target 8 when using JDK that does not support
level 7
-------------------------------------------------------------------
Fri Apr 8 13:48:45 UTC 2022 - Fridrich Strba <fstrba@suse.com>

View File

@ -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')