ports/devel/ruby-gems/files/patch-lib__rubygems__commands__setup_command.rb
Cheng-Lung Sung 3a0d47e472 - Update to 1.5.1
PR:		ports/154665
Submitted by:	wen
2011-02-21 04:02:51 +00:00

44 lines
1.1 KiB
Ruby

--- lib/rubygems/commands/setup_command.rb.orig 2011-02-10 14:01:36.000000000 +0000
+++ lib/rubygems/commands/setup_command.rb 2011-02-10 14:01:45.000000000 +0000
@@ -112,6 +112,8 @@
install_rdoc
+ install_sources
+
say
if @verbose then
say "-" * 78
@@ -147,6 +149,23 @@
end
end
+ def install_sources
+ say "Installing sources"
+
+ $: << "lib"
+ require 'rubygems'
+ require 'rubygems/builder'
+ require 'rubygems/installer'
+ require 'rubygems/config_file'
+
+ Dir.chdir("pkgs/sources") do
+ load "sources.gemspec"
+ spec = Gem.sources_spec
+ gem_file = Gem::Builder.new(spec).build
+ Gem::Installer.new(gem_file).install
+ end
+ end
+
def install_executables(bin_dir)
say "Installing gem executable" if @verbose
@@ -155,8 +174,6 @@
Dir.chdir 'bin' do
bin_files = Dir['*']
- bin_files.delete 'update_rubygems'
-
bin_files.each do |bin_file|
bin_file_formatted = if options[:format_executable] then
Gem.default_exec_format % bin_file