From patchwork Tue Feb 21 17:21:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vincent Fazio X-Patchwork-Id: 1745775 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PLmMH26sqz240n for ; Wed, 22 Feb 2023 04:22:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1CF0C61249; Tue, 21 Feb 2023 17:22:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 1CF0C61249 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sgwh0Q3D6_wl; Tue, 21 Feb 2023 17:22:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 4FD5E61295; Tue, 21 Feb 2023 17:22:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4FD5E61295 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B15501BF42C for ; Tue, 21 Feb 2023 17:22:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8883182B3E for ; Tue, 21 Feb 2023 17:22:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 8883182B3E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YZBjlSSdS4Op for ; Tue, 21 Feb 2023 17:22:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7C9ED82A6C Received: from mail.xes-mad.com (mail.xes-mad.com [162.248.234.2]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7C9ED82A6C for ; Tue, 21 Feb 2023 17:22:19 +0000 (UTC) Received: from vfazio2.xes-mad.com (vfazio2.xes-mad.com [10.52.16.113]) by mail.xes-mad.com (Postfix) with ESMTP id 52A222037D; Tue, 21 Feb 2023 11:22:18 -0600 (CST) From: Vincent Fazio To: buildroot@buildroot.org Date: Tue, 21 Feb 2023 11:21:54 -0600 Message-Id: <20230221172205.2450111-4-vfazio@xes-inc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230221172205.2450111-1-vfazio@xes-inc.com> References: <20230221172205.2450111-1-vfazio@xes-inc.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xes-inc.com; s=mail; t=1677000138; bh=RHmNOsbFC+rd18PZzziMOaI11mYO8xd5rWfJU2W4vc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vK53Iq4MBjSsm8JItvIHN3/5mLGwCPuXTCec8kKQycrFksAIBRohg62WJ2buOOiNi l4MqVoTOtv9brpKN4P5T1LuYOo1b2OdCWbCHHlrzxShyFQ6lQO+ETKTAKFXL82T+9s spo4nlZuB7mpcTcCo//uiwZzJbZCpuJoXSZBpd80= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=xes-inc.com header.i=@xes-inc.com header.a=rsa-sha256 header.s=mail header.b=vK53Iq4M Subject: [Buildroot] [PATCH 04/15] package/pkg-autotools: add FOO_AUTOPOINT flag X-BeenThere: buildroot@buildroot.org 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: Bernd Kuhls , Thomas De Schampheleire , Thomas Petazzoni , Fabrice Fontaine , Vincent Fazio , Joris Lijssens Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Vincent Fazio Add a new variable to run autopoint during autoreconf. This variable depends on FOO_AUTORECONF = YES. It is mutually exclusive to FOO_GETTEXTIZE. If both are set, FOO_AUTOPOINT is ignored to preserve previous behavior. This support is being added per a previous discussion [1]. The usage of gettextize needs to be removed cuz mama says so [2]. ... is not part of the GNU build system, in the sense that it should not be invoked automatically, and not be invoked by someone who doesn’t assume the responsibilities of a package maintainer. For the latter purpose, a separate tool is provided, see Invoking the autopoint Program [3] Using gettextize has the unintended consequence of updating the package based on the version of host-gettext vs what was chosen by the upstream maintainer. As mama said above, we should use autopoint. Do as she says to avoid further scolding (gettextize shoehorning and package patching). [1] https://patchwork.ozlabs.org/project/buildroot/patch/20170827110920.15579-1-aleksander@aleksander.es/ [2] https://www.gnu.org/software/gettext/manual/html_node/gettextize-Invocation.html [3] https://www.gnu.org/software/gettext/manual/html_node/autopoint-Invocation.html Signed-off-by: Vincent Fazio --- package/pkg-autotools.mk | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 418cd10945..48485567d7 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -152,6 +152,15 @@ ifndef $(2)_GETTEXTIZE endif endif +ifndef $(2)_AUTOPOINT + ifdef $(3)_AUTOPOINT + $(2)_AUTOPOINT = $$($(3)_AUTOPOINT) + else + $(2)_AUTOPOINT ?= NO + endif +endif + + ifeq ($(4),host) $(2)_AUTORECONF_OPTS ?= $$($(3)_AUTORECONF_OPTS) endif @@ -240,8 +249,14 @@ ifeq ($$($(2)_AUTORECONF),YES) ifeq ($$($(2)_GETTEXTIZE),YES) $(2)_PRE_CONFIGURE_HOOKS += GETTEXTIZE_HOOK $(2)_DEPENDENCIES += host-gettext -endif $(2)_AUTORECONF_ENV += AUTOPOINT=/bin/true +# autopoint is provided by gettext +else ifeq ($$($(2)_AUTOPOINT),YES) +$(2)_DEPENDENCIES += host-gettext +$(2)_AUTORECONF_ENV += AUTOPOINT=$$(HOST_DIR)/bin/autopoint +else +$(2)_AUTORECONF_ENV += AUTOPOINT=/bin/true +endif $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK # default values are not evaluated yet, so don't rely on this defaulting to YES ifneq ($$($(2)_LIBTOOL_PATCH),NO)