Add :hg build requirement.

Closes Homebrew/homebrew#19074.
This commit is contained in:
Adam Vandenberg 2013-04-17 10:01:38 -07:00
parent 869642e635
commit a7714a804b
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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