From 4690490e81ddc2c429d3e124639b2814db96f249 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sat, 6 May 2017 13:37:13 +0100 Subject: [PATCH cygport] Add src_patch_apply_hook --- lib/check_funcs.cygpart | 1 + lib/src_prep.cygpart | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/check_funcs.cygpart b/lib/check_funcs.cygpart index 93f3e12..bfa02f5 100644 --- a/lib/check_funcs.cygpart +++ b/lib/check_funcs.cygpart @@ -687,6 +687,7 @@ __check_unstable() { else warning "The ${1} API is not yet stable and is subject to change" warning "You must define ${unstable_var} in order to use it" + return 0 fi } diff --git a/lib/src_prep.cygpart b/lib/src_prep.cygpart index d787d2f..aad5564 100644 --- a/lib/src_prep.cygpart +++ b/lib/src_prep.cygpart @@ -209,6 +209,24 @@ cygpatch() { continue; fi +#****v* Preparation/src_patch_apply_hook +# DESCRIPTION +# src_patch_apply_hook() is an optional function which can be defined +# to control patch application, for architecture dependent patches, etc. +# It receives a patch filename as an argument, and a non-zero result +# causes the patch to be skipped. +# (This API is not yet stable and is subject to change) +#**** + + if __check_function src_patch_apply_hook + then + if ! __check_unstable src_patch_apply_hook ${patchfile_name} + then + warning "patch ${patchfile_name} skipped by src_patch_apply_hook"; + continue; + fi + fi + patchlevel=0; case ${patchfile_name} in -- 2.12.2