summaryrefslogtreecommitdiff
path: root/misc/rubygems
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2011-08-12 15:50:44 +0000
committertaca <taca@pkgsrc.org>2011-08-12 15:50:44 +0000
commitb8ab946db9c8cce222a097b3ca64142cb1a5ff64 (patch)
treec56360c422b756bf1ab1bd5e14d5c3c134c18784 /misc/rubygems
parent1f815e3cd4a663272600764d9e26655db70e2a10 (diff)
downloadpkgsrc-b8ab946db9c8cce222a097b3ca64142cb1a5ff64.tar.gz
Update rubygems package to 1.8.7 with adding compatibility to read
older gemspec files. Changes are too may to write here, please refer History.txt file.
Diffstat (limited to 'misc/rubygems')
-rw-r--r--misc/rubygems/Makefile7
-rw-r--r--misc/rubygems/PLIST4
-rw-r--r--misc/rubygems/distinfo34
-rw-r--r--misc/rubygems/patches/patch-aa79
-rw-r--r--misc/rubygems/patches/patch-ab29
-rw-r--r--misc/rubygems/patches/patch-ac6
-rw-r--r--misc/rubygems/patches/patch-ad38
-rw-r--r--misc/rubygems/patches/patch-ag8
-rw-r--r--misc/rubygems/patches/patch-ah21
-rw-r--r--misc/rubygems/patches/patch-aj20
-rw-r--r--misc/rubygems/patches/patch-al6
-rw-r--r--misc/rubygems/patches/patch-am10
-rw-r--r--misc/rubygems/patches/patch-an12
-rw-r--r--misc/rubygems/patches/patch-ap8
-rw-r--r--misc/rubygems/patches/patch-lib_rubygems_require__paths__builder.rb8
-rw-r--r--misc/rubygems/patches/patch-test_rubygems_test__gem.rb8
16 files changed, 171 insertions, 127 deletions
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile
index 0b6fb579181..2db9cb14ada 100644
--- a/misc/rubygems/Makefile
+++ b/misc/rubygems/Makefile
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.38 2011/03/27 13:02:17 taca Exp $
+# $NetBSD: Makefile,v 1.39 2011/08/12 15:50:44 taca Exp $
-DISTNAME= rubygems-1.6.2
-PKGREVISION= 1
+DISTNAME= rubygems-1.8.7
CATEGORIES= misc ruby
MASTER_SITES= http://production.cf.rubygems.org/rubygems/ \
- http://rubyforge.org/frs/download.php/74445/
+ http://rubyforge.org/frs/download.php/74954/
EXTRACT_SUFX= .tgz
MAINTAINER= taca@NetBSD.org
diff --git a/misc/rubygems/PLIST b/misc/rubygems/PLIST
index 86173ff4d26..0f2c8576794 100644
--- a/misc/rubygems/PLIST
+++ b/misc/rubygems/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.17 2011/03/27 13:02:17 taca Exp $
+@comment $NetBSD: PLIST,v 1.18 2011/08/12 15:50:44 taca Exp $
bin/gem${RUBY_VER}.new
${RUBY_VENDORLIB}/gauntlet_rubygems.rb
${RUBY_VENDORLIB}/rbconfig/datadir.rb
@@ -41,6 +41,7 @@ ${RUBY_VENDORLIB}/rubygems/defaults.rb
${RUBY_VENDORLIB}/rubygems/dependency.rb
${RUBY_VENDORLIB}/rubygems/dependency_installer.rb
${RUBY_VENDORLIB}/rubygems/dependency_list.rb
+${RUBY_VENDORLIB}/rubygems/deprecate.rb
${RUBY_VENDORLIB}/rubygems/doc_manager.rb
${RUBY_VENDORLIB}/rubygems/errors.rb
${RUBY_VENDORLIB}/rubygems/exceptions.rb
@@ -71,6 +72,7 @@ ${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb
${RUBY_VENDORLIB}/rubygems/package/tar_test_case.rb
${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb
${RUBY_VENDORLIB}/rubygems/package_task.rb
+${RUBY_VENDORLIB}/rubygems/path_support.rb
${RUBY_VENDORLIB}/rubygems/platform.rb
${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb
${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb
diff --git a/misc/rubygems/distinfo b/misc/rubygems/distinfo
index e3a7c5aa577..c1041381cfc 100644
--- a/misc/rubygems/distinfo
+++ b/misc/rubygems/distinfo
@@ -1,20 +1,20 @@
-$NetBSD: distinfo,v 1.28 2011/03/23 14:35:04 taca Exp $
+$NetBSD: distinfo,v 1.29 2011/08/12 15:50:44 taca Exp $
-SHA1 (rubygems-1.6.2.tgz) = 32bb7823eb28907c883e194fa7ce0fc1118eb8bc
-RMD160 (rubygems-1.6.2.tgz) = 1994ac432f178612a75ac8454d7962359b87cda5
-Size (rubygems-1.6.2.tgz) = 242518 bytes
-SHA1 (patch-aa) = 8fa88c8b44a792740a695571ce5e66fcbc6cbaca
-SHA1 (patch-ab) = 6e98c1d41e5bb9f824d60073354837ebf2e7d2d1
-SHA1 (patch-ac) = de613df5f7b17e3a9fe5cbc4febe6bebe479dff8
-SHA1 (patch-ad) = 8d37e84782c0724428399507a5fee3b0eb6af2e6
+SHA1 (rubygems-1.8.7.tgz) = 02ab2356c08fe6a8eeb818dcbbc96e231f1512e5
+RMD160 (rubygems-1.8.7.tgz) = 7e309e9705921d10d5d5ec68ed235d5fd14c9776
+Size (rubygems-1.8.7.tgz) = 248796 bytes
+SHA1 (patch-aa) = abb8adc8f8edd0d4b5278f2a375e8b799559d5a4
+SHA1 (patch-ab) = 00c16e5c0a82a26062e6d9d9b7a2d275f8537ab4
+SHA1 (patch-ac) = 7c3e254d120bcb9fb90895a7119eb18920508948
+SHA1 (patch-ad) = 6df1c96bee978425fdc7189af4e8389963b34782
SHA1 (patch-af) = 0a9f3f4b2b323c9e5578a9080e45cf930b511bd1
-SHA1 (patch-ag) = 94caf33061c1c455388c5e027c13adf6b7811bd6
-SHA1 (patch-ah) = 36ec4d8524dfe2960f6afb7afcd34f8ed2368a60
-SHA1 (patch-aj) = eb079e5b072c65f8b60df33c6b53791bb5129b38
-SHA1 (patch-al) = d0e26e23501274749831ff4bd9f4f8ff8bc774ab
-SHA1 (patch-am) = 83f22425e521ac577d91c17d9b0dcb79e086dc01
-SHA1 (patch-an) = f583e03e69aba2543a2b858a376eb81fb7a4a581
+SHA1 (patch-ag) = fe209f86dd68bfb8de7084b7a64e22a4dd6240f9
+SHA1 (patch-ah) = ef4fc236d7f1686d86104823a8c2a11ba6f89e35
+SHA1 (patch-aj) = 3b77a675470ea3702b9870843d2bb39bb6a83f3e
+SHA1 (patch-al) = beeff0531ff4bd23c0796b1e28805ae6fe2202b0
+SHA1 (patch-am) = 374b16a77a3471958e0fcf7a60633658f9e9d559
+SHA1 (patch-an) = a4de56fc44a4c7556486268344d44640538db108
SHA1 (patch-ao) = b78557ffaa2df6c251ad7bfce760574e0ef3157a
-SHA1 (patch-ap) = c70cd7cf263ef53fc4fde1fd9b499563dab1325b
-SHA1 (patch-lib_rubygems_require__paths__builder.rb) = d6da3c9e55ed3dd3ab35d9de71c7776cfdfb3fc4
-SHA1 (patch-test_rubygems_test__gem.rb) = 77496b0b8e2c23930d10aa4171667138b6fef33c
+SHA1 (patch-ap) = eaf2bf2fc7cc71139df7ce2677c3ec9fa95d1081
+SHA1 (patch-lib_rubygems_require__paths__builder.rb) = 4c59ff6c4389fdb69308f0ab67e50d47420de099
+SHA1 (patch-test_rubygems_test__gem.rb) = 8bad451e8054fe954c13d28e542509b8adae2764
diff --git a/misc/rubygems/patches/patch-aa b/misc/rubygems/patches/patch-aa
index 3de73ed99ca..63602df5ea1 100644
--- a/misc/rubygems/patches/patch-aa
+++ b/misc/rubygems/patches/patch-aa
@@ -1,32 +1,65 @@
-$NetBSD: patch-aa,v 1.9 2010/09/16 12:02:05 taca Exp $
+$NetBSD: patch-aa,v 1.10 2011/08/12 15:50:44 taca Exp $
-* Make sure to load YAML.
-* Avoid access nil.
+* Relax to allow some attribute could be nil.
+* Complete "http://" to homepage attribute if it isn't begin with it.
---- lib/rubygems/specification.rb.orig 2010-04-22 04:43:03.000000000 +0000
+--- lib/rubygems/specification.rb.orig 2011-07-25 23:44:31.000000000 +0000
+++ lib/rubygems/specification.rb
-@@ -476,6 +476,7 @@ class Gem::Specification
- # 'input' can be anything that YAML.load() accepts: String or IO.
+@@ -118,6 +118,12 @@ class Gem::Specification
+ @@default_value[k].nil?
+ }
- def self.from_yaml(input)
-+ require 'yaml'
- input = normalize_yaml_input input
- spec = YAML.load input
++ # under pkgsrc environment
++ @@pkgsrc_nil_attributes = {}
++ [:authors, :cert_chain, :executables, :extensions, :extra_rdoc_files, :licenses, :required_rubygems_version, :test_files].each do |k|
++ @@pkgsrc_nil_attributes[k] = true
++ end
++
+ ######################################################################
+ # :section: Required gemspec attributes
-@@ -837,12 +838,12 @@ class Gem::Specification
+@@ -1950,7 +1956,24 @@ class Gem::Specification
+ normalize
+
+ nil_attributes = self.class.non_nil_attributes.find_all do |name|
+- instance_variable_get("@#{name}").nil?
++ val = instance_variable_get("@#{name}")
++ if val.nil?
++ if @@pkgsrc_nil_attributes.key?(name)
++ case name
++ when :required_rubygems_version
++ val = Gem::Requirement.default
++ else
++ val = []
++ end
++ instance_variable_set("@#{name}", val)
++ false
++ end
++ end
++ if name == :authors and val.empty?
++ val = ['not specified']
++ self.authors = val
++ false
++ end
+ end
+
+ unless nil_attributes.empty? then
+@@ -2053,10 +2076,15 @@ class Gem::Specification
+ raise Gem::InvalidSpecificationException, "#{lazy} is not a summary"
end
- @files.delete_if do |file| File.directory? file end
-- @test_files.delete_if do |file| File.directory? file end
-- @executables.delete_if do |file|
-+ @test_files and @test_files.delete_if do |file| File.directory? file end
-+ @executables and @executables.delete_if do |file|
- File.directory? File.join(bindir, file)
+- if homepage and not homepage.empty? and
+- homepage !~ /\A[a-z][a-z\d+.-]*:/i then
+- raise Gem::InvalidSpecificationException,
++ if homepage and not homepage.empty?
++ if @homepage =~ /\A[a-z][a-z\d+.-]*/i and
++ @homepage !~ /\A[a-z][a-z\d+.-]*:/i
++ @homepage = "http://" + @homepage
++ end
++ if homepage !~ /\A[a-z][a-z\d+.-]*:/i then
++ raise Gem::InvalidSpecificationException,
+ "\"#{homepage}\" is not a URI"
++ end
end
-- @extra_rdoc_files.delete_if do |file| File.directory? file end
-- @extensions.delete_if do |file| File.directory? file end
-+ @extra_rdoc_files and @extra_rdoc_files.delete_if do |file| File.directory? file end
-+ @extensions and @extensions.delete_if do |file| File.directory? file end
- non_files = files.select do |file|
- !File.file? file
+ # Warnings
diff --git a/misc/rubygems/patches/patch-ab b/misc/rubygems/patches/patch-ab
index 151e5d28c75..49b72f6eedd 100644
--- a/misc/rubygems/patches/patch-ab
+++ b/misc/rubygems/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.12 2010/09/16 12:02:05 taca Exp $
+$NetBSD: patch-ab,v 1.13 2011/08/12 15:50:44 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/dependency_installer.rb.orig 2010-04-22 04:43:02.000000000 +0000
+--- lib/rubygems/dependency_installer.rb.orig 2011-05-18 23:36:37.000000000 +0000
+++ lib/rubygems/dependency_installer.rb
@@ -38,6 +38,7 @@ class Gem::DependencyInstaller
# :format_executable:: See Gem::Installer#initialize.
@@ -12,20 +12,25 @@ Add install_root option for pkgsrc's rubygems support.
# :prerelease:: Allow prerelease versions. See #install.
# :security_policy:: See Gem::Installer::new and Gem::Security.
# :user_install:: See Gem::Installer.new
-@@ -45,7 +46,11 @@ class Gem::DependencyInstaller
+@@ -45,11 +46,15 @@ class Gem::DependencyInstaller
def initialize(options = {})
if options[:install_dir] then
-- spec_dir = options[:install_dir], 'specifications'
+- @gem_home = options[:install_dir]
+ if options[:install_root].nil? or options[:install_root] == "" then
-+ spec_dir = options[:install_dir], 'specifications'
++ @gem_home = options[:install_root].dup
+ else
-+ spec_dir = options[:install_root], options[:install_dir], 'specifications'
++ @gem_home = options[:install_dir].dup
+ end
- @source_index = Gem::SourceIndex.from_gems_in spec_dir
- else
- @source_index = Gem.source_index
-@@ -68,7 +73,12 @@ class Gem::DependencyInstaller
+
+ Gem::Specification.dirs = @gem_home
+ Gem.ensure_gem_subdirectories @gem_home
+- options[:install_dir] = @gem_home # FIX: because we suck and reuse below
++# options[:install_dir] = @gem_home # FIX: because we suck and reuse below
+ end
+
+ options = DEFAULT_OPTIONS.merge options
+@@ -69,7 +74,12 @@ class Gem::DependencyInstaller
@installed_gems = []
@install_dir = options[:install_dir] || Gem.dir
@@ -39,11 +44,11 @@ Add install_root option for pkgsrc's rubygems support.
# Set with any errors that SpecFetcher finds while search through
# gemspecs for a dep
-@@ -269,6 +279,7 @@ class Gem::DependencyInstaller
+@@ -290,6 +300,7 @@ class Gem::DependencyInstaller
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
:install_dir => @install_dir,
+ :install_root => @install_root,
:security_policy => @security_policy,
- :source_index => @source_index,
:user_install => @user_install,
+ :wrappers => @wrappers
diff --git a/misc/rubygems/patches/patch-ac b/misc/rubygems/patches/patch-ac
index bd270e4cd4e..045dbd9c59a 100644
--- a/misc/rubygems/patches/patch-ac
+++ b/misc/rubygems/patches/patch-ac
@@ -1,10 +1,10 @@
-$NetBSD: patch-ac,v 1.5 2010/09/10 03:48:40 taca Exp $
+$NetBSD: patch-ac,v 1.6 2011/08/12 15:50:44 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/install_update_options.rb.orig 2009-06-22 22:54:36.000000000 +0000
+--- lib/rubygems/install_update_options.rb.orig 2011-05-18 22:23:53.000000000 +0000
+++ lib/rubygems/install_update_options.rb
-@@ -34,6 +34,12 @@ module Gem::InstallUpdateOptions
+@@ -44,6 +44,12 @@ module Gem::InstallUpdateOptions
options[:bin_dir] = File.expand_path(value)
end
diff --git a/misc/rubygems/patches/patch-ad b/misc/rubygems/patches/patch-ad
index 6818f108d04..1f6500347ab 100644
--- a/misc/rubygems/patches/patch-ad
+++ b/misc/rubygems/patches/patch-ad
@@ -1,10 +1,10 @@
-$NetBSD: patch-ad,v 1.8 2011/03/23 14:35:05 taca Exp $
+$NetBSD: patch-ad,v 1.9 2011/08/12 15:50:44 taca Exp $
* Add install_root option for pkgsrc's rubygems support.
* Disable Gem::QUICKLOADER_SUCKAGE while Ruby 1.9.2's rubygems generates
.require_paths file.
---- lib/rubygems/installer.rb.orig 2011-03-04 00:01:24.000000000 +0000
+--- lib/rubygems/installer.rb.orig 2011-05-31 21:55:13.000000000 +0000
+++ lib/rubygems/installer.rb
@@ -39,7 +39,8 @@ class Gem::Installer
@@ -14,19 +14,19 @@ $NetBSD: patch-ad,v 1.8 2011/03/23 14:35:05 taca Exp $
+ # For gem based package compatibility, generate .require_paths file.
+ include Gem::RequirePathsBuilder # if Gem::QUICKLOADER_SUCKAGE
- ##
- # The directory a gem's executables will be installed into
-@@ -87,6 +88,9 @@ class Gem::Installer
- # :force:: Overrides all version checks and security policy checks, except
+ attr_reader :gem
+
+@@ -85,6 +86,9 @@ class Gem::Installer
# for a signed-gems-only policy.
# :ignore_dependencies:: Don't raise if a dependency is missing.
+ # :install_dir:: The directory to install the gem into.
+ # :install_root:: The directory to use as a buildroot for "destdir"-style
+ # installation. All paths during installation are relative
+ # to the buildroot.
- # :install_dir:: The directory to install the gem into.
# :format_executable:: Format the executable the same as the ruby executable.
# If your ruby is ruby18, foo_exec will be installed as
-@@ -174,7 +178,8 @@ class Gem::Installer
+ # foo_exec18.
+@@ -195,7 +199,8 @@ class Gem::Installer
generate_bin
write_spec
@@ -34,14 +34,14 @@ $NetBSD: patch-ad,v 1.8 2011/03/23 14:35:05 taca Exp $
+ # For gem based package compatibility, generate .require_paths file.
+ write_require_paths_file_if_needed # if Gem::QUICKLOADER_SUCKAGE
- cached_gem = Gem.cache_gem(File.basename(@gem), @gem_home)
- unless File.exist? cached_gem then
-@@ -263,7 +268,11 @@ class Gem::Installer
+ cache_file = spec.cache_file
+ FileUtils.cp gem, cache_file unless File.exist? cache_file
+@@ -283,7 +288,11 @@ class Gem::Installer
# If the user has asked for the gem to be installed in a directory that is
# the system gem directory, then use the system bin directory, else create
# (or use) a new bin dir under the gem_home.
-- bindir = @bin_dir ? @bin_dir : Gem.bindir(@gem_home)
-+ bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root)
+- bindir = @bin_dir || Gem.bindir(gem_home)
++ bindir = @bin_dir || (Gem.bindir @gem_home, @install_root)
+
+ unless @install_root.nil? or @install_root == ""
+ bindir = File.join(@install_root, bindir)
@@ -49,23 +49,23 @@ $NetBSD: patch-ad,v 1.8 2011/03/23 14:35:05 taca Exp $
Dir.mkdir bindir unless File.exist? bindir
raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir
-@@ -392,6 +401,7 @@ class Gem::Installer
+@@ -416,6 +425,7 @@ class Gem::Installer
:exec_format => false,
:force => false,
:install_dir => Gem.dir,
+ :install_root => nil,
- :source_index => Gem.source_index,
}.merge options
-@@ -406,6 +416,11 @@ class Gem::Installer
+ @env_shebang = options[:env_shebang]
+@@ -427,6 +437,11 @@ class Gem::Installer
+ @wrappers = options[:wrappers]
@bin_dir = options[:bin_dir]
@development = options[:development]
- @source_index = options[:source_index]
+ install_root = options[:install_root]
+ unless install_root.nil? or install_root == ""
+ @install_root = File.expand_path install_root
+ @gem_home = File.join(@install_root, @gem_home)
+ end
- end
- def load_gem_file
+ raise "NOTE: Installer option :source_index is dead" if
+ options[:source_index]
diff --git a/misc/rubygems/patches/patch-ag b/misc/rubygems/patches/patch-ag
index 29fc3bf2a56..d7e92a55540 100644
--- a/misc/rubygems/patches/patch-ag
+++ b/misc/rubygems/patches/patch-ag
@@ -1,11 +1,11 @@
-$NetBSD: patch-ag,v 1.8 2011/03/23 14:35:05 taca Exp $
+$NetBSD: patch-ag,v 1.9 2011/08/12 15:50:44 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/uninstaller.rb.orig 2011-03-04 00:01:24.000000000 +0000
+--- lib/rubygems/uninstaller.rb.orig 2011-05-26 04:01:53.000000000 +0000
+++ lib/rubygems/uninstaller.rb
-@@ -52,6 +52,12 @@ class Gem::Uninstaller
- @bin_dir = options[:bin_dir]
+@@ -51,6 +51,12 @@ class Gem::Uninstaller
+ @bin_dir = options[:bin_dir]
@format_executable = options[:format_executable]
+ install_root = options[:install_root]
diff --git a/misc/rubygems/patches/patch-ah b/misc/rubygems/patches/patch-ah
index ae1c6ce416f..de496c02cb5 100644
--- a/misc/rubygems/patches/patch-ah
+++ b/misc/rubygems/patches/patch-ah
@@ -1,10 +1,10 @@
-$NetBSD: patch-ah,v 1.8 2011/03/23 14:35:05 taca Exp $
+$NetBSD: patch-ah,v 1.9 2011/08/12 15:50:44 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems.rb.orig 2011-03-09 03:30:40.000000000 +0000
+--- lib/rubygems.rb.orig 2011-05-31 21:55:13.000000000 +0000
+++ lib/rubygems.rb
-@@ -408,7 +408,10 @@ module Gem
+@@ -329,7 +329,10 @@ module Gem
##
# The path where gem executables are to be installed.
@@ -13,10 +13,10 @@ Add install_root option for pkgsrc's rubygems support.
+ unless install_root.nil?
+ install_dir = install_dir.sub(install_root, "")
+ end
- return File.join(install_dir, 'bin') unless
- install_dir.to_s == Gem.default_dir
- Gem.default_bindir
-@@ -668,12 +671,12 @@ module Gem
+ # TODO: move to Gem::Dirs
+ return File.join install_dir, 'bin' unless
+ install_dir.to_s == Gem.default_dir.to_s
+@@ -616,12 +619,12 @@ module Gem
##
# The index to insert activated gem paths into the $LOAD_PATH.
#
@@ -31,11 +31,12 @@ Add install_root option for pkgsrc's rubygems support.
if QUICKLOADER_SUCKAGE then
$LOAD_PATH.each_with_index do |path, i|
-@@ -829,6 +832,7 @@ module Gem
+@@ -774,7 +777,7 @@ module Gem
+ def self.prefix
prefix = File.dirname RUBYGEMS_DIR
- if prefix != File.expand_path(ConfigMap[:sitelibdir]) and
-+ prefix != File.expand_path(ConfigMap[:vendorlibdir]) and
+- if prefix != File.expand_path(ConfigMap[:sitelibdir]) and
++ if prefix != File.expand_path(ConfigMap[:vendorlibdir]) and
prefix != File.expand_path(ConfigMap[:libdir]) and
'lib' == File.basename(RUBYGEMS_DIR) then
prefix
diff --git a/misc/rubygems/patches/patch-aj b/misc/rubygems/patches/patch-aj
index 9a6faa3d1fe..dd5370a423e 100644
--- a/misc/rubygems/patches/patch-aj
+++ b/misc/rubygems/patches/patch-aj
@@ -1,15 +1,15 @@
-$NetBSD: patch-aj,v 1.6 2010/09/16 12:02:05 taca Exp $
+$NetBSD: patch-aj,v 1.7 2011/08/12 15:50:44 taca Exp $
Use vendordir instead of sitedir.
---- lib/rubygems/defaults.rb.orig 2010-04-20 05:57:27.000000000 +0000
+--- lib/rubygems/defaults.rb.orig 2011-05-18 23:36:37.000000000 +0000
+++ lib/rubygems/defaults.rb
-@@ -18,7 +18,7 @@ module Gem
-
+@@ -21,7 +21,7 @@ module Gem
def self.default_dir
- if defined? RUBY_FRAMEWORK_VERSION then
-- File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
-+ File.join File.dirname(ConfigMap[:vendordir]), 'Gems',
- ConfigMap[:ruby_version]
- elsif ConfigMap[:rubylibprefix] then
- File.join(ConfigMap[:rubylibprefix], 'gems',
+ path = if defined? RUBY_FRAMEWORK_VERSION then
+ [
+- File.dirname(ConfigMap[:sitedir]),
++ File.dirname(ConfigMap[:vendordir]),
+ 'Gems',
+ ConfigMap[:ruby_version]
+ ]
diff --git a/misc/rubygems/patches/patch-al b/misc/rubygems/patches/patch-al
index 842ec1fb373..9e6d3c1048d 100644
--- a/misc/rubygems/patches/patch-al
+++ b/misc/rubygems/patches/patch-al
@@ -1,10 +1,10 @@
-$NetBSD: patch-al,v 1.1 2010/09/10 03:48:40 taca Exp $
+$NetBSD: patch-al,v 1.2 2011/08/12 15:50:44 taca Exp $
Prevent access to HOME when --install-root is used.
---- lib/rubygems/commands/install_command.rb.orig 2009-06-22 22:54:36.000000000 +0000
+--- lib/rubygems/commands/install_command.rb.orig 2011-05-18 23:36:37.000000000 +0000
+++ lib/rubygems/commands/install_command.rb
-@@ -144,7 +144,7 @@ to write the specification by hand. For
+@@ -148,7 +148,7 @@ to write the specification by hand. For
Gem::DocManager.new(gem, options[:rdoc_args]).generate_ri
end
diff --git a/misc/rubygems/patches/patch-am b/misc/rubygems/patches/patch-am
index 85d44a010b5..06eb371329d 100644
--- a/misc/rubygems/patches/patch-am
+++ b/misc/rubygems/patches/patch-am
@@ -1,10 +1,10 @@
-$NetBSD: patch-am,v 1.2 2010/09/16 12:02:05 taca Exp $
+$NetBSD: patch-am,v 1.3 2011/08/12 15:50:44 taca Exp $
Make sure to setup under DESTDIR.
---- lib/rubygems/commands/setup_command.rb.orig 2010-04-20 06:47:36.000000000 +0000
+--- lib/rubygems/commands/setup_command.rb.orig 2011-05-26 04:01:53.000000000 +0000
+++ lib/rubygems/commands/setup_command.rb
-@@ -118,7 +118,7 @@ By default, this RubyGems will install g
+@@ -110,7 +110,7 @@ By default, this RubyGems will install g
uninstall_old_gemcutter
@@ -13,7 +13,7 @@ Make sure to setup under DESTDIR.
say
if @verbose then
-@@ -229,16 +229,20 @@ TEXT
+@@ -221,16 +221,20 @@ TEXT
end
end
@@ -32,7 +32,7 @@ Make sure to setup under DESTDIR.
File.writable? rubygems_doc_dir) then
say "Removing old RubyGems RDoc and ri" if @verbose
- Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
-+ Dir[File.join(gem_doc_dir, 'rubygems-[0-9]*')].each do |dir|
++ Dir[File.join(gem_doc_dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
rm_rf dir
end
diff --git a/misc/rubygems/patches/patch-an b/misc/rubygems/patches/patch-an
index 45da647a940..a1cd09456dd 100644
--- a/misc/rubygems/patches/patch-an
+++ b/misc/rubygems/patches/patch-an
@@ -1,10 +1,10 @@
-$NetBSD: patch-an,v 1.2 2010/09/16 12:02:05 taca Exp $
+$NetBSD: patch-an,v 1.3 2011/08/12 15:50:44 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/commands/unpack_command.rb.orig 2010-04-20 06:46:32.000000000 +0000
+--- lib/rubygems/commands/unpack_command.rb.orig 2011-05-18 23:36:37.000000000 +0000
+++ lib/rubygems/commands/unpack_command.rb
-@@ -12,6 +12,10 @@ class Gem::Commands::UnpackCommand < Gem
+@@ -14,6 +14,10 @@ class Gem::Commands::UnpackCommand < Gem
:version => Gem::Requirement.default,
:target => Dir.pwd
@@ -15,7 +15,7 @@ Add install_root option for pkgsrc's rubygems support.
add_option('--target=DIR',
'target directory for unpacking') do |value, options|
options[:target] = value
-@@ -56,7 +60,8 @@ class Gem::Commands::UnpackCommand < Gem
+@@ -70,7 +74,8 @@ class Gem::Commands::UnpackCommand < Gem
basename = File.basename path, '.gem'
target_dir = File.expand_path basename, options[:target]
FileUtils.mkdir_p target_dir
@@ -23,5 +23,5 @@ Add install_root option for pkgsrc's rubygems support.
+ Gem::Installer.new(path, :unpack => true,
+ :install_root => options[:install_root]).unpack target_dir
say "Unpacked gem: '#{target_dir}'"
- else
- alert_error "Gem '#{name}' not installed."
+ end
+ end
diff --git a/misc/rubygems/patches/patch-ap b/misc/rubygems/patches/patch-ap
index f58994ff7ca..22b3017998f 100644
--- a/misc/rubygems/patches/patch-ap
+++ b/misc/rubygems/patches/patch-ap
@@ -1,10 +1,10 @@
-$NetBSD: patch-ap,v 1.1 2010/09/10 03:48:40 taca Exp $
+$NetBSD: patch-ap,v 1.2 2011/08/12 15:50:44 taca Exp $
Prevent access to HOME when --install-root is used.
---- lib/rubygems/doc_manager.rb.orig 2009-06-22 22:54:36.000000000 +0000
+--- lib/rubygems/doc_manager.rb.orig 2011-05-18 23:36:37.000000000 +0000
+++ lib/rubygems/doc_manager.rb
-@@ -61,7 +61,7 @@ class Gem::DocManager
+@@ -60,7 +60,7 @@ class Gem::DocManager
##
# Updates the RI cache for RDoc 2 if it is installed
@@ -13,7 +13,7 @@ Prevent access to HOME when --install-root is used.
load_rdoc rescue return
return unless defined? RDoc::VERSION # RDoc 1 does not have VERSION
-@@ -72,7 +72,7 @@ class Gem::DocManager
+@@ -71,7 +71,7 @@ class Gem::DocManager
:use_cache => true,
:use_system => true,
:use_site => true,
diff --git a/misc/rubygems/patches/patch-lib_rubygems_require__paths__builder.rb b/misc/rubygems/patches/patch-lib_rubygems_require__paths__builder.rb
index 6cf52332739..8a715982bc2 100644
--- a/misc/rubygems/patches/patch-lib_rubygems_require__paths__builder.rb
+++ b/misc/rubygems/patches/patch-lib_rubygems_require__paths__builder.rb
@@ -1,6 +1,8 @@
-$NetBSD: patch-lib_rubygems_require__paths__builder.rb,v 1.1 2011/03/23 14:35:05 taca Exp $
+$NetBSD: patch-lib_rubygems_require__paths__builder.rb,v 1.2 2011/08/12 15:50:44 taca Exp $
---- lib/rubygems/require_paths_builder.rb.orig 2011-03-04 00:01:24.000000000 +0000
+Compatibility with ruby19-base's gem.
+
+--- lib/rubygems/require_paths_builder.rb.orig 2011-05-18 22:23:53.000000000 +0000
+++ lib/rubygems/require_paths_builder.rb
@@ -14,5 +14,5 @@ module Gem::RequirePathsBuilder
file.puts spec.bindir if spec.bindir
@@ -9,4 +11,4 @@ $NetBSD: patch-lib_rubygems_require__paths__builder.rb,v 1.1 2011/03/23 14:35:05
-end if Gem::QUICKLOADER_SUCKAGE
-
+end # if Gem::QUICKLOADER_SUCKAGE
-+ # it could be enabled after 1.9.2's rubygem updated.
++ # it could be enabled after 1.9.x's rubygem updated.
diff --git a/misc/rubygems/patches/patch-test_rubygems_test__gem.rb b/misc/rubygems/patches/patch-test_rubygems_test__gem.rb
index 9143f5cc5d4..c5dbed42ca0 100644
--- a/misc/rubygems/patches/patch-test_rubygems_test__gem.rb
+++ b/misc/rubygems/patches/patch-test_rubygems_test__gem.rb
@@ -1,8 +1,10 @@
-$NetBSD: patch-test_rubygems_test__gem.rb,v 1.1 2011/03/23 14:35:05 taca Exp $
+$NetBSD: patch-test_rubygems_test__gem.rb,v 1.2 2011/08/12 15:50:44 taca Exp $
---- test/rubygems/test_gem.rb.orig 2011-03-09 03:30:40.000000000 +0000
+Use vendorlibdir.
+
+--- test/rubygems/test_gem.rb.orig 2011-05-26 04:01:53.000000000 +0000
+++ test/rubygems/test_gem.rb
-@@ -822,13 +822,13 @@ class TestGem < Gem::TestCase
+@@ -806,13 +806,13 @@ class TestGem < Gem::TestCase
Gem::ConfigMap[:libdir] = orig_libdir
end