1 |
flameeyes 10/01/31 16:32:08 |
2 |
|
3 |
Added: jffi-0.7-makefile-flags.patch |
4 |
Log: |
5 |
Add a snapshot from upstream, this time the path to the library is injected at build-time so that it does not have to be defined at runtime. |
6 |
(Portage version: 2.2_rc62/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-java/jffi/files/jffi-0.7-makefile-flags.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jffi/files/jffi-0.7-makefile-flags.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-java/jffi/files/jffi-0.7-makefile-flags.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: jffi-0.7-makefile-flags.patch |
15 |
=================================================================== |
16 |
Index: wmeissner-jffi-6c5fb4a/jni/GNUmakefile |
17 |
=================================================================== |
18 |
--- wmeissner-jffi-6c5fb4a.orig/jni/GNUmakefile |
19 |
+++ wmeissner-jffi-6c5fb4a/jni/GNUmakefile |
20 |
@@ -58,7 +58,7 @@ OFLAGS = -O2 $(JFLAGS) |
21 |
|
22 |
# MacOS headers aren't completely warning free, so turn them off |
23 |
ifneq ($(OS),darwin) |
24 |
- WFLAGS = -W -Werror -Wall -Wno-unused -Wno-parentheses -Wundef |
25 |
+ WFLAGS = -W -Wall -Wno-unused -Wno-parentheses -Wundef |
26 |
endif |
27 |
PICFLAGS = -fPIC |
28 |
SOFLAGS = # Filled in for each OS specifically |
29 |
@@ -70,8 +70,8 @@ FFI_CFLAGS = $(FFI_MMAP_EXEC) $(OFLAGS) |
30 |
STRIP = strip -S |
31 |
|
32 |
JDK_INCLUDES = -I"$(JDK_HOME)/include" -I"$(JDK_HOME)/include/$(OS)" |
33 |
-IFLAGS = -I"$(BUILD_DIR)" -I"$(BUILD_DIR)"/jni -I$(SRC_DIR) -I"$(JFFI_SRC_DIR)" -I"$(LIBFFI_BUILD_DIR)"/include |
34 |
-CFLAGS = $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) |
35 |
+IFLAGS = -I"$(BUILD_DIR)" -I"$(BUILD_DIR)"/jni -I$(SRC_DIR) -I"$(JFFI_SRC_DIR)" |
36 |
+CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) |
37 |
CFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE -D_GNU_SOURCE |
38 |
CXXFLAGS = $(OFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) |
39 |
|
40 |
@@ -204,15 +204,15 @@ ifneq ($(strip $(findstring $(OS), linux |
41 |
endif |
42 |
|
43 |
LIBJFFI = $(BUILD_DIR)/$(PREFIX)$(LIBNAME)-$(VERSION).$(JNIEXT) |
44 |
-FFI_CONFIGURE = $(LIBFFI_SRC_DIR)/configure --disable-static \ |
45 |
- --with-pic=yes --disable-dependency-tracking |
46 |
-ifdef CONFIGURE_HOST |
47 |
- FFI_CONFIGURE += --host=$(CONFIGURE_HOST) |
48 |
-endif |
49 |
- |
50 |
-ifdef CONFIGURE_BUILD |
51 |
- FFI_CONFIGURE += --build=$(CONFIGURE_BUILD) |
52 |
-endif |
53 |
+#FFI_CONFIGURE = $(LIBFFI_SRC_DIR)/configure --disable-static \ |
54 |
+# --with-pic=yes --disable-dependency-tracking |
55 |
+#ifdef CONFIGURE_HOST |
56 |
+# FFI_CONFIGURE += --host=$(CONFIGURE_HOST) |
57 |
+#endif |
58 |
+# |
59 |
+#ifdef CONFIGURE_BUILD |
60 |
+# FFI_CONFIGURE += --build=$(CONFIGURE_BUILD) |
61 |
+#endif |
62 |
|
63 |
all: $(LIBJFFI) |
64 |
|
65 |
@@ -245,55 +245,55 @@ $(BUILD_DIR)/%.o : $(SRC_DIR)/%.cpp $(wi |
66 |
$(CCACHE) $(CXX) $(CXXFLAGS) -c $< -o $@ |
67 |
|
68 |
|
69 |
-ifeq ($(OS), darwin) |
70 |
-build_ffi = \ |
71 |
- mkdir -p $(BUILD_DIR)/libffi-darwin-$(1); \ |
72 |
- (if [ ! -f $(BUILD_DIR)/libffi-darwin-$(1)/Makefile ]; then \ |
73 |
- echo "Configuring libffi for $(1)"; \ |
74 |
- cd $(BUILD_DIR)/libffi-darwin-$(1) && \ |
75 |
- env CC="$(CCACHE) $(CC)" CFLAGS="-arch $(1) $(FFI_CFLAGS)" LDFLAGS="-arch $(1)" \ |
76 |
- $(FFI_CONFIGURE) --host=$(1)-apple-darwin > /dev/null; \ |
77 |
- fi); \ |
78 |
- env MACOSX_DEPLOYMENT_TARGET=10.5 $(MAKE) -C $(BUILD_DIR)/libffi-darwin-$(1) |
79 |
- |
80 |
-$(LIBFFI): |
81 |
- @mkdir -p $(@D) |
82 |
- @for arch in $(ARCHES); do $(call build_ffi,$$arch);done |
83 |
- |
84 |
- # Assemble into a FAT (i386, x86_64, ppc) library |
85 |
- @mkdir -p $(BUILD_DIR)/libffi/.libs |
86 |
- @env MACOSX_DEPLOYMENT_TARGET=10.5 /usr/bin/libtool -static -o $@ \ |
87 |
- $(foreach arch, $(ARCHES),$(BUILD_DIR)/libffi-darwin-$(arch)/.libs/libffi_convenience.a) |
88 |
- @mkdir -p $(LIBFFI_BUILD_DIR)/include |
89 |
- $(RM) $(LIBFFI_BUILD_DIR)/include/ffi.h |
90 |
- @( \ |
91 |
- printf "#if defined(__i386__)\n"; \ |
92 |
- printf "#include \"libffi-darwin-i386/include/ffi.h\"\n"; \ |
93 |
- printf "#elif defined(__x86_64__)\n"; \ |
94 |
- printf "#include \"libffi-darwin-x86_64/include/ffi.h\"\n";\ |
95 |
- printf "#elif defined(__ppc__)\n"; \ |
96 |
- printf "#include \"libffi-darwin-ppc/include/ffi.h\"\n";\ |
97 |
- printf "#endif\n";\ |
98 |
- ) > $(LIBFFI_BUILD_DIR)/include/ffi.h |
99 |
- @( \ |
100 |
- printf "#if defined(__i386__)\n"; \ |
101 |
- printf "#include \"libffi-darwin-i386/include/ffitarget.h\"\n"; \ |
102 |
- printf "#elif defined(__x86_64__)\n"; \ |
103 |
- printf "#include \"libffi-darwin-x86_64/include/ffitarget.h\"\n";\ |
104 |
- printf "#elif defined(__ppc__)\n"; \ |
105 |
- printf "#include \"libffi-darwin-ppc/include/ffitarget.h\"\n";\ |
106 |
- printf "#endif\n";\ |
107 |
- ) > $(LIBFFI_BUILD_DIR)/include/ffitarget.h |
108 |
-else |
109 |
-$(LIBFFI): |
110 |
- @mkdir -p $(LIBFFI_BUILD_DIR) |
111 |
- @if [ ! -f $(LIBFFI_BUILD_DIR)/Makefile ]; then \ |
112 |
- echo "Configuring libffi for $(PLATFORM)"; \ |
113 |
- cd $(LIBFFI_BUILD_DIR) && env CC="$(FFI_CC)" LD="$(FFI_LD)" CFLAGS="$(FFI_CFLAGS)" \ |
114 |
- $(FFI_CONFIGURE) > /dev/null; \ |
115 |
- fi |
116 |
- $(MAKE) -C $(LIBFFI_BUILD_DIR) |
117 |
-endif |
118 |
+#ifeq ($(OS), darwin) |
119 |
+#build_ffi = \ |
120 |
+# mkdir -p $(BUILD_DIR)/libffi-darwin-$(1); \ |
121 |
+# (if [ ! -f $(BUILD_DIR)/libffi-darwin-$(1)/Makefile ]; then \ |
122 |
+# echo "Configuring libffi for $(1)"; \ |
123 |
+# cd $(BUILD_DIR)/libffi-darwin-$(1) && \ |
124 |
+# env CC="$(CCACHE) $(CC)" CFLAGS="-arch $(1) $(FFI_CFLAGS)" LDFLAGS="-arch $(1)" \ |
125 |
+# $(FFI_CONFIGURE) --host=$(1)-apple-darwin > /dev/null; \ |
126 |
+# fi); \ |
127 |
+# env MACOSX_DEPLOYMENT_TARGET=10.5 $(MAKE) -C $(BUILD_DIR)/libffi-darwin-$(1) |
128 |
+# |
129 |
+#$(LIBFFI): |
130 |
+# @mkdir -p $(@D) |
131 |
+# @for arch in $(ARCHES); do $(call build_ffi,$$arch);done |
132 |
+# |
133 |
+# # Assemble into a FAT (i386, x86_64, ppc) library |
134 |
+# @mkdir -p $(BUILD_DIR)/libffi/.libs |
135 |
+# @env MACOSX_DEPLOYMENT_TARGET=10.5 /usr/bin/libtool -static -o $@ \ |
136 |
+# $(foreach arch, $(ARCHES),$(BUILD_DIR)/libffi-darwin-$(arch)/.libs/libffi_convenience.a) |
137 |
+# @mkdir -p $(LIBFFI_BUILD_DIR)/include |
138 |
+# $(RM) $(LIBFFI_BUILD_DIR)/include/ffi.h |
139 |
+# @( \ |
140 |
+# printf "#if defined(__i386__)\n"; \ |
141 |
+# printf "#include \"libffi-darwin-i386/include/ffi.h\"\n"; \ |
142 |
+# printf "#elif defined(__x86_64__)\n"; \ |
143 |
+# printf "#include \"libffi-darwin-x86_64/include/ffi.h\"\n";\ |
144 |
+# printf "#elif defined(__ppc__)\n"; \ |
145 |
+# printf "#include \"libffi-darwin-ppc/include/ffi.h\"\n";\ |
146 |
+# printf "#endif\n";\ |
147 |
+# ) > $(LIBFFI_BUILD_DIR)/include/ffi.h |
148 |
+# @( \ |
149 |
+# printf "#if defined(__i386__)\n"; \ |
150 |
+# printf "#include \"libffi-darwin-i386/include/ffitarget.h\"\n"; \ |
151 |
+# printf "#elif defined(__x86_64__)\n"; \ |
152 |
+# printf "#include \"libffi-darwin-x86_64/include/ffitarget.h\"\n";\ |
153 |
+# printf "#elif defined(__ppc__)\n"; \ |
154 |
+# printf "#include \"libffi-darwin-ppc/include/ffitarget.h\"\n";\ |
155 |
+# printf "#endif\n";\ |
156 |
+# ) > $(LIBFFI_BUILD_DIR)/include/ffitarget.h |
157 |
+#else |
158 |
+#$(LIBFFI): |
159 |
+# @mkdir -p $(LIBFFI_BUILD_DIR) |
160 |
+# @if [ ! -f $(LIBFFI_BUILD_DIR)/Makefile ]; then \ |
161 |
+# echo "Configuring libffi for $(PLATFORM)"; \ |
162 |
+# cd $(LIBFFI_BUILD_DIR) && env CC="$(FFI_CC)" LD="$(FFI_LD)" CFLAGS="$(FFI_CFLAGS)" \ |
163 |
+# $(FFI_CONFIGURE) > /dev/null; \ |
164 |
+# fi |
165 |
+# $(MAKE) -C $(LIBFFI_BUILD_DIR) |
166 |
+#endif |
167 |
clean:: |
168 |
# nothing to do - ant will delete the build dir |