summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2016-07-05 06:23:22 (GMT)
committerTony Theodore <tonyt@logyst.com>2016-07-05 06:26:15 (GMT)
commita0a3340772dd42ce0c36686aea6debd55513c346 (patch)
treefe3b4f0df96c93f1339be48e27233b050956e912 /Makefile
parentf0e9cf6f5db5ff2782b4a98a9e5066f2e65c1295 (diff)
downloadmxe-a0a3340772dd42ce0c36686aea6debd55513c346.zip
mxe-a0a3340772dd42ce0c36686aea6debd55513c346.tar.gz
mxe-a0a3340772dd42ce0c36686aea6debd55513c346.tar.bz2
Makefile: allow packages to specify a list of zero or more patches
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2edab45..ab61761 100644
--- a/Makefile
+++ b/Makefile
@@ -190,7 +190,11 @@ UNPACK_PKG_ARCHIVE = \
# all files for extension plugins will be considered for outdated checks
PKG_MAKEFILES = $(realpath $(sort $(wildcard $(addsuffix /$(1).mk, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS)))))
PKG_TESTFILES = $(realpath $(sort $(wildcard $(addsuffix /$(1)-test*, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS)))))
-PKG_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /$(1)-[0-9]*.patch, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS)))))
+# allow packages to specify a list of zero or more patches
+PKG_PATCHES = $(if $(findstring undefined,$(origin $(1)_PATCHES)), \
+ $(realpath $(sort $(wildcard $(addsuffix /$(1)-[0-9]*.patch, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS))))) \
+ $(else), \
+ $($(1)_PATCHES))
define PREPARE_PKG_SOURCE
cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1))