diff options
| author | Camillo Lugaresi | 2012-06-05 22:21:15 +0200 |
|---|---|---|
| committer | Jack Nagel | 2012-07-01 12:10:32 -0500 |
| commit | 63415cccaecf9cccf204570ea2242b56ce0ffdc4 (patch) | |
| tree | 3f40e2499f4bf0914234d33755586349edb2e805 /Library/Homebrew/macos.rb | |
| parent | 344005f8021eba9d9114735ec44a2e9f165a295b (diff) | |
| download | homebrew-63415cccaecf9cccf204570ea2242b56ce0ffdc4.tar.bz2 | |
use XQuartz when present
Diffstat (limited to 'Library/Homebrew/macos.rb')
| -rw-r--r-- | Library/Homebrew/macos.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index 766e07218..632077dbf 100644 --- a/Library/Homebrew/macos.rb +++ b/Library/Homebrew/macos.rb @@ -313,9 +313,16 @@ module MacOS extend self end end + def x11_prefix + @x11_prefix ||= if Pathname.new('/opt/X11/lib/libpng.dylib').exist? + Pathname.new('/opt/X11') + elsif Pathname.new('/usr/X11/lib/libpng.dylib').exist? + Pathname.new('/usr/X11') + end + end + def x11_installed? - # Even if only Xcode (without CLT) is installed, this dylib is there. - Pathname.new('/usr/X11/lib/libpng.dylib').exist? + not x11_prefix.nil? end def macports_or_fink_installed? |
