diff options
| author | Misty De Meo | 2015-06-14 19:22:03 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2015-06-15 08:21:08 -0700 | 
| commit | 6d5632cd8fb9cc33a181f418de18fb115fb58096 (patch) | |
| tree | 323d7092bfeb530818561f86e3b675b4b57239c0 /Library/Homebrew/caveats.rb | |
| parent | 4c6da16221a580fa6297930f9dfd6f150caab1dc (diff) | |
| download | brew-6d5632cd8fb9cc33a181f418de18fb115fb58096.tar.bz2 | |
Formula: always print keg_only_text
Fixes Homebrew/homebrew#40724.
Closes Homebrew/homebrew#40725.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/caveats.rb')
| -rw-r--r-- | Library/Homebrew/caveats.rb | 23 | 
1 files changed, 22 insertions, 1 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 1df2e2644..4b1c2fcdd 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -9,7 +9,7 @@ class Caveats      caveats = []      s = f.caveats.to_s      caveats << s.chomp + "\n" if s.length > 0 -    caveats << f.keg_only_text if f.keg_only? && f.respond_to?(:keg_only_text) +    caveats << keg_only_text      caveats << bash_completion_caveats      caveats << zsh_completion_caveats      caveats << fish_completion_caveats @@ -31,6 +31,27 @@ class Caveats      end.compact.first    end +  def keg_only_text +    return "" unless f.keg_only? + +    s = "This formula is keg-only, which means it was not symlinked into #{HOMEBREW_PREFIX}." +    s << "\n\n#{f.keg_only_reason.to_s}" +    if f.lib.directory? or f.include.directory? +      s << +        <<-EOS.undent_________________________________________________________72 + + +        Generally there are no consequences of this for you. If you build your +        own software and it requires this formula, you'll need to add to your +        build variables: + +        EOS +      s << "    LDFLAGS:  -L#{f.opt_lib}\n" if f.lib.directory? +      s << "    CPPFLAGS: -I#{f.opt_include}\n" if f.include.directory? +    end +    s << "\n" +  end +    def bash_completion_caveats      if keg and keg.completion_installed? :bash then <<-EOS.undent        Bash completion has been installed to:  | 
