aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-02-10 19:26:18 -0600
committerJack Nagel2013-02-10 19:28:14 -0600
commit87434496fcb25648300a0b8775ac699768f233d8 (patch)
tree3e5bef6f8cb8c4a39b709b2b5fd1a2647bb8ea6a
parent7938ea792fe5928860a7e87457ae796fcadb96d8 (diff)
downloadhomebrew-87434496fcb25648300a0b8775ac699768f233d8.tar.bz2
Add :libltdl dep for libtool's libltdl
The :libtool dep is implicitly a build-time dep; :libltdl can be used for software that uses the ltdl library at runtime.
-rw-r--r--Library/Homebrew/dependency_collector.rb9
-rw-r--r--Library/Homebrew/test/test_dependency_collector.rb7
2 files changed, 14 insertions, 2 deletions
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb
index e5da02429..2a40e1ad8 100644
--- a/Library/Homebrew/dependency_collector.rb
+++ b/Library/Homebrew/dependency_collector.rb
@@ -74,7 +74,7 @@ private
def parse_symbol_spec spec, tag
case spec
- when :autoconf, :automake, :bsdmake, :libtool
+ when :autoconf, :automake, :bsdmake, :libtool, :libltdl
# Xcode no longer provides autotools or some other build tools
autotools_dep(spec, tag)
when *X11Dependency::Proxy::PACKAGES
@@ -103,8 +103,13 @@ private
end
def autotools_dep(spec, tag)
+ case spec
+ when :libltdl then spec, tag = :libtool, Array(tag)
+ else tag = Array(tag) << :build
+ end
+
unless MacOS::Xcode.provides_autotools?
- Dependency.new(spec.to_s, [:build, *tag])
+ Dependency.new(spec.to_s, tag)
end
end
end
diff --git a/Library/Homebrew/test/test_dependency_collector.rb b/Library/Homebrew/test/test_dependency_collector.rb
index ee966ba8c..e4679a760 100644
--- a/Library/Homebrew/test/test_dependency_collector.rb
+++ b/Library/Homebrew/test/test_dependency_collector.rb
@@ -82,6 +82,13 @@ class DependencyCollectorTests < Test::Unit::TestCase
assert dep.optional?
end
+ def test_libltdl_not_build_dep
+ MacOS::Xcode.stubs(:provides_autotools?).returns(false)
+ dep = @d.build(:libltdl)
+ assert_equal Dependency.new("libtool"), dep
+ assert !dep.build?
+ end
+
def test_autotools_dep_no_system_autotools
MacOS::Xcode.stubs(:provides_autotools?).returns(false)
dep = @d.build(:libtool)