kumquat-buildroot/package/boost/boost.mk
Jerzy Grzegorek c4cc84afc6 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 14:54:31 +01:00

130 lines
4.9 KiB
Makefile

################################################################################
#
# boost
#
################################################################################
BOOST_VERSION = 1.55.0
BOOST_SOURCE = boost_$(subst .,_,$(BOOST_VERSION)).tar.bz2
BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSION)
BOOST_INSTALL_STAGING = YES
BOOST_LICENSE = Boost Software License 1.0
BOOST_LICENSE_FILES = LICENSE_1_0.txt
TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion)
HOST_CC_VERSION = $(shell $(HOSTCC) -dumpversion)
HOST_BOOST_DEPENDENCIES =
# 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)
# atomic library compile only with upstream version, wait for next release
# 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
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context)
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)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOCALE),,locale)
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)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TIMER),,timer)
BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave)
ifeq ($(BR2_PACKAGE_ICU),y)
BOOST_FLAGS += --with-icu=$(STAGING_DIR)/usr
BOOST_DEPENDENCIES += icu
else
BOOST_FLAGS += --without-icu
endif
ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y)
BOOST_DEPENDENCIES += bzip2 zlib
endif
HOST_BOOST_OPT += toolset=gcc threading=multi variant=release link=shared \
runtime-link=shared
BOOST_OPT += toolset=gcc \
threading=multi \
variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \
link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) \
runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared)
ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y)
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# 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
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))
echo "using gcc : $(TARGET_CC_VERSION) : $(TARGET_CXX) : <cxxflags>\"$(TARGET_CXXFLAGS)\" <linkflags>\"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam
echo "" >> $(@D)/user-config.jam
endef
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
define BOOST_INSTALL_TARGET_CMDS
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
--user-config=$(@D)/user-config.jam \
$(BOOST_OPT) \
--prefix=$(TARGET_DIR)/usr \
--layout=system install )
endef
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
define BOOST_INSTALL_STAGING_CMDS
(cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \
--user-config=$(@D)/user-config.jam \
$(BOOST_OPT) \
--prefix=$(STAGING_DIR)/usr \
--layout=system install)
endef
$(eval $(generic-package))
$(eval $(host-generic-package))