---
 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 961f263..224a7b1 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 2277ba4..db4a5cf 100644
--- a/lib/src_prep.cygpart
+++ b/lib/src_prep.cygpart
@@ -210,6 +210,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.16.1

Reply via email to