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.
This commit is contained in:
Jack Nagel 2013-02-10 19:26:18 -06:00
parent 803649bf04
commit 3e9241312d
2 changed files with 14 additions and 2 deletions

View File

@ -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

View File

@ -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)