diff options
| author | Xu Cheng | 2015-09-14 19:51:04 +0800 | 
|---|---|---|
| committer | Xu Cheng | 2015-10-19 21:41:36 +0800 | 
| commit | b5032ad2cbbdcc1917f1c7ca463565ee6a1e0c66 (patch) | |
| tree | c79cf3e4d32de22d03f40c34408e9c8535dea44f /Library/Homebrew/formula_support.rb | |
| parent | 5ec396ed38ce9b48108715376c7ff38d7ad48cf9 (diff) | |
| download | brew-b5032ad2cbbdcc1917f1c7ca463565ee6a1e0c66.tar.bz2 | |
Formula: add bottle disable DSL
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 20 | 
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 2430c31b0..c76ed39f3 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -55,3 +55,23 @@ EOS      end.strip    end  end + +# Used to annotate formulae that don't require compiling or cannot build bottle. +class BottleDisableReason +  def initialize(type, reason) +    @type = type +    @reason = reason +  end + +  def unneeded? +    @type == :unneeded +  end + +  def to_s +    if @type == :unneeded +      "This formula doesn't require compiling." +    else +      @reason +    end +  end +end  | 
