Skip to content
Snippets Groups Projects
Commit 51539517 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

Set cask and download DSL values on requirements.


Closes Homebrew/homebrew#35257.

Signed-off-by: default avatarMike McQuaid <mike@mikemcquaid.com>
parent 99ecc9ac
No related branches found
No related tags found
No related merge requests found
......@@ -60,28 +60,20 @@ end
class TeXDependency < Requirement
fatal true
cask "mactex"
download "http://www.tug.org/mactex/"
satisfy { which('tex') || which('latex') }
def message;
if File.exist?("/usr/texbin")
texbin_path = "/usr/texbin"
else
texbin_path = "its bin directory"
end
<<-EOS.undent
A LaTeX distribution is required for Homebrew to install this formula.
You can install MacTeX distribution with:
brew cask install mactex
Or from:
http://www.tug.org/mactex/
def message
s = <<-EOS.undent
A LaTeX distribution is required for Homebrew to install this formula.
Make sure that "/usr/texbin", or the location you installed it to, is in
your PATH before proceeding.
Make sure that "/usr/texbin", or the location you installed it to, is in
your PATH before proceeding.
EOS
s += super
s
end
end
......@@ -120,6 +112,9 @@ end
class JavaDependency < Requirement
fatal true
cask "java"
download "http://www.oracle.com/technetwork/java/javase/downloads/index.html"
satisfy { java_version }
def initialize(tags)
......@@ -136,15 +131,9 @@ class JavaDependency < Requirement
def message
version_string = " #{@version}" if @version
<<-EOS.undent
Java#{version_string} is required to install this formula.
You can install the Java Development Kit (JDK) with:
brew cask install java
Or from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
EOS
s = "Java#{version_string} is required to install this formula."
s += super
s
end
end
......
......@@ -3,6 +3,9 @@ require "requirement"
class OsxfuseDependency < Requirement
fatal true
default_formula "osxfuse"
cask "osxfuse"
download "https://osxfuse"
satisfy { Formula["osxfuse"].installed? || self.class.binary_osxfuse_installed? }
def self.binary_osxfuse_installed?
......@@ -12,7 +15,6 @@ class OsxfuseDependency < Requirement
env do
ENV.append_path "PKG_CONFIG_PATH", HOMEBREW_PREFIX/"Library/ENV/pkgconfig/fuse"
end
end
class ConflictsWithBinaryOsxfuse < Requirement
......
......@@ -3,6 +3,7 @@ require "language/python"
class PythonDependency < Requirement
fatal true
default_formula "python"
cask "python"
satisfy :build_env => false do
python = which_python
......@@ -51,6 +52,7 @@ end
class Python3Dependency < PythonDependency
fatal true
default_formula "python3"
cask "python3"
satisfy(:build_env => false) { which_python }
......
......@@ -3,6 +3,7 @@ require "requirement"
class TuntapDependency < Requirement
fatal true
default_formula "tuntap"
cask "tuntap"
satisfy { self.class.binary_tuntap_installed? || Formula["tuntap"].installed? }
def self.binary_tuntap_installed?
......
......@@ -5,6 +5,8 @@ class X11Dependency < Requirement
attr_reader :min_version
fatal true
cask "xquartz"
download "https://xquartz.macosforge.org"
env { ENV.x11 }
......@@ -24,13 +26,10 @@ class X11Dependency < Requirement
MacOS::XQuartz.installed? && min_version <= Version.new(MacOS::XQuartz.version)
end
def message; <<-EOS.undent
You can install XQuartz#{@min_version_string} with:
brew cask install xquartz
Or from:
https://xquartz.macosforge.org
EOS
def message
s = "XQuartz#{@min_version_string} is required to install this formula."
s += super
s
end
def <=> other
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment