2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-10-13 12:39:12 +02:00
|
|
|
#
|
2013-06-06 01:53:28 +02:00
|
|
|
# boost
|
2011-10-13 12:39:12 +02:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-10-13 12:39:12 +02:00
|
|
|
|
2013-10-10 17:56:58 +02:00
|
|
|
BOOST_VERSION = 1.54.0
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_FILE_VERSION = $(subst .,_,$(BOOST_VERSION))
|
|
|
|
BOOST_SOURCE = boost_$(BOOST_FILE_VERSION).tar.bz2
|
2012-08-26 01:52:48 +02:00
|
|
|
BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSION)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_INSTALL_STAGING = YES
|
2013-12-11 14:23:48 +01:00
|
|
|
BOOST_LICENSE = Boost Software License 1.0
|
|
|
|
BOOST_LICENSE_FILES = LICENSE_1_0.txt
|
2011-10-13 12:39:12 +02:00
|
|
|
|
2012-04-16 15:06:55 +02:00
|
|
|
TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion)
|
2013-12-02 14:00:11 +01:00
|
|
|
HOST_CC_VERSION = $(shell $(HOSTCC) -dumpversion)
|
2011-10-13 12:39:12 +02:00
|
|
|
|
2013-12-10 15:10:57 +01:00
|
|
|
HOST_BOOST_DEPENDENCIES =
|
2013-02-06 07:27:16 +01:00
|
|
|
|
2013-12-02 14:00:11 +01:00
|
|
|
# keep host variant as minimal as possible
|
|
|
|
HOST_BOOST_FLAGS = --without-icu \
|
|
|
|
--without-libraries=$(subst $(space),$(comma),atomic chrono context \
|
|
|
|
coroutine date_time exception filesystem graph graph_parallel \
|
|
|
|
iostreams locale log math mpi program_options python random regex \
|
|
|
|
serialization signals system test thread timer wave)
|
|
|
|
|
2013-02-06 07:27:16 +01:00
|
|
|
# atomic library compile only with upstream version, wait for next release
|
2013-10-14 16:15:11 +02:00
|
|
|
# coroutine breaks on some weak toolchains and it's new for 1.54+
|
|
|
|
# log breaks with some toolchain combinations and it's new for 1.54+
|
|
|
|
BOOST_WITHOUT_FLAGS = atomic coroutine log python
|
2011-10-13 12:39:12 +02:00
|
|
|
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
|
2013-04-15 01:10:31 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_DATE_TIME),,date_time)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_EXCEPTION),,exception)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_FILESYSTEM),,filesystem)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH),,graph)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH_PARALLEL),,graph_parallel)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_IOSTREAMS),,iostreams)
|
2012-04-16 21:46:46 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOCALE),,locale)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MATH),,math)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MPI),,mpi)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),,program_options)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_RANDOM),,random)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_REGEX),,regex)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SERIALIZATION),,serialization)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SIGNALS),,signals)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SYSTEM),,system)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TEST),,test)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_THREAD),,thread)
|
2012-04-16 21:46:46 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TIMER),,timer)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave)
|
|
|
|
|
2012-04-16 21:46:46 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ICU),y)
|
2013-02-07 04:48:35 +01:00
|
|
|
BOOST_FLAGS += --with-icu=$(STAGING_DIR)/usr
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_DEPENDENCIES += icu
|
|
|
|
else
|
|
|
|
BOOST_FLAGS += --without-icu
|
|
|
|
endif
|
|
|
|
|
2013-06-11 09:30:03 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y)
|
|
|
|
BOOST_DEPENDENCIES += bzip2 zlib
|
|
|
|
endif
|
|
|
|
|
2013-12-02 14:00:11 +01:00
|
|
|
HOST_BOOST_OPT += toolset=gcc threading=multi variant=release link=shared \
|
|
|
|
runtime-link=shared
|
|
|
|
|
2012-04-16 22:01:17 +02:00
|
|
|
BOOST_OPT += toolset=gcc \
|
2013-01-15 01:45:26 +01:00
|
|
|
threading=multi \
|
2012-04-16 22:01:17 +02:00
|
|
|
variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \
|
|
|
|
link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) \
|
2013-01-15 01:45:26 +01:00
|
|
|
runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared)
|
2012-04-16 22:01:17 +02:00
|
|
|
|
2012-04-16 21:46:46 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y)
|
2013-06-30 21:29:09 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
2012-04-16 21:46:46 +02:00
|
|
|
# posix backend needs monetary.h which isn't available on uClibc
|
|
|
|
BOOST_OPT += boost.locale.posix=off
|
|
|
|
endif
|
|
|
|
|
|
|
|
BOOST_DEPENDENCIES += $(if $(BR2_ENABLE_LOCALE),,libiconv)
|
|
|
|
endif
|
|
|
|
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS_COMMASEPERATED += $(subst $(space),$(comma),$(strip $(BOOST_WITHOUT_FLAGS)))
|
|
|
|
BOOST_FLAGS += $(if $(BOOST_WITHOUT_FLAGS_COMMASEPERATED), --without-libraries=$(BOOST_WITHOUT_FLAGS_COMMASEPERATED))
|
|
|
|
|
|
|
|
define BOOST_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS))
|
2012-01-30 17:58:22 +01:00
|
|
|
echo "using gcc : $(TARGET_CC_VERSION) : $(TARGET_CXX) : <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam
|
2011-10-13 12:39:12 +02:00
|
|
|
echo "" >> $(@D)/user-config.jam
|
|
|
|
endef
|
|
|
|
|
2013-12-02 14:00:11 +01:00
|
|
|
define HOST_BOOST_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS))
|
|
|
|
echo "using gcc : $(HOST_CC_VERSION) : $(HOSTCXX) : <cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam
|
|
|
|
echo "" >> $(@D)/user-config.jam
|
|
|
|
endef
|
|
|
|
|
2011-10-13 12:39:12 +02:00
|
|
|
define BOOST_INSTALL_TARGET_CMDS
|
2013-01-15 01:45:27 +01:00
|
|
|
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
|
2011-10-13 12:39:12 +02:00
|
|
|
--user-config=$(@D)/user-config.jam \
|
2012-04-16 21:46:46 +02:00
|
|
|
$(BOOST_OPT) \
|
2011-10-13 12:39:12 +02:00
|
|
|
--prefix=$(TARGET_DIR)/usr \
|
|
|
|
--layout=system install )
|
|
|
|
endef
|
|
|
|
|
2013-12-02 14:00:11 +01:00
|
|
|
define HOST_BOOST_BUILD_CMDS
|
|
|
|
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
|
|
|
|
--user-config=$(@D)/user-config.jam \
|
|
|
|
$(HOST_BOOST_OPT) \
|
|
|
|
--prefix=$(HOST_DIR)/usr )
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_BOOST_INSTALL_CMDS
|
|
|
|
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
|
|
|
|
--user-config=$(@D)/user-config.jam \
|
|
|
|
$(HOST_BOOST_OPT) \
|
|
|
|
--prefix=$(HOST_DIR)/usr \
|
|
|
|
--layout=system install )
|
|
|
|
endef
|
|
|
|
|
2011-10-13 12:39:12 +02:00
|
|
|
define BOOST_INSTALL_STAGING_CMDS
|
2013-01-15 01:45:27 +01:00
|
|
|
(cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \
|
2011-10-13 12:39:12 +02:00
|
|
|
--user-config=$(@D)/user-config.jam \
|
2012-04-16 21:46:46 +02:00
|
|
|
$(BOOST_OPT) \
|
2011-10-13 12:39:12 +02:00
|
|
|
--prefix=$(STAGING_DIR)/usr \
|
|
|
|
--layout=system install)
|
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|
2013-12-02 14:00:11 +01:00
|
|
|
$(eval $(host-generic-package))
|