packages: apply custom patches using *.patch instead of <pkg>-*.patch
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 29 Mar 2015 17:33:22 +0000 (19:33 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 6 Apr 2015 09:04:59 +0000 (11:04 +0200)
Several packages have some logic to apply custom patches that existed
before the BR2_GLOBAL_PATCH_DIR mechanism: at91bootstrap,
at91bootstrap3, barebox, uboot and linux. Currently, the logic of
those packages to apply custom patches is to match
<package-name>-*.patch, which is not consistent with what we've done
for patches stored in the package directory, and for patches stored in
BR2_GLOBAL_PATCH_DIR: in such cases, we simply apply *.patch.

Therefore, for consistency reasons, this commit changes these packages
to also apply *.patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
boot/at91bootstrap/at91bootstrap.mk
boot/at91bootstrap3/at91bootstrap3.mk
boot/barebox/barebox.mk
boot/uboot/uboot.mk
linux/Config.in
linux/linux.mk

index 50bbc26570bef34f48c6744cf0bbeadca80370d7..802e85e6e47972ef1f91185eb8956c47b046a0cc 100644 (file)
@@ -24,8 +24,7 @@ endef
 
 ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
 define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
-       $(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \
-               at91bootstrap-$(AT91BOOTSTRAP_VERSION)-\*.patch
+       $(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \*.patch
 endef
 
 AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
index 098e7bfe3afe38a674d3303856b8da1197cb7de6..b780617b335d091acf1b1ee7bd2b7b11387aff54 100644 (file)
@@ -21,8 +21,7 @@ AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR)
 
 ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
 define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
-       $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \
-               at91bootstrap3-\*.patch
+       $(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch
 endef
 
 AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
index 5809fb02971536dc78a2a4b2d3b765147c3d2206..98cb04ea055cfcbc6e6ff0a41bcd21788e89707a 100644 (file)
@@ -26,9 +26,8 @@ BAREBOX_LICENSE_FILES = COPYING
 
 ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
 define BAREBOX_APPLY_CUSTOM_PATCHES
-       $(APPLY_PATCHES) $(@D) \
-               $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
-               barebox-$(BAREBOX_VERSION)-\*.patch
+       $(APPLY_PATCHES) $(@D)
+               $(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \*.patch
 endef
 
 BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES
index 630619a4f5137d9a7bf1c78db520df76ba465e33..df991e73d075fa4f7b3ef58600d8f8adc5d8fff0 100644 (file)
@@ -91,8 +91,7 @@ UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
 
 ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
 define UBOOT_APPLY_CUSTOM_PATCHES
-       $(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
-               uboot-\*.patch
+       $(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \*.patch
 endef
 
 UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES
index a1113dd90488b602971b44237a6f7bdb77c0530a..c83a3f51e6616ef1dbab3f7201ff168a1f82bc30 100644 (file)
@@ -129,7 +129,7 @@ config BR2_LINUX_KERNEL_PATCH
          A space-separated list of patches to apply to the
          kernel. Each patch can be described as an URL, a local file
          path, or a directory. In the case of a directory, all files
-         matching linux-*.patch in the directory will be applied.
+         matching *.patch in the directory will be applied.
 
 #
 # Configuration selection
index 22fce3547c0e2225f36285152a4f422003bd84d3..21eb3c9966429b527e4594ef53401c810406bcd4 100644 (file)
@@ -159,7 +159,7 @@ endif # BR2_LINUX_KERNEL_VMLINUX
 define LINUX_APPLY_LOCAL_PATCHES
        for p in $(filter-out ftp://% http://% https://%,$(LINUX_PATCHES)) ; do \
                if test -d $$p ; then \
-                       $(APPLY_PATCHES) $(@D) $$p linux-\*.patch || exit 1 ; \
+                       $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
                else \
                        $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
                fi \