[packages] bind: fix pid file path (#7218)
[openwrt/svn-archive/archive.git] / libs / boost / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # Dude, this "boost" is really one of the most crude stuff I ported yet.
9
10 include $(TOPDIR)/rules.mk
11
12 PKG_NAME:=boost
13 PKG_VERSION:=1_38_0
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=@SF/boost
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
19 PKG_MD5SUM:=a4fc691c4e7c49b3b9b54a667d8f5529
20
21 PKG_BUILD_DEPENDS:=boost-jam/host
22
23 PKG_CONFIG_DEPENDS := \
24 CONFIG_PACKAGE_boost-date_time \
25 CONFIG_PACKAGE_boost-filesystem \
26 CONFIG_PACKAGE_boost-graph \
27 CONFIG_PACKAGE_boost-iostreams \
28 CONFIG_PACKAGE_boost-math \
29 CONFIG_PACKAGE_boost-program_options \
30 CONFIG_PACKAGE_boost-python \
31 CONFIG_PACKAGE_boost-regex \
32 CONFIG_PACKAGE_boost-serialization \
33 CONFIG_PACKAGE_boost-signals \
34 CONFIG_PACKAGE_boost-system \
35 CONFIG_PACKAGE_boost-test \
36 CONFIG_PACKAGE_boost-thread \
37 CONFIG_PACKAGE_boost-wave \
38
39 include $(INCLUDE_DIR)/package.mk
40
41 define Package/boost/Default
42 SECTION:=libs
43 CATEGORY:=Libraries
44 TITLE:=Boost C++ source libraries
45 URL:=http://www.boost.org
46 DEPENDS:=+libstdcpp
47 endef
48
49 define Package/boost/Default/description
50 Boost provides free peer-reviewed portable C++ source libraries
51 endef
52
53 define Package/boost-date_time
54 $(call Package/boost/Default)
55 TITLE+= (date_time)
56 endef
57
58 define Package/boost-filesystem
59 $(call Package/boost/Default)
60 TITLE+= (filesystem)
61 endef
62
63 define Package/boost-function_types
64 $(call Package/boost/Default)
65 TITLE+= (function_types)
66 BUILD_ONLY:=1
67 endef
68
69 define Package/boost-graph
70 $(call Package/boost/Default)
71 TITLE+= (graph)
72 endef
73
74 define Package/boost-iostreams
75 $(call Package/boost/Default)
76 TITLE+= (iostreams)
77 DEPENDS+= +zlib
78 endef
79
80 define Package/boost-math
81 $(call Package/boost/Default)
82 TITLE+= (math)
83 endef
84
85 #define Package/boost-mpi
86 # $(call Package/boost/Default)
87 # TITLE+= (mpi)
88 #endef
89
90 define Package/boost-program_options
91 $(call Package/boost/Default)
92 TITLE+= (program_options)
93 endef
94
95 define Package/boost-python
96 $(call Package/boost/Default)
97 TITLE+= (python)
98 DEPENDS+= +python
99 endef
100
101 define Package/boost-regex
102 $(call Package/boost/Default)
103 TITLE+= (regex)
104 endef
105
106 define Package/boost-serialization
107 $(call Package/boost/Default)
108 TITLE+= (serialization)
109 endef
110
111 define Package/boost-signals
112 $(call Package/boost/Default)
113 TITLE+= (signals)
114 endef
115
116 define Package/boost-system
117 $(call Package/boost/Default)
118 TITLE+= (system)
119 endef
120
121 define Package/boost-test
122 $(call Package/boost/Default)
123 TITLE+= (test)
124 endef
125
126 define Package/boost-thread
127 $(call Package/boost/Default)
128 TITLE+= (thread)
129 endef
130
131 define Package/boost-wave
132 $(call Package/boost/Default)
133 TITLE+= (wave)
134 endef
135
136 define Package/boost
137 $(call Package/boost/Default)
138 TITLE+= (header-only)
139 BUILDONLY:=1
140 endef
141
142 define Build/Configure
143 endef
144
145 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
146 define Build/Compile
147 ( cd $(PKG_BUILD_DIR) ; \
148 echo "using gcc : : $(GNU_TARGET_NAME)-gcc : <cflags>$(TARGET_CFLAGS) <cxxflags>$(TARGET_CXXFLAGS) <linkflags>$(TARGET_LDFLAGS) ;" > tools/build/v2/site-config.jam ; \
149 $(if $(CONFIG_PACKAGE_boost-python), \
150 echo "using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.6/ ;" >> \
151 tools/build/v2/site-config.jam; \
152 ) \
153 bjam \
154 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
155 --toolset=gcc --build-type=minimal --layout=system \
156 --disable-long-double \
157 $(CONFIGURE_ARGS) \
158 $(if $(CONFIG_PACKAGE_boost-date_time),--with-date_time) \
159 $(if $(CONFIG_PACKAGE_boost-filesystem),--with-filesystem) \
160 $(if $(CONFIG_PACKAGE_boost-function_types),--with-function_types) \
161 $(if $(CONFIG_PACKAGE_boost-graph),--with-graph) \
162 $(if $(CONFIG_PACKAGE_boost-iostreams),--with-iostreams) \
163 $(if $(CONFIG_PACKAGE_boost-math),--with-math) \
164 $(if $(CONFIG_PACKAGE_boost-mpi),--with-mpi) \
165 $(if $(CONFIG_PACKAGE_boost-program_options),--with-program_options) \
166 $(if $(CONFIG_PACKAGE_boost-python),--with-python) \
167 $(if $(CONFIG_PACKAGE_boost-regex),--with-regex) \
168 $(if $(CONFIG_PACKAGE_boost-serialization),--with-serialization) \
169 $(if $(CONFIG_PACKAGE_boost-signals),--with-signals) \
170 $(if $(CONFIG_PACKAGE_boost-system),--with-system) \
171 $(if $(CONFIG_PACKAGE_boost-test),--with-test) \
172 $(if $(CONFIG_PACKAGE_boost-thread),--with-thread) \
173 $(if $(CONFIG_PACKAGE_boost-wave),--with-wave) \
174 \
175 $(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
176 -sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
177 install \
178 )
179 endef
180
181 define Build/InstallDev
182 $(INSTALL_DIR) $(1)/usr/include/boost/
183 $(CP) $(PKG_INSTALL_DIR)/include/boost/* $(1)/usr/include/boost/ # copies _all_ header files - independent of <--with-library>-argument above
184
185 if [ -d $(PKG_INSTALL_DIR)/lib ]; then \
186 $(INSTALL_DIR) $(1)/usr/lib; \
187 $(CP) $(PKG_INSTALL_DIR)/lib/*.a $(1)/usr/lib/; \
188 $(CP) $(PKG_INSTALL_DIR)/lib/*.so* $(1)/usr/lib/; \
189 fi
190 endef
191
192 define Package/boost/Default/install
193 $(INSTALL_DIR) $(1)/usr/lib
194 $(CP) $(PKG_INSTALL_DIR)/lib/libboost_$(2)*.so* $(1)/usr/lib/
195 endef
196
197 define Package/boost-date_time/install
198 $(call Package/boost/Default/install,$(1),date_time)
199 endef
200
201 define Package/boost-filesystem/install
202 $(call Package/boost/Default/install,$(1),filesystem)
203 endef
204
205 define Package/boost-graph/install
206 $(call Package/boost/Default/install,$(1),graph)
207 endef
208
209 define Package/boost-iostreams/install
210 $(call Package/boost/Default/install,$(1),iostreams)
211 endef
212
213 define Package/boost-math/install
214 $(call Package/boost/Default/install,$(1),math)
215 endef
216
217 #define Package/boost-mpi/install
218 # $(call Package/boost/Default/install,$(1),mpi)
219 #endef
220
221 define Package/boost-program_options/install
222 $(call Package/boost/Default/install,$(1),program_options)
223 endef
224
225 define Package/boost-python/install
226 $(call Package/boost/Default/install,$(1),python)
227 endef
228
229 define Package/boost-regex/install
230 $(call Package/boost/Default/install,$(1),regex)
231 endef
232
233 define Package/boost-serialization/install
234 $(call Package/boost/Default/install,$(1),serialization)
235 endef
236
237 define Package/boost-signals/install
238 $(call Package/boost/Default/install,$(1),signals)
239 endef
240
241 define Package/boost-system/install
242 $(call Package/boost/Default/install,$(1),system)
243 endef
244
245 define Package/boost-test/install
246 $(INSTALL_DIR) $(1)/usr/lib
247 $(CP) $(PKG_INSTALL_DIR)/lib/libboost_unit_test_framework*.so* $(1)/usr/lib/
248 $(CP) $(PKG_INSTALL_DIR)/lib/libboost_prg_exec_monitor*.so* $(1)/usr/lib/
249 endef
250
251 define Package/boost-thread/install
252 $(call Package/boost/Default/install,$(1),thread)
253 endef
254
255 define Package/boost-wave/install
256 $(call Package/boost/Default/install,$(1),wave)
257 endef
258
259 $(eval $(call BuildPackage,boost))
260 $(eval $(call BuildPackage,boost-date_time))
261 $(eval $(call BuildPackage,boost-filesystem))
262 $(eval $(call BuildPackage,boost-function_types))
263 $(eval $(call BuildPackage,boost-graph))
264 $(eval $(call BuildPackage,boost-iostreams))
265 $(eval $(call BuildPackage,boost-math))
266 #$(eval $(call BuildPackage,boost-mpi))
267 $(eval $(call BuildPackage,boost-program_options))
268 $(eval $(call BuildPackage,boost-python))
269 $(eval $(call BuildPackage,boost-regex))
270 $(eval $(call BuildPackage,boost-serialization))
271 $(eval $(call BuildPackage,boost-signals))
272 $(eval $(call BuildPackage,boost-system))
273 $(eval $(call BuildPackage,boost-test))
274 $(eval $(call BuildPackage,boost-thread))
275 $(eval $(call BuildPackage,boost-wave))