From 06fbfa41901d32ea8cedee51017467cdcf3dcbebede0e03a653fe302abb6185f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 31 May 2023 05:01:36 +0000 Subject: [PATCH 1/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=14 --- jna.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jna.spec b/jna.spec index af92664..cd31e6d 100644 --- a/jna.spec +++ b/jna.spec @@ -1,7 +1,7 @@ # # spec file for package jna # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2000-2009, JPackage Project # # All modifications and additions to the file contributed by third parties @@ -30,12 +30,10 @@ Patch1: jna-callback.patch Patch2: jna-system-libjnidispatch.patch Patch3: jna-java8compat.patch BuildRequires: ant -BuildRequires: ant-junit BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local -BuildRequires: junit BuildRequires: libffi-devel BuildRequires: xorg-x11-libX11-devel BuildRequires: xorg-x11-libXt-devel From c80e5220e9d49008a88ead2f4be784faea5989f3a7b4ac3629e7cce0a57f604f Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 31 May 2023 05:06:39 +0000 Subject: [PATCH 2/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=15 --- jna.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jna.spec b/jna.spec index cd31e6d..7b8b19c 100644 --- a/jna.spec +++ b/jna.spec @@ -34,9 +34,9 @@ BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local +BuildRequires: libX11-devel +BuildRequires: libXt-devel BuildRequires: libffi-devel -BuildRequires: xorg-x11-libX11-devel -BuildRequires: xorg-x11-libXt-devel Requires: java >= 1.8 Provides: jna-native = %{version}-%{release} Obsoletes: jna-native < %{version}-%{release} From 43bb9aa1654a27c783f34be748352392c8a487fece8bd0c43b77ab40c70a3a21 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 31 May 2023 05:08:17 +0000 Subject: [PATCH 3/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=16 --- jna.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jna.spec b/jna.spec index 7b8b19c..28a53bc 100644 --- a/jna.spec +++ b/jna.spec @@ -82,7 +82,7 @@ sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java %build build-jar-repository -s -p lib ant -%ant \ +%{ant} \ jar \ native \ platform-jar \ From dad548ded6f4f2451eed5eeef2d4cf445a2d2ca8d2a6cf35697503ee0fd38f5d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sat, 3 Jun 2023 20:22:12 +0000 Subject: [PATCH 4/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=17 --- 5.13.0.tar.gz | 3 ++ 5.5.0.tar.gz | 3 -- jna-build.patch | 101 +++++++++++++++++++++++++++++++----------- jna-java8compat.patch | 34 +++++++------- jna.spec | 18 ++++---- 5 files changed, 102 insertions(+), 57 deletions(-) create mode 100644 5.13.0.tar.gz delete mode 100644 5.5.0.tar.gz 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
${header}
${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} From 8074593cf8c8593920761e88bb233ea4f82d09a0e61928b62f9e8dd8992b3bac Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sat, 3 Jun 2023 20:54:29 +0000 Subject: [PATCH 5/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=18 --- jna-old-libffi.patch | 14 ++++++++++++++ jna.spec | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 jna-old-libffi.patch diff --git a/jna-old-libffi.patch b/jna-old-libffi.patch new file mode 100644 index 0000000..aa28c42 --- /dev/null +++ b/jna-old-libffi.patch @@ -0,0 +1,14 @@ +--- jna-5.13.0/native/dispatch.c 2023-06-03 22:40:07.554822192 +0200 ++++ jna-5.13.0/native/dispatch.c 2023-06-03 22:40:35.518255491 +0200 +@@ -443,11 +443,6 @@ + "%s: Invalid structure definition (native typedef error, FFI_BAD_TYPEDEF)", op); + throwByName(env, EIllegalArgument, msg); + return JNI_TRUE; +- case FFI_BAD_ARGTYPE: +- snprintf(msg, sizeof(msg), +- "%s: Invalid argument type (FFI_BAD_ARGTYPE)", op); +- throwByName(env, EIllegalArgument, msg); +- return JNI_TRUE; + default: + snprintf(msg, sizeof(msg), "%s failed (%d)", op, status); + throwByName(env, EError, msg); diff --git a/jna.spec b/jna.spec index afda7f4..edf500c 100644 --- a/jna.spec +++ b/jna.spec @@ -22,6 +22,7 @@ Version: 5.13.0 Release: 0 Summary: Pure Java access to native libraries License: Apache-2.0 OR LGPL-2.1-or-later +Group: Development/Libraries/Java URL: https://github.com/twall/jna Source0: https://github.com/twall/%{name}/archive/%{version}.tar.gz Source1000: %{name}-rpmlintrc @@ -29,6 +30,7 @@ Patch0: jna-build.patch Patch1: jna-callback.patch Patch2: jna-system-libjnidispatch.patch Patch3: jna-java8compat.patch +Patch4: jna-old-libffi.patch BuildRequires: ant BuildRequires: dos2unix BuildRequires: fdupes @@ -54,6 +56,7 @@ of use take priority. %package contrib Summary: Contrib for %{name} +Group: Development/Libraries/Java Requires: %{name} = %{version}-%{release} BuildArch: noarch @@ -62,6 +65,7 @@ This package contains the contributed examples for %{name}. %package javadoc Summary: Javadocs for %{name} +Group: Documentation/HTML BuildArch: noarch %description javadoc @@ -78,6 +82,9 @@ dos2unix OTHERS %patch1 -p1 %patch2 -p1 %patch3 -p1 +%if %{?pkg_vcmp:%pkg_vcmp libffi-devel < 3.4}%{!?pkg_vcmp:1} +%patch4 -p1 +%endif sed -i 's|@LIBDIR@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java From cff2317cbd18da5ab3c16e8a37ab37d10e74e9446da68b6fa82f34d3033a5634 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sat, 3 Jun 2023 21:51:09 +0000 Subject: [PATCH 6/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=19 --- jna.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jna.spec b/jna.spec index edf500c..dee63b1 100644 --- a/jna.spec +++ b/jna.spec @@ -40,6 +40,7 @@ BuildRequires: libX11-devel BuildRequires: libXt-devel BuildRequires: libffi-devel BuildRequires: objectweb-asm +BuildRequires: pkg-config Requires: java >= 1.8 Provides: jna-native = %{version}-%{release} Obsoletes: jna-native < %{version}-%{release} @@ -82,7 +83,8 @@ dos2unix OTHERS %patch1 -p1 %patch2 -p1 %patch3 -p1 -%if %{?pkg_vcmp:%pkg_vcmp libffi-devel < 3.4}%{!?pkg_vcmp:1} + +%if 0%{?suse_version} < 1550 %patch4 -p1 %endif From 3ea22f2b6fbfb798e7a2bf9d994e304f7316f819154719dc5db06a441dd82224 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sun, 11 Jun 2023 13:30:39 +0000 Subject: [PATCH 7/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=20 --- jna.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jna.spec b/jna.spec index dee63b1..5d5d7c1 100644 --- a/jna.spec +++ b/jna.spec @@ -59,6 +59,8 @@ of use take priority. Summary: Contrib for %{name} Group: Development/Libraries/Java Requires: %{name} = %{version}-%{release} +Provides: jna-platform = %{version}-%{release} +Obsoletes: jna-platform < %{version}-%{release} BuildArch: noarch %description contrib From 10fed688068021d3eb93cc6aa76147b27748992372ca4ac0288f5572b9029f2d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 30 Aug 2023 10:35:08 +0000 Subject: [PATCH 8/8] OBS-URL: https://build.opensuse.org/package/show/Java:packages/jna?expand=0&rev=21 --- jna.changes | 262 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 262 insertions(+) diff --git a/jna.changes b/jna.changes index 3d98013..b141373 100644 --- a/jna.changes +++ b/jna.changes @@ -1,3 +1,265 @@ +------------------------------------------------------------------- +Wed Aug 30 10:34:18 UTC 2023 - Fridrich Strba + +- Upgrade to upstream version 5.13.0 +- Changes in version 5.13.0: + * Features: + + #1454: Add 'c.s.j.p.win32.Psapi.QueryWorkingSetEx' and + associated Types + + #1459: Add 'VirtualLock' and 'VirtualUnlock' in + 'c.s.j.p.win32.Kernel32' + + #1471: Add + 'c.s.j.p.win32.Advapi32Util#isCurrentProcessElevated' and + associated Types + + #1474: Add + 'c.s.j.p.win32.WbemCli#IWbemClassObject.IWbemQualifierSet', + 'IWbemServices.GetObject', 'IWbemContext.SetValue' and + associated methods + + #1482: Add multilingual support of + 'Kernel32Util.formatMessage' + + #1490: Adds support for a custom 'SymbolProvider' in + 'NativeLibrary' & 'Library' + + #1491: Update libffi to v3.4.4 + + #1487: Add 'uses' information to OSGI metadata in MANIFEST.MF + to improve stability of package resolution + * Bug Fixes: + + #1452: Fix memory allocation/handling for error message + generation in native library code ('dispatch.c') + + #1460: Fix win32 variant date conversion in DST offest window + and with millisecond values + + #1472: Fix incorrect bitmask in + 'c.s.j.Pointer#createConstant(int)' + + #1481: Fix NPE in NativeLibrary when unpacking from classpath + is disabled + + #1489: Fixes typo in 'OpenGL32Util#wglGetProcAddress', instead + of parameter 'procName' the hardcoded value 'wglEnumGpusNV' + was used +- Changes in version 5.12.1: + * Bug Fixes: + + #1447: Null-check cleanable in 'c.s.j.Memory#close' +- Changes in version 5.12.0: + * Features: + + #1433: Add 'CFEqual', 'CFDictionaryRef.ByReference', + 'CFStringRef.ByReference' to 'c.s.j.p.mac.CoreFoundation' + + #978: Remove use of finalizers in JNA and improve concurrency + for 'Memory', 'CallbackReference' and 'NativeLibrary' + + #1440: Support for LoongArch64 + + #1444: Update embedded libffi to + 1f14b3fa92d4442a60233e9596ddec428a985e3c and rebuild native + libraries + * Bug Fixes: + + #1438: Handle arrays in structures with differing size + + #1442: Handle race condition in + 'c.s.j.p.win32.PdhUtil#PdhEnumObjectItems' + * Important Changes: + + 'Memory#dispose', 'CallbackReference#dispose' and + 'NativeLibrary#dispose' were called by the 'Object#finalize' + override. These calls were replaced by the use of a cleaner. + It is not guaranteed anymore, that 'dispose' is called on + subclasses on finalization. +- Changes in version 5.11.0: + * Features: + + #1398: Increase 'c.s.j.p.win32.Sspi#MAX_TOKEN_SIZE' on + Windows 8/Server 2012 and later + + #1403: Rebuild AIX binaries with libffi 3.4.2 (other + architectures were part of 5.10) + + #1404: Added Solaris Kstat2 library + + #1416: Add 'CFDictionaryGetCount' to + 'c.s.j.p.mac.CoreFoundation' + + #1418: Add 'CertOpenStore' to 'c.s.j.p.win32.Crypt32' + * Bug Fixes: + + #1411: Do not throw 'Win32Exception' on success for empty + section in 'Kernel32Util#getPrivateProfileSection' + + #1414: Fix definition of 'c.s.j.p.unix.X11.XK_Shift_R' + + #1323. Fix crashes in direct callbacks on mac OS aarch64 + + #1422: Load jawt library relative to 'sun.boot.library.path' + system on unix OSes + + #1427: Rebuild all binaries with fix from #1422 and #1323 +- Changes in version 5.10.0: + * Features: + + #1377: Add 'RegLoadAppKey' to 'c.s.j.p.win32.Advapi32' and + 'registryLoadAppKey' to 'c.s.j.p.win32.Advapi32Util' + + #1093: Add 'OpenFileMapping' to 'c.s.j.p.win32.Kernel32' + + #1388: Map the arch 'zarch_64' as reported by SAPJVM8 to + 's390x' + + #1381: Update embedded libffi to 3.4.2 + + #1393: Update native encoding detection for JEP400 / JDK 18 + ('file.encoding' now defaults to 'UTF-8') + * Bug Fixes: + + #1378: Handle failure in 'ffi_closure_alloc' +- Changes in version 5.9.0: + * Features: + + #1336: Add 'HKEY_CURRENT_USER_LOCAL_SETTINGS' to + 'c.s.j.p.win32.WinReg' + + #1337: Add 'REG_NOTIFY_THREAD_AGNOSTIC' to + 'c.s.j.p.win32.WinNet' and update 'REG_LEGAL_CHANGE_FILTER' + + #1338: Add 'RegNotifyChangeKeyValue' to + 'c.s.j.p.win32.Advapi32' + + #1340: Add 'CM_Get_DevNode_Registry_Property' to + 'c.s.j.p.win32.Cfgmgr32' and corresponding util in + 'c.s.j.p.win32.Cfgmgr32Util' + + #1352: Add 'BringWindowToTop' to 'c.s.j.p.win32.User32' + + #1354: Add 'GetParent' to 'c.s.j.p.win32.User32' + + #1360: Add 'CommandLineToArgvW' to 'c.s.j.p.win32.Shell32' + and corresponding util in 'c.s.j.p.win32.Shell32Util' + + #1363: Update 'NUMA_NODE_RELATIONSHIP' in + 'c.s.j.p.win32.WinNT' to new version of the structure and + improve support for future values of + 'c.s.j.p.win32.WinNT.LOGICAL_PROCESSOR_RELATIONSHIP' + * Bug Fixes: + + #1343: 'c.s.j.p.mac.CoreFoundation.CFStringRef#stringValue' + buffer needs space for a null byte + + #1351: Define 'c.s.j.p.unix.size_t.ByReference' and fix macOS + sysctl 'size_t *' parameters + + #1362: Clear security sensitive data after usage in + 'c.s.j.p.win32.Crypt32Util#cryptProtectData' and + '#cryptUnprotectData' + + #1361: Make 'c.s.j.p.win32.Crypt32Util#cryptProtectData' and + '#cryptUnprotectData' properly handle 0-length array as input +- Changes in version 5.8.0: + * Features: + + #1313: Normalize 'RESOURCE_PREFIX' for darwin to + 'darwin-$arch' and split jnidispatch library per architecture + + #1318: Add support for linux-riscv64 + + #1327: Add partial support for future values of + 'c.s.j.p.win32.WinNT.LOGICAL_PROCESSOR_RELATIONSHIP' enum + present in Windows Insider builds + * Bug Fixes: + + #1317: Change the maven coordinates of the JPMS artifacts from + classifier 'jpms' to custom artifact ids 'jna-jpms' and + 'jna-platform-jpms' + + #1322: Handle 0-length domain names in + 'c.s.j.p.win32.Advapi32Util#getAccountBySid' + + #1326: Ensure pointers indirected from Memory and pointing + into Memory retain originating object + * Important Changes: + + The maven coordinates of the experimental JPMS (java module + system) artifacts were moved from using the classifier 'jpms' + to custom artifact ids 'jna-jpms' and 'jna-platform-jpms', + without an classifier. The reason for this is, that the + platform artifacts depend on the jna artifacts and need to + pull in the right variant. This is not possible if the + classifier is used. + + 'RESOURCE_PREFIX' for darwin (mac OS) was changed from + 'darwin' to 'darwin-$arch' as the fat binaries on mac OS + causes various problems: It was reported, that binaries were + rejected from the appstore because x86 binaries were found in + the application (jnidispatch for mac OS x86) and that builds + needed to be special cased so that the native library can be + assembled. The latter is also true for JNA. + While the prefix is changed, the old prefix is still searched + as a fallback location, so if only a fat binary is present, it + can still be loaded. +- Changes in version 5.7.0: + * Features: + + #1301: Improve bindings of the printer notification functions + ('FindFirstPrinterChangeNotification', + 'FindNextPrinterChangeNotification') in 'c.s.j.p.w.Winspool' + + #1238: Add macOS 'aarch64' architecture to universal 'darwin' + target + + #1264: Update libffi to v3.3; Add Windows 'aarch64' target. + + #1293: Bind part of Windows Application Recovery and Restart + API: 'RegisterApplicationRestart', + 'UnregisterApplicationRestart' and + 'GetApplicationRestartSettings' in 'c.s.j.p.w.Kernel32' + + #1217: Add mappings for AIX 'Perfstat' library to + 'c.s.j.p.unix.aix' + + #1231: The test suite can now be executed on Windows using + either ANSI or UNICODE win32 API by passing + '-Dw32.ascii=true/false' to ant. Previously, UNICODE was + always used. + + #1237: *Experimental:* Add artifacts that make jna and + jna-platform named modules (provide 'module-info.class'). + The new artifacts are named 'jna-jpms.jar' and + 'jna-platform-jpms.jar' + + #1242: Add CallWindowProc to User32 + + #1239: Improve performance of allocation of 'c.s.j.Memory' + objects + + #1246: Improve performance of 'c.s.j.Structure#read' and + 'c.s.j.Structure#write' + + #1260: Add mapping for X11 generic events + + #1263: Add LowLevelMouseProc + + #1265: Add mapping for XQueryExtension + + #1299: Add 'c.s.j.p.win32.IPHlpApi#GetExtendedTcpTable', + 'c.s.j.p.win32.IPHlpApi#GetExtendedUdpTable', and supporting + structures. + * Bug Fixes: + + #1286: Fix bindings of 'c.s.j.p.win32.DBT' + + #326: Fix loading library that re-uses pointers for different + callbacks + + #1244: Fix building on GCC 10 + + #1252: Fix bindings of 'CTL_ENTRY#getRgAttribute', + 'CTL_INFO#getRgCTLEntry', 'CTL_INFO#getRgExtension', + 'CERT_EXTENSIONS#getRgExtension', 'CERT_INFO#getRgExtension', + 'CRL_INFO#getRgCRLEntry', 'CRL_INFO#getRgExtension', + 'CRL_ENTRY#getRgExtension'. + Add bindings for 'CertEnumCertificatesInStore', + 'CertEnumCTLsInStore', 'CertEnumCRLsInStore' and + 'CryptQueryObject' in 'c.s.j.p.win32.Crypt32'. + *WARNING:* The signatures for 'CTL_INFO#getRgCTLEntry' and + 'CTL_INFO#getRgExtension' were changed - as the original + signatures were obviously wrong and read the wrong attributes, + it is not considered an API break + + #1275: Fix 'CFStringRef#stringValue' for empty Strings + + #1279: Remove 'DLLCallback' import from 'CallbackReference' + + #1278: Improve compatibility of + 'c.s.j.p.WindowUtils#getProcessFilePath' and fix unittests for + windows 32bit intel + + #1284: Fix illegal access exceptions, when retrieving options + for private library interfaces with an instance field + + #1300: Deprecate 'c.s.j.p.win32.WTypes.BSTR' String + constructor and 'setValue' method, as 'BSTR' allocation should + be managed by COM, Automation, and Interop functions + * Breaking Changes: + + Prebuild native library for darwin x86 (32bit java on mac OS) + was removed +- Changes in version 5.6.0: + * Features: + + #1160: Make FileUtils#moveToTrash a varargs method + + #1167: Add 'c.s.j.p.win32.Kernel32#GetProcessAffinityMask' + + #1168: Add 'c.s.j.p.win32.Kernel32#SetProcessAffinityMask' + + #1169: Wait for process in getLinuxLdPaths + + #1178: Add 'c.s.j.p.win32.IPHlpAPI#GetTcpStatistics', + 'c.s.j.p.win32.IPHlpAPI#GetUdpStatistics', + 'c.s.j.p.win32.IPHlpAPI#GetTcpStatisticsEx' and + 'c.s.j.p.win32.IPHlpAPI#GetUdpStatisticsEx' + + #1182: Add 'toString' to classes extending + 'c.s.j.ptr.ByReference' + + #1191: Add 'c.s.j.p.win32.Advapi32Util#getTokenPrimaryGroup' + + #1194: Add 'GetConsoleScreenBufferInfo', 'ReadConsoleInput' + and 'WriteConsole' with associated structures to + 'c.s.j.p.win32.Wincon' + + #1198: Add 'NetSessionEnum' to 'c.s.j.p.win32.Netapi32' and + 'WTSEnumerateSessions', 'WTSQuerySessionInformation', and + 'WTSFreeMemory' to 'c.s.j.p.win32.Wtsapi32' + + #1200: Add mappings for 'libudev' to 'c.s.j.p.linux.Udev' + + #1202: Add mappings supporting shared memory including + 'c.s.j.p.unix.LibCAPI' types 'size_t' and 'ssize_t', + 'c.s.j.p.linux.LibC' methods 'munmap()', 'msync()', and + 'close()', 'c.s.j.p.unix.LibCUtil' mapping 'mmap()' and + 'ftruncate()', and 'c.s.j.p.linux.LibRT' methods 'shm_open()' + and 'shm_unlink()' + + #1209: Add mappings for 'Thread32First' and 'Thread32Next' to + 'c.s.j.p.win32.Kernel32' + + #1214: Add mapping for EnumProcesses to 'c.s.j.p.win32.Psapi' + and 'c.s.j.p.win32.PsapiUtil' + * Bug Fixes: + + #1183: 'c.s.j.p.win32.WinDef.CHARByReference#getValue' should + only read one byte + + #1184: 'c.s.j.p.win32.WinDef.ULONGLONG' should always be 8 + bytes + + #1196: 'c.s.j.p.win32.WinNT.LARGE_INTEGER' needs to populate + both union fields + + #1216: Failure loading frameworks on macOS 11 +- Modified patches: + * jna-build.patch + * jna-java8compat.patch + + rediff to changed context +- Added patch: + * jna-old-libffi.patch + + patch out an enum that is not present in less recent libffi + used on some older systems + ------------------------------------------------------------------- Sat Mar 19 21:55:37 UTC 2022 - Fridrich Strba