vim: options for enabling and disabling language support
Closes Homebrew/homebrew#15757. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
142288863b
commit
cbb763b760
1 changed files with 23 additions and 3 deletions
|
@ -11,7 +11,28 @@ class Vim < Formula
|
|||
|
||||
env :std # To find interpreters
|
||||
|
||||
LANGUAGES = %w(lua mzscheme perl python python3 tcl ruby)
|
||||
DEFAULT_LANGUAGES = %w(ruby python)
|
||||
|
||||
LANGUAGES.each do |language|
|
||||
option "with-#{language}", "Build vim with #{language} support"
|
||||
option "without-#{language}", "Build vim without #{language} support"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV['LUA_PREFIX'] = HOMEBREW_PREFIX
|
||||
|
||||
language_opts = LANGUAGES.map do |language|
|
||||
with_option = "with-#{language}"
|
||||
without_option = "without-#{language}"
|
||||
|
||||
if DEFAULT_LANGUAGES.include? language and !build.include? without_option
|
||||
"--enable-#{language}interp"
|
||||
elsif build.include? with_option
|
||||
"--enable-#{language}interp"
|
||||
end
|
||||
end.compact
|
||||
|
||||
# Why are we specifying HOMEBREW_PREFIX as the prefix?
|
||||
#
|
||||
# To make vim look for the system vimscript files in the
|
||||
|
@ -28,10 +49,9 @@ class Vim < Formula
|
|||
"--disable-nls",
|
||||
"--enable-multibyte",
|
||||
"--with-tlib=ncurses",
|
||||
"--enable-pythoninterp",
|
||||
"--enable-rubyinterp",
|
||||
"--enable-cscope",
|
||||
"--with-features=huge"
|
||||
"--with-features=huge",
|
||||
*language_opts
|
||||
system "make"
|
||||
|
||||
# Even though we specified HOMEBREW_PREFIX for configure,
|
||||
|
|
Loading…
Reference in a new issue