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
--- libjna-java.orig/src/com/sun/jna/Native.java	2023-01-25 14:37:33.560717364 +0100
+++ libjna-java/src/com/sun/jna/Native.java	2023-01-25 14:37:33.556717293 +0100
@@ -950,8 +950,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/" + Platform.getMultiArchPath() + "/jni";
         }
--- libjna-java.orig/native/Makefile	2023-01-25 14:37:33.560717364 +0100
+++ libjna-java/native/Makefile	2023-01-25 14:37:33.556717293 +0100
@@ -69,7 +69,7 @@
 FFI_ENV=CC="$(CC)" CFLAGS="$(COPT) $(CDEBUG) -DFFI_STATIC_BUILD" CPPFLAGS="$(CDEFINES) -DFFI_STATIC_BUILD"
 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)
