From 92af5181770a7374f8d5c6581ca37920f7389579 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 5 Jul 2022 16:32:21 +0200 Subject: [PATCH] - add $(PKG)_PATCH --- make/buildsystem-helpers.mk | 2 +- package/pkg-utils.mk | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/make/buildsystem-helpers.mk b/make/buildsystem-helpers.mk index fe2b9482..73c85224 100644 --- a/make/buildsystem-helpers.mk +++ b/make/buildsystem-helpers.mk @@ -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_PATCHES_DIR))) + $(if $(filter $(1),$(PKG_NO_PATCHES)),,$(call APPLY_PATCHES,$($(PKG)_PATCH))) endef # ----------------------------------------------------------------------------- diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 49ca8352..8fa35996 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -18,6 +18,11 @@ PKG_PATCHES_DIR = $(PACKAGE_DIR)/$(subst host-,,$(pkgname))/patches # check for necessary $(PKG) variables define PKG_CHECK_VARIABLES +# patch +ifndef $(PKG)_PATCH + $(PKG)_PATCH = $(PKG_PATCHES_DIR) +endif + # autoreconf ifndef $(PKG)_AUTORECONF $(PKG)_AUTORECONF = NO