Move x86_64 Requirement into core

Closes Homebrew/homebrew#18886.
This commit is contained in:
Jack Nagel 2013-04-01 11:53:13 -05:00
parent 9f1e6af879
commit ee7178562f
2 changed files with 21 additions and 0 deletions

View File

@ -89,6 +89,7 @@ private
when :postgresql then PostgresqlDependency.new(tag)
when :tex then TeXDependency.new(tag)
when :clt then CLTDependency.new(tag)
when :arch then ArchRequirement.new(tag)
else
raise "Unsupported special dependency #{spec}"
end

View File

@ -334,3 +334,23 @@ class CLTDependency < Requirement
EOS
end
end
class ArchRequirement < Requirement
fatal true
def initialize(arch)
@arch = arch
super
end
satisfy do
case @arch
when :x86_64 then MacOS.prefer_64_bit?
end
end
def message; <<-EOS.undent
This formula requires an #{@arch} architecture.
EOS
end
end