summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/jna/files/jna-3.4.0-makefile-flags.patch')
-rw-r--r--dev-java/jna/files/jna-3.4.0-makefile-flags.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/dev-java/jna/files/jna-3.4.0-makefile-flags.patch b/dev-java/jna/files/jna-3.4.0-makefile-flags.patch
new file mode 100644
index 000000000000..e4ff00bf69da
--- /dev/null
+++ b/dev-java/jna/files/jna-3.4.0-makefile-flags.patch
@@ -0,0 +1,62 @@
+diff --git a/native/Makefile b/native/Makefile
+index 75246a8..a1c3e66 100644
+--- a/native/Makefile
++++ b/native/Makefile
+@@ -70,7 +70,7 @@ LIBPFX=lib
+ LIBSFX=.so
+ ARSFX=.a
+ JNISFX=$(LIBSFX)
+-CC=gcc
++CC?=gcc
+ LD=$(CC)
+ LIBS=
+ # Default to Sun recommendations for JNI compilation
+@@ -83,10 +83,10 @@ CFLAGS_EXTRA=
+ COUT=-o $@
+ CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
+ CDEFINES=-D_REENTRANT
+-PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
+-CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
++PCFLAGS=-Wall -Wno-unused -Wno-parentheses
++CFLAGS+=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
+ -DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
+-LDFLAGS=-o $@ -shared
++LDFLAGS+=-o $@ -shared
+ 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)
+@@ -149,7 +149,7 @@ ifneq ($(MINGW),)
+ CDEFINES=-DPSAPI_VERSION=1
+ CC = $(MINGW) -m64 -mno-cygwin
+ LD = $(CC)
+-LDFLAGS=-o $@ -shared
++LDFLAGS+=-o $@ -shared
+ LIBS= -lmingwex -lpsapi -lkernel32 -lmsvcrt
+ FFI_CONFIG += --host=x86_64-pc-mingw32
+ else
+@@ -169,14 +169,14 @@ ifeq ($(OS),linux)
+ ARCH=$(shell uname -m | sed 's/i.86/i386/g')
+ PCFLAGS+=-fPIC
+ CDEFINES+=-DHAVE_PROTECTION
+-LDFLAGS+=-Wl,-soname,$@
++LDFLAGS+= -Wl,-soname,$(shell basename $@)
+ endif
+
+ ifneq (,$(findstring bsd,$(OS)))
+ ARCH=$(shell uname -m | sed 's/i.86/i386/g')
+ PCFLAGS+=-fPIC
+ CINCLUDES+=-I/usr/X11R6/include
+-LDFLAGS=-o $@ -shared
++LDFLAGS+= -o $@ -shared
+ CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT
+ endif
+
+@@ -239,7 +239,7 @@ endif
+
+ PCFLAGS+=$(ISYSROOT) -x objective-c
+ CDEFINES+=-DTARGET_RT_MAC_CFM=0 -DFFI_MMAP_EXEC_WRIT
+-LDFLAGS=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
++LDFLAGS+=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
+ -compatibility_version $(shell echo ${JNA_JNI_VERSION}|sed 's/^\([0-9][0-9]*\).*/\1/g') \
+ -current_version $(JNA_JNI_VERSION) \
+ -mmacosx-version-min=10.3 \