Skip to content

Commit

Permalink
Change .eln files dylib ID before post-install phase
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderestivo committed Dec 22, 2020
1 parent 0f1d12e commit 6ecfa3c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Formula/emacs-plus@28.rb
Expand Up @@ -188,8 +188,21 @@ def install
system "make"
system "make", "install"
# system "false"

(buildpath/"nextstep/Emacs.app/Contents").install "native-lisp" if build.with? "native-comp"

if build.with? "native-comp"
(buildpath/"nextstep/Emacs.app/Contents").install "native-lisp"

# Change .eln files dylib ID to avoid that after the
# post-install phase all of the *.eln files end up with the
# same ID. See: https://github.com/Homebrew/brew/issues/9526
# and https://github.com/Homebrew/brew/pull/10075
Dir.glob(contents_dir/"native-lisp/*/*.eln").each do |f|
fo = MachO::MachOFile.new(f)
ohai "Change dylib_id of ELN files before post_install phase"
fo.dylib_id = "#{contents_dir}/" + f
fo.write!
end
end

icons_dir = buildpath/"nextstep/Emacs.app/Contents/Resources"
ICONS_CONFIG.each_key do |icon|
Expand Down

0 comments on commit 6ecfa3c

Please sign in to comment.