From patchwork Tue Dec 10 21:59:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1207306 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=none (p=none dis=none) header.from=bootlin.com 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 47XYry6Kwxz9sPK for ; Wed, 11 Dec 2019 09:00:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D05C2228E3; Tue, 10 Dec 2019 22:00:14 +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 shoc6mp3PwlJ; Tue, 10 Dec 2019 22:00:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 6BDD6228A4; Tue, 10 Dec 2019 22:00:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id CA3111BF580 for ; Tue, 10 Dec 2019 22:00:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C586688427 for ; Tue, 10 Dec 2019 22:00:02 +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 oEW155DZHG4I for ; Tue, 10 Dec 2019 22:00:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by hemlock.osuosl.org (Postfix) with ESMTPS id A14728847C for ; Tue, 10 Dec 2019 22:00:00 +0000 (UTC) X-Originating-IP: 86.210.146.109 Received: from localhost (amarseille-658-1-11-109.w86-210.abo.wanadoo.fr [86.210.146.109]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id AFF9F2000A; Tue, 10 Dec 2019 21:59:58 +0000 (UTC) From: Thomas Petazzoni To: "Yann E. MORIN" , "Arnout Vandecappelle (Essensium/Mind)" , Buildroot List Date: Tue, 10 Dec 2019 22:59:41 +0100 Message-Id: <20191210215952.902477-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191210215952.902477-1-thomas.petazzoni@bootlin.com> References: <20191210215952.902477-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 02/12] package/pkg-utils.mk: add extractor-pkg-dependency macro 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: Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" To extract some archive types, if the extracting tool is not available on the system where Buildroot runs on, we build it using a Buildroot host package. Such dependencies are currently explicitly handled by the inner-generic-package macro, but in fact we also need to handle them in all places where the "suitable-extractor" macro is invoked, and some packages invoke it directly. Otherwise, such packages may be missing a dependency to the appropriate host Buildroot package building the extracting tool they need. An example is gettext-tiny, whose source code is a gzip-compressed tarball, but in addition manually extracts a xz-compressed tarball. This extractor-pkg-dependency macro will be used in follow-up commits to ensure all the packages that use suitable-extractor properly add the correct dependencies. Signed-off-by: Thomas Petazzoni --- package/pkg-utils.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 0f916d81d8..35a441e0aa 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -46,6 +46,14 @@ INFLATE.tar = cat # suitable-extractor(filename): returns extractor based on suffix suitable-extractor = $(INFLATE$(suffix $(1))) +EXTRACTOR_PKG_DEPENDENCY.lzma = $(BR2_XZCAT_HOST_DEPENDENCY) +EXTRACTOR_PKG_DEPENDENCY.xz = $(BR2_XZCAT_HOST_DEPENDENCY) +EXTRACTOR_PKG_DEPENDENCY.lz = $(BR2_LZIP_HOST_DEPENDENCY) + +# extractor-pkg-dependency(filename): returns a Buildroot package +# dependency needed to extract file based on suffix +extractor-pkg-dependency = $(EXTRACTOR_PKG_DEPENDENCY$(suffix $(1))) + # extractor-system-dependency(filename): returns the name of the tool # needed to extract 'filename', and is meant to be used with # DL_TOOLS_DEPENDENCIES, in order to check that the necesary tool is