From patchwork Mon Apr 8 20:31:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadym Kochan X-Patchwork-Id: 1081472 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="mrMTD+LY"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44dMJj62Q3z9sPC for ; Tue, 9 Apr 2019 06:21:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4D6722342E; Mon, 8 Apr 2019 20:21:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i7yHPa5zzohj; Mon, 8 Apr 2019 20:21:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 4BEC7242F3; Mon, 8 Apr 2019 20:21:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 6B8951BF20D for ; Mon, 8 Apr 2019 20:21:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6281D846EE for ; Mon, 8 Apr 2019 20:21:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id epQnEJa4x7+m for ; Mon, 8 Apr 2019 20:21:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3E54783365 for ; Mon, 8 Apr 2019 20:21:34 +0000 (UTC) Received: by mail-lj1-f179.google.com with SMTP id f23so12510488ljc.0 for ; Mon, 08 Apr 2019 13:21:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=rHg2yKWQ+TldEixXyfSAUJ3vds0jWjPqDJdX9lVGC+U=; b=mrMTD+LYKgb/TQIb7NyW0V1tFC1uUYhDv+huP9ZztJa3jdcIkeyPcFP2yo6iGTnOJQ 9hKVNPcc9/pk/SoduVcuzZE7FC4jJGviKuU45QDzW50cojqEY6iLVFLi6jv3jk5tuvO1 4RkEpEpcV/HFxsRwYLBZrGh9w2QSJ2S/h4xZC77H2h88BaGaOQJvpoDhk2JH0D5Yk92G B5921WMNJSALmY+ZAKSTe7+nxzK5fMSYA9XvE/PpLfyghIJ+KQiM6WcJOVGVwFDP9u/j bV9UY9KUdgOjVpuJt7dimt2wcxDpViYwrJeDCENHNU+5GpkODl++mntw8XJnf7wylMdO 7KxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rHg2yKWQ+TldEixXyfSAUJ3vds0jWjPqDJdX9lVGC+U=; b=GrvrZt3oOpa012JkPGurCRXZVRdy+I0AAyBgeYQyaCT65gkmr0n63Jsmq59TOjofQ+ cdtW4bADo7LdShcDF1mPRLgK4dl24X9uXs4ldJWXinA2ADl2Bvj2ks2jp/xrsfrYoiWO YpXm0nS0IPx+uGrkwxQmhCqKL8gAO4oJ7sjxGlYnhSxdvNT8rF4J3oNlqf2bUmCNE4ec N2TtEnfYBixCtotMjjdOgaahAC062wNOr87pwiSIM+aTllovOZVLLwiGgbMG7rIs4Mm3 I9yYGd3q8OAUeBqqGmcXuV38OL1LvuAjeSQN2ESHQaKo2C6nkj+x0jvT2+H4Ted0jPFC s7Tg== X-Gm-Message-State: APjAAAUtqmRbFJmy3AvbqGr899UZpUmLNgnH80y+htyFahOGN5TsJF53 u3hAK7E3lt67O1HVEWAn/o5w7EMP X-Google-Smtp-Source: APXvYqxxwzIQXQxTmormFuwavvJPL86GmRlcv3/lkWVg4irjCCVCCVBYdz6QE4BQ+uFQ/cAUhRg32A== X-Received: by 2002:a2e:8149:: with SMTP id t9mr18183661ljg.2.1554754892126; Mon, 08 Apr 2019 13:21:32 -0700 (PDT) Received: from vkochan-ThinkPad-T470p.lan ([93.75.250.209]) by smtp.gmail.com with ESMTPSA id n10sm7251258ljh.36.2019.04.08.13.21.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Apr 2019 13:21:31 -0700 (PDT) From: Vadim Kochan To: buildroot@buildroot.org Date: Mon, 8 Apr 2019 23:31:32 +0300 Message-Id: <20190408203132.7740-1-vadim4j@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [Buildroot] [PATCH v3 1/1] package/gettext: Fix GETTEXTIZE is not defined in case of full gettext X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Vadim Kochan MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" After introducing gettext-tiny in: 5367a1b253 package/gettext-tiny: new package GETTEXTIZE variable is conditionally defined separately by gettext-gnu or gettext-tiny package depending on which of them is enabled. But it causes the issue when BR2_TOOLCHAIN_HAS_FULL_GETTEXT=y, because in that case BR2_PACKAGE_GETTEXT is not selected by BR2_SYSTEM_ENABLE_NLS config and GETTEXTIZE is not defined, which causes build fail for packages which uses gettextizing (e.g. host-flex). Fix issue by defining GETTEXTIZE unconditionally in package/gettext/gettext.mk. It is not needed to define it in each gettext-*.mk because the difference is only in passing 'data_dir' parameter which points to ${PREFIX}/share/gettext-tiny (in case of gettext-tiny provider), but simple linking: ${PREFIX}/share/gettext -> ${PREFIX}/share/gettext-tiny solves this issue. Reported-by: Romain Naour Signed-off-by: Vadim Kochan Reviewed-by: Romain Naour --- v3: Make commit message more descriptive and cleaner, also fix 'data_dir' explanation which was not updated in v2. v2: Do not use ${PREFIX}/share/gettext-tiny as 'data_dir' param for gettextize, but instead create link ${PREFIX}/share/gettext -> ${PREFIX}/share/gettext-tiny. It allows to have common invovation of gettextize in package/gettext.mk package/gettext-gnu/gettext-gnu.mk | 4 ---- package/gettext-tiny/gettext-tiny.mk | 10 +++------- package/gettext/gettext.mk | 2 ++ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/package/gettext-gnu/gettext-gnu.mk b/package/gettext-gnu/gettext-gnu.mk index 61adf72738..33a1cbed38 100644 --- a/package/gettext-gnu/gettext-gnu.mk +++ b/package/gettext-gnu/gettext-gnu.mk @@ -95,9 +95,5 @@ endef HOST_GETTEXT_GNU_POST_INSTALL_HOOKS += HOST_GETTEXT_GNU_ADD_ABOUT_NLS -ifeq ($(BR2_PACKAGE_GETTEXT_GNU),y) -GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/bin/autom4te $(HOST_DIR)/bin/gettextize -f -endif - $(eval $(autotools-package)) $(eval $(host-autotools-package)) diff --git a/package/gettext-tiny/gettext-tiny.mk b/package/gettext-tiny/gettext-tiny.mk index 4fa014e8dd..b596cefce8 100644 --- a/package/gettext-tiny/gettext-tiny.mk +++ b/package/gettext-tiny/gettext-tiny.mk @@ -98,6 +98,9 @@ define HOST_GETTEXT_TINY_INSTALL_CMDS $(INSTALL) -m 0644 -D $(@D)/extra/Makevars.template $(HOST_DIR)/share/gettext-tiny/po/Makevars.template $(Q)touch $(HOST_DIR)/share/gettext-tiny/ABOUT-NLS + + # for gettextize + ln -sf $(HOST_DIR)/usr/share/gettext-tiny $(HOST_DIR)/usr/share/gettext endef # Install simple echo wrapper for gettext tool @@ -105,12 +108,5 @@ define GETTEXT_TINY_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(GETTEXT_TINY_PKGDIR)/gettext-wrapper $(TARGET_DIR)/usr/bin/gettext endef -ifeq ($(BR2_SYSTEM_ENABLE_NLS),) -GETTEXTIZE = $(HOST_CONFIGURE_OPTS) \ - AUTOM4TE=$(HOST_DIR)/bin/autom4te \ - gettext_datadir=$(HOST_DIR)/usr/share/gettext-tiny \ - $(HOST_DIR)/bin/gettextize -f -endif - $(eval $(generic-package)) $(eval $(host-generic-package)) diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk index a86e26f69e..146d40e13b 100644 --- a/package/gettext/gettext.mk +++ b/package/gettext/gettext.mk @@ -4,5 +4,7 @@ # ################################################################################ +GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/bin/autom4te $(HOST_DIR)/bin/gettextize -f + $(eval $(virtual-package)) $(eval $(host-virtual-package))