aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-05-11 10:57:51 +1000
committerAdam Vandenberg2012-06-18 21:19:43 -0700
commit087645a4ecf190946ba33e532d6bd6a97bbbb8e0 (patch)
tree8a6bb2e1e51e9a6315bb62a23f3373e2a3fe5bda
parentfaf1584fec750a562375aa9b966e5468eb6619cd (diff)
downloadhomebrew-087645a4ecf190946ba33e532d6bd6a97bbbb8e0.tar.bz2
MacVim: warn if not using Ruby 1.8.x
Fixes #12199.
-rw-r--r--Library/Formula/macvim.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Formula/macvim.rb b/Library/Formula/macvim.rb
index 42ef95951..fb095a2c5 100644
--- a/Library/Formula/macvim.rb
+++ b/Library/Formula/macvim.rb
@@ -1,5 +1,20 @@
require 'formula'
+class Ruby18x < Requirement
+ def message; <<-EOS.undent
+ MacVim compiles against whatever Ruby it finds in your path, and has
+ problems working with Ruby 1.9. We've detected Ruby 1.9 in your path,
+ so this compile may fail.
+ EOS
+ end
+ def fatal?
+ false
+ end
+ def satisfied?
+ `ruby --version` =~ /1\.8\.\d/
+ end
+end
+
class Macvim < Formula
homepage 'http://code.google.com/p/macvim/'
url 'https://github.com/b4winckler/macvim/tarball/snapshot-64'
@@ -17,6 +32,7 @@ class Macvim < Formula
]
end
+ depends_on Ruby18x.new
depends_on 'cscope' if ARGV.include? '--with-cscope'
depends_on 'lua' if ARGV.include? '--with-lua'
@@ -33,6 +49,10 @@ class Macvim < Formula
arch = MacOS.prefer_64_bit? ? 'x86_64' : 'i386'
ENV['ARCHFLAGS'] = "-arch #{arch}"
+ if `ruby --version` =~ /1\.9\.\d/
+ opoo "Your default ruby is 1.9.x, install will likely fail. Try using system ruby"
+ end
+
args = ["--with-features=huge",
"--with-tlib=ncurses",
"--enable-multibyte",