Skip to content

Commit

Permalink
unpin emacs-plus@28 formula
Browse files Browse the repository at this point in the history
    * Change .eln files dylib ID in buildpath/native-lisp directly and
    do not duplicate .eln to Emacs.app/Contents
  • Loading branch information
longminwang authored and d12frosted committed Jul 22, 2021
1 parent 5628d0c commit 4f44f33
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Formula/emacs-plus@28.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class EmacsPlusAT28 < EmacsBase
# URL
#

url "https://github.com/emacs-mirror/emacs.git", revision: "4d63a033a726a8da33bda8d18a503e88bfb794fb"
url "https://github.com/emacs-mirror/emacs.git"

#
# Icons
Expand Down Expand Up @@ -168,24 +168,22 @@ def install
end

system "make"
system "make", "install"

if build.with? "native-comp"
contents_dir = buildpath/"nextstep/Emacs.app/Contents"
contents_dir.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|
Dir.glob(buildpath/"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.dylib_id = "#{buildpath}/" + f
fo.write!
end
end

system "make", "install"

icons_dir = buildpath/"nextstep/Emacs.app/Contents/Resources"
ICONS_CONFIG.each_key do |icon|
next if build.without? "#{icon}-icon"
Expand Down

0 comments on commit 4f44f33

Please # to comment.