SHA256
1
0
forked from pool/jna
Fridrich Strba 2023-06-03 20:54:29 +00:00 committed by Git OBS Bridge
parent dad548ded6
commit 8074593cf8
2 changed files with 21 additions and 0 deletions

14
jna-old-libffi.patch Normal file
View File

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

View File

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