Package: libjna-java / 4.5.2-1

14-rename-native-library.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Rename the native library to avoid conflicts with other JNA jars used on the system
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libjna-java/+bug/1065253
--- a/src/com/sun/jna/Native.java
+++ b/src/com/sun/jna/Native.java
@@ -866,8 +866,8 @@
             }
         }
 
-        String libName = System.getProperty("jna.boot.library.name", "jnidispatch");
-        String bootPath = System.getProperty("jna.boot.library.path");
+        String libName = "jnidispatch.system";
+        String bootPath = null;
         if (bootPath == null) {
             bootPath = "/usr/lib/jni" + File.pathSeparator + "/usr/lib/" + getMultiArchPath() + "/jni";
         }
--- a/native/Makefile
+++ b/native/Makefile
@@ -69,7 +69,7 @@
 FFI_ENV=CC="$(CC)" CFLAGS="$(COPT) $(CDEBUG)" CPPFLAGS="$(CDEFINES)"
 FFI_CONFIG=--enable-static --disable-shared --with-pic=yes
 endif
-LIBRARY=$(BUILD)/$(LIBPFX)jnidispatch$(JNISFX)
+LIBRARY=$(BUILD)/$(LIBPFX)jnidispatch.system$(JNISFX)
 TESTLIB=$(BUILD)/$(LIBPFX)testlib$(LIBSFX)
 TESTLIB_JAR=$(BUILD)/$(LIBPFX)testlib-jar$(LIBSFX)
 TESTLIB_PATH=$(BUILD)/$(LIBPFX)testlib-path$(LIBSFX)