From patchwork Tue Jul 25 18:41:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 793593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xH6XH2RcJz9ryv for ; Wed, 26 Jul 2017 04:41:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A8C9889C8B; Tue, 25 Jul 2017 18:41:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pTZ5DohjLOVw; Tue, 25 Jul 2017 18:41:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D6D4589C06; Tue, 25 Jul 2017 18:41:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B76A21C0F65 for ; Tue, 25 Jul 2017 18:41:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 786C887126 for ; Tue, 25 Jul 2017 18:41:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zwabISwIkUQs for ; Tue, 25 Jul 2017 18:41:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3F75786E73 for ; Tue, 25 Jul 2017 18:41:26 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id D62B821D74; Tue, 25 Jul 2017 20:41:22 +0200 (CEST) Received: from localhost (LFbn-1-10680-2.w90-89.abo.wanadoo.fr [90.89.33.2]) by mail.free-electrons.com (Postfix) with ESMTPSA id A47A52094A; Tue, 25 Jul 2017 20:41:22 +0200 (CEST) From: Thomas Petazzoni To: buildroot@buildroot.org Date: Tue, 25 Jul 2017 20:41:22 +0200 Message-Id: <20170725184122.13076-1-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.9.4 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] cppcms: fix build with ICU enabled, but CPPCMS_ICU disabled X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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 except 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 --- package/cppcms/cppcms.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/cppcms/cppcms.mk b/package/cppcms/cppcms.mk index e72acb2..f3ea2628 100644 --- a/package/cppcms/cppcms.mk +++ b/package/cppcms/cppcms.mk @@ -21,9 +21,11 @@ CPPCMS_CONF_OPTS = \ CPPCMS_DEPENDENCIES = zlib pcre libgcrypt ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y) -CPPCMS_CONF_OPTS += -DDISABLE_ICONV=ON +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)