diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index 32e836f..9d587c1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,14 @@ jna-3.2.7.tar.bz2 /jna-4.4.0-clean.tar.xz /jna-4.5.0-clean.tar.xz /jna-4.5.1-clean.tar.xz +/jna-5.2.0-clean.tar.xz +/jna-5.4.0-clean.tar.xz +/jna-5.6.0-clean.tar.xz +/jna-5.9.0-clean.tar.xz +/jna-5.10.0-clean.tar.xz +/jna-5.11.0-clean.tar.xz +/jna-5.12.1-clean.tar.xz +/jna-5.13.0-clean.tar.xz +/jna-5.14.0-clean.tar.xz +/jna-5.15.0-clean.tar.xz +/jna-5.17.0.tar.zst diff --git a/0001-Adapt-build.patch b/0001-Adapt-build.patch index 003d5db..36ad5d1 100644 --- a/0001-Adapt-build.patch +++ b/0001-Adapt-build.patch @@ -8,7 +8,7 @@ Subject: [PATCH 1/6] Adapt build 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/native/Makefile b/native/Makefile -index 6f9ad25..3712a9e 100644 +index 1bea2dc..cb3afed 100644 --- a/native/Makefile +++ b/native/Makefile @@ -97,7 +97,7 @@ CDEFINES=-D_REENTRANT @@ -20,7 +20,7 @@ index 6f9ad25..3712a9e 100644 ifeq ($(DYNAMIC_LIBFFI),true) CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo) LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi) -@@ -455,7 +455,6 @@ $(BUILD)/$(JNA_JNI_VERSION).stamp: +@@ -457,7 +457,6 @@ $(BUILD)/$(JNA_JNI_VERSION).stamp: $(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS) @@ -29,5 +29,5 @@ index 6f9ad25..3712a9e 100644 $(TESTLIB): $(BUILD)/testlib.o $(LD) $(LDFLAGS) $< $(LIBS) -- -2.14.3 +2.20.1 diff --git a/0002-Load-system-library.patch b/0002-Load-system-library.patch index 717300c..b8785b0 100644 --- a/0002-Load-system-library.patch +++ b/0002-Load-system-library.patch @@ -4,21 +4,19 @@ Date: Mon, 16 Jan 2017 11:31:32 +0100 Subject: [PATCH 2/6] Load system library --- - src/com/sun/jna/Native.java | 97 ++------------------------------------------- - 1 file changed, 4 insertions(+), 93 deletions(-) + src/com/sun/jna/Native.java | 80 ++----------------------------------- + 1 file changed, 4 insertions(+), 76 deletions(-) diff --git a/src/com/sun/jna/Native.java b/src/com/sun/jna/Native.java -index 91b195f..9ac3815 100644 +index eae060f..11bcc5b 100644 --- a/src/com/sun/jna/Native.java +++ b/src/com/sun/jna/Native.java -@@ -829,101 +829,12 @@ public final class Native implements Version { - - /** +@@ -912,84 +912,12 @@ public final class Native implements Version { * Loads the JNA stub library. -- * First tries jna.boot.library.path, then the system path, then from the -- * jar file. -+ * MODIFIED FROM UPSTREAM - we rip out all sorts of gunk here that is -+ * unnecessary when JNA is properly installed with the OS. + * First tries jna.boot.library.path, then the system path, then from the + * jar file. ++ * MODIFIED FROM UPSTREAM - we rip out all sorts of gunk here that is ++ * unnecessary when JNA is properly installed with the OS. */ private static void loadNativeDispatchLibrary() { - if (!Boolean.getBoolean("jna.nounpack")) { @@ -26,7 +24,7 @@ index 91b195f..9ac3815 100644 - removeTemporaryFiles(); - } - catch(IOException e) { -- System.err.println("JNA Warning: IOException removing temporary files: " + e.getMessage()); +- LOG.log(Level.WARNING, "JNA Warning: IOException removing temporary files", e); - } - } - @@ -39,20 +37,14 @@ index 91b195f..9ac3815 100644 - String dir = dirs.nextToken(); - File file = new File(new File(dir), System.mapLibraryName(libName).replace(".dylib", ".jnilib")); - String path = file.getAbsolutePath(); -- if (DEBUG_JNA_LOAD) { -- System.out.println("Looking in " + path); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Looking in {0}", path); - if (file.exists()) { - try { -- if (DEBUG_JNA_LOAD) { -- System.out.println("Trying " + path); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Trying {0}", path); - System.setProperty("jnidispatch.path", path); - System.load(path); - jnidispatchPath = path; -- if (DEBUG_JNA_LOAD) { -- System.out.println("Found jnidispatch at " + path); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Found jnidispatch at {0}", path); - return; - } catch (UnsatisfiedLinkError ex) { - // Not a problem if already loaded in anoteher class loader @@ -70,37 +62,28 @@ index 91b195f..9ac3815 100644 - ext = "dylib"; - } - path = path.substring(0, path.lastIndexOf(orig)) + ext; -- if (DEBUG_JNA_LOAD) { -- System.out.println("Looking in " + path); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Looking in {0}", path); - if (new File(path).exists()) { - try { -- if (DEBUG_JNA_LOAD) { -- System.out.println("Trying " + path); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Trying {0}", path); - System.setProperty("jnidispatch.path", path); - System.load(path); - jnidispatchPath = path; -- if (DEBUG_JNA_LOAD) { -- System.out.println("Found jnidispatch at " + path); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Found jnidispatch at {0}", path); - return; - } catch (UnsatisfiedLinkError ex) { -- System.err.println("File found at " + path + " but not loadable: " + ex.getMessage()); +- LOG.log(Level.WARNING, "File found at " + path + " but not loadable: " + ex.getMessage(), ex); - } - } - } - } - } -- if (!Boolean.getBoolean("jna.nosys")) { +- String jnaNosys = System.getProperty("jna.nosys", "true"); +- if ((!Boolean.parseBoolean(jnaNosys)) || Platform.isAndroid()) { - try { -- if (DEBUG_JNA_LOAD) { -- System.out.println("Trying (via loadLibrary) " + libName); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Trying (via loadLibrary) {0}", libName); - System.loadLibrary(libName); -- if (DEBUG_JNA_LOAD) { -- System.out.println("Found jnidispatch on system path"); -- } +- LOG.log(DEBUG_JNA_LOAD_LEVEL, "Found jnidispatch on system path"); - return; - } - catch(UnsatisfiedLinkError e) { @@ -113,10 +96,10 @@ index 91b195f..9ac3815 100644 - throw new UnsatisfiedLinkError("Unable to locate JNA native support library"); - } + jnidispatchPath = "@LIBDIR@/" + System.mapLibraryName("jnidispatch"); -+ System.load(jnidispatchPath); ++ System.load(jnidispatchPath); } static final String JNA_TMPLIB_PREFIX = "jna"; -- -2.14.3 +2.20.1 diff --git a/0003-Tests-headless.patch b/0003-Tests-headless.patch index f879f9d..9a4645d 100644 --- a/0003-Tests-headless.patch +++ b/0003-Tests-headless.patch @@ -8,17 +8,17 @@ Subject: [PATCH 3/6] Tests headless 1 file changed, 1 insertion(+) diff --git a/build.xml b/build.xml -index 63a9cc7..ab9cf52 100644 +index d5c2bbc..835c02b 100644 --- a/build.xml +++ b/build.xml -@@ -1128,6 +1128,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc +@@ -1202,6 +1202,7 @@ cd .. + - + -- -2.14.3 +2.20.1 diff --git a/0004-Fix-javadoc-build.patch b/0004-Fix-javadoc-build.patch index f68b0be..b2bc537 100644 --- a/0004-Fix-javadoc-build.patch +++ b/0004-Fix-javadoc-build.patch @@ -8,17 +8,17 @@ Subject: [PATCH 4/6] Fix javadoc build 1 file changed, 1 insertion(+) diff --git a/build.xml b/build.xml -index ab9cf52..d1fe4aa 100644 +index 8f5733a..fb8d544 100644 --- a/build.xml +++ b/build.xml -@@ -1233,6 +1233,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc +@@ -1343,6 +1343,7 @@ cd .. + - - +