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
|
|
|
|
2016-06-04 15:17:36 +02:00
|
|
|
BOOST_VERSION = 1.61.0
|
package: unification of use $(subst [._-], [._-], $(<PKG>_VERSION)) macro
Currently, there are five packages which use 'subst' macro to change their version.
* Three of them (ebtables, icu, perl) use this macro "in place" :
EBTABLES_SITE = http://downloads.sourceforge.net/project/ebtables/ebtables/ebtables-$(subst .,-,$(EBTABLES_VERSION))
ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz
PERL_CROSS_OLD_POD = perl$(subst .,,$(PERL_CROSS_BASE_VERSION))delta.pod
PERL_CROSS_NEW_POD = perl$(subst .,,$(PERL_VERSION))delta.pod
* Two of them (boost, libnss) use an additional variable :
BOOST_FILE_VERSION = $(subst .,_,$(BOOST_VERSION))
BOOST_SOURCE = boost_$(BOOST_FILE_VERSION).tar.bz2
LIBNSS_SITE_VERSION = $(subst .,_,$(LIBNSS_VERSION))
LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(LIBNSS_SITE_VERSION)_RTM/src
* Additionally two packages (duma, rings) doesn't use it at all :
DUMA_VERSION = 2_5_15
DUMA_SITE = http://downloads.sourceforge.net/project/duma/duma/2.5.15
RINGS_VERSION_MAJOR = 1.3.0
RINGS_SUBDIR = rings-v_1_3_0
This commit makes changes to use 'subst' macro "in place", in all of them.
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-14 11:30:58 +01:00
|
|
|
BOOST_SOURCE = boost_$(subst .,_,$(BOOST_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
|
|
|
|
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 \
|
2015-12-11 14:57:59 +01:00
|
|
|
coroutine coroutine2 date_time exception filesystem graph \
|
|
|
|
graph_parallel iostreams locale log math mpi program_options python \
|
2016-07-02 17:29:52 +02:00
|
|
|
random regex serialization signals system test thread timer type_erasure \
|
|
|
|
wave)
|
2013-12-02 14:00:11 +01:00
|
|
|
|
2015-03-12 10:44:24 +01:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_ATOMIC),,atomic)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
|
2015-04-20 12:15:02 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTAINER),,container)
|
2013-04-15 01:10:31 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context)
|
2015-11-03 17:59:38 +01:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_COROUTINE),,coroutine)
|
2015-12-11 14:57:59 +01:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_COROUTINE2),,coroutine2)
|
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)
|
2014-10-20 15:27:24 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOG),,log)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MATH),,math)
|
2016-06-04 15:17:37 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_METAPARSE),,metaparse)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MPI),,mpi)
|
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),,program_options)
|
2014-03-10 09:38:48 +01:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PYTHON),,python)
|
2011-10-13 12:39:12 +02:00
|
|
|
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)
|
2016-07-02 17:29:52 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TYPE_ERASURE),,type_erasure)
|
2011-10-13 12:39:12 +02:00
|
|
|
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave)
|
|
|
|
|
2014-03-10 09:38:48 +01:00
|
|
|
BOOST_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS)
|
|
|
|
|
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
|
|
|
|
|
2014-03-10 09:38:48 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BOOST_PYTHON),y)
|
|
|
|
BOOST_FLAGS += --with-python-root=$(HOST_DIR)
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
|
|
|
BOOST_FLAGS += --with-python=$(HOST_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)
|
|
|
|
BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m
|
|
|
|
BOOST_DEPENDENCIES += python3
|
|
|
|
else
|
|
|
|
BOOST_FLAGS += --with-python=$(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)
|
|
|
|
BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)
|
|
|
|
BOOST_DEPENDENCIES += python
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-09-27 21:32:50 +02:00
|
|
|
HOST_BOOST_OPTS += toolset=gcc threading=multi variant=release link=shared \
|
2013-12-02 14:00:11 +01:00
|
|
|
runtime-link=shared
|
|
|
|
|
2014-09-06 19:36:02 +02:00
|
|
|
ifeq ($(BR2_MIPS_OABI32),y)
|
|
|
|
BOOST_ABI = o32
|
|
|
|
else ifeq ($(BR2_arm),y)
|
|
|
|
BOOST_ABI = aapcs
|
|
|
|
else
|
|
|
|
BOOST_ABI = sysv
|
|
|
|
endif
|
|
|
|
|
2014-09-27 21:32:50 +02:00
|
|
|
BOOST_OPTS += toolset=gcc \
|
2013-01-15 01:45:26 +01:00
|
|
|
threading=multi \
|
2014-09-06 19:36:02 +02:00
|
|
|
abi=$(BOOST_ABI) \
|
2015-10-25 10:52:53 +01:00
|
|
|
variant=$(if $(BR2_ENABLE_DEBUG),debug,release)
|
|
|
|
|
2015-11-03 22:03:14 +01:00
|
|
|
ifeq ($(BR2_sparc64),y)
|
|
|
|
BOOST_OPTS += architecture=sparc instruction-set=ultrasparc
|
|
|
|
endif
|
|
|
|
|
2015-11-15 13:24:55 +01:00
|
|
|
ifeq ($(BR2_sparc),y)
|
|
|
|
BOOST_OPTS += architecture=sparc instruction-set=v8
|
|
|
|
endif
|
|
|
|
|
2015-10-25 10:52:53 +01:00
|
|
|
# By default, Boost build and installs both the shared and static
|
|
|
|
# variants. Override that if we want static only or shared only.
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
BOOST_OPTS += link=static runtime-link=static
|
|
|
|
else ifeq ($(BR2_SHARED_LIBS),y)
|
|
|
|
BOOST_OPTS += link=shared runtime-link=shared
|
|
|
|
endif
|
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
|
2014-09-27 21:32:50 +02:00
|
|
|
BOOST_OPTS += boost.locale.posix=off
|
2012-04-16 21:46:46 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
BOOST_DEPENDENCIES += $(if $(BR2_ENABLE_LOCALE),,libiconv)
|
|
|
|
endif
|
|
|
|
|
2015-10-25 08:09:23 +01:00
|
|
|
BOOST_WITHOUT_FLAGS_COMMASEPARATED += $(subst $(space),$(comma),$(strip $(BOOST_WITHOUT_FLAGS)))
|
|
|
|
BOOST_FLAGS += $(if $(BOOST_WITHOUT_FLAGS_COMMASEPARATED), --without-libraries=$(BOOST_WITHOUT_FLAGS_COMMASEPARATED))
|
2014-03-15 05:27:52 +01:00
|
|
|
BOOST_LAYOUT = $(call qstrip, $(BR2_PACKAGE_BOOST_LAYOUT))
|
2011-10-13 12:39:12 +02:00
|
|
|
|
2015-12-05 15:00:23 +01:00
|
|
|
# how verbose should the build be?
|
|
|
|
BOOST_OPTS += $(if $(QUIET),-d,-d+1)
|
|
|
|
HOST_BOOST_OPTS += $(if $(QUIET),-d,-d+1)
|
|
|
|
|
2011-10-13 12:39:12 +02:00
|
|
|
define BOOST_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS))
|
2015-07-12 16:35:28 +02:00
|
|
|
echo "using gcc : `$(TARGET_CC) -dumpversion` : $(TARGET_CXX) : <cxxflags>\"$(BOOST_TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam
|
2011-10-13 12:39:12 +02:00
|
|
|
echo "" >> $(@D)/user-config.jam
|
|
|
|
endef
|
|
|
|
|
2015-12-05 15:35:46 +01:00
|
|
|
define BOOST_BUILD_CMDS
|
|
|
|
(cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -q \
|
|
|
|
--user-config=$(@D)/user-config.jam \
|
|
|
|
$(BOOST_OPTS) \
|
|
|
|
--ignore-site-config \
|
|
|
|
--layout=$(BOOST_LAYOUT))
|
|
|
|
endef
|
|
|
|
|
2011-10-13 12:39:12 +02:00
|
|
|
define BOOST_INSTALL_TARGET_CMDS
|
2015-12-05 15:00:23 +01:00
|
|
|
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \
|
2011-10-13 12:39:12 +02:00
|
|
|
--user-config=$(@D)/user-config.jam \
|
2014-09-27 21:32:50 +02:00
|
|
|
$(BOOST_OPTS) \
|
2011-10-13 12:39:12 +02:00
|
|
|
--prefix=$(TARGET_DIR)/usr \
|
2014-10-28 11:49:11 +01:00
|
|
|
--ignore-site-config \
|
2014-03-15 05:27:52 +01:00
|
|
|
--layout=$(BOOST_LAYOUT) install )
|
2011-10-13 12:39:12 +02:00
|
|
|
endef
|
|
|
|
|
2015-12-05 15:05:32 +01:00
|
|
|
define BOOST_INSTALL_STAGING_CMDS
|
|
|
|
(cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -q \
|
|
|
|
--user-config=$(@D)/user-config.jam \
|
|
|
|
$(BOOST_OPTS) \
|
|
|
|
--prefix=$(STAGING_DIR)/usr \
|
|
|
|
--ignore-site-config \
|
|
|
|
--layout=$(BOOST_LAYOUT) install)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_BOOST_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS))
|
|
|
|
echo "using gcc : `$(HOST_CC) -dumpversion` : $(HOSTCXX) : <cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam
|
|
|
|
echo "" >> $(@D)/user-config.jam
|
|
|
|
endef
|
|
|
|
|
2013-12-02 14:00:11 +01:00
|
|
|
define HOST_BOOST_BUILD_CMDS
|
2015-12-05 15:00:23 +01:00
|
|
|
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \
|
2013-12-02 14:00:11 +01:00
|
|
|
--user-config=$(@D)/user-config.jam \
|
2014-09-27 21:32:50 +02:00
|
|
|
$(HOST_BOOST_OPTS) \
|
2014-10-28 11:49:11 +01:00
|
|
|
--ignore-site-config \
|
2013-12-02 14:00:11 +01:00
|
|
|
--prefix=$(HOST_DIR)/usr )
|
|
|
|
endef
|
|
|
|
|
|
|
|
define HOST_BOOST_INSTALL_CMDS
|
2015-12-05 15:00:23 +01:00
|
|
|
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \
|
2013-12-02 14:00:11 +01:00
|
|
|
--user-config=$(@D)/user-config.jam \
|
2014-09-27 21:32:50 +02:00
|
|
|
$(HOST_BOOST_OPTS) \
|
2013-12-02 14:00:11 +01:00
|
|
|
--prefix=$(HOST_DIR)/usr \
|
2014-10-28 11:49:11 +01:00
|
|
|
--ignore-site-config \
|
2014-03-15 05:27:52 +01:00
|
|
|
--layout=$(BOOST_LAYOUT) install )
|
2013-12-02 14:00:11 +01:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|
2013-12-02 14:00:11 +01:00
|
|
|
$(eval $(host-generic-package))
|