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