[packages/java-jna] - added x32 patch (use */libx32 libdirs, adjust alignments to conform x32 ABI) - release 2

qboosh qboosh at pld-linux.org
Tue Dec 15 19:29:34 CET 2015


commit a18624754d24ad1151433bcf0ceef784f9b8dcea
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Dec 15 19:30:46 2015 +0100

    - added x32 patch (use */libx32 libdirs, adjust alignments to conform x32 ABI)
    - release 2

 java-jna.spec |  4 +++-
 jna-x32.patch | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/java-jna.spec b/java-jna.spec
index 23da09e..2c7f08c 100644
--- a/java-jna.spec
+++ b/java-jna.spec
@@ -8,7 +8,7 @@ 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:	4.2.1
-Release:	1
+Release:	2
 License:	LGPL v2.1 or Apache v2.0
 Group:		Libraries/Java
 Source0:	https://github.com/java-native-access/jna/archive/%{version}/jna-%{version}.tar.gz
@@ -19,6 +19,7 @@ Source0:	https://github.com/java-native-access/jna/archive/%{version}/jna-%{vers
 Patch0:		jna-nonative.patch
 Patch1:		jna-soname.patch
 Patch2:		jna-tmpdir.patch
+Patch3:		jna-x32.patch
 URL:		https://github.com/java-native-access/jna/
 %if %(locale -a | grep -q '^en_US$'; echo $?)%(locale -a | grep -q '^en_US\.UTF-8$'; echo $?)
 BuildRequires:	glibc-localedb-all
@@ -58,6 +59,7 @@ ani kod natywny.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__rm} -r dist/* lib/native/*.jar
 
diff --git a/jna-x32.patch b/jna-x32.patch
new file mode 100644
index 0000000..7c5d8c4
--- /dev/null
+++ b/jna-x32.patch
@@ -0,0 +1,36 @@
+--- 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 @@
+             //
+             if (Platform.isLinux() || Platform.isSolaris()
+                 || Platform.isFreeBSD() || Platform.iskFreeBSD()) {
++                if (Platform.isLinux() && Platform.ARCH.equals("x32"))
++                    archPath = "x32";
++                else
+                 // Linux & FreeBSD use /usr/lib32, solaris uses /usr/lib/32
+                 archPath = (Platform.isSolaris() ? "/" : "") + Pointer.SIZE * 8;
+             }
+--- jna-4.2.1/src/com/sun/jna/Platform.java.orig	2015-10-18 14:40:13.000000000 +0200
++++ jna-4.2.1/src/com/sun/jna/Platform.java	2015-12-14 21:43:02.901129494 +0100
+@@ -207,6 +207,10 @@
+         return ARCH.startsWith("sparc");
+     }
+ 
++    public static final boolean isX32() {
++        return ARCH.startsWith("x32");
++    }
++
+     static String getCanonicalArchitecture(String arch) {
+ 	arch = arch.toLowerCase().trim();
+         if ("powerpc".equals(arch)) {
+--- jna-4.2.1/src/com/sun/jna/Native.java.orig	2015-10-18 14:40:13.000000000 +0200
++++ jna-4.2.1/src/com/sun/jna/Native.java	2015-12-14 21:43:48.103450946 +0100
+@@ -164,7 +164,7 @@
+                             + "   jnidispatch library included with the JNA jar file you are using" + LS);
+         }
+         MAX_ALIGNMENT = Platform.isSPARC() || Platform.isWindows()
+-            || (Platform.isLinux() && (Platform.isARM() || Platform.isPPC()))
++            || (Platform.isLinux() && (Platform.isARM() || Platform.isPPC() || Platform.isX32()))
+             || Platform.isAIX()
+             || Platform.isAndroid()
+             ? 8 : LONG_SIZE;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/java-jna.git/commitdiff/a18624754d24ad1151433bcf0ceef784f9b8dcea



More information about the pld-cvs-commit mailing list