aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2012-06-17 10:59:01 -0500
committerMisty De Meo2012-06-17 12:17:11 -0500
commit6229a20db7a8345b61b4a86484e55825f6ff5e86 (patch)
treeb5ec1957a693a7acef6d75c5c44f89f894a9c2cf /Library
parent2cca8e1a4f538aa7c2316752e21a26f1d490f107 (diff)
downloadbrew-6229a20db7a8345b61b4a86484e55825f6ff5e86.tar.bz2
doctor: Mono-specific warning for pkg-config
Mono installs its own pkg-config symlink into /usr/bin/pkg-config, which breaks non-Mono builds. Provide a specific warning. Closes Homebrew/homebrew#12859.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 277ce858f..11eabe281 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -463,7 +463,15 @@ def check_which_pkg_config
binary = which 'pkg-config'
return if binary.nil?
- unless binary.to_s == "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent
+ mono_config = Pathname.new("/usr/bin/pkg-config")
+ if mono_config.exist? && mono_config.realpath.to_s.include?("Mono.framework") then <<-EOS.undent
+ You have a non-Homebrew 'pkg-config' in your PATH:
+ /usr/bin/pkg-config => #{mono_config.realpath}
+
+ This was most likely created by the Mono installer. `./configure` may
+ have problems finding brew-installed packages using this other pkg-config.
+ EOS
+ elsif binary.to_s != "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent
You have a non-Homebrew 'pkg-config' in your PATH:
#{binary}