From c4768f4c3aed02a758863131abae5f07e8e4cf55 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 26 Apr 2020 22:21:22 +0100 Subject: [PATCH] fix(patches): Only apply patches as part of archive extraction --- build-emacs-for-macos | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-emacs-for-macos b/build-emacs-for-macos index d2844d9..e4536e7 100755 --- a/build-emacs-for-macos +++ b/build-emacs-for-macos @@ -29,7 +29,6 @@ class Build tarball = download_tarball(meta[:sha]) source = extract_tarball(tarball, patches(options)) - patches(options).each { |patch| apply_patch(patch, source) } app = compile_source(source) LibEmbedder.new(app, brew_dir, os.version, extra_libs).embed @@ -98,6 +97,8 @@ class Build result = run_cmd('tar', '-xzf', filename, '-C', source_dir) raise 'ERROR: Tarball extraction failed.' unless result + patches.each { |patch| apply_patch(patch, target) } + target end