Commit 59a326b9 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

support: move patch-kernel.sh and rename it



The name "patch-kernel.sh" is a bit stupid, since this script is used
to patch everything in Buildroot, not only kernel trees.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 20f8a7de
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ endef

ifneq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR)),)
define UBOOT_APPLY_CUSTOM_PATCHES
	toolchain/patch-kernel.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
	support/scripts/apply-patches.sh $(@D) $(BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR) \
		uboot-$(UBOOT_VERSION)-\*.patch
endef

+3 −3
Original line number Diff line number Diff line
@@ -100,11 +100,11 @@ LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES
define LINUX_APPLY_PATCHES
	for p in $(LINUX_PATCHES) ; do \
		if echo $$p | grep -q -E "^ftp://|^http://" ; then \
			toolchain/patch-kernel.sh $(@D) $(DL_DIR) `basename $$p` ; \
			support/scripts/apply-patches.sh $(@D) $(DL_DIR) `basename $$p` ; \
		elif test -d $$p ; then \
			toolchain/patch-kernel.sh $(@D) $$p linux-\*.patch ; \
			support/scripts/apply-patches.sh $(@D) $$p linux-\*.patch ; \
		else \
			toolchain/patch-kernel.sh $(@D) `dirname $$p` `basename $$p` ; \
			support/scripts/apply-patches.sh $(@D) `dirname $$p` `basename $$p` ; \
		fi \
	done
endef
+6 −6
Original line number Diff line number Diff line
@@ -152,11 +152,11 @@ define LIBTOOL_PATCH_HOOK
			ltmain_version=`sed -n '/^[ 	]*VERSION=/{s/^[ 	]*VERSION=//;p;q;}' $$$$i | \
			sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
			if test $$$${ltmain_version} = '1.5'; then \
				toolchain/patch-kernel.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
				support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
			elif test $$$${ltmain_version} = "2.2"; then\
				toolchain/patch-kernel.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
				support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
			elif test $$$${ltmain_version} = "2.4"; then\
				toolchain/patch-kernel.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
				support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
			fi \
		done \
	fi
@@ -177,11 +177,11 @@ define AUTORECONF_HOOK
		for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
			ltmain_version=`sed -n '/^[ 	]*VERSION=/{s/^[ 	]*VERSION=//;p;q;}' $$$$i | sed 's/\([0-9].[0-9]*\).*/\1/'`; \
			if test $$$${ltmain_version} = "1.5"; then \
				toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \
				support/scripts/apply-patches.sh $$$${i%/*} package buildroot-libtool-v1.5.patch; \
			elif test $$$${ltmain_version} = "2.2"; then\
				toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \
				support/scripts/apply-patches.sh $$$${i%/*} package buildroot-libtool-v2.2.patch; \
			elif test $$$${ltmain_version} = "2.4"; then\
				toolchain/patch-kernel.sh $$$${i%/*} package buildroot-libtool-v2.4.patch; \
				support/scripts/apply-patches.sh $$$${i%/*} package buildroot-libtool-v2.4.patch; \
			fi \
		done \
	fi
+4 −4
Original line number Diff line number Diff line
@@ -259,15 +259,15 @@ $(BUILD_DIR)/%/.stamp_extracted:
$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
$(BUILD_DIR)/%/.stamp_patched:
	@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
	$(if $($(PKG)_PATCH),toolchain/patch-kernel.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
	$(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
	$(Q)( \
	if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
	  if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \
	    toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
	    support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(NAMEVER)\*.patch $(NAMEVER)\*.patch.$(ARCH) || exit 1; \
	  else \
	    toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
	    support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME) $(RAWNAME)\*.patch $(RAWNAME)\*.patch.$(ARCH) || exit 1; \
	    if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER); then \
	      toolchain/patch-kernel.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
	      support/scripts/apply-patches.sh $(@D) $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH) || exit 1; \
	    fi; \
	  fi; \
	fi; \
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ ARGUS_DEPENDENCIES=libpcap

define ARGUS_DEBIAN_PATCH_APPLY
	if [ -d $(@D)/debian/patches ]; then \
		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
		support/scripts/apply-patches.sh $(@D) $(@D)/debian/patches \*.patch; \
	fi
endef

Loading