From a16df7f68a8547f29e5762c28c504a47d06c9c0f Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Jul 31 2020 17:10:14 +0000 Subject: Update to latest upstream release Add patch to fix incorrect java version detection of java 9+ --- diff --git a/.gitignore b/.gitignore index b3c21bc..44a52bd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ wmeissner-jffi-bbb81f1.tar.gz /1.2.10.zip /1.2.11.zip /jffi-1.2.12.tar.gz +/jffi-1.2.23.tar.gz diff --git a/0001-Fix-dependencies-on-junit-hamcrest.patch b/0001-Fix-dependencies-on-junit-hamcrest.patch new file mode 100644 index 0000000..d90455b --- /dev/null +++ b/0001-Fix-dependencies-on-junit-hamcrest.patch @@ -0,0 +1,60 @@ +From df823903e6ab15e9b336b5e5828afaaa87b66086 Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Fri, 31 Jul 2020 13:30:15 +0100 +Subject: [PATCH 1/4] Fix dependencies on junit/hamcrest + +--- + build.xml | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/build.xml b/build.xml +index cff1184..4474244 100644 +--- a/build.xml ++++ b/build.xml +@@ -2,8 +2,8 @@ + + Builds, tests, and runs the project jffi. + +- +- ++ ++ + + + +@@ -181,8 +181,8 @@ + + + +- +- ++ ++ + + + +@@ -207,8 +207,8 @@ + + + +- +- ++ ++ + + + +@@ -229,8 +229,8 @@ + + + +- +- ++ ++ + + + +-- +2.26.2 + diff --git a/0002-Fix-compilation-flags.patch b/0002-Fix-compilation-flags.patch new file mode 100644 index 0000000..d777caa --- /dev/null +++ b/0002-Fix-compilation-flags.patch @@ -0,0 +1,61 @@ +From ec546b03f871b9abaacdf359b1157f2eccfd4f8e Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Fri, 31 Jul 2020 13:53:48 +0100 +Subject: [PATCH 2/4] Fix compilation flags + +--- + jni/GNUmakefile | 10 ++++++---- + pom.xml | 4 ++++ + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/jni/GNUmakefile b/jni/GNUmakefile +index b5165db..58e5854 100755 +--- a/jni/GNUmakefile ++++ b/jni/GNUmakefile +@@ -67,10 +67,10 @@ OFLAGS = -O2 $(JFLAGS) + WERROR = -Werror + ifneq ($(OS),darwin) + ifneq ($(OS),aix) +- WFLAGS += -Wundef $(WERROR) ++ WFLAGS += -Wundef + endif + endif +-WFLAGS += -W -Wall -Wno-unused -Wno-parentheses -Wno-unused-parameter ++WFLAGS += -W -Wall -Wno-parentheses -Wno-unused-parameter + PICFLAGS = -fPIC + SOFLAGS = # Filled in for each OS specifically + FFI_MMAP_EXEC = -DFFI_MMAP_EXEC_WRIT +@@ -78,11 +78,13 @@ FFI_MMAP_EXEC = -DFFI_MMAP_EXEC_WRIT + FFI_CC = $(CCACHE) $(CC) + FFI_LD = $(LD) + FFI_CFLAGS = $(FFI_MMAP_EXEC) $(OFLAGS) +-STRIP ?= strip -S ++STRIP ?= /bin/true ++ ++RPMFLAGS=$(shell rpm --eval %optflags) + + JDK_INCLUDES = -I"$(JDK_HOME)/include" -I"$(JDK_HOME)/include/$(OS)" + IFLAGS = -I"$(BUILD_DIR)" -I"$(BUILD_DIR)"/jni -I$(SRC_DIR) -I"$(JFFI_SRC_DIR)" +-CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) $(LIBFFI_CFLAGS) ++CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) $(LIBFFI_CFLAGS) $(RPMFLAGS) + CFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE -D_GNU_SOURCE + + ifeq ($(OS), win64) +diff --git a/pom.xml b/pom.xml +index 66dc587..6320fad 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -210,6 +210,10 @@ + + + ++ ++ ++ ++ + + + +-- +2.26.2 + diff --git a/0003-Fix-native-header-generation.patch b/0003-Fix-native-header-generation.patch new file mode 100644 index 0000000..74ef849 --- /dev/null +++ b/0003-Fix-native-header-generation.patch @@ -0,0 +1,35 @@ +From e504b0a19157bb165ea20f0c9f3e08ae4e40531f Mon Sep 17 00:00:00 2001 +From: Mat Booth +Date: Fri, 31 Jul 2020 13:55:35 +0100 +Subject: [PATCH 3/4] Fix native header generation + +--- + build.xml | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/build.xml b/build.xml +index 4474244..11a818e 100644 +--- a/build.xml ++++ b/build.xml +@@ -297,11 +297,13 @@ + + + +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ +