From d396165808ab5852566e7ff6bcc23d47ddfdfdee Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Tue, 3 Dec 2024 03:21:31 +0000 Subject: [PATCH] fix(patches): improve chance of successful patch application by using -l This causes patch to ignore whitespace changes, which should make it more likely to apply patches which may not be an exact match. --- build-emacs-for-macos | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-emacs-for-macos b/build-emacs-for-macos index 1b86a92..a3fd19f 100755 --- a/build-emacs-for-macos +++ b/build-emacs-for-macos @@ -1159,7 +1159,9 @@ class Build if patch[:file] info 'Applying patch...' - FileUtils.cd(target) { run_cmd('patch', '-f', '-p1', '-i', patch[:file]) } + FileUtils.cd(target) do + run_cmd('patch', '-f', '-p1', '-l', '-i', patch[:file]) + end elsif patch[:url] patch_dir = "#{target}/macos_patches" run_cmd('mkdir', '-p', patch_dir)