support openjdk 17

This commit is contained in:
Zuzana Miklankova 2021-12-01 16:49:28 +01:00
parent fd68877ab9
commit be9d4eff9a
2 changed files with 235 additions and 2 deletions

View File

@ -0,0 +1,227 @@
From d47b8f0db649856949a27fac8f2958da8b98b964 Mon Sep 17 00:00:00 2001
From: Zuzana Miklankova <zmiklank@redhat.com>
Date: Wed, 1 Dec 2021 15:24:01 +0100
Subject: [PATCH] patch
---
contrib/alphamaskdemo/build.xml | 2 +-
contrib/balloonmanagerdemo/build.xml | 2 +-
contrib/balloontips/build.xml | 2 +-
contrib/dnddemo/build.xml | 2 +-
contrib/monitordemo/build.xml | 2 +-
contrib/msoffice/build.xml | 2 +-
contrib/native_window_msg/build.xml | 2 +-
contrib/ntservice/nbproject/project.properties | 4 ++--
contrib/platform/nbproject/project.properties | 4 ++--
contrib/shapedwindowdemo/build.xml | 2 +-
contrib/w32printing/build.xml | 2 +-
contrib/w32windowhooks/build.xml | 2 +-
contrib/x11/build.xml | 2 +-
nbproject/project.xml | 4 ++--
14 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/contrib/alphamaskdemo/build.xml b/contrib/alphamaskdemo/build.xml
index a9bead9ea..8f119be82 100644
--- a/contrib/alphamaskdemo/build.xml
+++ b/contrib/alphamaskdemo/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/balloonmanagerdemo/build.xml b/contrib/balloonmanagerdemo/build.xml
index 7f53f329e..11c8c5d4f 100644
--- a/contrib/balloonmanagerdemo/build.xml
+++ b/contrib/balloonmanagerdemo/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/balloontips/build.xml b/contrib/balloontips/build.xml
index 594b65f95..34b117f2c 100644
--- a/contrib/balloontips/build.xml
+++ b/contrib/balloontips/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/dnddemo/build.xml b/contrib/dnddemo/build.xml
index 4fab70a83..ae84b615a 100644
--- a/contrib/dnddemo/build.xml
+++ b/contrib/dnddemo/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/monitordemo/build.xml b/contrib/monitordemo/build.xml
index cb5ad9e77..2ad6a9de6 100644
--- a/contrib/monitordemo/build.xml
+++ b/contrib/monitordemo/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/msoffice/build.xml b/contrib/msoffice/build.xml
index 50452b084..c65c3f241 100644
--- a/contrib/msoffice/build.xml
+++ b/contrib/msoffice/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/native_window_msg/build.xml b/contrib/native_window_msg/build.xml
index 15bdb95b6..a35cdbd82 100644
--- a/contrib/native_window_msg/build.xml
+++ b/contrib/native_window_msg/build.xml
@@ -36,7 +36,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/ntservice/nbproject/project.properties b/contrib/ntservice/nbproject/project.properties
index 587ae2b4d..d30a26c83 100644
--- a/contrib/ntservice/nbproject/project.properties
+++ b/contrib/ntservice/nbproject/project.properties
@@ -7,7 +7,7 @@ javadoc.nonavbar=false
javac.external.vm=false
run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
javac.processorpath=${javac.classpath}
-javac.target=1.6
+javac.target=1.8
annotation.processing.processors.list=
javadoc.noindex=false
javadoc.additionalparam=
@@ -29,7 +29,7 @@ dist.dir=dist
build.classes.excludes=**/*.java,**/*.form
javadoc.splitindex=true
javadoc.encoding=
-javac.source=1.6
+javac.source=1.8
file.reference.jna.jar=../../build/jna.jar
application.vendor=matthias
junit.selected.version=4
diff --git a/contrib/platform/nbproject/project.properties b/contrib/platform/nbproject/project.properties
index fe6ceb756..da40cd9a9 100644
--- a/contrib/platform/nbproject/project.properties
+++ b/contrib/platform/nbproject/project.properties
@@ -52,8 +52,8 @@ javac.classpath=\
# Space-separated list of extra javac options
javac.compilerargs=-XDignore.symbol.file
javac.deprecation=false
-javac.source=1.6
-javac.target=1.6
+javac.source=1.8
+javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${file.reference.jna-test.jar}:\
diff --git a/contrib/shapedwindowdemo/build.xml b/contrib/shapedwindowdemo/build.xml
index cbcb1eea5..7fe70185a 100644
--- a/contrib/shapedwindowdemo/build.xml
+++ b/contrib/shapedwindowdemo/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/w32printing/build.xml b/contrib/w32printing/build.xml
index 5ac1fca8a..aa1310644 100644
--- a/contrib/w32printing/build.xml
+++ b/contrib/w32printing/build.xml
@@ -27,7 +27,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/w32windowhooks/build.xml b/contrib/w32windowhooks/build.xml
index cc77d70eb..c8d983805 100644
--- a/contrib/w32windowhooks/build.xml
+++ b/contrib/w32windowhooks/build.xml
@@ -37,7 +37,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/contrib/x11/build.xml b/contrib/x11/build.xml
index 6f9318681..f080928af 100644
--- a/contrib/x11/build.xml
+++ b/contrib/x11/build.xml
@@ -46,7 +46,7 @@
<target name="compile">
<mkdir dir="${classes}"/>
<!-- Compile the project. -->
- <javac srcdir="${src}" destdir="${classes}" target="1.6" source="1.6"
+ <javac srcdir="${src}" destdir="${classes}" target="1.8" source="1.8"
encoding="UTF-8" debug="on" includeantruntime="false">
<classpath>
<path refid="classpath"/>
diff --git a/nbproject/project.xml b/nbproject/project.xml
index c05eefc13..9cd22da94 100644
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -141,7 +141,7 @@ auxiliary.show.customizer.message=<message>
<compilation-unit>
<package-root>src</package-root>
<classpath mode="compile">src</classpath>
- <source-level>1.6</source-level>
+ <source-level>1.8</source-level>
</compilation-unit>
<compilation-unit>
<package-root>test</package-root>
@@ -152,7 +152,7 @@ auxiliary.show.customizer.message=<message>
<compilation-unit>
<package-root>ant-tools-src</package-root>
<classpath mode="compile">src:lib/ant.jar:lib/asm-8.0.1.jar</classpath>
- <source-level>1.6</source-level>
+ <source-level>1.8</source-level>
</compilation-unit>
</java-data>
</configuration>
--
2.31.1

