linamh/dev-ruby/rubygems/files/rubygems-1.1.0-setup.patch
2008-12-08 19:43:30 +00:00

62 lines
1.5 KiB
Diff

Source: Richard Brown
Upstream: no
Reason: respect --prefix properly, stop stamping on live filesystem.
--- setup.rb.orig 2008-03-27 23:09:24.000000000 +0000
+++ setup.rb 2008-03-29 09:12:32.000000000 +0000
@@ -81,8 +81,8 @@
raise "invalid --prefix #{prefix.inspect}" if prefix.nil?
- lib_dir = File.join prefix, 'lib'
- bin_dir = File.join prefix, 'bin'
+ lib_dir = File.join prefix, Config::CONFIG['sitelibdir']
+ bin_dir = File.join prefix, Config::CONFIG['bindir']
mkdir_p lib_dir
mkdir_p bin_dir
@@ -187,30 +187,15 @@
end
end
-# Remove source caches
-
-require 'rubygems/source_info_cache'
-
-user_cache_file = Gem::SourceInfoCache.user_cache_file
-system_cache_file = Gem::SourceInfoCache.system_cache_file
-
-rm_f user_cache_file if File.writable? File.dirname(user_cache_file)
-rm_f system_cache_file if File.writable? File.dirname(system_cache_file)
-
# install RDoc
gem_doc_dir = File.join Gem.dir, 'doc'
if File.writable? gem_doc_dir then
- puts "Removing old RubyGems RDoc and ri"
- Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
- rm_rf dir
- end
-
def run_rdoc(*args)
args << '--quiet'
args << '--main' << 'README'
- args << '.' << 'README' << 'LICENSE.txt' << 'GPL.txt'
+ args << '.' << 'README'
r = RDoc::RDoc.new
r.document args
@@ -237,6 +222,7 @@
end
# Remove stubs
+if false # Don't want this
def stub?(path)
return unless File.readable? path
@@ -305,3 +291,4 @@
puts "to remove it by hand."
puts
+end