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 7436b71..9d587c1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,17 @@ jna-3.2.7.tar.bz2 /jna-4.2.1-clean.tar.xz /jna-4.2.2-clean.tar.xz /jna-4.3.0-clean.tar.xz +/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 c7df6cc..36ad5d1 100644 --- a/0001-Adapt-build.patch +++ b/0001-Adapt-build.patch @@ -1,17 +1,17 @@ -From c38ff2904958eeae70e3d47b7b2363f9f181013b Mon Sep 17 00:00:00 2001 +From 52ef407584801916d6e60c4f4c5411023b5ac369 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 16 Jan 2017 11:29:06 +0100 -Subject: [PATCH 1/4] Adapt build +Subject: [PATCH 1/6] Adapt build --- native/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/native/Makefile b/native/Makefile -index fb5ac4b..be1b452 100644 +index 1bea2dc..cb3afed 100644 --- a/native/Makefile +++ b/native/Makefile -@@ -107,7 +107,7 @@ CDEFINES=-D_REENTRANT +@@ -97,7 +97,7 @@ CDEFINES=-D_REENTRANT PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \ -DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"' @@ -20,7 +20,7 @@ index fb5ac4b..be1b452 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) -@@ -442,7 +442,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 fb5ac4b..be1b452 100644 $(TESTLIB): $(BUILD)/testlib.o $(LD) $(LDFLAGS) $< $(LIBS) -- -2.9.3 +2.20.1 diff --git a/0002-Load-system-library.patch b/0002-Load-system-library.patch index 1485d54..b8785b0 100644 --- a/0002-Load-system-library.patch +++ b/0002-Load-system-library.patch @@ -1,24 +1,22 @@ -From 3f48354a76a0d24fb21e9132482d9ff7af6df8b4 Mon Sep 17 00:00:00 2001 +From 3d08314de0494ff8bdc1a7bccc0ecc1730dbdd60 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 16 Jan 2017 11:31:32 +0100 -Subject: [PATCH 2/4] Load system library +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 f51a152..b3ddbc3 100644 +index eae060f..11bcc5b 100644 --- a/src/com/sun/jna/Native.java +++ b/src/com/sun/jna/Native.java -@@ -788,101 +788,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 f51a152..b3ddbc3 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 f51a152..b3ddbc3 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 f51a152..b3ddbc3 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 f51a152..b3ddbc3 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.9.3 +2.20.1 diff --git a/0003-Tests-headless.patch b/0003-Tests-headless.patch index 393d723..9a4645d 100644 --- a/0003-Tests-headless.patch +++ b/0003-Tests-headless.patch @@ -1,24 +1,24 @@ -From 4a4aae7689b217a0057608667eb03d2eea3f3eba Mon Sep 17 00:00:00 2001 +From c0f33e9ed0a5cfd79b58487c2a36c9b880b49947 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Mon, 16 Jan 2017 11:32:32 +0100 -Subject: [PATCH 3/4] Tests headless +Subject: [PATCH 3/6] Tests headless --- build.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/build.xml b/build.xml -index 09aeac2..d9be501 100644 +index d5c2bbc..835c02b 100644 --- a/build.xml +++ b/build.xml -@@ -1008,6 +1008,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc +@@ -1202,6 +1202,7 @@ cd .. + - + -- -2.9.3 +2.20.1 diff --git a/0004-Fix-javadoc-build.patch b/0004-Fix-javadoc-build.patch index 16f92a0..b2bc537 100644 --- a/0004-Fix-javadoc-build.patch +++ b/0004-Fix-javadoc-build.patch @@ -1,24 +1,24 @@ -From 5fb86e7e8a37d8215d16480672a39e3ba75bd79d Mon Sep 17 00:00:00 2001 +From ced8baacd3bccba7ebaba80785b891bf579af215 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 31 Jan 2017 14:21:19 +0100 -Subject: [PATCH 4/4] Fix javadoc build +Subject: [PATCH 4/6] Fix javadoc build --- build.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/build.xml b/build.xml -index d9be501..bbb93a3 100644 +index 8f5733a..fb8d544 100644 --- a/build.xml +++ b/build.xml -@@ -1113,6 +1113,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc +@@ -1343,6 +1343,7 @@ cd .. + - - +