From cdc67d900d477f9489edabbea22ebe82ac9526b3 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 5 Jul 2022 17:16:44 +0200 Subject: [PATCH] - add $(PKG)_PATCH_CUSTOM --- make/buildsystem-helpers.mk | 4 ++-- package/pkg-utils.mk | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/make/buildsystem-helpers.mk b/make/buildsystem-helpers.mk index 73c85224..704d32b5 100644 --- a/make/buildsystem-helpers.mk +++ b/make/buildsystem-helpers.mk @@ -137,7 +137,7 @@ define APPLY_PATCHES # (patches or directory) $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) $(Q)( \ $(CHDIR)/$($(PKG)_DIR); \ - for i in $(1); do \ + for i in $(1) $(2); do \ if [ "$$i" == "$(PKG_PATCHES_DIR)" -a ! -d $$i ]; then \ continue; \ fi; \ @@ -170,7 +170,7 @@ define PREPARE $(call DEPENDENCIES) $(call DOWNLOAD,$($(PKG)_SOURCE)) $(if $(filter $(1),$(PKG_NO_EXTRACT)),,$(call EXTRACT,$(BUILD_DIR))) - $(if $(filter $(1),$(PKG_NO_PATCHES)),,$(call APPLY_PATCHES,$($(PKG)_PATCH))) + $(if $(filter $(1),$(PKG_NO_PATCHES)),,$(call APPLY_PATCHES,$($(PKG)_PATCH),$($(PKG)_PATCH_CUSTOM))) endef # ----------------------------------------------------------------------------- diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 8fa35996..6c4c0e4e 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -22,6 +22,9 @@ define PKG_CHECK_VARIABLES ifndef $(PKG)_PATCH $(PKG)_PATCH = $(PKG_PATCHES_DIR) endif +ifndef $(PKG)_PATCH_CUSTOM + $(PKG)_PATCH_CUSTOM = +endif # autoreconf ifndef $(PKG)_AUTORECONF