aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dependency_collector.rb12
-rw-r--r--Library/Homebrew/extend/os/linux/ant_dep.rb4
-rw-r--r--Library/Homebrew/extend/os/mac/ant_dep.rb5
3 files changed, 15 insertions, 6 deletions
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb
index ed9fc3a85..20bf39d83 100644
--- a/Library/Homebrew/dependency_collector.rb
+++ b/Library/Homebrew/dependency_collector.rb
@@ -5,6 +5,12 @@ require "requirement"
require "requirements"
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 requirement is something other than a formula that another formula
## needs to be present. This includes external language modules,
@@ -135,12 +141,6 @@ class DependencyCollector
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)
tags << :build
strategy = spec.download_strategy
diff --git a/Library/Homebrew/extend/os/linux/ant_dep.rb b/Library/Homebrew/extend/os/linux/ant_dep.rb
new file mode 100644
index 000000000..adc85ebb0
--- /dev/null
+++ b/Library/Homebrew/extend/os/linux/ant_dep.rb
@@ -0,0 +1,4 @@
+def ant_dep(spec, tags)
+ # Always use brewed ant on Linux
+ Dependency.new(spec.to_s, tags)
+end
diff --git a/Library/Homebrew/extend/os/mac/ant_dep.rb b/Library/Homebrew/extend/os/mac/ant_dep.rb
new file mode 100644
index 000000000..397eb0e72
--- /dev/null
+++ b/Library/Homebrew/extend/os/mac/ant_dep.rb
@@ -0,0 +1,5 @@
+def ant_dep(spec, tags)
+ if MacOS.version >= :mavericks
+ Dependency.new(spec.to_s, tags)
+ end
+end