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
24 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_PACKAGE_boost-date_time \
26 CONFIG_PACKAGE_boost-filesystem \
27 CONFIG_PACKAGE_boost-graph \
28 CONFIG_PACKAGE_boost-iostreams \
29 CONFIG_PACKAGE_boost-math \
30 CONFIG_PACKAGE_boost-program_options \
31 CONFIG_PACKAGE_boost-python \
32 CONFIG_PACKAGE_boost-regex \
33 CONFIG_PACKAGE_boost-serialization \
34 CONFIG_PACKAGE_boost-signals \
35 CONFIG_PACKAGE_boost-system \
36 CONFIG_PACKAGE_boost-test \
37 CONFIG_PACKAGE_boost-thread \
38 CONFIG_PACKAGE_boost-wave \
40 include $(INCLUDE_DIR
)/package.mk
42 define Package
/boost
/Default
45 TITLE
:=Boost C
++ source libraries
46 URL
:=http
://www.boost.org
50 define Package
/boost
/Default
/description
51 Boost provides free peer-reviewed portable C
++ source libraries
54 define Package
/boost-date_time
55 $(call Package
/boost
/Default
)
59 define Package
/boost-filesystem
60 $(call Package
/boost
/Default
)
64 define Package
/boost-function_types
65 $(call Package
/boost
/Default
)
66 TITLE
+= (function_types
)
70 define Package
/boost-graph
71 $(call Package
/boost
/Default
)
75 define Package
/boost-iostreams
76 $(call Package
/boost
/Default
)
81 define Package
/boost-math
82 $(call Package
/boost
/Default
)
86 #define Package/boost-mpi
87 # $(call Package/boost/Default)
91 define Package
/boost-program_options
92 $(call Package
/boost
/Default
)
93 TITLE
+= (program_options
)
96 define Package
/boost-python
97 $(call Package
/boost
/Default
)
102 define Package
/boost-regex
103 $(call Package
/boost
/Default
)
107 define Package
/boost-serialization
108 $(call Package
/boost
/Default
)
109 TITLE
+= (serialization
)
112 define Package
/boost-signals
113 $(call Package
/boost
/Default
)
117 define Package
/boost-system
118 $(call Package
/boost
/Default
)
122 define Package
/boost-test
123 $(call Package
/boost
/Default
)
127 define Package
/boost-thread
128 $(call Package
/boost
/Default
)
132 define Package
/boost-wave
133 $(call Package
/boost
/Default
)
138 $(call Package
/boost
/Default
)
139 TITLE
+= (header-only
)
143 define Build
/Configure
146 CONFIGURE_PREFIX
:=$(PKG_INSTALL_DIR
)
148 ( cd
$(PKG_BUILD_DIR
) ; \
149 echo
"using gcc : : $(GNU_TARGET_NAME)-gcc : <cflags>$(TARGET_CFLAGS) <cxxflags>$(TARGET_CXXFLAGS) <linkflags>$(TARGET_LDFLAGS) ;" > tools
/build
/v2
/site-config.jam
; \
150 $(if
$(CONFIG_PACKAGE_boost-python
), \
151 echo
"using python : : $(STAGING_DIR_ROOT)/usr/bin/python : $(STAGING_DIR)/usr/include/python2.6/ ;" >> \
152 tools
/build
/v2
/site-config.jam
; \
155 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
156 $(filter -j
%,$(PKG_JOBS
)) \
157 --toolset
=gcc
--build-type
=minimal
--layout
=system \
158 --disable-long-double \
160 $(if
$(CONFIG_PACKAGE_boost-date_time
),--with-date_time
) \
161 $(if
$(CONFIG_PACKAGE_boost-filesystem
),--with-filesystem
) \
162 $(if
$(CONFIG_PACKAGE_boost-function_types
),--with-function_types
) \
163 $(if
$(CONFIG_PACKAGE_boost-graph
),--with-graph
) \
164 $(if
$(CONFIG_PACKAGE_boost-iostreams
),--with-iostreams
) \
165 $(if
$(CONFIG_PACKAGE_boost-math
),--with-math
) \
166 $(if
$(CONFIG_PACKAGE_boost-mpi
),--with-mpi
) \
167 $(if
$(CONFIG_PACKAGE_boost-program_options
),--with-program_options
) \
168 $(if
$(CONFIG_PACKAGE_boost-python
),--with-python
) \
169 $(if
$(CONFIG_PACKAGE_boost-regex
),--with-regex
) \
170 $(if
$(CONFIG_PACKAGE_boost-serialization
),--with-serialization
) \
171 $(if
$(CONFIG_PACKAGE_boost-signals
),--with-signals
) \
172 $(if
$(CONFIG_PACKAGE_boost-system
),--with-system
) \
173 $(if
$(CONFIG_PACKAGE_boost-test
),--with-test
) \
174 $(if
$(CONFIG_PACKAGE_boost-thread
),--with-thread
) \
175 $(if
$(CONFIG_PACKAGE_boost-wave
),--with-wave
) \
177 $(if
$(CONFIG_PACKAGE_boost-iostreams
),-sNO_BZIP2
=1 -sZLIB_INCLUDE
=$(STAGING_DIR
)/usr
/include \
178 -sZLIB_LIBPATH
=$(STAGING_DIR
)/usr
/lib
) \
183 define Build
/InstallDev
184 $(INSTALL_DIR
) $(1)/usr
/include/boost
/
185 $(CP
) $(PKG_INSTALL_DIR
)/include/boost
/* $(1)/usr
/include/boost
/ # copies _all_ header files - independent of <--with-library>-argument above
187 if
[ -d
$(PKG_INSTALL_DIR
)/lib
]; then \
188 $(INSTALL_DIR
) $(1)/usr
/lib
; \
189 $(CP
) $(PKG_INSTALL_DIR
)/lib
/*.a
$(1)/usr
/lib
/; \
190 $(CP
) $(PKG_INSTALL_DIR
)/lib
/*.so
* $(1)/usr
/lib
/; \
194 define Package
/boost
/Default
/install
195 $(INSTALL_DIR
) $(1)/usr
/lib
196 $(CP
) $(PKG_INSTALL_DIR
)/lib
/libboost_
$(2)*.so
* $(1)/usr
/lib
/
199 define Package
/boost-date_time
/install
200 $(call Package
/boost
/Default
/install,$(1),date_time
)
203 define Package
/boost-filesystem
/install
204 $(call Package
/boost
/Default
/install,$(1),filesystem
)
207 define Package
/boost-graph
/install
208 $(call Package
/boost
/Default
/install,$(1),graph
)
211 define Package
/boost-iostreams
/install
212 $(call Package
/boost
/Default
/install,$(1),iostreams
)
215 define Package
/boost-math
/install
216 $(call Package
/boost
/Default
/install,$(1),math
)
219 #define Package/boost-mpi/install
220 # $(call Package/boost/Default/install,$(1),mpi)
223 define Package
/boost-program_options
/install
224 $(call Package
/boost
/Default
/install,$(1),program_options
)
227 define Package
/boost-python
/install
228 $(call Package
/boost
/Default
/install,$(1),python
)
231 define Package
/boost-regex
/install
232 $(call Package
/boost
/Default
/install,$(1),regex
)
235 define Package
/boost-serialization
/install
236 $(call Package
/boost
/Default
/install,$(1),serialization
)
239 define Package
/boost-signals
/install
240 $(call Package
/boost
/Default
/install,$(1),signals
)
243 define Package
/boost-system
/install
244 $(call Package
/boost
/Default
/install,$(1),system
)
247 define Package
/boost-test
/install
248 $(INSTALL_DIR
) $(1)/usr
/lib
249 $(CP
) $(PKG_INSTALL_DIR
)/lib
/libboost_unit_test_framework
*.so
* $(1)/usr
/lib
/
250 $(CP
) $(PKG_INSTALL_DIR
)/lib
/libboost_prg_exec_monitor
*.so
* $(1)/usr
/lib
/
253 define Package
/boost-thread
/install
254 $(call Package
/boost
/Default
/install,$(1),thread
)
257 define Package
/boost-wave
/install
258 $(call Package
/boost
/Default
/install,$(1),wave
)
261 $(eval
$(call BuildPackage
,boost
))
262 $(eval
$(call BuildPackage
,boost-date_time
))
263 $(eval
$(call BuildPackage
,boost-filesystem
))
264 $(eval
$(call BuildPackage
,boost-function_types
))
265 $(eval
$(call BuildPackage
,boost-graph
))
266 $(eval
$(call BuildPackage
,boost-iostreams
))
267 $(eval
$(call BuildPackage
,boost-math
))
268 #$(eval $(call BuildPackage,boost-mpi))
269 $(eval
$(call BuildPackage
,boost-program_options
))
270 $(eval
$(call BuildPackage
,boost-python
))
271 $(eval
$(call BuildPackage
,boost-regex
))
272 $(eval
$(call BuildPackage
,boost-serialization
))
273 $(eval
$(call BuildPackage
,boost-signals
))
274 $(eval
$(call BuildPackage
,boost-system
))
275 $(eval
$(call BuildPackage
,boost-test
))
276 $(eval
$(call BuildPackage
,boost-thread
))
277 $(eval
$(call BuildPackage
,boost-wave
))