diff options
| -rw-r--r-- | Library/Homebrew/cmd/--config.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/compat/compatibility.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 20 | ||||
| -rw-r--r-- | Library/Homebrew/macos/xquartz.rb | 10 |
4 files changed, 24 insertions, 14 deletions
diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb index d70af5f99..5c3da0303 100644 --- a/Library/Homebrew/cmd/--config.rb +++ b/Library/Homebrew/cmd/--config.rb @@ -60,7 +60,7 @@ module Homebrew extend self def describe_x11 return "N/A" unless MacOS::XQuartz.installed? - return "#{MacOS::XQuartz.version} @ " + describe_path(MacOS::XQuartz.prefix) + return "XQuartz #{MacOS::XQuartz.version} in " + describe_path(MacOS::XQuartz.prefix) end def describe_perl diff --git a/Library/Homebrew/compat/compatibility.rb b/Library/Homebrew/compat/compatibility.rb index a06978398..a8b6afb70 100644 --- a/Library/Homebrew/compat/compatibility.rb +++ b/Library/Homebrew/compat/compatibility.rb @@ -34,7 +34,7 @@ def llvm_build end def x11_installed? - MacOS::XQuartz.installed? + MacOS::X11.installed? end def macports_or_fink_installed? @@ -191,10 +191,10 @@ module MacOS extend self end def x11_installed? - XQuartz.installed? + X11.installed? end def x11_prefix - XQuartz.prefix + X11.prefix end end diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 7b0214816..436886318 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -314,26 +314,26 @@ Please take one of the following actions: end def x11 - unless MacOS::XQuartz.installed? + unless MacOS::X11.installed? opoo "You do not have X11 installed, this formula may not build." end # There are some config scripts here that should go in the PATH - prepend 'PATH', MacOS::XQuartz.bin, ':' + prepend 'PATH', MacOS::X11.bin, ':' - prepend 'PKG_CONFIG_PATH', MacOS::XQuartz.lib/'pkgconfig', ':' - prepend 'PKG_CONFIG_PATH', MacOS::XQuartz.share/'pkgconfig', ':' + prepend 'PKG_CONFIG_PATH', MacOS::X11.lib/'pkgconfig', ':' + prepend 'PKG_CONFIG_PATH', MacOS::X11.share/'pkgconfig', ':' - append 'LDFLAGS', "-L#{MacOS::XQuartz.lib}" - append 'CMAKE_PREFIX_PATH', MacOS::XQuartz.prefix, ':' - append 'CMAKE_INCLUDE_PATH', MacOS::XQuartz.include, ':' + append 'LDFLAGS', "-L#{MacOS::X11.lib}" + append 'CMAKE_PREFIX_PATH', MacOS::X11.prefix, ':' + append 'CMAKE_INCLUDE_PATH', MacOS::X11.include, ':' - append 'CPPFLAGS', "-I#{MacOS::XQuartz.include}" + append 'CPPFLAGS', "-I#{MacOS::X11.include}" unless MacOS::CLT.installed? append 'CMAKE_PREFIX_PATH', MacOS.sdk_path/'usr/X11', ':' - append 'CPPFLAGS', "-I#{MacOS::XQuartz.include}/freetype2" - append 'CFLAGS', "-I#{MacOS::XQuartz.include}" + append 'CPPFLAGS', "-I#{MacOS::X11.include}/freetype2" + append 'CFLAGS', "-I#{MacOS::X11.include}" end end alias_method :libpng, :x11 diff --git a/Library/Homebrew/macos/xquartz.rb b/Library/Homebrew/macos/xquartz.rb index d00c55680..cc7207d63 100644 --- a/Library/Homebrew/macos/xquartz.rb +++ b/Library/Homebrew/macos/xquartz.rb @@ -26,6 +26,16 @@ module MacOS::XQuartz extend self def installed? not prefix.nil? end +end + +module MacOS::X11 extend self + def prefix + MacOS::XQuartz.prefix + end + + def installed? + MacOS::XQuartz.installed? + end # If XQuartz and/or the CLT are installed, headers will be found under # /opt/X11/include or /usr/X11/include. For Xcode-only systems, they are |
