switch to using extend pattern
This commit is contained in:
parent
54a086e2fe
commit
0a4bc8494d
@ -5,6 +5,12 @@ require "requirement"
|
|||||||
require "requirements"
|
require "requirements"
|
||||||
require "set"
|
require "set"
|
||||||
|
|
||||||
|
if OS.mac?
|
||||||
|
require "extend/os/mac/ant_dep"
|
||||||
|
elsif OS.linux?
|
||||||
|
require "extend/os/linux/ant_dep"
|
||||||
|
end
|
||||||
|
|
||||||
## A dependency is a formula that another formula needs to install.
|
## A dependency is a formula that another formula needs to install.
|
||||||
## A requirement is something other than a formula that another formula
|
## A requirement is something other than a formula that another formula
|
||||||
## needs to be present. This includes external language modules,
|
## needs to be present. This includes external language modules,
|
||||||
@ -135,12 +141,6 @@ class DependencyCollector
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def ant_dep(spec, tags)
|
|
||||||
if MacOS.version >= :mavericks || !OS.mac?
|
|
||||||
Dependency.new(spec.to_s, tags)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def resource_dep(spec, tags)
|
def resource_dep(spec, tags)
|
||||||
tags << :build
|
tags << :build
|
||||||
strategy = spec.download_strategy
|
strategy = spec.download_strategy
|
||||||
|
|||||||
4
Library/Homebrew/extend/os/linux/ant_dep.rb
Normal file
4
Library/Homebrew/extend/os/linux/ant_dep.rb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
def ant_dep(spec, tags)
|
||||||
|
# Always use brewed ant on Linux
|
||||||
|
Dependency.new(spec.to_s, tags)
|
||||||
|
end
|
||||||
5
Library/Homebrew/extend/os/mac/ant_dep.rb
Normal file
5
Library/Homebrew/extend/os/mac/ant_dep.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
def ant_dep(spec, tags)
|
||||||
|
if MacOS.version >= :mavericks
|
||||||
|
Dependency.new(spec.to_s, tags)
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user