aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/macvim.rb
diff options
context:
space:
mode:
authorMike McQuaid2014-01-06 10:22:51 +0000
committerMike McQuaid2014-01-06 10:22:51 +0000
commit14d771654c12c62559c8c757e8c9f0444068c880 (patch)
tree510aaa5df5ac446fc33e28927fd22c332d6a0f56 /Library/Formula/macvim.rb
parentb1c7bffa2ab359fb6c48283ec67f143a15280039 (diff)
downloadhomebrew-14d771654c12c62559c8c757e8c9f0444068c880.tar.bz2
macvim: refix finding Homebrew Python.
Diffstat (limited to 'Library/Formula/macvim.rb')
-rw-r--r--Library/Formula/macvim.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Formula/macvim.rb b/Library/Formula/macvim.rb
index ffd0e296f..211aa87d7 100644
--- a/Library/Formula/macvim.rb
+++ b/Library/Formula/macvim.rb
@@ -71,6 +71,19 @@ class Macvim < Formula
args << "--enable-python3interp" if build.with? "python3"
end
+ # 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/Homebrew/homebrew/issues/17908
+ if build.with? "python" and build.without? "python3"
+ py_prefix = Pathname.new `python-config --prefix`.chomp
+ ENV.prepend 'LDFLAGS', "-L#{py_prefix}/lib/python2.7/config -F#{py_prefix.parent.parent}"
+ end
+
unless MacOS::CLT.installed?
# On Xcode-only systems:
# Macvim cannot deal with "/Applications/Xcode.app/Contents/Developer" as