aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/requirements.rb')
-rw-r--r--Library/Homebrew/requirements.rb20
1 files changed, 20 insertions, 0 deletions
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