aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2010-06-29 10:21:40 -0700
committerAdam Vandenberg2010-08-09 19:13:07 -0700
commit3fd8ca933d7c30ec01b6a2c2642c10df9f2220a5 (patch)
tree5e26e77e9834486c54310727fabd0c0f02f1b72a
parent8dde4f80acef32496d190934a0cd9a31f5dbae3f (diff)
downloadhomebrew-3fd8ca933d7c30ec01b6a2c2642c10df9f2220a5.tar.bz2
brew doctor - X11 check
Tweak wording in X11 check and use the same X11 detection function as ENV.x11; also move that function into utils.
-rw-r--r--Library/Homebrew/brew.h.rb4
-rw-r--r--Library/Homebrew/brew_doctor.rb5
-rw-r--r--Library/Homebrew/utils.rb4
3 files changed, 7 insertions, 6 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index ba3c15f05..8b091995d 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -619,7 +619,3 @@ def llvm_build
$1.to_i
end
end
-
-def x11_installed?
- Pathname.new('/usr/X11/lib/libpng.dylib').exist?
-end
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb
index 76177d068..fddd33a44 100644
--- a/Library/Homebrew/brew_doctor.rb
+++ b/Library/Homebrew/brew_doctor.rb
@@ -54,10 +54,11 @@ def check_for_stray_dylibs
end
def check_for_x11
- unless File.exists? '/usr/X11/lib/libpng.dylib'
+ unless x11_installed?
+ opoo "X11 not installed."
puts <<-EOS.undent
You don't have X11 installed as part of your Xcode installation.
- This isn't required for all formula, but is expected by some.
+ This isn't required for all formulae, but is expected by some.
EOS
end
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index a34e108de..52b85bd19 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -276,4 +276,8 @@ def dump_build_env env
value = env[k]
puts "#{k}: #{value}" if value
end
+end
+
+def x11_installed?
+ Pathname.new('/usr/X11/lib/libpng.dylib').exist?
end \ No newline at end of file