homebrew-core/Formula/macvim.rb
Bryan Ivory 37363310d9 Added --with-cscope option to the MacVim forumula.
Added the --with-cscope option to the MacVim formula to enable building
MacVim with Cscope support. A dependency on 'cscope' is added when the
--with-cscope option is present.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-11-26 12:34:12 -08:00

59 lines
1.7 KiB
Ruby

require 'formula'
class Macvim <Formula
url 'https://github.com/b4winckler/macvim/tarball/v7.3-53'
version 'v7.3-53'
md5 '35fb942c45109a2cbdbe7c1a3e02d59d'
head 'git://github.com/b4winckler/macvim.git', :branch => 'master'
homepage 'http://code.google.com/p/macvim/'
def options
# Occassional reports of this brew failing during the icon step
[["--no-icons", "Don't generate custom document icons."],
["--with-cscope", "Build with Cscope support."]]
end
depends_on 'cscope' if ARGV.include? '--with-cscope'
def install
# MacVim's Xcode project gets confused by $CC
# Disable it until someone figures out why it fails.
ENV['CC'] = nil
ENV['CFLAGS'] = nil
ENV['CXX'] = nil
ENV['CXXFLAGS'] = nil
args = ["--with-macsdk=#{MACOS_VERSION}",
# Add some features
"--with-features=huge",
"--enable-perlinterp",
"--enable-pythoninterp",
"--enable-rubyinterp",
"--enable-tclinterp"]
if ARGV.include? "--with-cscope"
args << "--enable-cscope"
end
system "./configure", *args
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
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
%w[mvimdiff mview mvimex].each {|f| ln_s bin+'mvim', bin+f}
end
def caveats
"MacVim.app installed to:\n#{prefix}"
end
end