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 #7973diff -r1.21 -r1.22 pkgsrc/misc/rubygems/Makefile
(taca)
@@ -1,19 +1,18 @@ | @@ -1,19 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.21 2008/06/19 14:52:36 taca Exp $ | 1 | # $NetBSD: Makefile,v 1.22 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | DISTNAME= rubygems-1.1.1 | 3 | DISTNAME= rubygems-1.2.0 | |
4 | PKGREVISION= 2 | |||
5 | CATEGORIES= misc ruby | 4 | CATEGORIES= misc ruby | |
6 | MASTER_SITES= http://rubyforge.org/frs/download.php/35283/ | 5 | MASTER_SITES= http://rubyforge.org/frs/download.php/38646/ | |
7 | EXTRACT_SUFX= .tgz | 6 | EXTRACT_SUFX= .tgz | |
8 | 7 | |||
9 | MAINTAINER= minskim@NetBSD.org | 8 | MAINTAINER= minskim@NetBSD.org | |
10 | HOMEPAGE= http://www.rubygems.org/ | 9 | HOMEPAGE= http://www.rubygems.org/ | |
11 | COMMENT= Ruby standard for publishing and managing third party libraries | 10 | COMMENT= Ruby standard for publishing and managing third party libraries | |
12 | 11 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 13 | |||
15 | .include "../../mk/bsd.prefs.mk" | 14 | .include "../../mk/bsd.prefs.mk" | |
16 | 15 | |||
17 | NO_CONFIGURE= yes | 16 | NO_CONFIGURE= yes | |
18 | NO_BUILD= yes | 17 | NO_BUILD= yes | |
19 | RUBY_REQD= 1.8.7 | 18 | RUBY_REQD= 1.8.7 | |
@@ -21,43 +20,51 @@ RUBY_REQD= 1.8.7 | @@ -21,43 +20,51 @@ RUBY_REQD= 1.8.7 | |||
21 | REPLACE_RUBY_DIRS= bin | 20 | REPLACE_RUBY_DIRS= bin | |
22 | REPLACE_RUBY_PAT= [a-z]* | 21 | REPLACE_RUBY_PAT= [a-z]* | |
23 | 22 | |||
24 | GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} | 23 | GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} | |
25 | GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME} | 24 | GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME} | |
26 | 25 | |||
27 | REQD_DIRS= ${GEM_HOME:H} | 26 | REQD_DIRS= ${GEM_HOME:H} | |
28 | REQD_DIRS+= ${GEM_HOME} | 27 | REQD_DIRS+= ${GEM_HOME} | |
29 | REQD_DIRS+= ${GEM_HOME}/cache | 28 | REQD_DIRS+= ${GEM_HOME}/cache | |
30 | REQD_DIRS+= ${GEM_HOME}/doc | 29 | REQD_DIRS+= ${GEM_HOME}/doc | |
31 | REQD_DIRS+= ${GEM_HOME}/gems | 30 | REQD_DIRS+= ${GEM_HOME}/gems | |
32 | REQD_DIRS+= ${GEM_HOME}/specifications | 31 | REQD_DIRS+= ${GEM_HOME}/specifications | |
33 | 32 | |||
33 | SUBST_CLASSES+= conf | |||
34 | SUBST_STAGE.conf= pre-install | |||
35 | SUBST_FILES.conf= lib/rubygems/config_file.rb | |||
36 | SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" | |||
37 | SUBST_MESSAGE.conf= Fixing configuration files. | |||
38 | ||||
39 | ||||
34 | # Generate a dynamic PLIST for the rubygems documentation directory. | 40 | # Generate a dynamic PLIST for the rubygems documentation directory. | |
35 | GENERATE_PLIST+= \ | 41 | GENERATE_PLIST+= \ | |
36 | ${ECHO} "@comment The following lines are automatically generated." && \ | 42 | ${ECHO} "@comment The following lines are automatically generated." && \ | |
37 | ( cd ${DESTDIR}${PREFIX} && \ | 43 | ( cd ${DESTDIR}${PREFIX} && \ | |
38 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \ | 44 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \ | |
39 | ${SORT} && \ | 45 | ${SORT} && \ | |
40 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \ | 46 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \ | |
41 | ${SORT} -r | ${SED} -e "s,^,@dirrm ," ); | 47 | ${SORT} -r | ${SED} -e "s,^,@dirrm ," ); | |
42 | 48 | |||
43 | .include "../../lang/ruby/modules.mk" | 49 | .include "../../lang/ruby/modules.mk" | |
44 | 50 | |||
45 | # Force the Gem repository to be under ${DESTDIR}. This is harmless | 51 | # Force the Gem repository to be under ${DESTDIR}. This is harmless | |
46 | # because this packages depends on no other gems. | 52 | # because this packages depends on no other gems. | |
47 | # | 53 | # | |
48 | INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME} | 54 | INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME} | |
49 | 55 | |||
50 | INSTALL_TARGET= install | 56 | INSTALL_TARGET= install | |
57 | INSTALL_TARGET+= --vendor | |||
51 | INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18" | 58 | INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18" | |
52 | .if ${_USE_DESTDIR} != "no" | 59 | .if ${_USE_DESTDIR} != "no" | |
53 | INSTALL_TARGET+= --install-root=${DESTDIR:Q} | 60 | INSTALL_TARGET+= --destdir=${DESTDIR:Q} | |
54 | .endif | 61 | .endif | |
55 | 62 | |||
56 | # rubygem's setup.rb is not the typical setup.rb -- manually run the | 63 | # rubygem's setup.rb is not the typical setup.rb -- manually run the | |
57 | # command to install. | 64 | # command to install. | |
58 | # | 65 | # | |
59 | do-install: | 66 | do-install: | |
60 | cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ | 67 | cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ | |
61 | ${RUBY} setup.rb ${INSTALL_TARGET} | 68 | ${RUBY} setup.rb ${INSTALL_TARGET} | |
62 | 69 | |||
63 | .include "../../mk/bsd.pkg.mk" | 70 | .include "../../mk/bsd.pkg.mk" |
@@ -1,98 +1,95 @@ | @@ -1,98 +1,95 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.9 2008/06/19 14:52:36 taca Exp $ | 1 | @comment $NetBSD: PLIST,v 1.10 2008/09/15 08:43:44 taca Exp $ | |
2 | bin/gem | 2 | bin/gem | |
3 | ${RUBY_VENDORLIB}/rbconfig/datadir.rb | 3 | ${RUBY_VENDORLIB}/rbconfig/datadir.rb | |
4 | ${RUBY_VENDORLIB}/rubygems.rb | |||
5 | ${RUBY_VENDORLIB}/rubygems/builder.rb | 4 | ${RUBY_VENDORLIB}/rubygems/builder.rb | |
6 | ${RUBY_VENDORLIB}/rubygems/command.rb | 5 | ${RUBY_VENDORLIB}/rubygems/command.rb | |
7 | ${RUBY_VENDORLIB}/rubygems/command_manager.rb | 6 | ${RUBY_VENDORLIB}/rubygems/command_manager.rb | |
8 | ${RUBY_VENDORLIB}/rubygems/commands/build_command.rb | 7 | ${RUBY_VENDORLIB}/rubygems/commands/build_command.rb | |
9 | ${RUBY_VENDORLIB}/rubygems/commands/cert_command.rb | 8 | ${RUBY_VENDORLIB}/rubygems/commands/cert_command.rb | |
10 | ${RUBY_VENDORLIB}/rubygems/commands/check_command.rb | 9 | ${RUBY_VENDORLIB}/rubygems/commands/check_command.rb | |
11 | ${RUBY_VENDORLIB}/rubygems/commands/cleanup_command.rb | 10 | ${RUBY_VENDORLIB}/rubygems/commands/cleanup_command.rb | |
12 | ${RUBY_VENDORLIB}/rubygems/commands/contents_command.rb | 11 | ${RUBY_VENDORLIB}/rubygems/commands/contents_command.rb | |
13 | ${RUBY_VENDORLIB}/rubygems/commands/dependency_command.rb | 12 | ${RUBY_VENDORLIB}/rubygems/commands/dependency_command.rb | |
14 | ${RUBY_VENDORLIB}/rubygems/commands/environment_command.rb | 13 | ${RUBY_VENDORLIB}/rubygems/commands/environment_command.rb | |
15 | ${RUBY_VENDORLIB}/rubygems/commands/fetch_command.rb | 14 | ${RUBY_VENDORLIB}/rubygems/commands/fetch_command.rb | |
16 | ${RUBY_VENDORLIB}/rubygems/commands/generate_index_command.rb | 15 | ${RUBY_VENDORLIB}/rubygems/commands/generate_index_command.rb | |
17 | ${RUBY_VENDORLIB}/rubygems/commands/help_command.rb | 16 | ${RUBY_VENDORLIB}/rubygems/commands/help_command.rb | |
18 | ${RUBY_VENDORLIB}/rubygems/commands/install_command.rb | 17 | ${RUBY_VENDORLIB}/rubygems/commands/install_command.rb | |
19 | ${RUBY_VENDORLIB}/rubygems/commands/list_command.rb | 18 | ${RUBY_VENDORLIB}/rubygems/commands/list_command.rb | |
20 | ${RUBY_VENDORLIB}/rubygems/commands/lock_command.rb | 19 | ${RUBY_VENDORLIB}/rubygems/commands/lock_command.rb | |
21 | ${RUBY_VENDORLIB}/rubygems/commands/mirror_command.rb | 20 | ${RUBY_VENDORLIB}/rubygems/commands/mirror_command.rb | |
22 | ${RUBY_VENDORLIB}/rubygems/commands/outdated_command.rb | 21 | ${RUBY_VENDORLIB}/rubygems/commands/outdated_command.rb | |
23 | ${RUBY_VENDORLIB}/rubygems/commands/pristine_command.rb | 22 | ${RUBY_VENDORLIB}/rubygems/commands/pristine_command.rb | |
24 | ${RUBY_VENDORLIB}/rubygems/commands/query_command.rb | 23 | ${RUBY_VENDORLIB}/rubygems/commands/query_command.rb | |
25 | ${RUBY_VENDORLIB}/rubygems/commands/rdoc_command.rb | 24 | ${RUBY_VENDORLIB}/rubygems/commands/rdoc_command.rb | |
26 | ${RUBY_VENDORLIB}/rubygems/commands/search_command.rb | 25 | ${RUBY_VENDORLIB}/rubygems/commands/search_command.rb | |
27 | ${RUBY_VENDORLIB}/rubygems/commands/server_command.rb | 26 | ${RUBY_VENDORLIB}/rubygems/commands/server_command.rb | |
28 | ${RUBY_VENDORLIB}/rubygems/commands/sources_command.rb | 27 | ${RUBY_VENDORLIB}/rubygems/commands/sources_command.rb | |
29 | ${RUBY_VENDORLIB}/rubygems/commands/specification_command.rb | 28 | ${RUBY_VENDORLIB}/rubygems/commands/specification_command.rb | |
29 | ${RUBY_VENDORLIB}/rubygems/commands/stale_command.rb | |||
30 | ${RUBY_VENDORLIB}/rubygems/commands/uninstall_command.rb | 30 | ${RUBY_VENDORLIB}/rubygems/commands/uninstall_command.rb | |
31 | ${RUBY_VENDORLIB}/rubygems/commands/unpack_command.rb | 31 | ${RUBY_VENDORLIB}/rubygems/commands/unpack_command.rb | |
32 | ${RUBY_VENDORLIB}/rubygems/commands/update_command.rb | 32 | ${RUBY_VENDORLIB}/rubygems/commands/update_command.rb | |
33 | ${RUBY_VENDORLIB}/rubygems/commands/which_command.rb | 33 | ${RUBY_VENDORLIB}/rubygems/commands/which_command.rb | |
34 | ${RUBY_VENDORLIB}/rubygems/config_file.rb | 34 | ${RUBY_VENDORLIB}/rubygems/config_file.rb | |
35 | ${RUBY_VENDORLIB}/rubygems/custom_require.rb | 35 | ${RUBY_VENDORLIB}/rubygems/custom_require.rb | |
36 | ${RUBY_VENDORLIB}/rubygems/defaults.rb | 36 | ${RUBY_VENDORLIB}/rubygems/defaults.rb | |
37 | ${RUBY_VENDORLIB}/rubygems/dependency.rb | 37 | ${RUBY_VENDORLIB}/rubygems/dependency.rb | |
38 | ${RUBY_VENDORLIB}/rubygems/dependency_installer.rb | 38 | ${RUBY_VENDORLIB}/rubygems/dependency_installer.rb | |
39 | ${RUBY_VENDORLIB}/rubygems/dependency_list.rb | 39 | ${RUBY_VENDORLIB}/rubygems/dependency_list.rb | |
40 | ${RUBY_VENDORLIB}/rubygems/digest/digest_adapter.rb | 40 | ${RUBY_VENDORLIB}/rubygems/digest/digest_adapter.rb | |
41 | ${RUBY_VENDORLIB}/rubygems/digest/md5.rb | 41 | ${RUBY_VENDORLIB}/rubygems/digest/md5.rb | |
42 | ${RUBY_VENDORLIB}/rubygems/digest/sha1.rb | 42 | ${RUBY_VENDORLIB}/rubygems/digest/sha1.rb | |
43 | ${RUBY_VENDORLIB}/rubygems/digest/sha2.rb | 43 | ${RUBY_VENDORLIB}/rubygems/digest/sha2.rb | |
44 | ${RUBY_VENDORLIB}/rubygems/doc_manager.rb | 44 | ${RUBY_VENDORLIB}/rubygems/doc_manager.rb | |
45 | ${RUBY_VENDORLIB}/rubygems/exceptions.rb | 45 | ${RUBY_VENDORLIB}/rubygems/exceptions.rb | |
46 | ${RUBY_VENDORLIB}/rubygems/ext.rb | |||
47 | ${RUBY_VENDORLIB}/rubygems/ext/builder.rb | 46 | ${RUBY_VENDORLIB}/rubygems/ext/builder.rb | |
48 | ${RUBY_VENDORLIB}/rubygems/ext/configure_builder.rb | 47 | ${RUBY_VENDORLIB}/rubygems/ext/configure_builder.rb | |
49 | ${RUBY_VENDORLIB}/rubygems/ext/ext_conf_builder.rb | 48 | ${RUBY_VENDORLIB}/rubygems/ext/ext_conf_builder.rb | |
50 | ${RUBY_VENDORLIB}/rubygems/ext/rake_builder.rb | 49 | ${RUBY_VENDORLIB}/rubygems/ext/rake_builder.rb | |
50 | ${RUBY_VENDORLIB}/rubygems/ext.rb | |||
51 | ${RUBY_VENDORLIB}/rubygems/format.rb | 51 | ${RUBY_VENDORLIB}/rubygems/format.rb | |
52 | ${RUBY_VENDORLIB}/rubygems/gem_openssl.rb | 52 | ${RUBY_VENDORLIB}/rubygems/gem_openssl.rb | |
53 | ${RUBY_VENDORLIB}/rubygems/gem_path_searcher.rb | 53 | ${RUBY_VENDORLIB}/rubygems/gem_path_searcher.rb | |
54 | ${RUBY_VENDORLIB}/rubygems/gem_runner.rb | 54 | ${RUBY_VENDORLIB}/rubygems/gem_runner.rb | |
55 | ${RUBY_VENDORLIB}/rubygems/indexer.rb | 55 | ${RUBY_VENDORLIB}/rubygems/indexer.rb | |
56 | ${RUBY_VENDORLIB}/rubygems/indexer/abstract_index_builder.rb | |||
57 | ${RUBY_VENDORLIB}/rubygems/indexer/latest_index_builder.rb | |||
58 | ${RUBY_VENDORLIB}/rubygems/indexer/marshal_index_builder.rb | |||
59 | ${RUBY_VENDORLIB}/rubygems/indexer/master_index_builder.rb | |||
60 | ${RUBY_VENDORLIB}/rubygems/indexer/quick_index_builder.rb | |||
61 | ${RUBY_VENDORLIB}/rubygems/install_update_options.rb | 56 | ${RUBY_VENDORLIB}/rubygems/install_update_options.rb | |
62 | ${RUBY_VENDORLIB}/rubygems/installer.rb | 57 | ${RUBY_VENDORLIB}/rubygems/installer.rb | |
63 | ${RUBY_VENDORLIB}/rubygems/local_remote_options.rb | 58 | ${RUBY_VENDORLIB}/rubygems/local_remote_options.rb | |
64 | ${RUBY_VENDORLIB}/rubygems/old_format.rb | 59 | ${RUBY_VENDORLIB}/rubygems/old_format.rb | |
65 | ${RUBY_VENDORLIB}/rubygems/package.rb | |||
66 | ${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb | 60 | ${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb | |
67 | ${RUBY_VENDORLIB}/rubygems/package/tar_header.rb | 61 | ${RUBY_VENDORLIB}/rubygems/package/tar_header.rb | |
68 | ${RUBY_VENDORLIB}/rubygems/package/tar_input.rb | 62 | ${RUBY_VENDORLIB}/rubygems/package/tar_input.rb | |
69 | ${RUBY_VENDORLIB}/rubygems/package/tar_output.rb | 63 | ${RUBY_VENDORLIB}/rubygems/package/tar_output.rb | |
70 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb | |||
71 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb | 64 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb | |
65 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb | |||
72 | ${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb | 66 | ${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb | |
67 | ${RUBY_VENDORLIB}/rubygems/package.rb | |||
73 | ${RUBY_VENDORLIB}/rubygems/platform.rb | 68 | ${RUBY_VENDORLIB}/rubygems/platform.rb | |
74 | ${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb | 69 | ${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb | |
75 | ${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb | 70 | ${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb | |
76 | ${RUBY_VENDORLIB}/rubygems/requirement.rb | 71 | ${RUBY_VENDORLIB}/rubygems/requirement.rb | |
77 | ${RUBY_VENDORLIB}/rubygems/rubygems_version.rb | 72 | ${RUBY_VENDORLIB}/rubygems/rubygems_version.rb | |
78 | ${RUBY_VENDORLIB}/rubygems/security.rb | 73 | ${RUBY_VENDORLIB}/rubygems/security.rb | |
79 | ${RUBY_VENDORLIB}/rubygems/server.rb | 74 | ${RUBY_VENDORLIB}/rubygems/server.rb | |
80 | ${RUBY_VENDORLIB}/rubygems/source_index.rb | 75 | ${RUBY_VENDORLIB}/rubygems/source_index.rb | |
81 | ${RUBY_VENDORLIB}/rubygems/source_info_cache.rb | 76 | ${RUBY_VENDORLIB}/rubygems/source_info_cache.rb | |
82 | ${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb | 77 | ${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb | |
78 | ${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb | |||
83 | ${RUBY_VENDORLIB}/rubygems/specification.rb | 79 | ${RUBY_VENDORLIB}/rubygems/specification.rb | |
80 | ${RUBY_VENDORLIB}/rubygems/test_utilities.rb | |||
84 | ${RUBY_VENDORLIB}/rubygems/timer.rb | 81 | ${RUBY_VENDORLIB}/rubygems/timer.rb | |
85 | ${RUBY_VENDORLIB}/rubygems/uninstaller.rb | 82 | ${RUBY_VENDORLIB}/rubygems/uninstaller.rb | |
86 | ${RUBY_VENDORLIB}/rubygems/user_interaction.rb | 83 | ${RUBY_VENDORLIB}/rubygems/user_interaction.rb | |
87 | ${RUBY_VENDORLIB}/rubygems/validator.rb | 84 | ${RUBY_VENDORLIB}/rubygems/validator.rb | |
88 | ${RUBY_VENDORLIB}/rubygems/version.rb | 85 | ${RUBY_VENDORLIB}/rubygems/version.rb | |
89 | ${RUBY_VENDORLIB}/rubygems/version_option.rb | 86 | ${RUBY_VENDORLIB}/rubygems/version_option.rb | |
87 | ${RUBY_VENDORLIB}/rubygems.rb | |||
90 | ${RUBY_VENDORLIB}/ubygems.rb | 88 | ${RUBY_VENDORLIB}/ubygems.rb | |
91 | @dirrm ${RUBY_VENDORLIB}/rubygems/package/tar_reader | 89 | @dirrm ${RUBY_VENDORLIB}/rubygems/package/tar_reader | |
92 | @dirrm ${RUBY_VENDORLIB}/rubygems/package | 90 | @dirrm ${RUBY_VENDORLIB}/rubygems/package | |
93 | @dirrm ${RUBY_VENDORLIB}/rubygems/indexer | |||
94 | @dirrm ${RUBY_VENDORLIB}/rubygems/ext | 91 | @dirrm ${RUBY_VENDORLIB}/rubygems/ext | |
95 | @dirrm ${RUBY_VENDORLIB}/rubygems/digest | 92 | @dirrm ${RUBY_VENDORLIB}/rubygems/digest | |
96 | @dirrm ${RUBY_VENDORLIB}/rubygems/commands | 93 | @dirrm ${RUBY_VENDORLIB}/rubygems/commands | |
97 | @dirrm ${RUBY_VENDORLIB}/rubygems | 94 | @dirrm ${RUBY_VENDORLIB}/rubygems | |
98 | @dirrm ${RUBY_VENDORLIB}/rbconfig | 95 | @dirrm ${RUBY_VENDORLIB}/rbconfig |
@@ -1,16 +1,15 @@ | @@ -1,16 +1,15 @@ | |||
1 | $NetBSD: distinfo,v 1.17 2008/06/19 14:52:36 taca Exp $ | 1 | $NetBSD: distinfo,v 1.18 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | SHA1 (rubygems-1.1.1.tgz) = e1ead11fa2928fb4b7871c17fd1186198c97c11a | 3 | SHA1 (rubygems-1.2.0.tgz) = 89f8e35f03e1e8057cc8e237f2df025642653dde | |
4 | RMD160 (rubygems-1.1.1.tgz) = 264b6c2667fd74c111b6886da13b324bc391eaa8 | 4 | RMD160 (rubygems-1.2.0.tgz) = c66444cc3f372f7170ba1d8ef3c456052acb2bde | |
5 | Size (rubygems-1.1.1.tgz) = 423308 bytes | 5 | Size (rubygems-1.2.0.tgz) = 246920 bytes | |
6 | SHA1 (patch-aa) = 43d31663301d537f4fb25df61f499e59efefc60c | 6 | SHA1 (patch-aa) = c504f63e6279a99ddc76a03c0978b89ae2e81024 | |
7 | SHA1 (patch-ab) = e5c3bcdb1220067b7fb6f45bd0311894e683c8b9 | 7 | SHA1 (patch-ab) = 6eb8c453aab58a708dba04944cc0d4b8880014f8 | |
8 | SHA1 (patch-ac) = e007358881509523f2c2821ced208f5bd9b5a232 | 8 | SHA1 (patch-ac) = 5f744d9556855f7a430401c855e288b42669c808 | |
9 | SHA1 (patch-ad) = b7e9a459ccb0305591db97ab7214ddc5befa24f0 | 9 | SHA1 (patch-ad) = 5f11cff48cbafc4c210a514f50356742b74943ae | |
10 | SHA1 (patch-ae) = 109d5e590aacbbde0af8666ca086b65357113afa | 10 | SHA1 (patch-af) = 75f7fe5c777c4eef652e537ba91c2977ee2cfdd6 | |
11 | SHA1 (patch-af) = c18ecbbf52cdd68543cd1e11742045f0295dc337 | 11 | SHA1 (patch-ag) = e9c72c6d6af55fa60d3da96a56ffde3dc002f164 | |
12 | SHA1 (patch-ag) = 699d5830c20f0f026b074e5ef4546853df022136 | 12 | SHA1 (patch-ah) = 0dcf44dfaaa1ae5d2b4165c8b1431ddbe46b4b24 | |
13 | SHA1 (patch-ah) = 1183501773758b14104d5111c0e1c1090dde99d4 | 13 | SHA1 (patch-aj) = b19778ff6f12216f0a29f93c596492602809359e | |
14 | SHA1 (patch-ai) = 5f2e1945617c7a9c0066d9cd6b73f217c45661f2 | 14 | SHA1 (patch-ak) = 6230bb570f10b7b81f61ccd8f970128450520f52 | |
15 | SHA1 (patch-aj) = 0fbb15871804e4b212df8cde3ef34f0d4a5172cb | 15 | SHA1 (patch-al) = be02021fad82392bfb42c22ae5336700d62ff37e | |
16 | SHA1 (patch-ak) = d4c8de917c4aff3ce69bdaea198e6a53f22f36df |
@@ -1,12 +1,12 @@ | @@ -1,12 +1,12 @@ | |||
1 | $NetBSD: patch-aa,v 1.4 2008/03/31 15:40:43 jlam Exp $ | 1 | $NetBSD: patch-aa,v 1.5 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/commands/install_command.rb.orig 2008-03-28 17:29:50.000000000 -0400 | 3 | --- lib/rubygems/commands/install_command.rb.orig 2008-06-21 05:05:41.000000000 +0900 | |
4 | +++ lib/rubygems/commands/install_command.rb | 4 | +++ lib/rubygems/commands/install_command.rb | |
5 | @@ -60,6 +60,7 @@ class Gem::Commands::InstallCommand < Ge | 5 | @@ -59,6 +59,7 @@ class Gem::Commands::InstallCommand < Ge | |
6 | :format_executable => options[:format_executable], | 6 | :format_executable => options[:format_executable], | |
7 | :ignore_dependencies => options[:ignore_dependencies], | 7 | :ignore_dependencies => options[:ignore_dependencies], | |
8 | :install_dir => options[:install_dir], | 8 | :install_dir => options[:install_dir], | |
9 | + :install_root => options[:install_root], | 9 | + :install_root => options[:install_root], | |
10 | :security_policy => options[:security_policy], | 10 | :security_policy => options[:security_policy], | |
11 | :wrappers => options[:wrappers], | 11 | :wrappers => options[:wrappers], | |
12 | :bin_dir => options[:bin_dir] | 12 | :bin_dir => options[:bin_dir], |
@@ -1,51 +1,38 @@ | @@ -1,51 +1,38 @@ | |||
1 | $NetBSD: patch-ab,v 1.7 2008/04/13 06:01:59 jlam Exp $ | 1 | $NetBSD: patch-ab,v 1.8 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/dependency_installer.rb.orig 2008-04-04 21:10:11.000000000 -0400 | 3 | --- lib/rubygems/dependency_installer.rb.orig 2008-06-21 04:55:40.000000000 +0900 | |
4 | +++ lib/rubygems/dependency_installer.rb | 4 | +++ lib/rubygems/dependency_installer.rb | |
5 | @@ -33,6 +33,7 @@ class Gem::DependencyInstaller | 5 | @@ -37,6 +37,7 @@ class Gem::DependencyInstaller | |
6 | # :format_executable:: See Gem::Installer#initialize. | 6 | # :format_executable:: See Gem::Installer#initialize. | |
7 | # :ignore_dependencies: Don't install any dependencies. | 7 | # :ignore_dependencies:: Don't install any dependencies. | |
8 | # :install_dir: See Gem::Installer#install. | 8 | # :install_dir:: See Gem::Installer#install. | |
9 | + # :install_root: See Gem::Installer#install. | 9 | + # :install_root: See Gem::Installer#install. | |
10 | # :security_policy: See Gem::Installer::new and Gem::Security. | 10 | # :security_policy:: See Gem::Installer::new and Gem::Security. | |
11 | # :wrappers: See Gem::Installer::new | 11 | # :wrappers:: See Gem::Installer::new | |
12 | def initialize(options = {}) | |||
13 | @@ -43,6 +44,7 @@ class Gem::DependencyInstaller | |||
14 | @format_executable = options[:format_executable] | |||
15 | @ignore_dependencies = options[:ignore_dependencies] | |||
16 | @install_dir = options[:install_dir] || Gem.dir | |||
17 | + @install_root = options[:install_root] | |||
18 | @security_policy = options[:security_policy] | |||
19 | @wrappers = options[:wrappers] | |||
20 | @bin_dir = options[:bin_dir] | |||
21 | @@ -177,7 +179,12 @@ class Gem::DependencyInstaller | |||
22 | 12 | |||
23 | gather_dependencies | 13 | @@ -56,10 +57,15 @@ class Gem::DependencyInstaller | |
14 | @installed_gems = [] | |||
24 | 15 | |||
25 | - spec_dir = File.join @install_dir, 'specifications' | 16 | @install_dir = options[:install_dir] || Gem.dir | |
17 | - @cache_dir = options[:cache_dir] || @install_dir | |||
18 | + @install_root = options[:install_root] | |||
26 | + install_dir = @install_dir | 19 | + install_dir = @install_dir | |
27 | + unless @install_root.nil? or @install_root == "" | 20 | + unless @install_root.nil? or @install_root == "" | |
28 | + install_dir = File.join(@install_root, @install_dir) | 21 | + install_dir = File.join(@install_root, @install_dir) | |
29 | + end | 22 | + end | |
30 | + | 23 | + @cache_dir = options[:cache_dir] || install_dir | |
31 | + spec_dir = File.join install_dir, 'specifications' | |||
32 | source_index = Gem::SourceIndex.from_gems_in spec_dir | |||
33 | 24 | |||
34 | @gems_to_install.each do |spec| | 25 | if options[:install_dir] then | |
35 | @@ -191,7 +198,7 @@ class Gem::DependencyInstaller | 26 | - spec_dir = File.join @install_dir, 'specifications' | |
36 | _, source_uri = @specs_and_sources.assoc spec | 27 | + spec_dir = File.join install_dir, 'specifications' | |
37 | begin | 28 | @source_index = Gem::SourceIndex.from_gems_in spec_dir | |
38 | local_gem_path = Gem::RemoteFetcher.fetcher.download spec, source_uri, | 29 | else | |
39 | - @install_dir | 30 | @source_index = Gem.source_index | |
40 | + install_dir | 31 | @@ -237,6 +243,7 @@ class Gem::DependencyInstaller | |
41 | rescue Gem::RemoteFetcher::FetchError | |||
42 | next if @force | |||
43 | raise | |||
44 | @@ -203,6 +210,7 @@ class Gem::DependencyInstaller | |||
45 | :format_executable => @format_executable, | 32 | :format_executable => @format_executable, | |
46 | :ignore_dependencies => @ignore_dependencies, | 33 | :ignore_dependencies => @ignore_dependencies, | |
47 | :install_dir => @install_dir, | 34 | :install_dir => @install_dir, | |
48 | + :install_root => @install_root, | 35 | + :install_root => @install_root, | |
49 | :security_policy => @security_policy, | 36 | :security_policy => @security_policy, | |
50 | :wrappers => @wrappers, | 37 | :wrappers => @wrappers, | |
51 | :bin_dir => @bin_dir | 38 | :bin_dir => @bin_dir, |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | $NetBSD: patch-ac,v 1.2 2008/03/31 15:40:43 jlam Exp $ | 1 | $NetBSD: patch-ac,v 1.3 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/install_update_options.rb.orig 2008-02-20 14:27:40.000000000 -0500 | 3 | --- lib/rubygems/install_update_options.rb.orig 2008-05-07 11:15:51.000000000 +0900 | |
4 | +++ lib/rubygems/install_update_options.rb | 4 | +++ lib/rubygems/install_update_options.rb | |
5 | @@ -31,6 +31,11 @@ module Gem::InstallUpdateOptions | 5 | @@ -31,6 +31,11 @@ module Gem::InstallUpdateOptions | |
6 | options[:bin_dir] = File.expand_path(value) | 6 | options[:bin_dir] = File.expand_path(value) | |
7 | end | 7 | end | |
8 | 8 | |||
9 | + add_option(:"Install", '-B', '--install-root DIR', | 9 | + add_option(:"Install", '-B', '--install-root DIR', | |
10 | + 'Root directory for gem files on install') do |value, options| | 10 | + 'Root directory for gem files on install') do |value, options| | |
11 | + options[:install_root] = File.expand_path(value) | 11 | + options[:install_root] = File.expand_path(value) | |
12 | + end | 12 | + end | |
13 | + | 13 | + | |
14 | add_option(:"Install/Update", '-d', '--[no-]rdoc', | 14 | add_option(:"Install/Update", '-d', '--[no-]rdoc', | |
15 | 'Generate RDoc documentation for the gem on', | 15 | 'Generate RDoc documentation for the gem on', | |
16 | 'install') do |value, options| | 16 | 'install') do |value, options| |
@@ -1,54 +1,47 @@ | @@ -1,54 +1,47 @@ | |||
1 | $NetBSD: patch-ad,v 1.2 2008/03/31 15:40:43 jlam Exp $ | 1 | $NetBSD: patch-ad,v 1.3 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/installer.rb.orig 2008-03-28 21:10:33.000000000 -0400 | 3 | --- lib/rubygems/installer.rb.orig 2008-06-07 09:15:11.000000000 +0900 | |
4 | +++ lib/rubygems/installer.rb | 4 | +++ lib/rubygems/installer.rb | |
5 | @@ -51,6 +51,9 @@ class Gem::Installer | 5 | @@ -51,6 +51,9 @@ class Gem::Installer | |
6 | # for a signed-gems-only policy. | 6 | # for a signed-gems-only policy. | |
7 | # :ignore_dependencies:: Don't raise if a dependency is missing. | 7 | # :ignore_dependencies:: Don't raise if a dependency is missing. | |
8 | # :install_dir:: The directory to install the gem into. | 8 | # :install_dir:: The directory to install the gem into. | |
9 | + # :install_root:: The directory to use as a buildroot for "destdir"-style | 9 | + # :install_root:: The directory to use as a buildroot for "destdir"-style | |
10 | + # installation. All paths during installation are relative | 10 | + # installation. All paths during installation are relative | |
11 | + # to the buildroot. | 11 | + # to the buildroot. | |
12 | # :format_executable:: Format the executable the same as the ruby executable. | 12 | # :format_executable:: Format the executable the same as the ruby executable. | |
13 | # If your ruby is ruby18, foo_exec will be installed as | 13 | # If your ruby is ruby18, foo_exec will be installed as | |
14 | # foo_exec18. | 14 | # foo_exec18. | |
15 | @@ -62,6 +65,7 @@ class Gem::Installer | 15 | @@ -63,6 +66,7 @@ class Gem::Installer | |
16 | options = { | 16 | options = { | |
17 | :force => false, | 17 | :force => false, | |
18 | :install_dir => Gem.dir, | 18 | :install_dir => Gem.dir, | |
19 | + :install_root => nil, | 19 | + :install_root => nil, | |
20 | :exec_format => false, | 20 | :exec_format => false, | |
21 | :env_shebang => false, | 21 | :env_shebang => false, | |
22 | :bin_dir => nil | 22 | :bin_dir => nil | |
23 | @@ -70,12 +74,17 @@ class Gem::Installer | 23 | @@ -78,6 +82,11 @@ class Gem::Installer | |
24 | @env_shebang = options[:env_shebang] | |||
25 | @force = options[:force] | |||
26 | gem_home = options[:install_dir] | |||
27 | - @gem_home = Pathname.new(gem_home).expand_path | |||
28 | + @gem_home = File.expand_path gem_home | |||
29 | @ignore_dependencies = options[:ignore_dependencies] | |||
30 | @format_executable = options[:format_executable] | |||
31 | @security_policy = options[:security_policy] | |||
32 | @wrappers = options[:wrappers] | 24 | @wrappers = options[:wrappers] | |
33 | @bin_dir = options[:bin_dir] | 25 | @bin_dir = options[:bin_dir] | |
26 | @development = options[:development] | |||
34 | + install_root = options[:install_root] | 27 | + install_root = options[:install_root] | |
35 | + unless install_root.nil? or install_root == "" | 28 | + unless install_root.nil? or install_root == "" | |
36 | + @install_root = File.expand_path install_root | 29 | + @install_root = File.expand_path install_root | |
37 | + @gem_home = File.join(@install_root, @gem_home) | 30 | + @gem_home = File.join(@install_root, @gem_home) | |
38 | + end | 31 | + end | |
39 | 32 | |||
40 | begin | 33 | begin | |
41 | @format = Gem::Format.from_file_by_path @gem, @security_policy | 34 | @format = Gem::Format.from_file_by_path @gem, @security_policy | |
42 | @@ -227,7 +236,11 @@ class Gem::Installer | 35 | @@ -234,7 +243,11 @@ class Gem::Installer | |
43 | # If the user has asked for the gem to be installed in a directory that is | 36 | # If the user has asked for the gem to be installed in a directory that is | |
44 | # the system gem directory, then use the system bin directory, else create | 37 | # the system gem directory, then use the system bin directory, else create | |
45 | # (or use) a new bin dir under the gem_home. | 38 | # (or use) a new bin dir under the gem_home. | |
46 | - bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home) | 39 | - bindir = @bin_dir ? @bin_dir : Gem.bindir(@gem_home) | |
47 | + bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root) | 40 | + bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root) | |
48 | + | 41 | + | |
49 | + unless @install_root.nil? or @install_root == "" | 42 | + unless @install_root.nil? or @install_root == "" | |
50 | + bindir = File.join(@install_root, bindir) | 43 | + bindir = File.join(@install_root, bindir) | |
51 | + end | 44 | + end | |
52 | 45 | |||
53 | Dir.mkdir bindir unless File.exist? bindir | 46 | Dir.mkdir bindir unless File.exist? bindir | |
54 | raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir | 47 | raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | $NetBSD: patch-af,v 1.1 2008/03/31 15:40:43 jlam Exp $ | 1 | $NetBSD: patch-af,v 1.2 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/commands/uninstall_command.rb.orig 2008-02-23 21:26:47.000000000 -0500 | 3 | --- lib/rubygems/commands/uninstall_command.rb.orig 2008-02-24 11:26:47.000000000 +0900 | |
4 | +++ lib/rubygems/commands/uninstall_command.rb | 4 | +++ lib/rubygems/commands/uninstall_command.rb | |
5 | @@ -40,6 +40,11 @@ module Gem | 5 | @@ -40,6 +40,11 @@ module Gem | |
6 | options[:bin_dir] = File.expand_path(value) | 6 | options[:bin_dir] = File.expand_path(value) | |
7 | end | 7 | end | |
8 | 8 | |||
9 | + add_option('-B', '--install-root DIR', | 9 | + add_option('-B', '--install-root DIR', | |
10 | + 'Root directory for gem files') do |value, options| | 10 | + 'Root directory for gem files') do |value, options| | |
11 | + options[:install_root] = File.expand_path(value) | 11 | + options[:install_root] = File.expand_path(value) | |
12 | + end | 12 | + end | |
13 | + | 13 | + | |
14 | add_version_option | 14 | add_version_option | |
15 | add_platform_option | 15 | add_platform_option | |
16 | end | 16 | end |
@@ -1,21 +1,21 @@ | @@ -1,21 +1,21 @@ | |||
1 | $NetBSD: patch-ag,v 1.1 2008/03/31 15:40:43 jlam Exp $ | 1 | $NetBSD: patch-ag,v 1.2 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/uninstaller.rb.orig 2008-02-23 22:05:54.000000000 -0500 | 3 | --- lib/rubygems/uninstaller.rb.orig 2008-06-21 03:34:46.000000000 +0900 | |
4 | +++ lib/rubygems/uninstaller.rb | 4 | +++ lib/rubygems/uninstaller.rb | |
5 | @@ -31,6 +31,11 @@ class Gem::Uninstaller | 5 | @@ -31,6 +31,11 @@ class Gem::Uninstaller | |
6 | @force_all = options[:all] | 6 | @force_all = options[:all] | |
7 | @force_ignore = options[:ignore] | 7 | @force_ignore = options[:ignore] | |
8 | @bin_dir = options[:bin_dir] | 8 | @bin_dir = options[:bin_dir] | |
9 | + install_root = options[:install_root] | 9 | + install_root = options[:install_root] | |
10 | + unless install_root.nil? or install_root == "" | 10 | + unless install_root.nil? or install_root == "" | |
11 | + @install_root = File.expand_path install_root | 11 | + @install_root = File.expand_path install_root | |
12 | + @gem_home = File.join(@install_root, @gem_home) | 12 | + @gem_home = File.join(@install_root, @gem_home) | |
13 | + end | 13 | + end | |
14 | end | 14 | end | |
15 | 15 | |||
16 | ## | 16 | ## | |
17 | @@ -74,7 +79,11 @@ class Gem::Uninstaller | 17 | @@ -74,7 +79,11 @@ class Gem::Uninstaller | |
18 | return if gemspec.nil? | 18 | return if gemspec.nil? | |
19 | 19 | |||
20 | if gemspec.executables.size > 0 then | 20 | if gemspec.executables.size > 0 then | |
21 | - bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home) | 21 | - bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home) |
@@ -1,13 +1,13 @@ | @@ -1,13 +1,13 @@ | |||
1 | $NetBSD: patch-aj,v 1.1 2008/06/19 14:52:36 taca Exp $ | 1 | $NetBSD: patch-aj,v 1.2 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/defaults.rb.orig 2008-03-09 12:42:07.000000000 +0900 | 3 | --- lib/rubygems/defaults.rb.orig 2008-06-05 11:34:47.000000000 +0900 | |
4 | +++ lib/rubygems/defaults.rb | 4 | +++ lib/rubygems/defaults.rb | |
5 | @@ -9,7 +9,7 @@ module Gem | 5 | @@ -9,7 +9,7 @@ module Gem | |
6 | # specified in the environment. | 6 | # specified in the environment. | |
7 | def self.default_dir | 7 | def self.default_dir | |
8 | if defined? RUBY_FRAMEWORK_VERSION then | 8 | if defined? RUBY_FRAMEWORK_VERSION then | |
9 | - File.join File.dirname(ConfigMap[:sitedir]), 'Gems', | 9 | - File.join File.dirname(ConfigMap[:sitedir]), 'Gems', | |
10 | + File.join File.dirname(ConfigMap[:vendordir]), 'Gems', | 10 | + File.join File.dirname(ConfigMap[:vendordir]), 'Gems', | |
11 | ConfigMap[:ruby_version] | 11 | ConfigMap[:ruby_version] | |
12 | elsif defined? RUBY_ENGINE then | 12 | elsif defined? RUBY_ENGINE then | |
13 | File.join ConfigMap[:libdir], RUBY_ENGINE, 'gems', | 13 | File.join ConfigMap[:libdir], RUBY_ENGINE, 'gems', |
@@ -1,24 +1,26 @@ | @@ -1,24 +1,26 @@ | |||
1 | $NetBSD: patch-ak,v 1.1 2008/06/19 14:52:36 taca Exp $ | 1 | $NetBSD: patch-ak,v 1.2 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- test/test_gem.rb.orig 2008-04-10 06:17:44.000000000 +0900 | 3 | --- test/test_gem.rb.orig 2008-06-19 06:27:03.000000000 +0900 | |
4 | +++ test/test_gem.rb | 4 | +++ test/test_gem.rb | |
5 | @@ -326,16 +326,16 @@ class TestGem < RubyGemTestCase | 5 | @@ -345,17 +345,17 @@ class TestGem < RubyGemTestCase | |
6 | Gem::ConfigMap[:libdir] = orig_libdir | |||
6 | end | 7 | end | |
7 | 8 | |||
8 | def test_self_prefix_sitelibdir | 9 | - def test_self_prefix_sitelibdir | |
9 | - orig_sitelibdir = Gem::ConfigMap[:sitelibdir] | 10 | - orig_sitelibdir = Gem::ConfigMap[:sitelibdir] | |
10 | + orig_sitelibdir = Gem::ConfigMap[:vendorlibdir] | 11 | + def test_self_prefix_vendorlibdir | |
12 | + orig_vendorlibdir = Gem::ConfigMap[:vendorlibdir] | |||
11 | 13 | |||
12 | file_name = File.expand_path __FILE__ | 14 | file_name = File.expand_path __FILE__ | |
13 | prefix = File.dirname File.dirname(file_name) | 15 | prefix = File.dirname File.dirname(file_name) | |
14 | 16 | |||
15 | - Gem::ConfigMap[:sitelibdir] = prefix | 17 | - Gem::ConfigMap[:sitelibdir] = prefix | |
16 | + Gem::ConfigMap[:vendorlibdir] = prefix | 18 | + Gem::ConfigMap[:vendorlibdir] = prefix | |
17 | 19 | |||
18 | assert_nil Gem.prefix | 20 | assert_nil Gem.prefix | |
19 | ensure | 21 | ensure | |
20 | - Gem::ConfigMap[:sitelibdir] = orig_sitelibdir | 22 | - Gem::ConfigMap[:sitelibdir] = orig_sitelibdir | |
21 | + Gem::ConfigMap[:vendorlibdir] = orig_sitelibdir | 23 | + Gem::ConfigMap[:vendorlibdir] = orig_vendorlibdir | |
22 | end | 24 | end | |
23 | 25 | |||
24 | def test_self_refresh | 26 | def test_self_refresh |
@@ -1,49 +1,44 @@ | @@ -1,49 +1,44 @@ | |||
1 | $NetBSD: patch-ah,v 1.3 2008/06/19 14:52:36 taca Exp $ | 1 | $NetBSD: patch-ah,v 1.4 2008/09/15 08:43:44 taca Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems.rb.orig 2008-04-10 06:18:31.000000000 +0900 | 3 | --- lib/rubygems.rb.orig 2008-06-21 04:54:57.000000000 +0900 | |
4 | +++ lib/rubygems.rb | 4 | +++ lib/rubygems.rb | |
5 | @@ -71,7 +71,9 @@ module Gem | 5 | @@ -230,7 +230,13 @@ module Gem | |
6 | :ruby_install_name => RbConfig::CONFIG["ruby_install_name"], | |||
7 | :ruby_version => RbConfig::CONFIG["ruby_version"], | |||
8 | :sitedir => RbConfig::CONFIG["sitedir"], | |||
9 | - :sitelibdir => RbConfig::CONFIG["sitelibdir"] | |||
10 | + :sitelibdir => RbConfig::CONFIG["sitelibdir"], | |||
11 | + :vendordir => RbConfig::CONFIG["vendordir"], | |||
12 | + :vendorlibdir => RbConfig::CONFIG["vendorlibdir"] | |||
13 | ) | |||
14 | ||||
15 | DIRECTORIES = %w[cache doc gems specifications] unless defined?(DIRECTORIES) | |||
16 | @@ -213,7 +215,13 @@ module Gem | |||
17 | ## | 6 | ## | |
18 | # The path where gem executables are to be installed. | 7 | # The path where gem executables are to be installed. | |
19 | 8 | |||
20 | - def self.bindir(install_dir=Gem.dir) | 9 | - def self.bindir(install_dir=Gem.dir) | |
21 | + def self.bindir(install_dir=Gem.dir, install_root=nil) | 10 | + def self.bindir(install_dir=Gem.dir, install_root=nil) | |
22 | + unless install_root.nil? | 11 | + unless install_root.nil? | |
23 | + install_root_path = Pathname.new install_root | 12 | + install_root_path = Pathname.new install_root | |
24 | + install_dir_path = Pathname.new install_dir | 13 | + install_dir_path = Pathname.new install_dir | |
25 | + install_dir_path = install_dir_path.relative_path_from install_root_path | 14 | + install_dir_path = install_dir_path.relative_path_from install_root_path | |
26 | + install_dir = install_dir_path.expand_path File::SEPARATOR | 15 | + install_dir = install_dir_path.expand_path File::SEPARATOR | |
27 | + end | 16 | + end | |
28 | return File.join(install_dir, 'bin') unless | 17 | return File.join(install_dir, 'bin') unless | |
29 | install_dir.to_s == Gem.default_dir | 18 | install_dir.to_s == Gem.default_dir | |
30 | Gem.default_bindir | 19 | Gem.default_bindir | |
31 | @@ -389,7 +397,7 @@ module Gem | 20 | @@ -435,12 +441,12 @@ module Gem | |
21 | ## | |||
22 | # The index to insert activated gem paths into the $LOAD_PATH. | |||
23 | # | |||
24 | - # Defaults to the site lib directory unless gem_prelude.rb has loaded paths, | |||
25 | + # Defaults to the vendor lib directory unless gem_prelude.rb has loaded paths, | |||
26 | # then it inserts the activated gem's paths before the gem_prelude.rb paths | |||
32 | # so you can override the gem_prelude.rb default $LOAD_PATH paths. | 27 | # so you can override the gem_prelude.rb default $LOAD_PATH paths. | |
33 | 28 | |||
34 | def self.load_path_insert_index | 29 | def self.load_path_insert_index | |
35 | - index = $LOAD_PATH.index ConfigMap[:sitelibdir] | 30 | - index = $LOAD_PATH.index ConfigMap[:sitelibdir] | |
36 | + index = $LOAD_PATH.index ConfigMap[:vendorlibdir] | 31 | + index = $LOAD_PATH.index ConfigMap[:vendorlibdir] | |
37 | 32 | |||
38 | $LOAD_PATH.each_with_index do |path, i| | 33 | $LOAD_PATH.each_with_index do |path, i| | |
39 | if path.instance_variables.include?(:@gem_prelude_index) or | 34 | if path.instance_variables.include?(:@gem_prelude_index) or | |
40 | @@ -474,7 +482,8 @@ module Gem | 35 | @@ -529,7 +535,8 @@ module Gem | |
41 | def self.prefix | 36 | def self.prefix | |
42 | prefix = File.dirname File.expand_path(__FILE__) | 37 | prefix = File.dirname File.expand_path(__FILE__) | |
43 | 38 | |||
44 | - if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | 39 | - if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | |
45 | + if File.dirname(prefix) == File.expand_path(ConfigMap[:vendorlibdir]) or | 40 | + if File.dirname(prefix) == File.expand_path(ConfigMap[:vendorlibdir]) or | |
46 | + File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | 41 | + File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | |
47 | File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or | 42 | File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or | |
48 | 'lib' != File.basename(prefix) then | 43 | 'lib' != File.basename(prefix) then | |
49 | nil | 44 | nil |