diff options
| author | Dominyk Tiller | 2016-09-11 04:49:09 +0100 |
|---|---|---|
| committer | Dominyk Tiller | 2016-09-11 04:49:09 +0100 |
| commit | 2394d6f2d8d00dfe6dd3824de678d3ca44e9ae57 (patch) | |
| tree | f9b1dfaef870fe25c3c8a41c14dff78e7af0e377 | |
| parent | 2815485f544ae9e4b2a04e32ee9cb01e7cea47c0 (diff) | |
| download | brew-2394d6f2d8d00dfe6dd3824de678d3ca44e9ae57.tar.bz2 | |
caveats: highlight PKG_CONFIG_PATH if exists
We keep getting issues every now & again about people being confused that
keg_only includes hiding the `pkg-config` files. Perhaps seems reasonable to
start pointing out those exist when they do & a hint on how to access them.
Hidden behind a which check to avoid redundant messages, although `pkg-config`
is an incredibly popular formula. Ran some time tests, no appreciable difference
from the status quo.
If accepted:
Closes https://github.com/Homebrew/homebrew-core/issues/4669.
| -rw-r--r-- | Library/Homebrew/caveats.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 7c23901b8..b71596b2b 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -54,6 +54,11 @@ class Caveats EOS 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") + 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 end s << "\n" end |
