diff options
| author | Adam Vandenberg | 2010-09-07 05:33:23 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-09-07 05:33:23 -0700 |
| commit | 2a0250eaca518daf9706b0c9588b8b7ea5684fd8 (patch) | |
| tree | c9e2f71884ed5bc8b34d9bc861865e83b8703b89 /Library/Formula | |
| parent | 5c9c69944a9286c841d6c170aa4d4f21353c32d8 (diff) | |
| download | homebrew-2a0250eaca518daf9706b0c9588b8b7ea5684fd8.tar.bz2 | |
Use startup script instead of symlink for cocoa emacs
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/emacs.rb | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb index 32f3a5a32..b082cc4a1 100644 --- a/Library/Formula/emacs.rb +++ b/Library/Formula/emacs.rb @@ -1,5 +1,7 @@ require 'formula' +# For tips on Cocoa Emacs, see: +# * http://superuser.com/questions/73500/on-os-x-how-do-i-start-cocoa-emacs-and-bring-it-to-front class Emacs <Formula url 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.2.tar.bz2' md5 '057a0379f2f6b85fb114d8c723c79ce2' @@ -52,33 +54,36 @@ class Emacs <Formula return s end + def cocoa_startup_script; <<-EOS.undent + #!/bin/bash + open -a #{prefix}/Emacs.app/Contents/MacOS/Emacs --args $@ + EOS + end + def install fails_with_llvm "Duplicate symbol errors while linking." - configure_args = [ + args = [ "--prefix=#{prefix}", "--without-dbus", "--enable-locallisppath=#{HOMEBREW_PREFIX}/share/emacs/site-lisp", ] if ARGV.include? "--cocoa" - configure_args << "--with-ns" << "--disable-ns-self-contained" - system "./configure", *configure_args + args << "--with-ns" << "--disable-ns-self-contained" + system "./configure", *args system "make bootstrap" system "make install" prefix.install "nextstep/Emacs.app" - bin.mkpath - ln_s prefix+"Emacs.app/Contents/MacOS/Emacs", bin+"emacs" + (bin+"emacs").write cocoa_startup_script else if ARGV.include? "--with-x" - configure_args << "--with-x" - configure_args << "--with-gif=no" - configure_args << "--with-tiff=no" - configure_args << "--with-jpeg=no" + args << "--with-x" + args << "--with-gif=no" << "--with-tiff=no" << "--with-jpeg=no" else - configure_args << "--without-x" + args << "--without-x" end - system "./configure", *configure_args + system "./configure", *args system "make" system "make install" end |
