aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-01-25 09:32:36 +0000
committerGitHub2017-01-25 09:32:36 +0000
commite77e32c2dc29b29c4a4cfe3ddc76ee8bf09fd731 (patch)
treea523115b425b412f57ad9a3f788915973ed33a28
parent54b9bc4d0ec91db10204313cfa11e9e3bb3b38e2 (diff)
parentcc22239c9999f4d56f487d4002b1bbe0a2dc0a94 (diff)
downloadbrew-e77e32c2dc29b29c4a4cfe3ddc76ee8bf09fd731.tar.bz2
Merge pull request #1902 from MikeMcQuaid/caveats-keg-only
caveats: tweak keg-only messaging.
-rw-r--r--Library/Homebrew/caveats.rb25
1 files changed, 14 insertions, 11 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb
index d1dda9d4c..d051a7ca7 100644
--- a/Library/Homebrew/caveats.rb
+++ b/Library/Homebrew/caveats.rb
@@ -48,20 +48,23 @@ class Caveats
s = "This formula is keg-only, which means it was not symlinked into #{HOMEBREW_PREFIX}."
s << "\n\n#{f.keg_only_reason}"
- if f.lib.directory? || 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:
+ if f.bin.directory? || f.sbin.directory?
+ s << "\nIf you need to have this software first in your PATH run:\n"
+ if f.bin.directory?
+ s << " #{Utils::Shell.prepend_path_in_shell_profile(f.opt_bin.to_s)}\n"
+ end
+ if f.sbin.directory?
+ s << " #{Utils::Shell.prepend_path_in_shell_profile(f.opt_sbin.to_s)}\n"
+ end
+ end
- EOS
+ if f.lib.directory? || f.include.directory?
+ s << "\nFor compilers to find this software you may need to set:\n"
s << " LDFLAGS: -L#{f.opt_lib}\n" if f.lib.directory?
s << " CPPFLAGS: -I#{f.opt_include}\n" if f.include.directory?
-
- if which("pkg-config")
+ if which("pkg-config") &&
+ ((f.lib/"pkgconfig").directory? || (f.share/"pkgconfig").directory?)
+ s << "For pkg-config to find this software you may need to set:\n"
s << " PKG_CONFIG_PATH: #{f.opt_lib}/pkgconfig\n" if (f.lib/"pkgconfig").directory?
s << " PKG_CONFIG_PATH: #{f.opt_share}/pkgconfig\n" if (f.share/"pkgconfig").directory?
end