View File

@ -3,7 +3,7 @@
Name: jna
Version: 5.9.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Pure Java access to native libraries
# Most of code is dual-licensed under either LGPL 2.1+ only or Apache
# License 2.0. WeakIdentityHashMap.java was taken from Apache CXF,
@ -33,6 +33,8 @@ Patch4: 0005-Fix-duplicate-manifest-entry.patch
# We don't want newly added warnings to break our build
Patch5: 0006-Remove-Werror.patch
Patch6: 0007-Support-openjdk-17.patch
# We manually require libffi because find-requires doesn't work
# inside jars.
Requires: libffi
@ -85,6 +87,7 @@ cp %{SOURCE1} .
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
chmod -Rf a+rX,u+w,g-w,o-w .
sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java
@ -117,7 +120,7 @@ cp lib/native/aix-ppc64.jar lib/clover.jar
# upstream doesn't want to default to dynamic linking.
# -Drelease removes the .SNAPSHOT suffix from maven artifact names
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true native compile javadoc jar contrib-jars
ant -Drelease -Dcompatibility=1.6 -Dplatform.compatibility=1.6\
ant -Drelease -Dcompatibility=1.8 -Dplatform.compatibility=1.8\
-Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -DCC=%{__cc} native dist
# remove compiled contribs
find contrib -name build -exec rm -rf {} \; || :
@ -153,6 +156,9 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
%changelog
* Wed Dec 1 2021 Zuzana Miklankova <zmiklank@redhat.com> - 5.9.0-3
- Support openjdk-17 with dropping 1.6 compatibility
* Wed Dec 1 2021 Zuzana Miklankova <zmiklank@redhat.com> - 5.9.0-2
- Rebuild with resolved reflections dependecy