diff --git a/5.13.0.tar.gz b/5.13.0.tar.gz
new file mode 100644
index 0000000..a30c685
--- /dev/null
+++ b/5.13.0.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:526bff8ffcbc2067a7403f55b01ad8d7a781c098abca79c4ea6c9e80198bb5fd
+size 116027625
diff --git a/5.5.0.tar.gz b/5.5.0.tar.gz
deleted file mode 100644
index bc05a4d..0000000
--- a/5.5.0.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b684792ff099afba639288da75bc6ae4a2641f46a6429b5a481b7749630c56f7
-size 93781100
diff --git a/jna-build.patch b/jna-build.patch
index bd6517e..7ce6995 100644
--- a/jna-build.patch
+++ b/jna-build.patch
@@ -1,6 +1,6 @@
---- jna-5.5.0/build.xml 2019-10-30 17:41:18.000000000 +0100
-+++ jna-5.5.0/build.xml 2020-06-04 08:56:23.649941131 +0200
-@@ -357,7 +357,7 @@
+--- jna-5.13.0/build.xml 2023-05-30 11:38:06.363232087 +0200
++++ jna-5.13.0/build.xml 2023-05-30 15:27:50.875085921 +0200
+@@ -370,7 +370,7 @@
@@ -9,7 +9,7 @@
-@@ -403,7 +403,7 @@
+@@ -440,7 +440,7 @@
@@ -18,20 +18,24 @@
description="Build primary jar">
--
+-
-
+
+
+
+@@ -596,108 +515,6 @@
@@ -101,9 +119,21 @@
-
--
+- prefix="com/sun/jna/darwin-ppc"/>
+-
+-
+-
+-
-
@@ -137,9 +167,15 @@
-
+-
-
+-
-
@@ -167,6 +203,9 @@
-
+-
-
@@ -176,7 +215,16 @@
-@@ -1059,7 +912,7 @@
+@@ -781,7 +598,7 @@
+
+
+
+-
++
+
+
+
+@@ -1196,7 +1013,7 @@
@@ -185,7 +233,7 @@
description="Compile all test code">
@@ -194,7 +242,7 @@
-@@ -1313,7 +1164,6 @@
+@@ -1486,7 +1301,6 @@
JNA API Documentation
${footer}
@@ -202,7 +250,7 @@
-@@ -1331,13 +1181,14 @@
+@@ -1504,13 +1318,14 @@
@@ -217,10 +265,9 @@
+
-
-Only in jna-5.5.0/native/libffi/src/powerpc: linux64_closure.S.orig
---- jna-5.5.0/native/Makefile 2019-10-30 17:41:18.000000000 +0100
-+++ jna-5.5.0/native/Makefile 2020-06-04 08:53:07.896789270 +0200
+
+--- jna-5.13.0/native/Makefile 2023-05-30 11:38:06.515233135 +0200
++++ jna-5.13.0/native/Makefile 2023-05-30 12:04:00.394037184 +0200
@@ -97,7 +97,7 @@
PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
@@ -230,12 +277,12 @@ Only in jna-5.5.0/native/libffi/src/powerpc: linux64_closure.S.orig
ifeq ($(DYNAMIC_LIBFFI),true)
CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
-@@ -337,11 +337,11 @@
+@@ -356,11 +356,11 @@
GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f 1 -d '.')
ifneq ($(GCC_MAJOR_VERSION),4)
ifneq ($(GCC_MAJOR_VERSION),3)
-- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable
-+ LOC_CC_OPTS=-Wno-error -Wno-clobbered -Wno-unused-variable
+- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
++ LOC_CC_OPTS=-Wno-error -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
endif
endif
else
@@ -244,7 +291,7 @@ Only in jna-5.5.0/native/libffi/src/powerpc: linux64_closure.S.orig
endif
# Enable 64-bit builds if the arch demands it
-@@ -457,7 +457,6 @@
+@@ -486,7 +486,6 @@
$(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB)
$(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS)
diff --git a/jna-java8compat.patch b/jna-java8compat.patch
index 60234e2..85b65e4 100644
--- a/jna-java8compat.patch
+++ b/jna-java8compat.patch
@@ -1,22 +1,21 @@
-diff -urEbwB jna-5.4.0/build.xml jna-5.4.0.new/build.xml
---- jna-5.4.0/build.xml 2019-07-19 21:22:03.000000000 +0200
-+++ jna-5.4.0.new/build.xml 2019-10-10 21:47:22.950356404 +0200
-@@ -102,7 +102,12 @@
+--- jna-5.13.0/build.xml 2023-05-30 15:30:31.116195853 +0200
++++ jna-5.13.0/build.xml 2023-05-30 15:31:56.400786710 +0200
+@@ -106,8 +106,12 @@
+ JDK 11 is the last JDK, that supports creation of Java 6 compatible class
files.
-->
-
+-
++
+
+
-+
-+
++
+
-diff -urEbwB jna-5.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java jna-5.4.0.new/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java
---- jna-5.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2019-07-19 21:22:03.000000000 +0200
-+++ jna-5.4.0.new/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2019-10-10 21:37:54.962613364 +0200
+--- jna-5.13.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2023-05-30 15:30:31.140196020 +0200
++++ jna-5.13.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2023-05-30 15:30:47.452309013 +0200
@@ -23,6 +23,7 @@
*/
package com.sun.jna.platform.mac;
@@ -39,9 +38,8 @@ diff -urEbwB jna-5.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.j
}
}
-diff -urEbwB jna-5.4.0/test/com/sun/jna/BufferArgumentsMarshalTest.java jna-5.4.0.new/test/com/sun/jna/BufferArgumentsMarshalTest.java
---- jna-5.4.0/test/com/sun/jna/BufferArgumentsMarshalTest.java 2019-07-19 21:22:03.000000000 +0200
-+++ jna-5.4.0.new/test/com/sun/jna/BufferArgumentsMarshalTest.java 2019-10-10 21:28:39.574890668 +0200
+--- jna-5.13.0/test/com/sun/jna/BufferArgumentsMarshalTest.java 2023-05-30 15:30:31.288197044 +0200
++++ jna-5.13.0/test/com/sun/jna/BufferArgumentsMarshalTest.java 2023-05-30 15:30:47.452309013 +0200
@@ -23,6 +23,7 @@
*/
package com.sun.jna;
@@ -59,9 +57,8 @@ diff -urEbwB jna-5.4.0/test/com/sun/jna/BufferArgumentsMarshalTest.java jna-5.4.
lib.fillInt8Buffer(buf, 512, (byte)0);
for (int i=0;i < buf.capacity();i++) {
assertEquals("Bad value at index " + i,
-diff -urEbwB jna-5.4.0/test/com/sun/jna/PerformanceTest.java jna-5.4.0.new/test/com/sun/jna/PerformanceTest.java
---- jna-5.4.0/test/com/sun/jna/PerformanceTest.java 2019-07-19 21:22:03.000000000 +0200
-+++ jna-5.4.0.new/test/com/sun/jna/PerformanceTest.java 2019-10-10 21:26:21.041920761 +0200
+--- jna-5.13.0/test/com/sun/jna/PerformanceTest.java 2023-05-30 15:30:31.288197044 +0200
++++ jna-5.13.0/test/com/sun/jna/PerformanceTest.java 2023-05-30 15:30:47.452309013 +0200
@@ -396,7 +396,7 @@
start = System.currentTimeMillis();
for (int i=0;i < COUNT;i++) {
@@ -89,9 +86,8 @@ diff -urEbwB jna-5.4.0/test/com/sun/jna/PerformanceTest.java jna-5.4.0.new/test/
b.put(bulk);
}
delta = System.currentTimeMillis() - start;
-diff -urEbwB jna-5.4.0/test/com/sun/jna/PointerBufferTest.java jna-5.4.0.new/test/com/sun/jna/PointerBufferTest.java
---- jna-5.4.0/test/com/sun/jna/PointerBufferTest.java 2019-07-19 21:22:03.000000000 +0200
-+++ jna-5.4.0.new/test/com/sun/jna/PointerBufferTest.java 2019-10-10 21:21:33.152310989 +0200
+--- jna-5.13.0/test/com/sun/jna/PointerBufferTest.java 2023-05-30 15:30:31.288197044 +0200
++++ jna-5.13.0/test/com/sun/jna/PointerBufferTest.java 2023-05-30 15:30:47.452309013 +0200
@@ -24,6 +24,7 @@
package com.sun.jna;
diff --git a/jna.spec b/jna.spec
index 28a53bc..afda7f4 100644
--- a/jna.spec
+++ b/jna.spec
@@ -18,7 +18,7 @@
Name: jna
-Version: 5.5.0
+Version: 5.13.0
Release: 0
Summary: Pure Java access to native libraries
License: Apache-2.0 OR LGPL-2.1-or-later
@@ -32,11 +32,12 @@ Patch3: jna-java8compat.patch
BuildRequires: ant
BuildRequires: dos2unix
BuildRequires: fdupes
-BuildRequires: java-devel >= 1.8
+BuildRequires: java-devel >= 9
BuildRequires: javapackages-local
BuildRequires: libX11-devel
BuildRequires: libXt-devel
BuildRequires: libffi-devel
+BuildRequires: objectweb-asm
Requires: java >= 1.8
Provides: jna-native = %{version}-%{release}
Obsoletes: jna-native < %{version}-%{release}
@@ -82,6 +83,7 @@ sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java
%build
build-jar-repository -s -p lib ant
+ln -s $(find-jar objectweb-asm/asm) lib/asm-8.0.1.jar
%{ant} \
jar \
native \
@@ -104,17 +106,17 @@ install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
install -d -m 755 %{buildroot}%{_jnidir}/%{name}
install -d -m 755 %{buildroot}%{_javadir}/%{name}
-install -p -m 644 build/jna-min.jar %{buildroot}%{_jnidir}/%{name}.jar
+install -p -m 644 build/jna-jpms.jar %{buildroot}%{_jnidir}/%{name}.jar
ln -sf ../%{name}.jar %{buildroot}%{_jnidir}/%{name}/%{name}.jar
ln -sf %{_jnidir}/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
-install -p -m 644 ./contrib/platform/dist/jna-platform.jar %{buildroot}%{_javadir}/%{name}-platform.jar
+install -p -m 644 ./contrib/platform/dist/jna-platform-jpms.jar %{buildroot}%{_javadir}/%{name}-platform.jar
ln -sf ../%{name}-platform.jar %{buildroot}%{_javadir}/%{name}/%{name}-platform.jar
install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -p -m 644 pom-jna.xml %{buildroot}/%{_mavenpomdir}/%{name}.pom
-install -p -m 644 pom-jna-platform.xml %{buildroot}/%{_mavenpomdir}/%{name}-platform.pom
-%add_maven_depmap %{name}.pom %{name}.jar
-%add_maven_depmap %{name}-platform.pom %{name}-platform.jar -a net.java.dev.jna:platform -f contrib
+install -p -m 644 build/pom-jna.xml %{buildroot}/%{_mavenpomdir}/%{name}.pom
+install -p -m 644 build/pom-jna-platform.xml %{buildroot}/%{_mavenpomdir}/%{name}-platform.pom
+%add_maven_depmap %{name}.pom %{name}.jar -a net.java.dev.jna:jna-jpms
+%add_maven_depmap %{name}-platform.pom %{name}-platform.jar -a net.java.dev.jna:platform,net.java.dev.jna:jna-platform-jpms -f contrib
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}