-
-
Save bmatheny/3772167 to your computer and use it in GitHub Desktop.
Vim Formula with Ruby & Python support for OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
"/Users/bmatheny/.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 |
jlbfalcao
commented
Sep 23, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment