diff options
| author | Jack Nagel | 2013-04-01 11:53:13 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-04-02 13:17:24 -0500 |
| commit | ee7178562fde5fb23acde1cb4f8d8e4c4ac969c2 (patch) | |
| tree | 006d4f24f84b211a1d4a3dbe1841115dfc4b4e40 | |
| parent | 9f1e6af879542224622f27ba1ae4870ae474ac6e (diff) | |
| download | brew-ee7178562fde5fb23acde1cb4f8d8e4c4ac969c2.tar.bz2 | |
Move x86_64 Requirement into core
Closes Homebrew/homebrew#18886.
| -rw-r--r-- | Library/Homebrew/dependency_collector.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/requirements.rb | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index 92450a771..cfbb06695 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -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 diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb index 1f58e6b0a..988a0a6c0 100644 --- a/Library/Homebrew/requirements.rb +++ b/Library/Homebrew/requirements.rb @@ -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 |
