Skip to content

Instantly share code, notes, and snippets.

@tscolari
Forked from bmatheny/vim.rb
Created September 26, 2012 16:45
Show Gist options
  • Save tscolari/3789116 to your computer and use it in GitHub Desktop.
Save tscolari/3789116 to your computer and use it in GitHub Desktop.
Vim Formula with Ruby & Python support for OS X
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
version '7.3.666'
url 'https://vim.googlecode.com/hg/', :revision => '1e22adc6176e'
head 'https://vim.googlecode.com/hg/'
def ruby_bin
"$HOME/.rvm/rubies/ruby-1.9.3-p194/bin/ruby"
end
def ruby_lib
ruby_bin.sub("/bin/ruby", "/lib")
end
def install
options = [
"--prefix=#{prefix}",
"--mandir=#{man}",
'--enable-gui=no',
'--without-x',
'--disable-nls',
'--enable-multibyte',
'--with-tlib=ncurses',
'--enable-pythoninterp',
'--enable-rubyinterp=yes',
"--with-ruby-command=#{ruby_bin}",
'--with-features=huge'
]
system "./configure", *options
inreplace 'src/auto/config.mk' do |s|
s.change_make_var! "LDFLAGS", "-L. -arch x86_64 -L#{ruby_lib} -L#{prefix}/lib"
end
ENV.append "LDFLAGS", "-arch x86_64 -L#{ruby_lib}"
system 'make'
system 'make install'
system "cp src/vim #{prefix}/bin"
end
end
@tscolari
Copy link
Author

brew install https://raw.github.com/gist/3789116/15558e178ccbf3dab82f7e61cf63749770a0e007/vim.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment