[packages/java-jna] - updated to 5.6.0 (fails two tests)
qboosh
qboosh at pld-linux.org
Sun Feb 5 15:11:34 CET 2023
commit 39e713d978f086945ff4207879fb4239ac0a07de
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Feb 3 22:08:56 2023 +0100
- updated to 5.6.0 (fails two tests)
java-jna.spec | 21 ++++++++++++++-------
jna-x32.patch | 24 ++++++++++++------------
2 files changed, 26 insertions(+), 19 deletions(-)
---
diff --git a/java-jna.spec b/java-jna.spec
index 55fe038..3518eb3 100644
--- a/java-jna.spec
+++ b/java-jna.spec
@@ -1,18 +1,18 @@
#
# Conditional build:
-%bcond_without tests # don't build and run tests
-%bcond_without system_libffi # use system libffi (upstream 3.0.12 or gcc >= 4.8)
+%bcond_without tests # unit test
+%bcond_without system_libffi # system libffi (upstream 3.0.12 or gcc >= 4.8)
Summary: Easy access to native shared libraries from Java
Summary(pl.UTF-8): Prosty dostęp do natywnych bibliotek współdzielonych z poziomu Javy
Name: java-jna
-Version: 5.5.0
+Version: 5.6.0
Release: 1
License: LGPL v2.1 or Apache v2.0
Group: Libraries/Java
-#Source0Download: https://github.com/java-native-access/jna/releases
+#Source0Download: https://github.com/java-native-access/jna/tags
Source0: https://github.com/java-native-access/jna/archive/%{version}/jna-%{version}.tar.gz
-# Source0-md5: 12df44bb982fb1250687b58f8e23a0de
+# Source0-md5: 94886628549a2f3ab29ba340dd335f17
# Note: by default jna.jar contains versions of native libjnidispatch
# for many systems/architectures; this patch disables such packaging;
# we package libjnidispatch.so as normal native library instead
@@ -78,12 +78,19 @@ ani kod natywny.
%build
# build seems to need iso-8859-1 locale (there are some 8bit-encoded characters in win32 sources)
export LC_ALL=en_US
-%ant -DCC="%{__cc}" -Drelease=1 -Dbuild-native=true -Ddynlink.native=true dist
+%ant \
+ -DCC="%{__cc}" \
+ -Drelease=1 \
+ -Dbuild-native=true \
+ -Ddynlink.native=true \
+ dist
%if %{with tests}
# but tests require UTF-8
export LC_ALL=en_US.UTF-8
-%ant -Drelease=1 test
+%ant \
+ -Drelease=1 \
+ test
%endif
%install
diff --git a/jna-x32.patch b/jna-x32.patch
index fed69d3..3101c45 100644
--- a/jna-x32.patch
+++ b/jna-x32.patch
@@ -1,6 +1,6 @@
---- jna-4.2.1/src/com/sun/jna/NativeLibrary.java.orig 2015-10-18 14:40:13.000000000 +0200
-+++ jna-4.2.1/src/com/sun/jna/NativeLibrary.java 2015-12-13 16:14:09.494386400 +0100
-@@ -839,6 +839,9 @@
+--- jna-5.6.0/src/com/sun/jna/NativeLibrary.java.orig 2023-02-03 16:12:04.261810212 +0100
++++ jna-5.6.0/src/com/sun/jna/NativeLibrary.java 2023-02-03 16:18:25.517413974 +0100
+@@ -903,6 +903,9 @@ public class NativeLibrary {
//
if (Platform.isLinux() || Platform.isSolaris()
|| Platform.isFreeBSD() || Platform.iskFreeBSD()) {
@@ -8,11 +8,11 @@
+ archPath = "x32";
+ else
// Linux & FreeBSD use /usr/lib32, solaris uses /usr/lib/32
- archPath = (Platform.isSolaris() ? "/" : "") + Pointer.SIZE * 8;
+ archPath = (Platform.isSolaris() ? "/" : "") + Native.POINTER_SIZE * 8;
}
---- jna-4.5.1/src/com/sun/jna/Platform.java.orig 2018-06-28 19:46:05.611493700 +0200
-+++ jna-4.5.1/src/com/sun/jna/Platform.java 2018-06-28 19:49:30.964824730 +0200
-@@ -236,6 +236,10 @@
+--- jna-5.6.0/src/com/sun/jna/Platform.java.orig 2023-02-03 16:12:04.262811012 +0100
++++ jna-5.6.0/src/com/sun/jna/Platform.java 2023-02-03 16:19:26.593247233 +0100
+@@ -233,6 +233,10 @@ public final class Platform {
return false;
}
@@ -21,16 +21,16 @@
+ }
+
static String getCanonicalArchitecture(String arch, int platform) {
- arch = arch.toLowerCase().trim();
+ arch = arch.toLowerCase().trim();
if ("powerpc".equals(arch)) {
---- jna-4.5.1/src/com/sun/jna/Native.java.orig 2018-06-28 19:46:05.611493700 +0200
-+++ jna-4.5.1/src/com/sun/jna/Native.java 2018-06-28 19:50:19.764824118 +0200
-@@ -218,7 +218,7 @@
+--- jna-5.6.0/src/com/sun/jna/Native.java.orig 2023-02-03 16:12:04.266143327 +0100
++++ jna-5.6.0/src/com/sun/jna/Native.java 2023-02-03 16:21:28.159753425 +0100
+@@ -224,7 +224,7 @@ public final class Native implements Ver
setProtected(true);
}
MAX_ALIGNMENT = Platform.isSPARC() || Platform.isWindows()
- || (Platform.isLinux() && (Platform.isARM() || Platform.isPPC() || Platform.isMIPS()))
+ || (Platform.isLinux() && (Platform.isARM() || Platform.isPPC() || Platform.isMIPS()) || Platform.isX32())
|| Platform.isAIX()
- || Platform.isAndroid()
+ || (Platform.isAndroid() && !Platform.isIntel())
? 8 : LONG_SIZE;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/java-jna.git/commitdiff/050c755829f59720d1b31208d28f8d00cc935216
More information about the pld-cvs-commit
mailing list