]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
Support for multiple BR2_GLOBAL_PATCH_DIR
authorRyan Barnett <rjbarnet@rockwellcollins.com>
Wed, 18 Dec 2013 10:25:01 +0000 (04:25 -0600)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 25 Dec 2013 16:31:10 +0000 (17:31 +0100)
Adding support for specifying multiple directories in
BR2_GLOBAL_PATCH_DIR. This will allow for a layered approach for the
patching of a package.

Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Config.in
package/pkg-generic.mk

index 2b401cb8a2d1aa31b56fe4930760a440d0c53b6e..d55e57ca0becaf940978fe2869988301b9d729c6 100644 (file)
--- 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 <packageversion> of a specific package
-         <packagename>, patches are applied as follows.
+         You may specify a space separated list of one or more directories
+         containing global package patches. For a specific version
+         <packageversion> of a specific package <packagename>, 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 the package's directory in Buildroot.
 
-         If the directory $(BR2_GLOBAL_PATCH_DIR)/<packagename>/<packageversion>
-         exists, then all *.patch files in the directory will be applied.
+         Then for every directory - <global-patch-dir> - that exists in
+         BR2_GLOBAL_PATCH_DIR, if the directory
+         <global-patch-dir>/<packagename>/<packageversion>/ exists, then all
+         *.patch files in this directory will be applied.
 
-         Otherwise, if the directory $(BR2_GLOBAL_PATCH_DIR)/<packagename> exists,
+         Otherwise, if the directory <global-patch-dir>/<packagename> exists,
          then all *.patch files in the directory will be applied.
 
 endmenu
index 45b808a6953848eef2eb394ae5db8f7a1ce4889c..66034bac6b4dac66c7ad316c668df628183fae20 100644 (file)
@@ -134,8 +134,11 @@ endif
 # The RAWNAME variable is the lowercased package name, which allows to
 # find the package directory (typically package/<pkgname>) 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 += $(addsuffix /$(RAWNAME),$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)))
 $(BUILD_DIR)/%/.stamp_patched:
        @$(call step_start,patch)
        @$(call MESSAGE,"Patching")