Don't use XQuartz for e.g. :libpng on 10.8.

XQuartz isn't added to the default library paths so if something is
linked against a Homebrew libpng then it doesn't work against the
XQuartz libpng. The CLT provides X11 on Lion so don't request users
install XQuartz if it isn't needed on Mountain Lion.

Fixes Homebrew/homebrew#14325.
This commit is contained in:
Mike McQuaid 2012-08-22 13:34:26 -07:00
parent 97d1dc4f2b
commit 1f8af42fee

View File

@ -63,8 +63,8 @@ private
# Xcode no longer provides autotools or some other build tools # Xcode no longer provides autotools or some other build tools
Dependency.new(spec.to_s) unless MacOS::Xcode.provides_autotools? Dependency.new(spec.to_s) unless MacOS::Xcode.provides_autotools?
when :libpng, :freetype, :pixman, :fontconfig, :cairo when :libpng, :freetype, :pixman, :fontconfig, :cairo
if MacOS.version >= :lion if MacOS.version >= :mountain_lion
MacOS::XQuartz.installed? ? X11Dependency.new(tag) : Dependency.new(spec.to_s) Dependency.new(spec.to_s)
else else
X11Dependency.new(tag) X11Dependency.new(tag)
end end