openbsd-ports/devel/ruby-gems/patches/patch-lib_rubygems_installer_rb
bernd 0dd529a522 Update to ruby-gems-1.3.5.
From Jeremy Evans. Thank you!
2009-10-12 17:18:00 +00:00

29 lines
1.0 KiB
Plaintext

$OpenBSD: patch-lib_rubygems_installer_rb,v 1.8 2009/10/12 17:18:00 bernd Exp $
This is for GEM_SKIPDEPENDS in ruby.port.mk.
--- lib/rubygems/installer.rb.orig Mon Jun 22 15:54:36 2009
+++ lib/rubygems/installer.rb Tue Sep 8 18:23:08 2009
@@ -114,6 +114,7 @@ class Gem::Installer
@bin_dir = options[:bin_dir]
@development = options[:development]
@source_index = options[:source_index]
+ @skip_dependencies = options[:skip_dependencies]
begin
@format = Gem::Format.from_file_by_path @gem, @security_policy
@@ -199,7 +200,12 @@ class Gem::Installer
deps |= @spec.development_dependencies if @development
deps.each do |dep_gem|
- ensure_dependency @spec, dep_gem
+ if @skip_dependencies && @skip_dependencies.include?(dep_gem.name)
+ say "Skipping '#{dep_gem.name}' dependency."
+ @spec.dependencies.delete(dep_gem)
+ else
+ ensure_dependency @spec, dep_gem
+ end
end
end
end