kumquat-buildroot/package/cppcms/cppcms.mk
Thomas Petazzoni 02e678ef94 cppcms: fix build with ICU
Since the bump of ICU to 59.1, it needs C++11. cppcms has been updated
with the appropriate dependency on gcc >= 4.8, but it also needs
-std=c++11. Therefore, this patch complements the CXXFLAGS passed to
cppcms by adding what icu-config reports, in a manner similar to what
was done to fix the same issue in the PHP package in commit
214a76d045 ("package/php: fix icu
support").

Fixes:

  http://autobuild.buildroot.net/results/f05d9999f1f3248b6a50f14de476108028ed047e/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-22 22:39:01 +02:00

43 lines
1.4 KiB
Makefile

################################################################################
#
# cppcms
#
################################################################################
CPPCMS_VERSION = 1.0.5
CPPCMS_SOURCE = cppcms-$(CPPCMS_VERSION).tar.bz2
CPPCMS_LICENSE = LGPL-3.0
CPPCMS_LICENSE_FILES = COPYING.TXT
CPPCMS_SITE = http://downloads.sourceforge.net/project/cppcms/cppcms/$(CPPCMS_VERSION)
CPPCMS_INSTALL_STAGING = YES
CPPCMS_CXXFLAGS = $(TARGET_CXXFLAGS)
# disable rpath to avoid getting /usr/lib added to the link search
# path
CPPCMS_CONF_OPTS = \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_CXX_FLAGS="$(CPPCMS_CXXFLAGS)"
CPPCMS_DEPENDENCIES = zlib pcre libgcrypt
ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y)
CPPCMS_CONF_OPTS += -DDISABLE_ICONV=ON
CPPCMS_DEPENDENCIES += icu
CPPCMS_CXXFLAGS += "`$(STAGING_DIR)/usr/bin/icu-config --cxxflags`"
endif
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
# posix backend needs monetary.h which isn't available on uClibc
CPPCMS_CONF_OPTS += -DDISABLE_POSIX_LOCALE=on
endif
# We copy cppcms_tmpl_cc from staging to host because this file can be
# needed for compiling packages using cppcms. And it is not worth
# creating a host package just for a python script.
define CPPCMS_INSTALL_HOST_TOOLS
cp $(STAGING_DIR)/usr/bin/cppcms_tmpl_cc $(HOST_DIR)/bin/cppcms_tmpl_cc
endef
CPPCMS_POST_INSTALL_STAGING_HOOKS += CPPCMS_INSTALL_HOST_TOOLS
$(eval $(cmake-package))