diff options
| author | Florian Leitner | 2014-08-05 18:18:05 +0200 |
|---|---|---|
| committer | Jack Nagel | 2014-08-11 11:34:55 -0500 |
| commit | 32f506534f1c515067369ceca9623aabb3af48cc (patch) | |
| tree | 425eab58e338d579dd5841900988bdc23f2c4459 /Library/Formula | |
| parent | 3d49c82c281011ac68c44ed15de648460a744fc1 (diff) | |
| download | homebrew-32f506534f1c515067369ceca9623aabb3af48cc.tar.bz2 | |
vim: fixes for issue #31337
- add default perl support to match MacVim
Closes #31367.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/vim.rb | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/Library/Formula/vim.rb b/Library/Formula/vim.rb index e2e4c4670..5b54deee0 100644 --- a/Library/Formula/vim.rb +++ b/Library/Formula/vim.rb @@ -16,9 +16,10 @@ class Vim < Formula option "disable-nls", "Build vim without National Language Support (translated messages, keymaps)" option "with-client-server", "Enable client/server mode" - LANGUAGES_OPTIONAL = %w(lua mzscheme perl python3 tcl) - LANGUAGES_DEFAULT = %w(ruby python) + LANGUAGES_OPTIONAL = %w(lua mzscheme python3 tcl) + LANGUAGES_DEFAULT = %w(perl python ruby) + option "with-python3", "Build vim with python3 instead of python[2] support" LANGUAGES_OPTIONAL.each do |language| option "with-#{language}", "Build vim with #{language} support" end @@ -49,7 +50,10 @@ class Vim < Formula "--enable-#{language}interp" if build.with? language end if opts.include? "--enable-pythoninterp" and opts.include? "--enable-python3interp" - opts = opts - %W[--enable-pythoninterp --enable-python3interp] + %W[--enable-pythoninterp=dynamic --enable-python3interp=dynamic] + # only compile with either python or python3 support, but not both + # (if vim74 is compiled with +python3/dyn, the Python[3] library lookup segfaults + # in other words, a command like ":py3 import sys" leads to a SEGV) + opts = opts - %W[--enable-pythoninterp] end opts << "--disable-nls" if build.include? "disable-nls" @@ -81,17 +85,6 @@ class Vim < Formula "--with-compiledby=Homebrew", *opts - # Require Python's dynamic library, and needs to be built as a framework. - if build.with? "python" and build.with? "python3" - py_prefix = `python -c "import sys; print(sys.prefix)"`.chomp - py3_prefix = `python3 -c "import sys; print(sys.prefix)"`.chomp - # Help vim find Python's dynamic library as absolute path. - inreplace "src/auto/config.mk" do |s| - s.gsub! /-DDYNAMIC_PYTHON_DLL=\\".*\\"/, %(-DDYNAMIC_PYTHON_DLL=\'\"#{py_prefix}/Python\"\') - s.gsub! /-DDYNAMIC_PYTHON3_DLL=\\".*\\"/, %(-DDYNAMIC_PYTHON3_DLL=\'\"#{py3_prefix}/Python\"\') - end - end - system "make" # If stripping the binaries is not enabled, vim will segfault with # statically-linked interpreters like ruby |
