Skip to content

Commit 0268f52

Browse files
committed
depends: Introduce customizable $(package)_patches_path variables
This change helps avoid patch duplication between a package and its native counterpart.
1 parent 5e794e6 commit 0268f52

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

depends/funcs.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ define fetch_file
4040
endef
4141

4242
define int_get_build_recipe_hash
43-
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
43+
$(eval $(1)_patches_path?=$(PATCHES_PATH)/$(1))
44+
$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $($(1)_patches_path)/,$($(1)_patches)) | cut -d" " -f1))
4445
$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
4546
endef
4647

@@ -219,7 +220,7 @@ $($(1)_extracted): | $($(1)_fetched)
219220
$($(1)_preprocessed): | $($(1)_extracted)
220221
echo Preprocessing $(1)...
221222
mkdir -p $$(@D) $($(1)_patch_dir)
222-
$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
223+
$(foreach patch,$($(1)_patches),cd $($(1)_patches_path); cp $(patch) $($(1)_patch_dir) ;)
223224
{ cd $$(@D); $($(1)_preprocess_cmds); } $$($(1)_logging)
224225
touch $$@
225226
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)

0 commit comments

Comments
 (0)