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

twittner twittner at pld-linux.org
Sun Jan 13 01:57:40 CET 2008


Author: twittner                     Date: Sun Jan 13 00:57:40 2008 GMT
Module: SOURCES                       Tag: DEVEL
---- Log message:
- up to 1.0.1

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

---- Diffs:

================================================================
Index: SOURCES/ruby-RubyGems-setup.patch
diff -u /dev/null SOURCES/ruby-RubyGems-setup.patch:1.1.2.1
--- /dev/null	Sun Jan 13 01:57:40 2008
+++ SOURCES/ruby-RubyGems-setup.patch	Sun Jan 13 01:57:35 2008
@@ -0,0 +1,124 @@
+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
++
+ $:.unshift 'lib'
+ require 'rubygems'
+ 
+ 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
+ 
+-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]
+   end
+ 
+   prefix = File.expand_path prefix
+ 
+-  raise "invalid --prefix #{prefix.inspect}" if prefix.nil?
++  raise "invalid --root #{prefix.inspect}" if prefix.nil?
+ 
+-  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 @@
+   puts "Set the GEM_HOME environment variable if you want RDoc generated"
+ end
+ 
+-# Remove stubs
+-
+-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
+-
+-if seen_stub then
+-  puts "Finished with library stubs."
+-else
+-  puts "No library stubs found."
+-end
+-
================================================================


More information about the pld-cvs-commit mailing list