Add special :xcode dependency

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Adam Vandenberg 2012-07-12 07:08:23 -07:00 committed by Jack Nagel
parent ac51c0ffbb
commit 4a948c4132

View File

@ -70,6 +70,8 @@ private
end
when :x11
X11Dependency.new(tag)
when :xcode
XCodeDependency.new
else
raise "Unsupported special dependency #{spec}"
end
@ -322,3 +324,16 @@ class ConflictRequirement < Requirement
not ARGV.force?
end
end
class XCodeDependency < Requirement
def fatal?; true; end
def satisfied?
MacOS::Xcode.installed?
end
def message; <<-EOS.undent
XCode is required to compile this software.
EOS
end
end