diff options
| author | Adam Vandenberg | 2012-07-12 07:08:23 -0700 |
|---|---|---|
| committer | Jack Nagel | 2012-08-17 15:35:54 -0500 |
| commit | f334344b1b73a6ec2adc13aa1a3d7e7876f09cf4 (patch) | |
| tree | 06754a307576fc4f4e36a93fcb98153cfdb8a39b | |
| parent | f554497dc00ca1096c8b903e8179e9d306ed7205 (diff) | |
| download | homebrew-f334344b1b73a6ec2adc13aa1a3d7e7876f09cf4.tar.bz2 | |
Add special :xcode dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/dependencies.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/dependencies.rb b/Library/Homebrew/dependencies.rb index 44584242a..43d77f531 100644 --- a/Library/Homebrew/dependencies.rb +++ b/Library/Homebrew/dependencies.rb @@ -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 |
