From 006f25d8cfa5ffa9e4c531d49dcc99fe312edff6 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 4 Dec 2016 21:35:43 +0100 Subject: Use Homebrew to detect if X11 is installed. --- Library/Homebrew/cask/lib/hbc/installer.rb | 2 +- Library/Homebrew/cask/lib/hbc/locations.rb | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'Library/Homebrew/cask/lib') diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb index 57efe97e9..afdaa2ec5 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -179,7 +179,7 @@ module Hbc def x11_dependencies return unless @cask.depends_on.x11 - raise CaskX11DependencyError, @cask.token if Hbc.x11_libpng.select(&:exist?).empty? + raise CaskX11DependencyError, @cask.token unless MacOS::X11.installed? end def formula_dependencies diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb index 7a0bde1b0..f28e84b2e 100644 --- a/Library/Homebrew/cask/lib/hbc/locations.rb +++ b/Library/Homebrew/cask/lib/hbc/locations.rb @@ -171,14 +171,6 @@ module Hbc def pre_mavericks_accessibility_dotfile @pre_mavericks_accessibility_dotfile ||= Pathname.new("/private/var/db/.AccessibilityAPIEnabled") end - - def x11_executable - @x11_executable ||= Pathname.new("/usr/X11/bin/X") - end - - def x11_libpng - @x11_libpng ||= [Pathname.new("/opt/X11/lib/libpng.dylib"), Pathname.new("/usr/X11/lib/libpng.dylib")] - end end end end -- cgit v1.2.3