SOURCES (DEVEL): ruby-RubyGems-setup.patch - up to 1.2.0

twittner twittner at pld-linux.org
Thu Aug 21 18:40:38 CEST 2008


Author: twittner                     Date: Thu Aug 21 16:40:38 2008 GMT
Module: SOURCES                       Tag: DEVEL
---- Log message:
- up to 1.2.0

---- Files affected:
SOURCES:
   ruby-RubyGems-setup.patch (1.1.2.1 -> 1.1.2.2) 

---- Diffs:

================================================================
Index: SOURCES/ruby-RubyGems-setup.patch
diff -u SOURCES/ruby-RubyGems-setup.patch:1.1.2.1 SOURCES/ruby-RubyGems-setup.patch:1.1.2.2
--- SOURCES/ruby-RubyGems-setup.patch:1.1.2.1	Sun Jan 13 01:57:35 2008
+++ SOURCES/ruby-RubyGems-setup.patch	Thu Aug 21 18:40:33 2008
@@ -1,124 +1,82 @@
-diff -Nru -x '*~' o.rubygems-1.0.1/setup.rb n.rubygems-1.0.1/setup.rb
---- o.rubygems-1.0.1/setup.rb	2007-12-21 02:15:55.000000000 +0100
-+++ n.rubygems-1.0.1/setup.rb	2008-01-13 01:08:59.000000000 +0100
-@@ -15,13 +15,20 @@
-   exec(ruby, 'setup.rb', *ARGV)
- end
- 
-+require 'fileutils'
-+require 'rbconfig'
-+require 'rdoc/rdoc'
-+require 'tmpdir'
-+
-+include FileUtils::Verbose
+diff -Nur b.rubygems-1.2.0/setup.rb n.rubygems-1.2.0/setup.rb
+--- b.rubygems-1.2.0/setup.rb	2008-06-22 01:51:11.000000000 +0200
++++ n.rubygems-1.2.0/setup.rb	2008-08-21 18:14:59.000000000 +0200
+@@ -29,7 +29,8 @@
+     [ '--no-rdoc',                      GetoptLong::NO_ARGUMENT ],
+     [ '--no-ri',                        GetoptLong::NO_ARGUMENT ],
+     [ '--vendor',                       GetoptLong::NO_ARGUMENT ],
+-    [ '--destdir',                      GetoptLong::REQUIRED_ARGUMENT ]
++    [ '--destdir',                      GetoptLong::REQUIRED_ARGUMENT ],
++    [ '--rdocdir',                      GetoptLong::REQUIRED_ARGUMENT ]
+ )
+ 
+ prefix = ''
+@@ -38,6 +39,7 @@
+ ri = true
+ site_or_vendor = :sitelibdir
+ install_destdir = ''
++rdoc_dir = ''
+ 
+ opts.each do | opt, arg |
+   case opt
+@@ -63,6 +65,8 @@
+                          (Requires Ruby 1.8.7)
+   --destdir              Root directory to install rubygems into
+                          Used mainly for packaging RubyGems
++  --rdocdir              Put rdoc documentation in different location than gem's default (PLD addition)
 +
- $:.unshift 'lib'
- require 'rubygems'
+ HELP
+     exit 0
  
- if ARGV.include? '--help' then
-   puts "ruby setup.rb [options]:"
-   puts
--  puts "  --prefix=DIR         Prefix path for installing RubyGems"
-+  puts "  --root=DIR         Root directory for installing RubyGems"
-   puts "                       Will not affect gem repository"
-   puts
-   puts "  --format-executable  Make the gem command's prefix and suffix match ruby's"
-@@ -34,13 +41,6 @@
-   exit
- end
+@@ -87,6 +91,9 @@
  
--require 'fileutils'
--require 'rbconfig'
--require 'rdoc/rdoc'
--require 'tmpdir'
--
--include FileUtils::Verbose
--
- # check ruby version
- 
- required_version = Gem::Version::Requirement.create("> 1.8.2")
-@@ -54,26 +54,26 @@
- lib_dir = nil
- bin_dir = nil
- 
--if ARGV.grep(/^--prefix/).empty? then
--  lib_dir = Config::CONFIG['sitelibdir']
-+if ARGV.grep(/^--root/).empty? then
-+  lib_dir = Config::CONFIG['vendorlibdir']
-   bin_dir = Config::CONFIG['bindir']
- else
-   prefix = nil
- 
--  prefix_arg = ARGV.grep(/^--prefix=/).first
--  if prefix_arg =~ /^--prefix=(.*)/ then
-+  prefix_arg = ARGV.grep(/^--root=/).first
-+  if prefix_arg =~ /^--root=(.*)/ then
-     prefix = $1
-   else
--    path_index = ARGV.index '--prefix'
-+    path_index = ARGV.index '--root'
-     prefix = ARGV[path_index + 1]
+   when '--destdir'
+     install_destdir = File.expand_path(arg)
++
++  when '--rdocdir'
++    rdoc_dir = File.expand_path(arg)
    end
+ end
  
-   prefix = File.expand_path prefix
+@@ -168,7 +175,7 @@
+                          end
  
--  raise "invalid --prefix #{prefix.inspect}" if prefix.nil?
-+  raise "invalid --root #{prefix.inspect}" if prefix.nil?
+     dest_file = File.join bin_dir, bin_file_formatted
+-    bin_tmp_file = File.join Dir.tmpdir, bin_file
++    bin_tmp_file = File.join((install_destdir.empty? ? Dir.tmpdir : install_destdir), bin_file)
+ 
+     begin
+       cp bin_file, bin_tmp_file
+@@ -290,7 +297,7 @@
+   end
  
--  lib_dir = File.join prefix, 'lib'
--  bin_dir = File.join prefix, 'bin'
-+  lib_dir = File.join prefix, Config::CONFIG['vendorlibdir'] 
-+  bin_dir = File.join prefix, Config::CONFIG['bindir']
- 
-   mkdir_p lib_dir
-   mkdir_p bin_dir
-@@ -222,49 +222,3 @@
+   if rdoc then
+-    rdoc_dir = File.join rubygems_doc_dir, 'rdoc'
++    rdoc_dir = rdoc_dir.empty? ? File.join(rubygems_doc_dir, 'rdoc') : rdoc_dir
+     puts "Installing #{rubygems_name} rdoc into #{rdoc_dir}"
+     run_rdoc '--op', rdoc_dir
+   end
+@@ -299,23 +306,6 @@
    puts "Set the GEM_HOME environment variable if you want RDoc generated"
  end
  
--# Remove stubs
+-puts
+-puts "-" * 78
+-puts
 -
--def stub?(path)
--  return unless File.readable? path
--  File.read(path, 40) =~ /^# This file was generated by RubyGems/ and
--  File.readlines(path).size < 20
--end
--
--puts <<-EOF.gsub(/^ */, '')
--  As of RubyGems 0.8.0, library stubs are no longer needed.
--  Searching $LOAD_PATH for stubs to optionally delete (may take a while)...
--  EOF
--
--gemfiles = Dir[File.join("{#{($LOAD_PATH).join(',')}}", '**', '*.rb')]
--gemfiles = gemfiles.map { |file| File.expand_path file }.uniq
--
--puts "...done."
--
--seen_stub = false
--
--gemfiles.each do |file|
--  next if File.directory? file
--  next unless stub? file
--
--  unless seen_stub then
--    puts "\nRubyGems has detected stubs that can be removed.  Confirm their removal:"
--  end
--  seen_stub = true
--
--  print "  * remove #{file}? [y/n] "
--  answer = gets
--
--  if answer =~ /y/i then
--    unlink file
--    puts "        (removed)"
--  else
--    puts "        (skipping)"
--  end
--end
+-release_notes = File.join File.dirname(__FILE__), 'doc', 'release_notes',
+-                          "rel_#{Gem::RubyGemsVersion.gsub '.', '_'}.rdoc"
 -
--if seen_stub then
--  puts "Finished with library stubs."
+-if File.exist? release_notes then
+-  puts File.read(release_notes)
 -else
--  puts "No library stubs found."
+-  puts "Oh-no! Unable to find release notes in:\n\t#{release_notes}"
 -end
 -
+-puts
+-puts "-" * 78
+-puts
+-
+ puts "RubyGems installed the following executables:"
+ puts bin_file_names.map { |name| "\t#{name}\n" }
+ puts
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/ruby-RubyGems-setup.patch?r1=1.1.2.1&r2=1.1.2.2&f=u



More information about the pld-cvs-commit mailing list