From 530d479b4f68e8f30d129f1c1f12866b10b5ef10 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Mon, 12 Oct 2015 00:22:19 +0300 Subject: [PATCH] require patch number to start with a digit MXE recongized file src/lua-rapidjson-1-use-unix-file-functions.patch as a patch for lua, however it was intended to be a patch for lua-rapidjson. Patch filename pattern was src/$(1)-*.patch. * captured "rapidjson-1-use-unix-file-functions". Currently * was replaced with [0-9]* to require patch name starting with a digit. close #921 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 67405d2f..32448a22 100644 --- a/Makefile +++ b/Makefile @@ -164,10 +164,12 @@ UNPACK_ARCHIVE = \ UNPACK_PKG_ARCHIVE = \ $(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE)) +PATCHES = $(sort $(wildcard $(TOP_DIR)/src/$(1)-[0-9]*.patch)) + define PREPARE_PKG_SOURCE cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1)) cd '$(2)/$($(1)_SUBDIR)' - $(foreach PKG_PATCH,$(sort $(wildcard $(TOP_DIR)/src/$(1)-*.patch)), + $(foreach PKG_PATCH,$(PATCHES), (cd '$(2)/$($(1)_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH)) endef @@ -381,7 +383,7 @@ define PKG_TARGET_RULE .PHONY: $(1) $(1): $(PREFIX)/$(3)/installed/$(1) $(PREFIX)/$(3)/installed/$(1): $(TOP_DIR)/src/$(1).mk \ - $(wildcard $(TOP_DIR)/src/$(1)-*.patch) \ + $(PATCHES) \ $(wildcard $(TOP_DIR)/src/$(1)-test*) \ $(addprefix $(PREFIX)/$(3)/installed/,$(value $(call LOOKUP_PKG_RULE,$(1),DEPS,$(3)))) \ | $(if $(DONT_CHECK_REQUIREMENTS),,check-requirements) \