2009-12-26 14:11:03 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Macvim <Formula
|
2010-10-06 16:48:58 +00:00
|
|
|
url 'git://github.com/b4winckler/macvim.git', :tag => 'v7.3-53'
|
|
|
|
version 'v7.3-53'
|
|
|
|
head 'git://github.com/b4winckler/macvim.git', :branch => 'master'
|
2010-08-21 18:49:25 +00:00
|
|
|
homepage 'http://code.google.com/p/macvim/'
|
2009-12-26 14:11:03 +00:00
|
|
|
|
2010-08-14 21:00:47 +00:00
|
|
|
def options
|
2010-08-21 18:49:25 +00:00
|
|
|
# Occassional reports of this brew failing during the icon step
|
|
|
|
[["--no-icons", "Don't generate custom document icons."]]
|
2010-08-14 21:00:47 +00:00
|
|
|
end
|
|
|
|
|
2009-12-26 14:11:03 +00:00
|
|
|
def install
|
2010-04-07 05:58:35 +00:00
|
|
|
# MacVim's Xcode project gets confused by $CC
|
|
|
|
# Disable it until someone figures out why it fails.
|
2009-12-26 14:11:03 +00:00
|
|
|
ENV['CC'] = nil
|
|
|
|
ENV['CFLAGS'] = nil
|
|
|
|
ENV['CXX'] = nil
|
|
|
|
ENV['CXXFLAGS'] = nil
|
|
|
|
|
|
|
|
system "./configure",
|
2010-06-25 06:06:02 +00:00
|
|
|
"--with-macsdk=#{MACOS_VERSION}",
|
2009-12-26 14:11:03 +00:00
|
|
|
# Add some features
|
|
|
|
"--with-features=huge",
|
|
|
|
"--enable-perlinterp",
|
|
|
|
"--enable-pythoninterp",
|
|
|
|
"--enable-rubyinterp",
|
|
|
|
"--enable-tclinterp"
|
2010-08-14 21:00:47 +00:00
|
|
|
|
|
|
|
if ARGV.include? "--no-icons"
|
|
|
|
inreplace "src/MacVim/icons/Makefile", "$(MAKE) -C makeicns", ""
|
|
|
|
inreplace "src/MacVim/icons/make_icons.py", "dont_create = False", "dont_create = True"
|
|
|
|
end
|
|
|
|
|
2009-12-26 14:11:03 +00:00
|
|
|
system "make"
|
|
|
|
|
|
|
|
prefix.install "src/MacVim/build/Release/MacVim.app"
|
|
|
|
inreplace "src/MacVim/mvim", /^# VIM_APP_DIR=\/Applications$/,
|
|
|
|
"VIM_APP_DIR=#{prefix}"
|
|
|
|
bin.install "src/MacVim/mvim"
|
|
|
|
|
|
|
|
# Create MacVim vimdiff, view, ex equivalents
|
2010-08-21 18:49:25 +00:00
|
|
|
%w[mvimdiff mview mvimex].each {|f| ln_s bin+'mvim', bin+f}
|
2009-12-26 14:11:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
"MacVim.app installed to #{prefix}."
|
|
|
|
end
|
|
|
|
end
|