From 2394d6f2d8d00dfe6dd3824de678d3ca44e9ae57 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sun, 11 Sep 2016 04:49:09 +0100 Subject: 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. --- Library/Homebrew/caveats.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3