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.
This commit is contained in:
2024-12-03 03:21:31 +00:00
parent 66ccd9c6fd
commit d396165808

View File

@@ -1159,7 +1159,9 @@ class Build
if patch[:file] if patch[:file]
info 'Applying patch...' 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] elsif patch[:url]
patch_dir = "#{target}/macos_patches" patch_dir = "#{target}/macos_patches"
run_cmd('mkdir', '-p', patch_dir) run_cmd('mkdir', '-p', patch_dir)