From patchwork Wed Dec 11 17:58:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 300242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 44BEF2C00B8 for ; Thu, 12 Dec 2013 04:58:15 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 170608B7A3; Wed, 11 Dec 2013 17:58:15 +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 MBdPofwPBet0; Wed, 11 Dec 2013 17:58:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 27BC78B1AF; Wed, 11 Dec 2013 17:58:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C6F631CE869 for ; Wed, 11 Dec 2013 17:58:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C36C98AAA6 for ; Wed, 11 Dec 2013 17:58:11 +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 g8+YffCYur01 for ; Wed, 11 Dec 2013 17:58:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs01.rockwellcollins.com (secvs01.rockwellcollins.com [205.175.225.240]) by whitealder.osuosl.org (Postfix) with ESMTPS id D11A688737 for ; Wed, 11 Dec 2013 17:58:10 +0000 (UTC) Received: from nosuchhost.198.131.in-addr.arpa (HELO collinscrsmtp02.rockwellcollins.com) ([131.198.63.133]) by mail-virt.rockwellcollins.com with ESMTP; 11 Dec 2013 11:58:08 -0600 Received: from nunkun.rockwellcollins.com ([131.198.63.11]) by collinscrsmtp02.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013121111580848-1019301 ; Wed, 11 Dec 2013 11:58:08 -0600 From: Ryan Barnett To: buildroot@busybox.net Date: Wed, 11 Dec 2013 11:58:03 -0600 Message-Id: <1386784684-6546-1-git-send-email-rjbarnet@rockwellcollins.com> X-Mailer: git-send-email 1.7.9.5 X-MIMETrack: Itemize by SMTP Server on CollinsCRSMTP02/CedarRapids/RockwellCollins(Release 8.5.2FP2 HF162|May 16, 2011) at 12/11/2013 11:58:08 AM, Serialize by Router on CollinsCRSMTP02/CedarRapids/RockwellCollins(Release 8.5.2FP2 HF162|May 16, 2011) at 12/11/2013 11:58:08 AM, Serialize complete at 12/11/2013 11:58:08 AM X-TNEFEvaluated: 1 Subject: [Buildroot] [PATCH 1/2] pkg-generick.mk: support for multiple patch dirs X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net Adding support for specifying multiple directories in BR2_GLOBAL_PATCH_DIR. This will allow for a layered approach for the patching of a package. --- Config.in | 20 ++++++++++++-------- package/pkg-generic.mk | 5 ++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Config.in b/Config.in index 2b401cb..be9a352 100644 --- a/Config.in +++ b/Config.in @@ -461,18 +461,22 @@ config BR2_PACKAGE_OVERRIDE_FILE Buildroot documentation for more details on this feature. config BR2_GLOBAL_PATCH_DIR - string "global patch directory" + string "global patch directories" help - You may specify a directory containing global package patches. - For a specific version of a specific package - , patches are applied as follows. + You may specify a space seperated list of one or more directories + containing global package patches. For a specific version + of a specific package , patches are + applied as follows: - First, the default Buildroot patch set for the package is applied. + First, the default Buildroot patch set for the package is applied + from 'package/'. - If the directory $(BR2_GLOBAL_PATCH_DIR)// - exists, then all *.patch files in the directory will be applied. + Then for every directory - - that exists in + BR2_GLOBAL_PATCH_DIR, if the directory + /// exists, then all + *.patch files in this directory will be applied. - Otherwise, if the directory $(BR2_GLOBAL_PATCH_DIR)/ exists, + Otherwise, if the directory / exists, then all *.patch files in the directory will be applied. endmenu diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 1fce71b..53d96c9 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -134,8 +134,11 @@ endif # The RAWNAME variable is the lowercased package name, which allows to # find the package directory (typically package/) and the # prefix of the patches +# +# For BR2_GLOBAL_PATCH_DIR, only generate if it is defined $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) -$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(call qstrip,$(BR2_GLOBAL_PATCH_DIR))/$(RAWNAME) +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $($(PKG)_DIR_PREFIX)/$(RAWNAME) +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS += $(if $(BR2_GLOBAL_PATCH_DIR),$(foreach pdir,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)),$(pdir)/$(RAWNAME))) $(BUILD_DIR)/%/.stamp_patched: @$(call step_start,patch) @$(call MESSAGE,"Patching")