Skip to content

Instantly share code, notes, and snippets.

@peel
Forked from dpo/vim.rb
Created October 23, 2012 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peel/3940881 to your computer and use it in GitHub Desktop.
Save peel/3940881 to your computer and use it in GitHub Desktop.
Homebrew formula to build vim against Homebrew Python 2.7.3 with client/server feature
# To build vim against homebrew Python 2.7.3.
# You'll also need to adjust the symbolic link of the current
# system Python framework (cf. http://goo.gl/b66fs):
#
# cd /System/Library/Frameworks/Python.framework/Versions
# sudo rm Current
# sudo ln -sf /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/Current Current
require 'formula'
# Is a client/server build requested?
def build_clientserver?; ARGV.include? '--clientserver'; end
class Vim < Formula
# Get stable versions from hg repo instead of downloading an increasing
# number of separate patches.
url 'https://vim.googlecode.com/hg/', :revision => '72146e7f47fa'
version '7.3.444'
homepage 'http://www.vim.org/'
depends_on 'mercurial'
depends_on :x11 if build_clientserver? # To preserve X11 paths.
head 'https://vim.googlecode.com/hg/'
def install
args = ["--prefix=#{prefix}",
"--mandir=#{man}",
"--disable-nls",
"--enable-multibyte",
"--with-tlib=ncurses",
"--enable-pythoninterp=yes",
#"--with-python-command=/usr/local/bin/python",
"--with-python-config-dir=/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
"--enable-rubyinterp=yes",
"--with-ruby-command=/usr/bin/ruby",
"--with-features=huge"
]
nocs_args = ["--enable-gui=no",
"--without-x"
]
cs_args = ["--enable-gui=gtk2",
"--enable-cscope"
]
if build_clientserver?
args = args + cs_args
else
args = args + nocs_args
end
system "./configure", *args
system "make"
system "make install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment