-
-
Save josepjaume/814520 to your computer and use it in GitHub Desktop.
This file contains 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 | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
homepage 'http://www.vim.org/' | |
md5 '5b9510a17074e2b37d8bb38ae09edbf2' | |
version '7.3.112' | |
def patchlevel; 112 end | |
def features; %w(tiny small normal big huge) end | |
def interp; %w(lua mzscheme perl python python3 tcl ruby) end | |
def options | |
features.map {|f| ["--#{f}", "Configure with --with-feature-#{f}"] } \ | |
| interp.map {|i| ["--#{i}", "Configure with --enable-#{i}interp"] } | |
end | |
def patches | |
patches = (1..patchlevel).map {|i| sprintf('ftp://ftp.vim.org/pub/vim/patches/7.3/7.3.%03d', i) } | |
{:p0 => patches} | |
end | |
def install | |
feature = features.find {|f| ARGV.include? "--#{f}" } || "normal" | |
opts = [] | |
interp.each do |i| | |
opts << "--enable-#{i}interp=yes" if ARGV.include? "--#{i}" | |
end | |
system "./configure", | |
"--enable-gui", | |
"--without-x", | |
"--disable-gpm", | |
"--disable-nls", | |
"--with-tlib=ncurses", | |
"--enable-multibyte", | |
"--with-feature-#{feature}", | |
"--prefix=#{prefix}", | |
"--mandir=#{man}", | |
*opts | |
system "make install" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment