aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-04-17 10:01:38 -0700
committerAdam Vandenberg2013-04-17 10:01:38 -0700
commitc9cd3008e236a15bb1f6c3f560056c1e7e6bd659 (patch)
treecb48ee6e3e5682f2d7d7e51b7c20565426e58487 /Library
parent53edc7535845fb1bc00656e6ff3c729fd686a784 (diff)
downloadhomebrew-c9cd3008e236a15bb1f6c3f560056c1e7e6bd659.tar.bz2
Add :hg build requirement.
Closes #19074.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/vim.rb2
-rw-r--r--Library/Homebrew/dependency_collector.rb1
-rw-r--r--Library/Homebrew/requirements.rb14
3 files changed, 17 insertions, 0 deletions
diff --git a/Library/Formula/vim.rb b/Library/Formula/vim.rb
index 6f0d64fcd..3d1b8434e 100644
--- a/Library/Formula/vim.rb
+++ b/Library/Formula/vim.rb
@@ -11,6 +11,8 @@ class Vim < Formula
env :std # To find interpreters
+ depends_on :hg => :build
+
LANGUAGES = %w(lua mzscheme perl python python3 tcl ruby)
DEFAULT_LANGUAGES = %w(ruby python)
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb
index 22f690a8c..bf5c014f3 100644
--- a/Library/Homebrew/dependency_collector.rb
+++ b/Library/Homebrew/dependency_collector.rb
@@ -91,6 +91,7 @@ class DependencyCollector
when :tex then TeXDependency.new(tag)
when :clt then CLTDependency.new(tag)
when :arch then ArchRequirement.new(tag)
+ when :hg then MercurialDependency.new(tag)
else
raise "Unsupported special dependency #{spec}"
end
diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb
index f226db839..6ebf3f6a4 100644
--- a/Library/Homebrew/requirements.rb
+++ b/Library/Homebrew/requirements.rb
@@ -107,3 +107,17 @@ class ArchRequirement < Requirement
"This formula requires an #{@arch} architecture."
end
end
+
+class MercurialDependency < Requirement
+ fatal true
+
+ satisfy { which('hg') }
+
+ def message; <<-EOS.undent
+ Mercurial is needed to install this software.
+
+ You can install this with Homebrew using:
+ brew install mercurial
+ EOS
+ end
+end