aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/macvim.rb
diff options
context:
space:
mode:
authorSamuel John2013-06-10 22:02:34 +0200
committerSamuel John2013-06-10 22:09:10 +0200
commitee0d6c0b05a80243a0393cd71926fea12ad5d5e4 (patch)
tree5c783a9373940be78d284399cec60f2d7f1e03b5 /Library/Formula/macvim.rb
parent5f86f17c88fa5c9b2590414c7943c4839edbeeb0 (diff)
downloadhomebrew-ee0d6c0b05a80243a0393cd71926fea12ad5d5e4.tar.bz2
macvim: Now builds with brewed python 2.x
The python3 option has been removed because enabling it made the MacVim GUI disappear when `:python3` is executed. Further, using Python 3.x seems to disable the 2.x bindings. Now tested to work with powerline.
Diffstat (limited to 'Library/Formula/macvim.rb')
-rw-r--r--Library/Formula/macvim.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/Library/Formula/macvim.rb b/Library/Formula/macvim.rb
index ae8a8198c..594948a5a 100644
--- a/Library/Formula/macvim.rb
+++ b/Library/Formula/macvim.rb
@@ -14,7 +14,7 @@ class Macvim < Formula
depends_on 'cscope' => :recommended
depends_on 'lua' => :optional
depends_on :python => :recommended
- depends_on :python3 => :optional # Help us! :python3 in MacVim makes the window disappear!
+ # Help us! :python3 in MacVim makes the window disappear, so only 2.x bindings!
depends_on :xcode # For xcodebuild.
@@ -51,7 +51,16 @@ class Macvim < Formula
end
args << "--enable-pythoninterp=yes" if build.with? 'python'
- args << "--enable-python3interp=yes" if build.with? "python3"
+
+ # MacVim seems to link Python by `-framework Python` (instead of
+ # `python-config --ldflags`) and so we have to pass the -F to point to
+ # where the Python.framework is located, we want it to use!
+ # Also the -L is needed for the correct linking. This is a mess but we have
+ # to wait until MacVim is really able to link against different Python's
+ # on the Mac. Note configure detects brewed python correctly, but that
+ # is ignored.
+ # See https://github.com/mxcl/homebrew/issues/17908
+ ENV.prepend 'LDFLAGS', "-L#{python2.libdir} -F#{python2.framework}" if python.brewed?
unless MacOS::CLT.installed?
# On Xcode-only systems: