File: 14-rename-native-library.patch

package info (click to toggle)
libjna-java 4.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,844 kB
  • sloc: java: 75,159; ansic: 4,781; xml: 4,585; makefile: 434; sh: 235
file content (28 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | 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)