2 # Copyright (C) 2009-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 # Dude, this "boost" is really one of the most crude stuff I ported yet.
10 include $(TOPDIR
)/rules.mk
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
21 PKG_BUILD_DEPENDS
:=boost-jam
/host
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 \
39 include $(INCLUDE_DIR
)/package.mk
41 define Package
/boost
/Default
44 TITLE
:=Boost C
++ source libraries
45 URL
:=http
://www.boost.org
49 define Package
/boost
/Default
/description
50 Boost provides free peer-reviewed portable C
++ source libraries
53 define Package
/boost-date_time
54 $(call Package
/boost
/Default
)
58 define Package
/boost-filesystem
59 $(call Package
/boost
/Default
)
63 define Package
/boost-function_types
64 $(call Package
/boost
/Default
)
65 TITLE
+= (function_types
)
69 define Package
/boost-graph
70 $(call Package
/boost
/Default
)
74 define Package
/boost-iostreams
75 $(call Package
/boost
/Default
)
80 define Package
/boost-math
81 $(call Package
/boost
/Default
)
85 #define Package/boost-mpi
86 # $(call Package/boost/Default)
90 define Package
/boost-program_options
91 $(call Package
/boost
/Default
)
92 TITLE
+= (program_options
)
95 define Package
/boost-python
96 $(call Package
/boost
/Default
)
101 define Package
/boost-regex
102 $(call Package
/boost
/Default
)
106 define Package
/boost-serialization
107 $(call Package
/boost
/Default
)
108 TITLE
+= (serialization
)
111 define Package
/boost-signals
112 $(call Package
/boost
/Default
)
116 define Package
/boost-system
117 $(call Package
/boost
/Default
)
121 define Package
/boost-test
122 $(call Package
/boost
/Default
)
126 define Package
/boost-thread
127 $(call Package
/boost
/Default
)
131 define Package
/boost-wave
132 $(call Package
/boost
/Default
)
137 $(call Package
/boost
/Default
)
138 TITLE
+= (header-only
)
142 define Build
/Configure
145 CONFIGURE_PREFIX
:=$(PKG_INSTALL_DIR
)
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
; \
154 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
155 --toolset
=gcc
--build-type
=minimal
--layout
=system \
156 --disable-long-double \
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
) \
175 $(if
$(CONFIG_PACKAGE_boost-iostreams
),-sNO_BZIP2
=1 -sZLIB_INCLUDE
=$(STAGING_DIR
)/usr
/include \
176 -sZLIB_LIBPATH
=$(STAGING_DIR
)/usr
/lib
) \
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
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
/; \
192 define Package
/boost
/Default
/install
193 $(INSTALL_DIR
) $(1)/usr
/lib
194 $(CP
) $(PKG_INSTALL_DIR
)/lib
/libboost_
$(2)*.so
* $(1)/usr
/lib
/
197 define Package
/boost-date_time
/install
198 $(call Package
/boost
/Default
/install,$(1),date_time
)
201 define Package
/boost-filesystem
/install
202 $(call Package
/boost
/Default
/install,$(1),filesystem
)
205 define Package
/boost-graph
/install
206 $(call Package
/boost
/Default
/install,$(1),graph
)
209 define Package
/boost-iostreams
/install
210 $(call Package
/boost
/Default
/install,$(1),iostreams
)
213 define Package
/boost-math
/install
214 $(call Package
/boost
/Default
/install,$(1),math
)
217 #define Package/boost-mpi/install
218 # $(call Package/boost/Default/install,$(1),mpi)
221 define Package
/boost-program_options
/install
222 $(call Package
/boost
/Default
/install,$(1),program_options
)
225 define Package
/boost-python
/install
226 $(call Package
/boost
/Default
/install,$(1),python
)
229 define Package
/boost-regex
/install
230 $(call Package
/boost
/Default
/install,$(1),regex
)
233 define Package
/boost-serialization
/install
234 $(call Package
/boost
/Default
/install,$(1),serialization
)
237 define Package
/boost-signals
/install
238 $(call Package
/boost
/Default
/install,$(1),signals
)
241 define Package
/boost-system
/install
242 $(call Package
/boost
/Default
/install,$(1),system
)
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
/
251 define Package
/boost-thread
/install
252 $(call Package
/boost
/Default
/install,$(1),thread
)
255 define Package
/boost-wave
/install
256 $(call Package
/boost
/Default
/install,$(1),wave
)
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
))