mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 21:26:36 +00:00
packages: apply custom patches using *.patch instead of <pkg>-*.patch
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>
This commit is contained in:
parent
ea8edb9514
commit
0eba4759fa
@ -24,8 +24,7 @@ endef
|
|||||||
|
|
||||||
ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
|
ifneq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR)),)
|
||||||
define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
define AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
||||||
$(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \
|
$(APPLY_PATCHES) $(@D) $(BR2_TARGET_AT91BOOTSTRAP_CUSTOM_PATCH_DIR) \*.patch
|
||||||
at91bootstrap-$(AT91BOOTSTRAP_VERSION)-\*.patch
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
AT91BOOTSTRAP_POST_PATCH_HOOKS += AT91BOOTSTRAP_APPLY_CUSTOM_PATCHES
|
||||||
|
@ -21,8 +21,7 @@ AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR)
|
|||||||
|
|
||||||
ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
|
ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
|
||||||
define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
|
define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
|
||||||
$(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \
|
$(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch
|
||||||
at91bootstrap3-\*.patch
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
|
AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
|
||||||
|
@ -26,9 +26,8 @@ BAREBOX_LICENSE_FILES = COPYING
|
|||||||
|
|
||||||
ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
|
ifneq ($(call qstrip,$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR)),)
|
||||||
define BAREBOX_APPLY_CUSTOM_PATCHES
|
define BAREBOX_APPLY_CUSTOM_PATCHES
|
||||||
$(APPLY_PATCHES) $(@D) \
|
$(APPLY_PATCHES) $(@D)
|
||||||
$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \
|
$(BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR) \*.patch
|
||||||
barebox-$(BAREBOX_VERSION)-\*.patch
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES
|
BAREBOX_POST_PATCH_HOOKS += BAREBOX_APPLY_CUSTOM_PATCHES
|
||||||
|
@ -91,8 +91,7 @@ UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE
|
|||||||
|
|
||||||
ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
|
ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
|
||||||
define UBOOT_APPLY_CUSTOM_PATCHES
|
define UBOOT_APPLY_CUSTOM_PATCHES
|
||||||
$(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
|
$(APPLY_PATCHES) $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \*.patch
|
||||||
uboot-\*.patch
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES
|
UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_CUSTOM_PATCHES
|
||||||
|
@ -129,7 +129,7 @@ config BR2_LINUX_KERNEL_PATCH
|
|||||||
A space-separated list of patches to apply to the
|
A space-separated list of patches to apply to the
|
||||||
kernel. Each patch can be described as an URL, a local file
|
kernel. Each patch can be described as an URL, a local file
|
||||||
path, or a directory. In the case of a directory, all files
|
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
|
# Configuration selection
|
||||||
|
@ -159,7 +159,7 @@ endif # BR2_LINUX_KERNEL_VMLINUX
|
|||||||
define LINUX_APPLY_LOCAL_PATCHES
|
define LINUX_APPLY_LOCAL_PATCHES
|
||||||
for p in $(filter-out ftp://% http://% https://%,$(LINUX_PATCHES)) ; do \
|
for p in $(filter-out ftp://% http://% https://%,$(LINUX_PATCHES)) ; do \
|
||||||
if test -d $$p ; then \
|
if test -d $$p ; then \
|
||||||
$(APPLY_PATCHES) $(@D) $$p linux-\*.patch || exit 1 ; \
|
$(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \
|
||||||
else \
|
else \
|
||||||
$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
|
$(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \
|
||||||
fi \
|
fi \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user