Bladeren bron

Merge pull request #952 from ClaymorePT/master

boost: Dependencies, architectures updates and lib additions
Ted Hess 9 jaren geleden
bovenliggende
commit
d0a772521d
1 gewijzigde bestanden met toevoegingen van 82 en 5 verwijderingen
  1. 82
    5
      libs/boost/Makefile

+ 82
- 5
libs/boost/Makefile Bestand weergeven

@@ -12,10 +12,12 @@
12 12
 
13 13
 
14 14
 include $(TOPDIR)/rules.mk
15
+include $(INCLUDE_DIR)/nls.mk
16
+include $(INCLUDE_DIR)/target.mk 
15 17
 
16 18
 PKG_NAME:=boost
17 19
 PKG_VERSION:=1_57_0
18
-PKG_RELEASE:=1
20
+PKG_RELEASE:=2
19 21
 
20 22
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
21 23
 PKG_SOURCE_URL:=@SF/boost
@@ -26,7 +28,7 @@ PKG_LICENSE:=Boost Software License <http://www.boost.org/users/license.html>
26 28
 PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com> (Modified from Mirko Vogt <mirko@openwrt.org> Boost 1.51 Original Makefile and patches)
27 29
 
28 30
 
29
-PKG_BUILD_DEPENDS:=boost/host
31
+PKG_BUILD_DEPENDS += boost/host 
30 32
 PKG_BUILD_PARALLEL:=0
31 33
 PKG_USE_MIPS16:=0
32 34
 
@@ -45,7 +47,12 @@ PKG_CONFIG_DEPENDS := \
45 47
 	CONFIG_PACKAGE_boost-test \
46 48
 	CONFIG_PACKAGE_boost-thread \
47 49
 	CONFIG_PACKAGE_boost-wave \
48
-        CONFIG_PACKAGE_boost-atomic \
50
+	CONFIG_PACKAGE_boost-atomic \
51
+	CONFIG_PACKAGE_boost-context \
52
+	CONFIG_PACKAGE_boost-container \
53
+	CONFIG_PACKAGE_boost-coroutine \
54
+	CONFIG_PACKAGE_boost-log \
55
+
49 56
 
50 57
 
51 58
 include $(INCLUDE_DIR)/package.mk
@@ -111,6 +118,7 @@ endef
111 118
 define Package/boost-locale
112 119
   $(call Package/boost/Default)
113 120
   TITLE+= (locale)
121
+  DEPENDS+= $(ICONV_DEPENDS)
114 122
 endef
115 123
 
116 124
 define Package/boost-math
@@ -183,6 +191,28 @@ define Package/boost-wave
183 191
   DEPENDS+= +boost-date_time +boost-thread +boost-filesystem
184 192
 endef
185 193
 
194
+define Package/boost-context
195
+  $(call Package/boost/Default)
196
+  TITLE+= (context)
197
+endef
198
+
199
+define Package/boost-container
200
+  $(call Package/boost/Default)
201
+  TITLE+= (container)
202
+endef
203
+
204
+define Package/boost-coroutine
205
+  $(call Package/boost/Default)
206
+  TITLE+= (coroutine)
207
+  DEPENDS+= +boost-system +boost-chrono +boost-context +boost-thread
208
+endef
209
+
210
+define Package/boost-log
211
+  $(call Package/boost/Default)
212
+  TITLE+= (log)
213
+  DEPENDS+= +boost-system +boost-chrono +boost-date_time +boost-thread +boost-filesystem +boost-regex
214
+endef
215
+
186 216
 define Package/boost
187 217
   $(call Package/boost/Default)
188 218
   TITLE+= (header-only)
@@ -200,7 +230,27 @@ endef
200 230
 CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR)
201 231
 TARGET_LDFLAGS += -pthread -lrt
202 232
 
233
+
234
+
235
+
236
+ifneq ($(findstring mips,$(ARCH)),)
237
+    ifeq ($(ARCH),mips64)
238
+        BOOST_ABI = 64
239
+    else ifeq ($(ARCH),octeon)
240
+        BOOST_ABI = 64
241
+    else
242
+        BOOST_ABI = o32
243
+    endif
244
+else ifeq ($(ARCH),arm)
245
+	BOOST_ABI = aapcs
246
+else
247
+	BOOST_ABI = sysv
248
+endif
249
+
250
+
251
+
203 252
 define Build/Compile
