aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2013-04-17 10:01:38 -0700
committerAdam Vandenberg2013-04-17 10:01:38 -0700
commita7714a804b028523d3c213ae9cf2cb150876bec4 (patch)
treeb0f792381c2a6248a0994b28e146a681ae0850a8
parent869642e635e8fd26024f173475cd8ace81970197 (diff)
downloadbrew-a7714a804b028523d3c213ae9cf2cb150876bec4.tar.bz2
Add :hg build requirement.
Closes Homebrew/homebrew#19074.
-rw-r--r--Library/Homebrew/dependency_collector.rb1
-rw-r--r--Library/Homebrew/requirements.rb14
2 files changed, 15 insertions, 0 deletions
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