summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2015-01-25 16:13:13 +0000
committertaca <taca@pkgsrc.org>2015-01-25 16:13:13 +0000
commita733bef433f3658d8510610de6c1710f467f1c53 (patch)
tree1bc3ce9bdb5dcbf6a9b9446da9d72cb7f62c9727
parentb29d443d04c1da351e7d743aacfd4bff3994006f (diff)
downloadpkgsrc-a733bef433f3658d8510610de6c1710f467f1c53.tar.gz
Update rubygems to 2.4.5 and make this package for ruby18 only.
Changes are too many to write here, please refer rubygem's github: https://github.com/rubygems/rubygems/blob/master/History.txt.
-rw-r--r--misc/rubygems/Makefile8
-rw-r--r--misc/rubygems/PLIST60
-rw-r--r--misc/rubygems/distinfo30
-rw-r--r--misc/rubygems/patches/patch-aa44
-rw-r--r--misc/rubygems/patches/patch-ab44
-rw-r--r--misc/rubygems/patches/patch-ac6
-rw-r--r--misc/rubygems/patches/patch-ad34
-rw-r--r--misc/rubygems/patches/patch-af18
-rw-r--r--misc/rubygems/patches/patch-ag31
-rw-r--r--misc/rubygems/patches/patch-ah29
-rw-r--r--misc/rubygems/patches/patch-aj12
-rw-r--r--misc/rubygems/patches/patch-am4
-rw-r--r--misc/rubygems/patches/patch-ao10
-rw-r--r--misc/rubygems/patches/patch-lib_rubygems_platform.rb20
-rw-r--r--misc/rubygems/patches/patch-test_rubygems_test__gem.rb20
15 files changed, 191 insertions, 179 deletions
diff --git a/misc/rubygems/Makefile b/misc/rubygems/Makefile
index c2865de82ab..cd03b37987f 100644
--- a/misc/rubygems/Makefile
+++ b/misc/rubygems/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.57 2014/03/13 18:05:49 taca Exp $
+# $NetBSD: Makefile,v 1.58 2015/01/25 16:13:13 taca Exp $
-DISTNAME= rubygems-2.0.10
-PKGREVISION= 2
+DISTNAME= rubygems-${RUBY_GEMS_PKGSRC_VERS}
CATEGORIES= misc ruby
MASTER_SITES= http://production.cf.rubygems.org/rubygems/
EXTRACT_SUFX= .tgz
@@ -15,6 +14,9 @@ CONFLICTS+= rubygems-[0-9]*
.include "../../mk/bsd.prefs.mk"
+# Modern ruby bundles rubygems.
+RUBY_VERSION_SUPPORTED= 18
+
NO_CONFIGURE= yes
NO_BUILD= yes
diff --git a/misc/rubygems/PLIST b/misc/rubygems/PLIST
index 6afa2b5084d..1b1a0ee0ccb 100644
--- a/misc/rubygems/PLIST
+++ b/misc/rubygems/PLIST
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.24 2014/03/13 18:05:49 taca Exp $
+@comment $NetBSD: PLIST,v 1.25 2015/01/25 16:13:13 taca Exp $
bin/gem${RUBY_SUFFIX}.new
${RUBY_VENDORLIB}/gauntlet_rubygems.rb
${RUBY_VENDORLIB}/rubygems.rb
${RUBY_VENDORLIB}/rubygems/available_set.rb
+${RUBY_VENDORLIB}/rubygems/basic_specification.rb
${RUBY_VENDORLIB}/rubygems/command.rb
${RUBY_VENDORLIB}/rubygems/command_manager.rb
${RUBY_VENDORLIB}/rubygems/commands/build_command.rb
@@ -19,6 +20,7 @@ ${RUBY_VENDORLIB}/rubygems/commands/install_command.rb
${RUBY_VENDORLIB}/rubygems/commands/list_command.rb
${RUBY_VENDORLIB}/rubygems/commands/lock_command.rb
${RUBY_VENDORLIB}/rubygems/commands/mirror_command.rb
+${RUBY_VENDORLIB}/rubygems/commands/open_command.rb
${RUBY_VENDORLIB}/rubygems/commands/outdated_command.rb
${RUBY_VENDORLIB}/rubygems/commands/owner_command.rb
${RUBY_VENDORLIB}/rubygems/commands/pristine_command.rb
@@ -44,12 +46,12 @@ ${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/dependency_resolver.rb
${RUBY_VENDORLIB}/rubygems/deprecate.rb
${RUBY_VENDORLIB}/rubygems/doctor.rb
${RUBY_VENDORLIB}/rubygems/errors.rb
${RUBY_VENDORLIB}/rubygems/exceptions.rb
${RUBY_VENDORLIB}/rubygems/ext.rb
+${RUBY_VENDORLIB}/rubygems/ext/build_error.rb
${RUBY_VENDORLIB}/rubygems/ext/builder.rb
${RUBY_VENDORLIB}/rubygems/ext/cmake_builder.rb
${RUBY_VENDORLIB}/rubygems/ext/configure_builder.rb
@@ -58,6 +60,7 @@ ${RUBY_VENDORLIB}/rubygems/ext/rake_builder.rb
${RUBY_VENDORLIB}/rubygems/gem_runner.rb
${RUBY_VENDORLIB}/rubygems/gemcutter_utilities.rb
${RUBY_VENDORLIB}/rubygems/indexer.rb
+${RUBY_VENDORLIB}/rubygems/install_default_message.rb
${RUBY_VENDORLIB}/rubygems/install_message.rb
${RUBY_VENDORLIB}/rubygems/install_update_options.rb
${RUBY_VENDORLIB}/rubygems/installer.rb
@@ -67,7 +70,10 @@ ${RUBY_VENDORLIB}/rubygems/mock_gem_ui.rb
${RUBY_VENDORLIB}/rubygems/name_tuple.rb
${RUBY_VENDORLIB}/rubygems/package.rb
${RUBY_VENDORLIB}/rubygems/package/digest_io.rb
+${RUBY_VENDORLIB}/rubygems/package/file_source.rb
+${RUBY_VENDORLIB}/rubygems/package/io_source.rb
${RUBY_VENDORLIB}/rubygems/package/old.rb
+${RUBY_VENDORLIB}/rubygems/package/source.rb
${RUBY_VENDORLIB}/rubygems/package/tar_header.rb
${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb
${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb
@@ -80,8 +86,39 @@ ${RUBY_VENDORLIB}/rubygems/psych_additions.rb
${RUBY_VENDORLIB}/rubygems/psych_tree.rb
${RUBY_VENDORLIB}/rubygems/rdoc.rb
${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb
+${RUBY_VENDORLIB}/rubygems/request.rb
+${RUBY_VENDORLIB}/rubygems/request/connection_pools.rb
+${RUBY_VENDORLIB}/rubygems/request/http_pool.rb
+${RUBY_VENDORLIB}/rubygems/request/https_pool.rb
${RUBY_VENDORLIB}/rubygems/request_set.rb
+${RUBY_VENDORLIB}/rubygems/request_set/gem_dependency_api.rb
+${RUBY_VENDORLIB}/rubygems/request_set/lockfile.rb
${RUBY_VENDORLIB}/rubygems/requirement.rb
+${RUBY_VENDORLIB}/rubygems/resolver.rb
+${RUBY_VENDORLIB}/rubygems/resolver/activation_request.rb
+${RUBY_VENDORLIB}/rubygems/resolver/api_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/api_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/best_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/composed_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/conflict.rb
+${RUBY_VENDORLIB}/rubygems/resolver/current_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/dependency_request.rb
+${RUBY_VENDORLIB}/rubygems/resolver/git_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/git_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/index_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/index_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/installed_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/installer_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/local_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/lock_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/lock_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/requirement_list.rb
+${RUBY_VENDORLIB}/rubygems/resolver/set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/spec_specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/specification.rb
+${RUBY_VENDORLIB}/rubygems/resolver/stats.rb
+${RUBY_VENDORLIB}/rubygems/resolver/vendor_set.rb
+${RUBY_VENDORLIB}/rubygems/resolver/vendor_specification.rb
${RUBY_VENDORLIB}/rubygems/security.rb
${RUBY_VENDORLIB}/rubygems/security/policies.rb
${RUBY_VENDORLIB}/rubygems/security/policy.rb
@@ -89,21 +126,34 @@ ${RUBY_VENDORLIB}/rubygems/security/signer.rb
${RUBY_VENDORLIB}/rubygems/security/trust_dir.rb
${RUBY_VENDORLIB}/rubygems/server.rb
${RUBY_VENDORLIB}/rubygems/source.rb
+${RUBY_VENDORLIB}/rubygems/source/git.rb
+${RUBY_VENDORLIB}/rubygems/source/installed.rb
+${RUBY_VENDORLIB}/rubygems/source/local.rb
+${RUBY_VENDORLIB}/rubygems/source/lock.rb
+${RUBY_VENDORLIB}/rubygems/source/specific_file.rb
+${RUBY_VENDORLIB}/rubygems/source/vendor.rb
${RUBY_VENDORLIB}/rubygems/source_list.rb
${RUBY_VENDORLIB}/rubygems/source_local.rb
${RUBY_VENDORLIB}/rubygems/source_specific_file.rb
${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb
${RUBY_VENDORLIB}/rubygems/specification.rb
+${RUBY_VENDORLIB}/rubygems/ssl_certs/AddTrustExternalCARoot-2048.pem
${RUBY_VENDORLIB}/rubygems/ssl_certs/AddTrustExternalCARoot.pem
-${RUBY_VENDORLIB}/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem
-${RUBY_VENDORLIB}/rubygems/ssl_certs/GeoTrust_Global_CA.pem
-${RUBY_VENDORLIB}/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem
+${RUBY_VENDORLIB}/rubygems/ssl_certs/Class3PublicPrimaryCertificationAuthority.pem
+${RUBY_VENDORLIB}/rubygems/ssl_certs/DigiCertHighAssuranceEVRootCA.pem
+${RUBY_VENDORLIB}/rubygems/ssl_certs/EntrustnetSecureServerCertificationAuthority.pem
+${RUBY_VENDORLIB}/rubygems/ssl_certs/GeoTrustGlobalCA.pem
+${RUBY_VENDORLIB}/rubygems/stub_specification.rb
${RUBY_VENDORLIB}/rubygems/syck_hack.rb
${RUBY_VENDORLIB}/rubygems/test_case.rb
${RUBY_VENDORLIB}/rubygems/test_utilities.rb
${RUBY_VENDORLIB}/rubygems/text.rb
${RUBY_VENDORLIB}/rubygems/uninstaller.rb
+${RUBY_VENDORLIB}/rubygems/uri_formatter.rb
${RUBY_VENDORLIB}/rubygems/user_interaction.rb
+${RUBY_VENDORLIB}/rubygems/util.rb
+${RUBY_VENDORLIB}/rubygems/util/list.rb
+${RUBY_VENDORLIB}/rubygems/util/stringio.rb
${RUBY_VENDORLIB}/rubygems/validator.rb
${RUBY_VENDORLIB}/rubygems/version.rb
${RUBY_VENDORLIB}/rubygems/version_option.rb
diff --git a/misc/rubygems/distinfo b/misc/rubygems/distinfo
index 854ae6092c9..abfbcea05c8 100644
--- a/misc/rubygems/distinfo
+++ b/misc/rubygems/distinfo
@@ -1,17 +1,15 @@
-$NetBSD: distinfo,v 1.47 2014/03/16 17:42:33 taca Exp $
+$NetBSD: distinfo,v 1.48 2015/01/25 16:13:13 taca Exp $
-SHA1 (rubygems-2.0.10.tgz) = e4119824649771958038b2347485df85c3a09fc6
-RMD160 (rubygems-2.0.10.tgz) = cc6c5adb29464217067eeab6e06bbb1b67d6cf42
-Size (rubygems-2.0.10.tgz) = 338280 bytes
-SHA1 (patch-aa) = ec1af229bb7cf9b36b0b5669b8c6f3d97f7ea15e
-SHA1 (patch-ab) = a960d57b48397fa499c0ee1a91b534eb10574d06
-SHA1 (patch-ac) = 1a59a5d2fc090dfcf6d3bd3b9c133f0ce4a1feee
-SHA1 (patch-ad) = 40819a75ae0094292417a7c682ed56abd98de1c2
-SHA1 (patch-af) = d96d5dafd830b0c94bf6c191a3274701ebc6d564
-SHA1 (patch-ag) = 1114e30ce7161a6aa98c3ac6c4ee81f1c22a10d8
-SHA1 (patch-ah) = ae9cd39b900793dbb3d22bad88163750e4d120fe
-SHA1 (patch-aj) = 3b77a675470ea3702b9870843d2bb39bb6a83f3e
-SHA1 (patch-am) = 9146ece86c0bae61553c916adafb2c108f3f07a9
-SHA1 (patch-ao) = 4a8be3bdab5e465814b626d17a5f2811fbfc808c
-SHA1 (patch-lib_rubygems_platform.rb) = 1a80ea59f02366c5de035783e40b7904df4be84f
-SHA1 (patch-test_rubygems_test__gem.rb) = 883675c1af0314c66c3d02fb9c012fac768ebb9b
+SHA1 (rubygems-2.4.5.tgz) = a7122c93b0f6b4aac5291772d5ed973a09c244cb
+RMD160 (rubygems-2.4.5.tgz) = d5de8615edbddfaa75b4e03bab27868198fa20e7
+Size (rubygems-2.4.5.tgz) = 446665 bytes
+SHA1 (patch-aa) = a4348c5389c1f758d8c43c3ac27b3d5f3db2bace
+SHA1 (patch-ab) = ac375cf0c8dd688e1b93709ea787def867efaa05
+SHA1 (patch-ac) = a5b0ed3e2cd8ea7385889fc084a5971b5db3c0a5
+SHA1 (patch-ad) = 197aa2711640ad734a9c97d8a04c9dd4b0ae4ac2
+SHA1 (patch-ah) = f606d0883b75e5b07224e521c3614ea9fcc4d52b
+SHA1 (patch-aj) = 6eb781e915c517b7f4e6c315873d1037793adf6b
+SHA1 (patch-am) = e65b9b9f5b0aff58ac6fc25d0f27811aefcbd90a
+SHA1 (patch-ao) = f8dd8b3734e6cc065cdebc97fd7fdc7601c9a175
+SHA1 (patch-lib_rubygems_platform.rb) = e7b2450a48fb58e2f0221f6de1bb87e22f87f4c2
+SHA1 (patch-test_rubygems_test__gem.rb) = 3d853bfe2100fde8314fd4c3281b1f511b386618
diff --git a/misc/rubygems/patches/patch-aa b/misc/rubygems/patches/patch-aa
index 27df8635b29..786786e6363 100644
--- a/misc/rubygems/patches/patch-aa
+++ b/misc/rubygems/patches/patch-aa
@@ -1,12 +1,14 @@
-$NetBSD: patch-aa,v 1.14 2013/09/10 16:33:29 taca Exp $
+$NetBSD: patch-aa,v 1.15 2015/01/25 16:13:13 taca Exp $
* Relax to allow some attribute could be nil.
* Complete "http://" to homepage attribute if it isn't begin with it.
* Accpet date with Time, but ignore time part.
+* Skip checking gem.build_complete existence of file.
+* Allow duplicate dependencies but warn them.
---- lib/rubygems/specification.rb.orig 2013-09-09 23:41:27.000000000 +0000
+--- lib/rubygems/specification.rb.orig 2014-11-30 04:25:42.000000000 +0000
+++ lib/rubygems/specification.rb
-@@ -162,6 +162,12 @@ class Gem::Specification
+@@ -172,6 +172,12 @@ class Gem::Specification < Gem::BasicSpe
@@default_value[k].nil?
}
@@ -19,25 +21,36 @@ $NetBSD: patch-aa,v 1.14 2013/09/10 16:33:29 taca Exp $
######################################################################
# :section: Required gemspec attributes
-@@ -2337,7 +2343,24 @@ class Gem::Specification
+@@ -1779,7 +1785,7 @@ class Gem::Specification < Gem::BasicSpe
+ # directory.
+
+ def gem_build_complete_path # :nodoc:
+- File.join extension_dir, 'gem.build_complete'
++ File.join extension_dir
+ end
+
+ ##
+@@ -2456,8 +2462,25 @@ class Gem::Specification < Gem::BasicSpe
+ extend Gem::UserInteraction
normalize
- nil_attributes = self.class.non_nil_attributes.find_all do |name|
+- nil_attributes = self.class.non_nil_attributes.find_all do |name|
- instance_variable_get("@#{name}").nil?
-+ val = instance_variable_get("@#{name}")
++ nil_attributes = self.class.non_nil_attributes.find_all do |attrname|
++ val = instance_variable_get("@#{attrname}")
+ if val.nil?
-+ if @@pkgsrc_nil_attributes.key?(name)
-+ case name
++ if @@pkgsrc_nil_attributes.key?(attrname)
++ case attrname
+ when :required_rubygems_version
+ val = Gem::Requirement.default
+ else
+ val = []
+ end
-+ instance_variable_set("@#{name}", val)
++ instance_variable_set("@#{attrname}", val)
+ false
+ end
+ end
-+ if name == :authors and val.empty?
++ if attrname == :authors and val.empty?
+ val = ['not specified']
+ self.authors = val
+ false
@@ -45,7 +58,7 @@ $NetBSD: patch-aa,v 1.14 2013/09/10 16:33:29 taca Exp $
end
unless nil_attributes.empty? then
-@@ -2475,10 +2498,15 @@ class Gem::Specification
+@@ -2601,10 +2624,15 @@ http://opensource.org/licenses/alphabeti
raise Gem::InvalidSpecificationException, "#{lazy} is not a summary"
end
@@ -65,3 +78,12 @@ $NetBSD: patch-aa,v 1.14 2013/09/10 16:33:29 taca Exp $
end
# Warnings
+@@ -2647,7 +2675,7 @@ http://opensource.org/licenses/alphabeti
+
+ dependencies.each do |dep|
+ if prev = seen[dep.name] then
+- raise Gem::InvalidSpecificationException, <<-MESSAGE
++ warn <<-MESSAGE
+ duplicate dependency on #{dep}, (#{prev.requirement}) use:
+ add_runtime_dependency '#{dep.name}', '#{dep.requirement}', '#{prev.requirement}'
+ MESSAGE
diff --git a/misc/rubygems/patches/patch-ab b/misc/rubygems/patches/patch-ab
index 69f580f9beb..9f2591547f3 100644
--- a/misc/rubygems/patches/patch-ab
+++ b/misc/rubygems/patches/patch-ab
@@ -1,10 +1,10 @@
-$NetBSD: patch-ab,v 1.18 2014/02/19 15:47:32 taca Exp $
+$NetBSD: patch-ab,v 1.19 2015/01/25 16:13:13 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/dependency_installer.rb.orig 2013-09-09 23:41:27.000000000 +0000
+--- lib/rubygems/dependency_installer.rb.orig 2014-09-10 04:23:57.000000000 +0000
+++ lib/rubygems/dependency_installer.rb
-@@ -50,6 +50,7 @@ class Gem::DependencyInstaller
+@@ -63,6 +63,7 @@ class Gem::DependencyInstaller
# :format_executable:: See Gem::Installer#initialize.
# :ignore_dependencies:: Don't install any dependencies.
# :install_dir:: See Gem::Installer#install.
@@ -12,23 +12,7 @@ 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
-@@ -57,12 +58,13 @@ class Gem::DependencyInstaller
- # :build_args:: See Gem::Installer::new
-
- def initialize(options = {})
-- @install_dir = options[:install_dir] || Gem.dir
--
- if options[:install_dir] then
-+ @install_dir = options[:install_dir]
- # HACK shouldn't change the global settings, needed for -i behavior
- # maybe move to the install command? See also github #442
- Gem::Specification.dirs = @install_dir
-+ else
-+ @install_dir = Gem.dir
- end
-
- options = DEFAULT_OPTIONS.merge options
-@@ -91,7 +93,12 @@ class Gem::DependencyInstaller
+@@ -101,7 +102,12 @@ class Gem::DependencyInstaller
@installed_gems = []
@toplevel_specs = nil
@@ -40,13 +24,13 @@ Add install_root option for pkgsrc's rubygems support.
+ end
+ @cache_dir = options[:cache_dir] || install_dir
- # Set with any errors that SpecFetcher finds while search through
- # gemspecs for a dep
-@@ -363,6 +370,7 @@ class Gem::DependencyInstaller
- :format_executable => @format_executable,
- :ignore_dependencies => @ignore_dependencies,
- :install_dir => @install_dir,
-+ :install_root => @install_root,
- :security_policy => @security_policy,
- :user_install => @user_install,
- :wrappers => @wrappers,
+ @errors = []
+ end
+@@ -382,6 +388,7 @@ class Gem::DependencyInstaller
+ :force => @force,
+ :format_executable => @format_executable,
+ :ignore_dependencies => @ignore_dependencies,
++ :install_root => @install_root,
+ :prerelease => @prerelease,
+ :security_policy => @security_policy,
+ :user_install => @user_install,
diff --git a/misc/rubygems/patches/patch-ac b/misc/rubygems/patches/patch-ac
index a86db6dfab1..282d8362a48 100644
--- a/misc/rubygems/patches/patch-ac
+++ b/misc/rubygems/patches/patch-ac
@@ -1,10 +1,10 @@
-$NetBSD: patch-ac,v 1.8 2013/06/11 14:55:54 taca Exp $
+$NetBSD: patch-ac,v 1.9 2015/01/25 16:13:13 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/install_update_options.rb.orig 2013-02-12 20:04:55.000000000 +0000
+--- lib/rubygems/install_update_options.rb.orig 2014-07-21 18:50:29.000000000 +0000
+++ lib/rubygems/install_update_options.rb
-@@ -33,6 +33,12 @@ module Gem::InstallUpdateOptions
+@@ -36,6 +36,12 @@ module Gem::InstallUpdateOptions
value
end
diff --git a/misc/rubygems/patches/patch-ad b/misc/rubygems/patches/patch-ad
index 91ba61ed346..2904f0bf9a3 100644
--- a/misc/rubygems/patches/patch-ad
+++ b/misc/rubygems/patches/patch-ad
@@ -1,10 +1,10 @@
-$NetBSD: patch-ad,v 1.14 2014/02/19 15:47:32 taca Exp $
+$NetBSD: patch-ad,v 1.15 2015/01/25 16:13:13 taca Exp $
* Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems/installer.rb.orig 2013-09-09 23:41:27.000000000 +0000
+--- lib/rubygems/installer.rb.orig 2014-11-30 04:24:42.000000000 +0000
+++ lib/rubygems/installer.rb
-@@ -98,6 +98,9 @@ class Gem::Installer
+@@ -113,6 +113,9 @@ class Gem::Installer
# foo_exec18.
# :ignore_dependencies:: Don't raise if a dependency is missing.
# :install_dir:: The directory to install the gem into.
@@ -14,28 +14,28 @@ $NetBSD: patch-ad,v 1.14 2014/02/19 15:47:32 taca Exp $
# :security_policy:: Use the specified security policy. See Gem::Security
# :user_install:: Indicate that the gem should be unpacked into the users
# personal gem directory.
-@@ -548,7 +551,8 @@ class Gem::Installer
- :env_shebang => false,
- :force => false,
- :install_dir => Gem.dir,
-- :only_install_dir => false
-+ :only_install_dir => false,
-+ :install_root => nil,
- }.merge options
-
- @env_shebang = options[:env_shebang]
-@@ -563,8 +567,13 @@ class Gem::Installer
+@@ -602,7 +605,13 @@ 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.
- @bin_dir = options[:bin_dir] || Gem.bindir(gem_home)
+ install_root = options[:install_root]
+ @bin_dir = options[:bin_dir] || Gem.bindir(gem_home, install_root)
- @development = options[:development]
++ @development = options[:development]
+ unless install_root.nil? or install_root.empty?
+ @install_root = File.expand_path install_root
+ @gem_home = File.join(@install_root, @gem_home)
+ end
+ @development = options[:development]
+ @build_root = options[:build_root]
+
+@@ -794,6 +803,9 @@ TEXT
+ return if @build_args.empty?
+
+ build_info_dir = File.join gem_home, 'build_info'
++ unless @install_root.nil? or @install_root.empty?
++ build_info_dir = File.join @gem_home, "build_info"
++ end
+
+ FileUtils.mkdir_p build_info_dir
- @build_args = options[:build_args] || Gem::Command.build_args
- end
diff --git a/misc/rubygems/patches/patch-af b/misc/rubygems/patches/patch-af
deleted file mode 100644
index 3a5f3cf8735..00000000000
--- a/misc/rubygems/patches/patch-af
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-af,v 1.7 2013/06/11 14:55:54 taca Exp $
-
-Add install_root option for pkgsrc's rubygems support.
-
---- lib/rubygems/commands/uninstall_command.rb.orig 2013-02-12 20:04:54.000000000 +0000
-+++ lib/rubygems/commands/uninstall_command.rb
-@@ -22,6 +22,11 @@ class Gem::Commands::UninstallCommand <
- options[:all] = value
- end
-
-+ add_option('-B', '--install-root DIR',
-+ 'Root directory for gem files') do |value, options|
-+ options[:install_root] = File.expand_path(value)
-+ end
-+
- add_option('-I', '--[no-]ignore-dependencies',
- 'Ignore dependency requirements while',
- 'uninstalling') do |value, options|
diff --git a/misc/rubygems/patches/patch-ag b/misc/rubygems/patches/patch-ag
deleted file mode 100644
index ff032d8068b..00000000000
--- a/misc/rubygems/patches/patch-ag
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ag,v 1.11 2014/02/19 15:47:32 taca Exp $
-
-Add install_root option for pkgsrc's rubygems support.
-
---- lib/rubygems/uninstaller.rb.orig 2013-02-12 20:04:55.000000000 +0000
-+++ lib/rubygems/uninstaller.rb
-@@ -51,6 +51,11 @@ class Gem::Uninstaller
- @force_ignore = options[:ignore]
- @bin_dir = options[:bin_dir]
- @format_executable = options[:format_executable]
-+ install_root = options[:install_root]
-+ unless install_root.nil? or install_root.empty?
-+ @install_root = File.expand_path install_root
-+ @gem_home = File.join(@install_root, @gem_home)
-+ end
-
- # Indicate if development dependencies should be checked when
- # uninstalling. (default: false)
-@@ -199,7 +204,11 @@ class Gem::Uninstaller
- end
-
- if remove then
-- bin_dir = @bin_dir || Gem.bindir(spec.base_dir)
-+ bin_dir = @bin_dir || (Gem.bindir @gem_home, @install_root)
-+
-+ unless @install_root.nil? or @install_root.empty?
-+ bindir = File.join(@install_root, bindir)
-+ end
-
- raise Gem::FilePermissionError, bin_dir unless File.writable? bin_dir
-
diff --git a/misc/rubygems/patches/patch-ah b/misc/rubygems/patches/patch-ah
index 7f31469f62e..1d7ae7c1975 100644
--- a/misc/rubygems/patches/patch-ah
+++ b/misc/rubygems/patches/patch-ah
@@ -1,19 +1,18 @@
-$NetBSD: patch-ah,v 1.14 2014/02/19 15:47:32 taca Exp $
+$NetBSD: patch-ah,v 1.15 2015/01/25 16:13:13 taca Exp $
Add install_root option for pkgsrc's rubygems support.
---- lib/rubygems.rb.orig 2013-09-09 23:41:27.000000000 +0000
+--- lib/rubygems.rb.orig 2014-12-03 07:22:15.000000000 +0000
+++ lib/rubygems.rb
-@@ -291,11 +291,17 @@ module Gem
+@@ -265,10 +265,16 @@ module Gem
##
# The path where gem executables are to be installed.
- def self.bindir(install_dir=Gem.dir)
-+ def self.bindir(install_dir=Gem.dir, install_root=nil)
- # TODO: move to Gem::Dirs
- return File.join install_dir, 'bin' unless
- install_dir.to_s == Gem.default_dir.to_s
- Gem.default_bindir
++ def self.bindir(install_dir=Gem.dir, install_root=nil)
+ if install_dir.to_s == Gem.default_dir.to_s
+ install_dir = Gem.default_bindir
+ else
@@ -26,26 +25,20 @@ Add install_root option for pkgsrc's rubygems support.
end
##
-@@ -551,12 +557,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.
+@@ -580,7 +586,7 @@ module Gem
+ # gem's paths are inserted before site lib directory by default.
def self.load_path_insert_index
-- index = $LOAD_PATH.index ConfigMap[:sitelibdir]
-+ index = $LOAD_PATH.index ConfigMap[:vendorlibdir]
+- index = $LOAD_PATH.index RbConfig::CONFIG['sitelibdir']
++ index = $LOAD_PATH.index RbConfig::CONFIG['vendorlibdir']
index
end
-@@ -729,6 +735,7 @@ module Gem
+@@ -752,6 +758,7 @@ module Gem
prefix = File.dirname RUBYGEMS_DIR
- if prefix != File.expand_path(ConfigMap[:sitelibdir]) and
+ if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and
+ prefix != File.expand_path(ConfigMap[:vendorlibdir]) and
- prefix != File.expand_path(ConfigMap[:libdir]) and
+ prefix != File.expand_path(RbConfig::CONFIG['libdir']) and
'lib' == File.basename(RUBYGEMS_DIR) then
prefix
diff --git a/misc/rubygems/patches/patch-aj b/misc/rubygems/patches/patch-aj
index dd5370a423e..970b4dfa809 100644
--- a/misc/rubygems/patches/patch-aj
+++ b/misc/rubygems/patches/patch-aj
@@ -1,15 +1,15 @@
-$NetBSD: patch-aj,v 1.7 2011/08/12 15:50:44 taca Exp $
+$NetBSD: patch-aj,v 1.8 2015/01/25 16:13:13 taca Exp $
Use vendordir instead of sitedir.
---- lib/rubygems/defaults.rb.orig 2011-05-18 23:36:37.000000000 +0000
+--- lib/rubygems/defaults.rb.orig 2014-07-21 18:50:29.000000000 +0000
+++ lib/rubygems/defaults.rb
-@@ -21,7 +21,7 @@ module Gem
+@@ -29,7 +29,7 @@ module Gem
def self.default_dir
path = if defined? RUBY_FRAMEWORK_VERSION then
[
-- File.dirname(ConfigMap[:sitedir]),
-+ File.dirname(ConfigMap[:vendordir]),
+- File.dirname(RbConfig::CONFIG['sitedir']),
++ File.dirname(RbConfig::CONFIG['vendordir']),
'Gems',
- ConfigMap[:ruby_version]
+ RbConfig::CONFIG['ruby_version']
]
diff --git a/misc/rubygems/patches/patch-am b/misc/rubygems/patches/patch-am
index 7219cbee0d8..b41e6d1089e 100644
--- a/misc/rubygems/patches/patch-am
+++ b/misc/rubygems/patches/patch-am
@@ -1,8 +1,8 @@
-$NetBSD: patch-am,v 1.6 2013/09/10 16:33:29 taca Exp $
+$NetBSD: patch-am,v 1.7 2015/01/25 16:13:13 taca Exp $
Make sure to setup under DESTDIR.
---- lib/rubygems/commands/setup_command.rb.orig 2013-09-09 23:41:27.000000000 +0000
+--- lib/rubygems/commands/setup_command.rb.orig 2014-07-21 18:50:29.000000000 +0000
+++ lib/rubygems/commands/setup_command.rb
@@ -145,7 +145,7 @@ By default, this RubyGems will install g
diff --git a/misc/rubygems/patches/patch-ao b/misc/rubygems/patches/patch-ao
index f51c3eaccf6..3e166e1c3dc 100644
--- a/misc/rubygems/patches/patch-ao
+++ b/misc/rubygems/patches/patch-ao
@@ -1,14 +1,14 @@
-$NetBSD: patch-ao,v 1.5 2013/06/11 14:55:54 taca Exp $
+$NetBSD: patch-ao,v 1.6 2015/01/25 16:13:13 taca Exp $
Don't hard code config file's path for gem.
---- lib/rubygems/config_file.rb.orig 2013-02-12 20:04:55.000000000 +0000
+--- lib/rubygems/config_file.rb.orig 2014-09-04 20:56:50.000000000 +0000
+++ lib/rubygems/config_file.rb
-@@ -56,32 +56,7 @@ class Gem::ConfigFile
+@@ -57,32 +57,7 @@ class Gem::ConfigFile
# :stopdoc:
-- system_config_path =
+- SYSTEM_CONFIG_PATH =
- begin
- require "etc"
- Etc.sysconfdir
@@ -34,7 +34,7 @@ Don't hard code config file's path for gem.
- RbConfig::CONFIG["sysconfdir"] || "/etc"
- end
- end
-+ system_config_path = '@PKG_SYSCONFDIR@'
++ SYSTEM_CONFIG_PATH = '@PKG_SYSCONFDIR@'
# :startdoc:
diff --git a/misc/rubygems/patches/patch-lib_rubygems_platform.rb b/misc/rubygems/patches/patch-lib_rubygems_platform.rb
index b6dd49e5488..1ef23fb635e 100644
--- a/misc/rubygems/patches/patch-lib_rubygems_platform.rb
+++ b/misc/rubygems/patches/patch-lib_rubygems_platform.rb
@@ -1,14 +1,26 @@
-$NetBSD: patch-lib_rubygems_platform.rb,v 1.1 2014/03/13 18:05:49 taca Exp $
+$NetBSD: patch-lib_rubygems_platform.rb,v 1.2 2015/01/25 16:13:13 taca Exp $
Allow simple "netbsd" as Gem::Platform.
---- lib/rubygems/platform.rb.orig 2013-09-24 23:47:37.000000000 +0000
+--- lib/rubygems/platform.rb.orig 2014-07-21 18:50:29.000000000 +0000
+++ lib/rubygems/platform.rb
-@@ -84,6 +84,7 @@ class Gem::Platform
+@@ -63,7 +63,7 @@ class Gem::Platform
+ cpu = arch.shift
+
+ @cpu = case cpu
+- when /i\d86/ then 'x86'
++ when /noti\d86/ then 'x86'
+ else cpu
+ end
+
+@@ -94,8 +94,9 @@ class Gem::Platform
@cpu = 'x86' if @cpu.nil? and os =~ /32$/
[os, version]
when /netbsdelf/ then [ 'netbsdelf', nil ]
+ when /netbsd/ then [ 'netbsd', nil ]
when /openbsd(\d+\.\d+)?/ then [ 'openbsd', $1 ]
- when /solaris(\d+\.\d+)?/ then [ 'solaris', $1 ]
+- when /solaris(\d+\.\d+)?/ then [ 'solaris', $1 ]
++ when /solaris(\d+\.\d+)?/ then [ "solaris#{$1}", nil ]
# test
+ when /^(\w+_platform)(\d+)?/ then [ $1, $2 ]
+ else [ 'unknown', nil ]
diff --git a/misc/rubygems/patches/patch-test_rubygems_test__gem.rb b/misc/rubygems/patches/patch-test_rubygems_test__gem.rb
index e0267b71c68..41e4129c88b 100644
--- a/misc/rubygems/patches/patch-test_rubygems_test__gem.rb
+++ b/misc/rubygems/patches/patch-test_rubygems_test__gem.rb
@@ -1,22 +1,22 @@
-$NetBSD: patch-test_rubygems_test__gem.rb,v 1.4 2013/06/15 02:12:48 taca Exp $
+$NetBSD: patch-test_rubygems_test__gem.rb,v 1.5 2015/01/25 16:13:13 taca Exp $
Use vendorlibdir.
---- test/rubygems/test_gem.rb.orig 2013-03-11 21:10:40.000000000 +0000
+--- test/rubygems/test_gem.rb.orig 2014-11-30 04:31:10.000000000 +0000
+++ test/rubygems/test_gem.rb
-@@ -964,12 +964,12 @@ class TestGem < Gem::TestCase
+@@ -641,12 +641,12 @@ class TestGem < Gem::TestCase
end
def test_self_prefix_sitelibdir
-- orig_sitelibdir = Gem::ConfigMap[:sitelibdir]
-- Gem::ConfigMap[:sitelibdir] = @@project_dir
-+ orig_sitelibdir = Gem::ConfigMap[:vendorlibdir]
-+ Gem::ConfigMap[:vendorlibdir] = @@project_dir
+- orig_sitelibdir = RbConfig::CONFIG['sitelibdir']
+- RbConfig::CONFIG['sitelibdir'] = @@project_dir
++ orig_sitelibdir = RbConfig::CONFIG['vendorlibdir']
++ RbConfig::CONFIG['vendorlibdir'] = @@project_dir
assert_nil Gem.prefix
ensure
-- Gem::ConfigMap[:sitelibdir] = orig_sitelibdir
-+ Gem::ConfigMap[:vendorlibdir] = orig_sitelibdir
+- RbConfig::CONFIG['sitelibdir'] = orig_sitelibdir
++ RbConfig::CONFIG['vendorlibdir'] = orig_sitelibdir
end
- def test_self_refresh
+ def test_self_read_binary