253
+	echo "Selected Boost API $(BOOST_ABI) for architecture $(ARCH) and cpu $(CPU_TYPE) $(CPU_SUBTYPE)";
204 254
 	( cd $(PKG_BUILD_DIR) ; \
205 255
 		echo "using gcc : $(ARCH) : $(GNU_TARGET_NAME)-gcc : <compileflags>\"$(TARGET_CFLAGS)\" <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > tools/build/src/user-config.jam ; \
206 256
 		$(if $(CONFIG_PACKAGE_boost-python), \
@@ -209,7 +259,7 @@ define Build/Compile
209 259
 		) \
210 260
 		bjam \
211 261
 			'-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
212
-			--toolset=gcc-$(ARCH) --build-type=minimal --layout=system \
262
+			--toolset=gcc-$(ARCH) --build-type=minimal --layout=system abi=$(BOOST_ABI) \
213 263
 			--disable-long-double \
214 264
 			$(CONFIGURE_ARGS) \
215 265
 			$(if $(CONFIG_PACKAGE_boost-atomic),,--without-atomic) \
@@ -220,7 +270,8 @@ define Build/Compile
220 270
 			$(if $(CONFIG_PACKAGE_boost-graph),,--without-graph) \
221 271
 			$(if $(CONFIG_PACKAGE_boost-graph_parallel),,--without-graph_parallel) \
222 272
 			$(if $(CONFIG_PACKAGE_boost-iostreams),,--without-iostreams) \
223
-			$(if $(CONFIG_PACKAGE_boost-locale),,--without-locale) \
273
+			$(if $(CONFIG_PACKAGE_boost-locale),boost.locale.iconv=on -sICONV_PATH=$(ICONV_PREFIX) boost.locale.posix=$(if $(USE_UCLIBC),on,off), \
274
+				--without-locale boost.locale.iconv=off) \
224 275
 			$(if $(CONFIG_PACKAGE_boost-math),,--without-math) \
225 276
 			$(if $(CONFIG_PACKAGE_boost-mpi),,--without-mpi) \
226 277
 			$(if $(CONFIG_PACKAGE_boost-program_options),,--without-program_options) \
@@ -234,6 +285,10 @@ define Build/Compile
234 285
 			$(if $(CONFIG_PACKAGE_boost-thread),,--without-thread) \
235 286
 			$(if $(CONFIG_PACKAGE_boost-timer),,--without-timer) \
236 287
 			$(if $(CONFIG_PACKAGE_boost-wave),,--without-wave) \
288
+			$(if $(CONFIG_PACKAGE_boost-context),,--without-context) \
289
+			$(if $(CONFIG_PACKAGE_boost-container),,--without-container) \
290
+			$(if $(CONFIG_PACKAGE_boost-coroutine),,--without-coroutine) \
291
+			$(if $(CONFIG_PACKAGE_boost-log),,--without-log) \
237 292
 			\
238 293
 			$(if $(CONFIG_PACKAGE_boost-iostreams),-sNO_BZIP2=1 -sZLIB_INCLUDE=$(STAGING_DIR)/usr/include \
239 294
 				-sZLIB_LIBPATH=$(STAGING_DIR)/usr/lib) \
@@ -373,6 +428,24 @@ define Package/boost-wave/install
373 428
   $(call Package/boost/Default/install,$(1),wave)
374 429
 endef
375 430
 
431
+define Package/boost-context/install
432
+  $(call Package/boost/Default/install,$(1),context)
433
+endef
434
+
435
+define Package/boost-container/install
436
+  $(call Package/boost/Default/install,$(1),container)
437
+endef
438
+
439
+define Package/boost-coroutine/install
440
+  $(call Package/boost/Default/install,$(1),coroutine)
441
+endef
442
+
443
+define Package/boost-log/install
444
+  $(call Package/boost/Default/install,$(1),log)
445
+endef
446
+
447
+
448
+
376 449
 $(eval $(call HostBuild))
377 450
 $(eval $(call BuildPackage,boost))
378 451
 $(eval $(call BuildPackage,boost-atomic))
@@ -397,3 +470,7 @@ $(eval $(call BuildPackage,boost-test))
397 470
 $(eval $(call BuildPackage,boost-thread))
398 471
 $(eval $(call BuildPackage,boost-timer))
399 472
 $(eval $(call BuildPackage,boost-wave))
473
+$(eval $(call BuildPackage,boost-context))
474
+$(eval $(call BuildPackage,boost-container))
475
+$(eval $(call BuildPackage,boost-coroutine))
476
+$(eval $(call BuildPackage,boost-log))