summaryrefslogtreecommitdiff
path: root/misc/rubygems
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2008-09-15 08:43:44 +0000
committertaca <taca@pkgsrc.org>2008-09-15 08:43:44 +0000
commit8de24d4f76ff04a4bbc3d6ad0e2664874bab0d2c (patch)
tree8afbd3b148c4e232690505cd4465ea9f5687484e /misc/rubygems
parente45a919f8f5f9433918f38a354207831bcd9f50b (diff)
downloadpkgsrc-8de24d4f76ff04a4bbc3d6ad0e2664874bab0d2c.tar.gz
Update rubygems pacakge to 1.2.0.
Release 1.2.0 adds new features and fixes some bugs. New features: * RubyGems no longer performs bulk updates and instead only fetches the gemspec files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to allow RubyGems to take advantage of the new metadata updater. If a pre 1.2 remote source is in the sources list, RubyGems will revert to the bulk update code for compatibility. * RubyGems now has runtime and development dependency types. Use #add_development_dependency and #add_runtime_dependency. All typeless dependencies are considered to be runtime dependencies. * RubyGems will now require rubygems/defaults/operating_system.rb and rubygems/defaults/#{RBX_ENGINE}.rb if they exist. This allows packagers and ruby implementers to add custom behavior to RubyGems via these files. (If the RubyGems API is insufficient, please suggest improvements via the RubyGems list.) * /etc/gemrc (and windows equivalent) for global settings * setup.rb now handles --vendor and --destdir for packagers * `gem stale` command that lists gems by last access time Bugs Fixed: * File modes from gems are now honored, patch #19737 * Marshal Gem::Specification objects from the future can now be loaded. * A trailing / is now added to remote sources when missing, bug #20134 * Gems with legacy platforms will now be correctly uninstalled, patch #19877 * `gem install --no-wrappers` followed by `gem install --wrappers` no longer overwrites executables * `gem pristine` now forces reinstallation of gems, bug #20387 * RubyGems gracefully handles ^C while loading .gemspec files from disk, bug #20523 * Paths are expanded in more places, bug #19317, bug #19896 * Gem::DependencyInstaller resets installed gems every install, bug #19444 * Gem.default_path is now honored if GEM_PATH is not set, patch #19502 Other Changes Include: * setup.rb * stub files created by RubyGems 0.7.x and older are no longer removed. When upgrading from these ancient versions, upgrade to 1.1.x first to clean up stubs. * RDoc is no longer required until necessary, patch #20414 * `gem server` * Now completely matches the output of `gem generate_index` and has correct content types * Refreshes from source directories for every hit. The server will no longer need to be restarted after installing gems. * `gem query --details` and friends now display author, homepage, rubyforge url and installed location * `gem install` without -i no longer reinstalls dependencies if they are in GEM_PATH but not in GEM_HOME * Gem::RemoteFetcher now performs persistent connections for HEAD requests, bug #7973
Diffstat (limited to 'misc/rubygems')
-rw-r--r--misc/rubygems/Makefile17
-rw-r--r--misc/rubygems/PLIST19
-rw-r--r--misc/rubygems/distinfo29
-rw-r--r--misc/rubygems/patches/patch-aa8
-rw-r--r--misc/rubygems/patches/patch-ab55
-rw-r--r--misc/rubygems/patches/patch-ac4
-rw-r--r--misc/rubygems/patches/patch-ad21
-rw-r--r--misc/rubygems/patches/patch-ae57
-rw-r--r--misc/rubygems/patches/patch-af4
-rw-r--r--misc/rubygems/patches/patch-ag6
-rw-r--r--misc/rubygems/patches/patch-ah27
-rw-r--r--misc/rubygems/patches/patch-ai13
-rw-r--r--misc/rubygems/patches/patch-aj4
-rw-r--r--misc/rubygems/patches/patch-ak14
14 files changed, 94 insertions, 184 deletions
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile
index a35a98637fc..b3a5b99c231 100644
--- a/misc/rubygems/Makefile
+++ b/misc/rubygems/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2008/06/19 14:52:36 taca Exp $
+# $NetBSD: Makefile,v 1.22 2008/09/15 08:43:44 taca Exp $
-DISTNAME= rubygems-1.1.1
-PKGREVISION= 2
+DISTNAME= rubygems-1.2.0
CATEGORIES= misc ruby
-MASTER_SITES= http://rubyforge.org/frs/download.php/35283/
+MASTER_SITES= http://rubyforge.org/frs/download.php/38646/
EXTRACT_SUFX= .tgz
MAINTAINER= minskim@NetBSD.org
@@ -31,6 +30,13 @@ REQD_DIRS+= ${GEM_HOME}/doc
REQD_DIRS+= ${GEM_HOME}/gems
REQD_DIRS+= ${GEM_HOME}/specifications
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= pre-install
+SUBST_FILES.conf= lib/rubygems/config_file.rb
+SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_MESSAGE.conf= Fixing configuration files.
+
+
# Generate a dynamic PLIST for the rubygems documentation directory.
GENERATE_PLIST+= \
${ECHO} "@comment The following lines are automatically generated." && \
@@ -48,9 +54,10 @@ GENERATE_PLIST+= \
INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME}
INSTALL_TARGET= install
+INSTALL_TARGET+= --vendor
INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18"
.if ${_USE_DESTDIR} != "no"
-INSTALL_TARGET+= --install-root=${DESTDIR:Q}
+INSTALL_TARGET+= --destdir=${DESTDIR:Q}
.endif
# rubygem's setup.rb is not the typical setup.rb -- manually run the
diff --git a/misc/rubygems/PLIST b/misc/rubygems/PLIST
index 4e3c4ea7e60..d41ae51f92d 100644
--- a/misc/rubygems/PLIST
+++ b/misc/rubygems/PLIST
@@ -1,7 +1,6 @@
-@comment $NetBSD: PLIST,v 1.9 2008/06/19 14:52:36 taca Exp $
+@comment $NetBSD: PLIST,v 1.10 2008/09/15 08:43:44 taca Exp $
bin/gem
${RUBY_VENDORLIB}/rbconfig/datadir.rb
-${RUBY_VENDORLIB}/rubygems.rb
${RUBY_VENDORLIB}/rubygems/builder.rb
${RUBY_VENDORLIB}/rubygems/command.rb
${RUBY_VENDORLIB}/rubygems/command_manager.rb
@@ -27,6 +26,7 @@ ${RUBY_VENDORLIB}/rubygems/commands/search_command.rb
${RUBY_VENDORLIB}/rubygems/commands/server_command.rb
${RUBY_VENDORLIB}/rubygems/commands/sources_command.rb
${RUBY_VENDORLIB}/rubygems/commands/specification_command.rb
+${RUBY_VENDORLIB}/rubygems/commands/stale_command.rb
${RUBY_VENDORLIB}/rubygems/commands/uninstall_command.rb
${RUBY_VENDORLIB}/rubygems/commands/unpack_command.rb
${RUBY_VENDORLIB}/rubygems/commands/update_command.rb
@@ -43,33 +43,28 @@ ${RUBY_VENDORLIB}/rubygems/digest/sha1.rb
${RUBY_VENDORLIB}/rubygems/digest/sha2.rb
${RUBY_VENDORLIB}/rubygems/doc_manager.rb
${RUBY_VENDORLIB}/rubygems/exceptions.rb
-${RUBY_VENDORLIB}/rubygems/ext.rb
${RUBY_VENDORLIB}/rubygems/ext/builder.rb
${RUBY_VENDORLIB}/rubygems/ext/configure_builder.rb
${RUBY_VENDORLIB}/rubygems/ext/ext_conf_builder.rb
${RUBY_VENDORLIB}/rubygems/ext/rake_builder.rb
+${RUBY_VENDORLIB}/rubygems/ext.rb
${RUBY_VENDORLIB}/rubygems/format.rb
${RUBY_VENDORLIB}/rubygems/gem_openssl.rb
${RUBY_VENDORLIB}/rubygems/gem_path_searcher.rb
${RUBY_VENDORLIB}/rubygems/gem_runner.rb
${RUBY_VENDORLIB}/rubygems/indexer.rb
-${RUBY_VENDORLIB}/rubygems/indexer/abstract_index_builder.rb
-${RUBY_VENDORLIB}/rubygems/indexer/latest_index_builder.rb
-${RUBY_VENDORLIB}/rubygems/indexer/marshal_index_builder.rb
-${RUBY_VENDORLIB}/rubygems/indexer/master_index_builder.rb
-${RUBY_VENDORLIB}/rubygems/indexer/quick_index_builder.rb
${RUBY_VENDORLIB}/rubygems/install_update_options.rb
${RUBY_VENDORLIB}/rubygems/installer.rb
${RUBY_VENDORLIB}/rubygems/local_remote_options.rb
${RUBY_VENDORLIB}/rubygems/old_format.rb
-${RUBY_VENDORLIB}/rubygems/package.rb
${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb
${RUBY_VENDORLIB}/rubygems/package/tar_header.rb
${RUBY_VENDORLIB}/rubygems/package/tar_input.rb
${RUBY_VENDORLIB}/rubygems/package/tar_output.rb
-${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb
${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb
+${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb
${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb
+${RUBY_VENDORLIB}/rubygems/package.rb
${RUBY_VENDORLIB}/rubygems/platform.rb
${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb
${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb
@@ -80,17 +75,19 @@ ${RUBY_VENDORLIB}/rubygems/server.rb
${RUBY_VENDORLIB}/rubygems/source_index.rb
${RUBY_VENDORLIB}/rubygems/source_info_cache.rb
${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb
+${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb
${RUBY_VENDORLIB}/rubygems/specification.rb
+${RUBY_VENDORLIB}/rubygems/test_utilities.rb
${RUBY_VENDORLIB}/rubygems/timer.rb
${RUBY_VENDORLIB}/rubygems/uninstaller.rb
${RUBY_VENDORLIB}/rubygems/user_interaction.rb
${RUBY_VENDORLIB}/rubygems/validator.rb
${RUBY_VENDORLIB}/rubygems/version.rb
${RUBY_VENDORLIB}/rubygems/version_option.rb
+${RUBY_VENDORLIB}/rubygems.rb
${RUBY_VENDORLIB}/ubygems.rb
@dirrm ${RUBY_VENDORLIB}/rubygems/package/tar_reader
@dirrm ${RUBY_VENDORLIB}/rubygems/package
-@dirrm ${RUBY_VENDORLIB}/rubygems/indexer
@dirrm ${RUBY_VENDORLIB}/rubygems/ext
@dirrm ${RUBY_VENDORLIB}/rubygems/digest
@dirrm ${RUBY_VENDORLIB}/rubygems/commands
diff --git a/misc/rubygems/distinfo b/misc/rubygems/distinfo
index 17e0d2b74c6..e71df5ccea8 100644
--- a/misc/rubygems/distinfo
+++ b/misc/rubygems/distinfo
@@ -1,16 +1,15 @@
-$NetBSD: distinfo,v 1.17 2008/06/19 14:52:36 taca Exp $
+$NetBSD: distinfo,v 1.18 2008/09/15 08:43:44 taca Exp $
-SHA1 (rubygems-1.1.1.tgz) = e1ead11fa2928fb4b7871c17fd1186198c97c11a
-RMD160 (rubygems-1.1.1.tgz) = 264b6c2667fd74c111b6886da13b324bc391eaa8
-Size (rubygems-1.1.1.tgz) = 423308 bytes
-SHA1 (patch-aa) = 43d31663301d537f4fb25df61f499e59efefc60c
-SHA1 (patch-ab) = e5c3bcdb1220067b7fb6f45bd0311894e683c8b9
-SHA1 (patch-ac) = e007358881509523f2c2821ced208f5bd9b5a232
-SHA1 (patch-ad) = b7e9a459ccb0305591db97ab7214ddc5befa24f0
-SHA1 (patch-ae) = 109d5e590aacbbde0af8666ca086b65357113afa
-SHA1 (patch-af) = c18ecbbf52cdd68543cd1e11742045f0295dc337
-SHA1 (patch-ag) = 699d5830c20f0f026b074e5ef4546853df022136
-SHA1 (patch-ah) = 1183501773758b14104d5111c0e1c1090dde99d4
-SHA1 (patch-ai) = 5f2e1945617c7a9c0066d9cd6b73f217c45661f2
-SHA1 (patch-aj) = 0fbb15871804e4b212df8cde3ef34f0d4a5172cb
-SHA1 (patch-ak) = d4c8de917c4aff3ce69bdaea198e6a53f22f36df
+SHA1 (rubygems-1.2.0.tgz) = 89f8e35f03e1e8057cc8e237f2df025642653dde
+RMD160 (rubygems-1.2.0.tgz) = c66444cc3f372f7170ba1d8ef3c456052acb2bde
+Size (rubygems-1.2.0.tgz) = 246920 bytes
+SHA1 (patch-aa) = c504f63e6279a99ddc76a03c0978b89ae2e81024
+SHA1 (patch-ab) = 6eb8c453aab58a708dba04944cc0d4b8880014f8
+SHA1 (patch-ac) = 5f744d9556855f7a430401c855e288b42669c808
+SHA1 (patch-ad) = 5f11cff48cbafc4c210a514f50356742b74943ae
+SHA1 (patch-af) = 75f7fe5c777c4eef652e537ba91c2977ee2cfdd6
+SHA1 (patch-ag) = e9c72c6d6af55fa60d3da96a56ffde3dc002f164
+SHA1 (patch-ah) = 0dcf44dfaaa1ae5d2b4165c8b1431ddbe46b4b24
+SHA1 (patch-aj) = b19778ff6f12216f0a29f93c596492602809359e
+SHA1 (patch-ak) = 6230bb570f10b7b81f61ccd8f970128450520f52
+SHA1 (patch-al) = be02021fad82392bfb42c22ae5336700d62ff37e
diff --git a/misc/rubygems/patches/patch-aa b/misc/rubygems/patches/patch-aa
index d7cc6bc8164..c71c2ddbb18 100644
--- a/misc/rubygems/patches/patch-aa
+++ b/misc/rubygems/patches/patch-aa
@@ -1,12 +1,12 @@
-$NetBSD: patch-aa,v 1.4 2008/03/31 15:40:43 jlam Exp $
+$NetBSD: patch-aa,v 1.5 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/commands/install_command.rb.orig 2008-03-28 17:29:50.000000000 -0400
+--- lib/rubygems/commands/install_command.rb.orig 2008-06-21 05:05:41.000000000 +0900
+++ lib/rubygems/commands/install_command.rb
-@@ -60,6 +60,7 @@ class Gem::Commands::InstallCommand < Ge
+@@ -59,6 +59,7 @@ class Gem::Commands::InstallCommand < Ge
:format_executable => options[:format_executable],
:ignore_dependencies => options[:ignore_dependencies],
:install_dir => options[:install_dir],
+ :install_root => options[:install_root],
:security_policy => options[:security_policy],
:wrappers => options[:wrappers],
- :bin_dir => options[:bin_dir]
+ :bin_dir => options[:bin_dir],
diff --git a/misc/rubygems/patches/patch-ab b/misc/rubygems/patches/patch-ab
index 674e7ecd9c0..18995435881 100644
--- a/misc/rubygems/patches/patch-ab
+++ b/misc/rubygems/patches/patch-ab
@@ -1,51 +1,38 @@
-$NetBSD: patch-ab,v 1.7 2008/04/13 06:01:59 jlam Exp $
+$NetBSD: patch-ab,v 1.8 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/dependency_installer.rb.orig 2008-04-04 21:10:11.000000000 -0400
+--- lib/rubygems/dependency_installer.rb.orig 2008-06-21 04:55:40.000000000 +0900
+++ lib/rubygems/dependency_installer.rb
-@@ -33,6 +33,7 @@ class Gem::DependencyInstaller
+@@ -37,6 +37,7 @@ class Gem::DependencyInstaller
# :format_executable:: See Gem::Installer#initialize.
- # :ignore_dependencies: Don't install any dependencies.
- # :install_dir: See Gem::Installer#install.
+ # :ignore_dependencies:: Don't install any dependencies.
+ # :install_dir:: See Gem::Installer#install.
+ # :install_root: See Gem::Installer#install.
- # :security_policy: See Gem::Installer::new and Gem::Security.
- # :wrappers: See Gem::Installer::new
- def initialize(options = {})
-@@ -43,6 +44,7 @@ class Gem::DependencyInstaller
- @format_executable = options[:format_executable]
- @ignore_dependencies = options[:ignore_dependencies]
- @install_dir = options[:install_dir] || Gem.dir
-+ @install_root = options[:install_root]
- @security_policy = options[:security_policy]
- @wrappers = options[:wrappers]
- @bin_dir = options[:bin_dir]
-@@ -177,7 +179,12 @@ class Gem::DependencyInstaller
+ # :security_policy:: See Gem::Installer::new and Gem::Security.
+ # :wrappers:: See Gem::Installer::new
- gather_dependencies
+@@ -56,10 +57,15 @@ class Gem::DependencyInstaller
+ @installed_gems = []
-- spec_dir = File.join @install_dir, 'specifications'
+ @install_dir = options[:install_dir] || Gem.dir
+- @cache_dir = options[:cache_dir] || @install_dir
++ @install_root = options[:install_root]
+ install_dir = @install_dir
+ unless @install_root.nil? or @install_root == ""
+ install_dir = File.join(@install_root, @install_dir)
+ end
-+
-+ spec_dir = File.join install_dir, 'specifications'
- source_index = Gem::SourceIndex.from_gems_in spec_dir
++ @cache_dir = options[:cache_dir] || install_dir
- @gems_to_install.each do |spec|
-@@ -191,7 +198,7 @@ class Gem::DependencyInstaller
- _, source_uri = @specs_and_sources.assoc spec
- begin
- local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri,
-- @install_dir
-+ install_dir
- rescue Gem::RemoteFetcher::FetchError
- next if @force
- raise
-@@ -203,6 +210,7 @@ class Gem::DependencyInstaller
+ if options[:install_dir] then
+- spec_dir = File.join @install_dir, 'specifications'
++ spec_dir = File.join install_dir, 'specifications'
+ @source_index = Gem::SourceIndex.from_gems_in spec_dir
+ else
+ @source_index = Gem.source_index
+@@ -237,6 +243,7 @@ class Gem::DependencyInstaller
:format_executable => @format_executable,
:ignore_dependencies => @ignore_dependencies,
:install_dir => @install_dir,
+ :install_root => @install_root,
:security_policy => @security_policy,
:wrappers => @wrappers,
- :bin_dir => @bin_dir
+ :bin_dir => @bin_dir,
diff --git a/misc/rubygems/patches/patch-ac b/misc/rubygems/patches/patch-ac
index f594f0b52ff..474668d5def 100644
--- a/misc/rubygems/patches/patch-ac
+++ b/misc/rubygems/patches/patch-ac
@@ -1,6 +1,6 @@
-$NetBSD: patch-ac,v 1.2 2008/03/31 15:40:43 jlam Exp $
+$NetBSD: patch-ac,v 1.3 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/install_update_options.rb.orig 2008-02-20 14:27:40.000000000 -0500
+--- lib/rubygems/install_update_options.rb.orig 2008-05-07 11:15:51.000000000 +0900
+++ lib/rubygems/install_update_options.rb
@@ -31,6 +31,11 @@ module Gem::InstallUpdateOptions
options[:bin_dir] = File.expand_path(value)
diff --git a/misc/rubygems/patches/patch-ad b/misc/rubygems/patches/patch-ad
index bd0595fbb24..eb0f0c7fe22 100644
--- a/misc/rubygems/patches/patch-ad
+++ b/misc/rubygems/patches/patch-ad
@@ -1,6 +1,6 @@
-$NetBSD: patch-ad,v 1.2 2008/03/31 15:40:43 jlam Exp $
+$NetBSD: patch-ad,v 1.3 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/installer.rb.orig 2008-03-28 21:10:33.000000000 -0400
+--- lib/rubygems/installer.rb.orig 2008-06-07 09:15:11.000000000 +0900
+++ lib/rubygems/installer.rb
@@ -51,6 +51,9 @@ class Gem::Installer
# for a signed-gems-only policy.
@@ -12,7 +12,7 @@ $NetBSD: patch-ad,v 1.2 2008/03/31 15:40:43 jlam Exp $
# :format_executable:: Format the executable the same as the ruby executable.
# If your ruby is ruby18, foo_exec will be installed as
# foo_exec18.
-@@ -62,6 +65,7 @@ class Gem::Installer
+@@ -63,6 +66,7 @@ class Gem::Installer
options = {
:force => false,
:install_dir => Gem.dir,
@@ -20,17 +20,10 @@ $NetBSD: patch-ad,v 1.2 2008/03/31 15:40:43 jlam Exp $
:exec_format => false,
:env_shebang => false,
:bin_dir => nil
-@@ -70,12 +74,17 @@ class Gem::Installer
- @env_shebang = options[:env_shebang]
- @force = options[:force]
- gem_home = options[:install_dir]
-- @gem_home = Pathname.new(gem_home).expand_path
-+ @gem_home = File.expand_path gem_home
- @ignore_dependencies = options[:ignore_dependencies]
- @format_executable = options[:format_executable]
- @security_policy = options[:security_policy]
+@@ -78,6 +82,11 @@ class Gem::Installer
@wrappers = options[:wrappers]
@bin_dir = options[:bin_dir]
+ @development = options[:development]
+ install_root = options[:install_root]
+ unless install_root.nil? or install_root == ""
+ @install_root = File.expand_path install_root
@@ -39,11 +32,11 @@ $NetBSD: patch-ad,v 1.2 2008/03/31 15:40:43 jlam Exp $
begin
@format = Gem::Format.from_file_by_path @gem, @security_policy
-@@ -227,7 +236,11 @@ class Gem::Installer
+@@ -234,7 +243,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)
+ bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root)
+
+ unless @install_root.nil? or @install_root == ""
diff --git a/misc/rubygems/patches/patch-ae b/misc/rubygems/patches/patch-ae
deleted file mode 100644
index 8ede85f765c..00000000000
--- a/misc/rubygems/patches/patch-ae
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-ae,v 1.4 2008/06/19 14:52:36 taca Exp $
-
---- setup.rb.orig 2008-04-02 08:22:20.000000000 +0900
-+++ setup.rb
-@@ -37,6 +37,9 @@ if ARGV.include? '--help' or ARGV.includ
- puts " --prefix=DIR Prefix path for installing RubyGems"
- puts " Will not affect gem repository location"
- puts
-+ puts " --install-root=DIR Root directory for installing RubyGems"
-+ puts " Will not affect gem repository"
-+ puts
- puts " --no-format-executable Force installation as `gem`"
- puts
- puts " --no-rdoc Don't build RDoc for RubyGems"
-@@ -67,7 +70,7 @@ lib_dir = nil
- bin_dir = nil
-
- if ARGV.grep(/^--prefix/).empty? then
-- lib_dir = Gem::ConfigMap[:sitelibdir]
-+ lib_dir = Gem::ConfigMap[:vendorlibdir]
- bin_dir = Gem::ConfigMap[:bindir]
- else
- prefix = nil
-@@ -96,11 +99,30 @@ else
- else
- lib_dir = File.join prefix, 'lib'
- bin_dir = File.join prefix, 'bin'
--
-- mkdir_p lib_dir
-- mkdir_p bin_dir
- end
- end
-+
-+unless ARGV.grep(/^--install-root/).empty? then
-+ install_root = nil
-+
-+ install_root_arg = ARGV.grep(/^--install-root=/).first
-+ if install_root_arg =~ /^--install-root=(.*)/ then
-+ install_root = $1
-+ else
-+ path_index = ARGV.index '--install-root'
-+ install_root = ARGV[path_index + 1]
-+ end
-+
-+ install_root = File.expand_path install_root
-+
-+ raise "invalid --install-root #{install_root.inspect}" if install_root.nil?
-+
-+ bin_dir = File.join(install_root, bin_dir)
-+ lib_dir = File.join(install_root, lib_dir)
-+end
-+
-+mkdir_p lib_dir
-+mkdir_p bin_dir
-
- Dir.chdir 'lib' do
- lib_files = Dir[File.join('**', '*rb')]
diff --git a/misc/rubygems/patches/patch-af b/misc/rubygems/patches/patch-af
index cca1568446e..a2cd82c7c12 100644
--- a/misc/rubygems/patches/patch-af
+++ b/misc/rubygems/patches/patch-af
@@ -1,6 +1,6 @@
-$NetBSD: patch-af,v 1.1 2008/03/31 15:40:43 jlam Exp $
+$NetBSD: patch-af,v 1.2 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/commands/uninstall_command.rb.orig 2008-02-23 21:26:47.000000000 -0500
+--- lib/rubygems/commands/uninstall_command.rb.orig 2008-02-24 11:26:47.000000000 +0900
+++ lib/rubygems/commands/uninstall_command.rb
@@ -40,6 +40,11 @@ module Gem
options[:bin_dir] = File.expand_path(value)
diff --git a/misc/rubygems/patches/patch-ag b/misc/rubygems/patches/patch-ag
index c8f9983efd1..6760c74155d 100644
--- a/misc/rubygems/patches/patch-ag
+++ b/misc/rubygems/patches/patch-ag
@@ -1,11 +1,11 @@
-$NetBSD: patch-ag,v 1.1 2008/03/31 15:40:43 jlam Exp $
+$NetBSD: patch-ag,v 1.2 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/uninstaller.rb.orig 2008-02-23 22:05:54.000000000 -0500
+--- lib/rubygems/uninstaller.rb.orig 2008-06-21 03:34:46.000000000 +0900
+++ lib/rubygems/uninstaller.rb
@@ -31,6 +31,11 @@ class Gem::Uninstaller
@force_all = options[:all]
@force_ignore = options[:ignore]
- @bin_dir = options[:bin_dir]
+ @bin_dir = options[:bin_dir]
+ install_root = options[:install_root]
+ unless install_root.nil? or install_root == ""
+ @install_root = File.expand_path install_root
diff --git a/misc/rubygems/patches/patch-ah b/misc/rubygems/patches/patch-ah
index 129b7c7afa4..6607f62facd 100644
--- a/misc/rubygems/patches/patch-ah
+++ b/misc/rubygems/patches/patch-ah
@@ -1,19 +1,8 @@
-$NetBSD: patch-ah,v 1.3 2008/06/19 14:52:36 taca Exp $
+$NetBSD: patch-ah,v 1.4 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems.rb.orig 2008-04-10 06:18:31.000000000 +0900
+--- lib/rubygems.rb.orig 2008-06-21 04:54:57.000000000 +0900
+++ lib/rubygems.rb
-@@ -71,7 +71,9 @@ module Gem
- :ruby_install_name => RbConfig::CONFIG["ruby_install_name"],
- :ruby_version => RbConfig::CONFIG["ruby_version"],
- :sitedir => RbConfig::CONFIG["sitedir"],
-- :sitelibdir => RbConfig::CONFIG["sitelibdir"]
-+ :sitelibdir => RbConfig::CONFIG["sitelibdir"],
-+ :vendordir => RbConfig::CONFIG["vendordir"],
-+ :vendorlibdir => RbConfig::CONFIG["vendorlibdir"]
- )
-
- DIRECTORIES = %w[cache doc gems specifications] unless defined?(DIRECTORIES)
-@@ -213,7 +215,13 @@ module Gem
+@@ -230,7 +230,13 @@ module Gem
##
# The path where gem executables are to be installed.
@@ -28,7 +17,13 @@ $NetBSD: patch-ah,v 1.3 2008/06/19 14:52:36 taca Exp $
return File.join(install_dir, 'bin') unless
install_dir.to_s == Gem.default_dir
Gem.default_bindir
-@@ -389,7 +397,7 @@ module Gem
+@@ -435,12 +441,12 @@ module Gem
+ ##
+ # The index to insert activated gem paths into the $LOAD_PATH.
+ #
+- # Defaults to the site lib directory unless gem_prelude.rb has loaded paths,
++ # Defaults to the vendor lib directory unless gem_prelude.rb has loaded paths,
+ # then it inserts the activated gem's paths before the gem_prelude.rb paths
# so you can override the gem_prelude.rb default $LOAD_PATH paths.
def self.load_path_insert_index
@@ -37,7 +32,7 @@ $NetBSD: patch-ah,v 1.3 2008/06/19 14:52:36 taca Exp $
$LOAD_PATH.each_with_index do |path, i|
if path.instance_variables.include?(:@gem_prelude_index) or
-@@ -474,7 +482,8 @@ module Gem
+@@ -529,7 +535,8 @@ module Gem
def self.prefix
prefix = File.dirname File.expand_path(__FILE__)
diff --git a/misc/rubygems/patches/patch-ai b/misc/rubygems/patches/patch-ai
deleted file mode 100644
index 524d9c7de49..00000000000
--- a/misc/rubygems/patches/patch-ai
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2008/06/19 14:52:36 taca Exp $
-
---- Rakefile.orig 2008-04-02 09:46:17.000000000 +0900
-+++ Rakefile
-@@ -338,7 +338,7 @@ task :install do
- unless svnversion.empty? then
- current_version = Gem::RubyGemsVersion.split '.', 4
- rubygems_version = (current_version[0, 3] << svnversion).join '.'
-- rubygems_version_file = File.join Gem::ConfigMap[:sitelibdir], 'rubygems',
-+ rubygems_version_file = File.join Gem::ConfigMap[:vendorlibdir], 'rubygems',
- 'rubygems_version.rb'
-
- generate_rubygems_version rubygems_version_file, rubygems_version
diff --git a/misc/rubygems/patches/patch-aj b/misc/rubygems/patches/patch-aj
index a9eb782a682..fe568c698bd 100644
--- a/misc/rubygems/patches/patch-aj
+++ b/misc/rubygems/patches/patch-aj
@@ -1,6 +1,6 @@
-$NetBSD: patch-aj,v 1.1 2008/06/19 14:52:36 taca Exp $
+$NetBSD: patch-aj,v 1.2 2008/09/15 08:43:44 taca Exp $
---- lib/rubygems/defaults.rb.orig 2008-03-09 12:42:07.000000000 +0900
+--- lib/rubygems/defaults.rb.orig 2008-06-05 11:34:47.000000000 +0900
+++ lib/rubygems/defaults.rb
@@ -9,7 +9,7 @@ module Gem
# specified in the environment.
diff --git a/misc/rubygems/patches/patch-ak b/misc/rubygems/patches/patch-ak
index aa6198d57bb..c7cc6a2628b 100644
--- a/misc/rubygems/patches/patch-ak
+++ b/misc/rubygems/patches/patch-ak
@@ -1,13 +1,15 @@
-$NetBSD: patch-ak,v 1.1 2008/06/19 14:52:36 taca Exp $
+$NetBSD: patch-ak,v 1.2 2008/09/15 08:43:44 taca Exp $
---- test/test_gem.rb.orig 2008-04-10 06:17:44.000000000 +0900
+--- test/test_gem.rb.orig 2008-06-19 06:27:03.000000000 +0900
+++ test/test_gem.rb
-@@ -326,16 +326,16 @@ class TestGem < RubyGemTestCase
+@@ -345,17 +345,17 @@ class TestGem < RubyGemTestCase
+ Gem::ConfigMap[:libdir] = orig_libdir
end
- def test_self_prefix_sitelibdir
+- def test_self_prefix_sitelibdir
- orig_sitelibdir = Gem::ConfigMap[:sitelibdir]
-+ orig_sitelibdir = Gem::ConfigMap[:vendorlibdir]
++ def test_self_prefix_vendorlibdir
++ orig_vendorlibdir = Gem::ConfigMap[:vendorlibdir]
file_name = File.expand_path __FILE__
prefix = File.dirname File.dirname(file_name)
@@ -18,7 +20,7 @@ $NetBSD: patch-ak,v 1.1 2008/06/19 14:52:36 taca Exp $
assert_nil Gem.prefix
ensure
- Gem::ConfigMap[:sitelibdir] = orig_sitelibdir
-+ Gem::ConfigMap[:vendorlibdir] = orig_sitelibdir
++ Gem::ConfigMap[:vendorlibdir] = orig_vendorlibdir
end
def test_self_refresh