![Thomas Petazzoni](/assets/img/avatar_default.png)
When the ICU package is enabled (BR2_PACKAGE_ICU=y) but ICU support in cppcms is disabled (BR2_PACKAGE_CPPCMS_ICU is disabled), cppcms still detects ICU, but it fails to build since we don't get the proper ICU CXXFLAGS. In addition, this is not the intended behavior: when BR2_PACKAGE_CPPCMS_ICU is disabled, we expect cppcms to be built without ICU support. To achieve this, we pass -DDISABLE_ICU_LOCALE=ON when BR2_PACKAGE_CPPCMS_ICU is disabled (yes DISABLE_ICU_LOCALE means the logic is inverted). While at it, we pass DISABLE_ICU_LOCALE=OFF when ICU support is enabled, and not DISABLE_ICONV=ON. The latter has been passed in this condition since the cppcms package was introduced in Buildroot, but it doesn't seem to make sense. Fixes: http://autobuild.buildroot.net/results/b6a8c7000c5742efc9d8e13507dab86e36b62840/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
45 lines
1.4 KiB
Makefile
45 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_ICU_LOCALE=OFF
|
|
CPPCMS_DEPENDENCIES += icu
|
|
CPPCMS_CXXFLAGS += "`$(STAGING_DIR)/usr/bin/icu-config --cxxflags`"
|
|
else
|
|
CPPCMS_CONF_OPTS += -DDISABLE_ICU_LOCALE=ON
|
|
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))
|