diff options
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? |
