Update rubygems to 1.3.4. New features since 1.3.1: * RubyGems now loads plugins from rubygems_plugin.rb in installed gems. This can be used to add commands (See Gem::CommandManager) or add install/uninstall hooks (See Gem::Installer and Gem::Uninstaller). * Gem::Version now understands prerelease versions using letters. (eg. '1.2.1.b') Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg. * RubyGems now includes a Rake task for creating gems which replaces rake's Rake::GemPackageTask. See Gem::PackageTask. * Gem::find_files now returns paths in $LOAD_PATH. * Added Gem::promote_load_path for use with Gem::find_files * Added Gem::bin_path to make finding executables easier. Patch #24114 by James Tucker. * Various improvements to build arguments for installing gems. * `gem contents` added --all and --no-prefix. * Gem::Specification * #validate strips directories and errors on not-files. * #description no longer removes newlines. * #name must be a String. * FIXME and TODO are no longer allowed in various fields. * Added support for a license attribute. Feature #11041 (partial). * Removed Gem::Specification::list, too much process growth. Bug #23668 by Steve Purcell. * `gem generate_index` * Can now generate an RSS feed. * Modern indicies can now be updated incrementally. * Legacy indicies can be updated separately from modern. * `gem server` allows port names (from /etc/services) with --port. * `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir Dobriakov. * `gem spec` can retrieve single fields from a spec (like `gem spec rake authors`). * Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true) * RDoc is now generated regardless of Gem::Specification#has_rdoc?diff -r1.23 -r1.24 pkgsrc/misc/rubygems/Makefile
(minskim)
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | # $NetBSD: Makefile,v 1.23 2009/04/07 07:35:44 minskim Exp $ | 1 | # $NetBSD: Makefile,v 1.24 2009/06/10 21:44:30 minskim Exp $ | |
2 | 2 | |||
3 | DISTNAME= rubygems-1.3.1 | 3 | DISTNAME= rubygems-1.3.4 | |
4 | CATEGORIES= misc ruby | 4 | CATEGORIES= misc ruby | |
5 | MASTER_SITES= http://rubyforge.org/frs/download.php/45905/ | 5 | MASTER_SITES= http://rubyforge.org/frs/download.php/57643/ | |
6 | EXTRACT_SUFX= .tgz | 6 | EXTRACT_SUFX= .tgz | |
7 | 7 | |||
8 | MAINTAINER= minskim@NetBSD.org | 8 | MAINTAINER= minskim@NetBSD.org | |
9 | HOMEPAGE= http://www.rubygems.org/ | 9 | HOMEPAGE= http://www.rubygems.org/ | |
10 | COMMENT= Ruby standard for publishing and managing third party libraries | 10 | COMMENT= Ruby standard for publishing and managing third party libraries | |
11 | 11 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 13 | |||
14 | .include "../../mk/bsd.prefs.mk" | 14 | .include "../../mk/bsd.prefs.mk" | |
15 | 15 | |||
16 | NO_CONFIGURE= yes | 16 | NO_CONFIGURE= yes | |
17 | NO_BUILD= yes | 17 | NO_BUILD= yes | |
18 | RUBY_REQD= 1.8.7 | 18 | RUBY_REQD= 1.8.7 | |
@@ -39,32 +39,33 @@ SUBST_MESSAGE.conf= Fixing configuration | @@ -39,32 +39,33 @@ SUBST_MESSAGE.conf= Fixing configuration | |||
39 | 39 | |||
40 | # Generate a dynamic PLIST for the rubygems documentation directory. | 40 | # Generate a dynamic PLIST for the rubygems documentation directory. | |
41 | GENERATE_PLIST+= \ | 41 | GENERATE_PLIST+= \ | |
42 | ${ECHO} "@comment The following lines are automatically generated." && \ | 42 | ${ECHO} "@comment The following lines are automatically generated." && \ | |
43 | ( cd ${DESTDIR}${PREFIX} && \ | 43 | ( cd ${DESTDIR}${PREFIX} && \ | |
44 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \ | 44 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \ | |
45 | ${SORT} && \ | 45 | ${SORT} && \ | |
46 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \ | 46 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \ | |
47 | ${SORT} -r | ${SED} -e "s,^,@dirrm ," ); | 47 | ${SORT} -r | ${SED} -e "s,^,@dirrm ," ); | |
48 | 48 | |||
49 | .include "../../lang/ruby/modules.mk" | 49 | .include "../../lang/ruby/modules.mk" | |
50 | 50 | |||
51 | # Force the Gem repository to be under ${DESTDIR}. This is harmless | 51 | # Force the Gem repository to be under ${DESTDIR}. This is harmless | |
52 | # because this packages depends on no other gems. | 52 | # because this package depends on no other gems. | |
53 | # | 53 | # | |
54 | INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME} | 54 | INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME} | |
55 | INSTALL_ENV+= GEM_PATH=${DESTDIR}${GEM_HOME} | |||
55 | 56 | |||
56 | INSTALL_TARGET= install | 57 | INSTALL_TARGET= install | |
57 | INSTALL_TARGET+= --vendor | 58 | INSTALL_TARGET+= --vendor | |
58 | INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18" | 59 | INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18" | |
59 | .if ${_USE_DESTDIR} != "no" | 60 | .if ${_USE_DESTDIR} != "no" | |
60 | INSTALL_TARGET+= --destdir=${DESTDIR:Q}${PREFIX:Q} | 61 | INSTALL_TARGET+= --destdir=${DESTDIR:Q} | |
61 | .endif | 62 | .endif | |
62 | 63 | |||
63 | # rubygem's setup.rb is not the typical setup.rb -- manually run the | 64 | # rubygem's setup.rb is not the typical setup.rb -- manually run the | |
64 | # command to install. | 65 | # command to install. | |
65 | # | 66 | # | |
66 | do-install: | 67 | do-install: | |
67 | cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ | 68 | cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ | |
68 | ${RUBY} setup.rb ${INSTALL_TARGET} | 69 | ${RUBY} setup.rb ${INSTALL_TARGET} | |
69 | 70 | |||
70 | .include "../../mk/bsd.pkg.mk" | 71 | .include "../../mk/bsd.pkg.mk" |
@@ -1,39 +1,41 @@ | @@ -1,39 +1,41 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.10 2008/09/15 08:43:44 taca Exp $ | 1 | @comment $NetBSD: PLIST,v 1.11 2009/06/10 21:44:31 minskim Exp $ | |
2 | bin/gem | 2 | bin/gem | |
3 | ${RUBY_VENDORLIB}/gauntlet_rubygems.rb | |||
3 | ${RUBY_VENDORLIB}/rbconfig/datadir.rb | 4 | ${RUBY_VENDORLIB}/rbconfig/datadir.rb | |
4 | ${RUBY_VENDORLIB}/rubygems/builder.rb | 5 | ${RUBY_VENDORLIB}/rubygems/builder.rb | |
5 | ${RUBY_VENDORLIB}/rubygems/command.rb | 6 | ${RUBY_VENDORLIB}/rubygems/command.rb | |
6 | ${RUBY_VENDORLIB}/rubygems/command_manager.rb | 7 | ${RUBY_VENDORLIB}/rubygems/command_manager.rb | |
7 | ${RUBY_VENDORLIB}/rubygems/commands/build_command.rb | 8 | ${RUBY_VENDORLIB}/rubygems/commands/build_command.rb | |
8 | ${RUBY_VENDORLIB}/rubygems/commands/cert_command.rb | 9 | ${RUBY_VENDORLIB}/rubygems/commands/cert_command.rb | |
9 | ${RUBY_VENDORLIB}/rubygems/commands/check_command.rb | 10 | ${RUBY_VENDORLIB}/rubygems/commands/check_command.rb | |
10 | ${RUBY_VENDORLIB}/rubygems/commands/cleanup_command.rb | 11 | ${RUBY_VENDORLIB}/rubygems/commands/cleanup_command.rb | |
11 | ${RUBY_VENDORLIB}/rubygems/commands/contents_command.rb | 12 | ${RUBY_VENDORLIB}/rubygems/commands/contents_command.rb | |
12 | ${RUBY_VENDORLIB}/rubygems/commands/dependency_command.rb | 13 | ${RUBY_VENDORLIB}/rubygems/commands/dependency_command.rb | |
13 | ${RUBY_VENDORLIB}/rubygems/commands/environment_command.rb | 14 | ${RUBY_VENDORLIB}/rubygems/commands/environment_command.rb | |
14 | ${RUBY_VENDORLIB}/rubygems/commands/fetch_command.rb | 15 | ${RUBY_VENDORLIB}/rubygems/commands/fetch_command.rb | |
15 | ${RUBY_VENDORLIB}/rubygems/commands/generate_index_command.rb | 16 | ${RUBY_VENDORLIB}/rubygems/commands/generate_index_command.rb | |
16 | ${RUBY_VENDORLIB}/rubygems/commands/help_command.rb | 17 | ${RUBY_VENDORLIB}/rubygems/commands/help_command.rb | |
17 | ${RUBY_VENDORLIB}/rubygems/commands/install_command.rb | 18 | ${RUBY_VENDORLIB}/rubygems/commands/install_command.rb | |
18 | ${RUBY_VENDORLIB}/rubygems/commands/list_command.rb | 19 | ${RUBY_VENDORLIB}/rubygems/commands/list_command.rb | |
19 | ${RUBY_VENDORLIB}/rubygems/commands/lock_command.rb | 20 | ${RUBY_VENDORLIB}/rubygems/commands/lock_command.rb | |
20 | ${RUBY_VENDORLIB}/rubygems/commands/mirror_command.rb | 21 | ${RUBY_VENDORLIB}/rubygems/commands/mirror_command.rb | |
21 | ${RUBY_VENDORLIB}/rubygems/commands/outdated_command.rb | 22 | ${RUBY_VENDORLIB}/rubygems/commands/outdated_command.rb | |
22 | ${RUBY_VENDORLIB}/rubygems/commands/pristine_command.rb | 23 | ${RUBY_VENDORLIB}/rubygems/commands/pristine_command.rb | |
23 | ${RUBY_VENDORLIB}/rubygems/commands/query_command.rb | 24 | ${RUBY_VENDORLIB}/rubygems/commands/query_command.rb | |
24 | ${RUBY_VENDORLIB}/rubygems/commands/rdoc_command.rb | 25 | ${RUBY_VENDORLIB}/rubygems/commands/rdoc_command.rb | |
25 | ${RUBY_VENDORLIB}/rubygems/commands/search_command.rb | 26 | ${RUBY_VENDORLIB}/rubygems/commands/search_command.rb | |
26 | ${RUBY_VENDORLIB}/rubygems/commands/server_command.rb | 27 | ${RUBY_VENDORLIB}/rubygems/commands/server_command.rb | |
28 | ${RUBY_VENDORLIB}/rubygems/commands/setup_command.rb | |||
27 | ${RUBY_VENDORLIB}/rubygems/commands/sources_command.rb | 29 | ${RUBY_VENDORLIB}/rubygems/commands/sources_command.rb | |
28 | ${RUBY_VENDORLIB}/rubygems/commands/specification_command.rb | 30 | ${RUBY_VENDORLIB}/rubygems/commands/specification_command.rb | |
29 | ${RUBY_VENDORLIB}/rubygems/commands/stale_command.rb | 31 | ${RUBY_VENDORLIB}/rubygems/commands/stale_command.rb | |
30 | ${RUBY_VENDORLIB}/rubygems/commands/uninstall_command.rb | 32 | ${RUBY_VENDORLIB}/rubygems/commands/uninstall_command.rb | |
31 | ${RUBY_VENDORLIB}/rubygems/commands/unpack_command.rb | 33 | ${RUBY_VENDORLIB}/rubygems/commands/unpack_command.rb | |
32 | ${RUBY_VENDORLIB}/rubygems/commands/update_command.rb | 34 | ${RUBY_VENDORLIB}/rubygems/commands/update_command.rb | |
33 | ${RUBY_VENDORLIB}/rubygems/commands/which_command.rb | 35 | ${RUBY_VENDORLIB}/rubygems/commands/which_command.rb | |
34 | ${RUBY_VENDORLIB}/rubygems/config_file.rb | 36 | ${RUBY_VENDORLIB}/rubygems/config_file.rb | |
35 | ${RUBY_VENDORLIB}/rubygems/custom_require.rb | 37 | ${RUBY_VENDORLIB}/rubygems/custom_require.rb | |
36 | ${RUBY_VENDORLIB}/rubygems/defaults.rb | 38 | ${RUBY_VENDORLIB}/rubygems/defaults.rb | |
37 | ${RUBY_VENDORLIB}/rubygems/dependency.rb | 39 | ${RUBY_VENDORLIB}/rubygems/dependency.rb | |
38 | ${RUBY_VENDORLIB}/rubygems/dependency_installer.rb | 40 | ${RUBY_VENDORLIB}/rubygems/dependency_installer.rb | |
39 | ${RUBY_VENDORLIB}/rubygems/dependency_list.rb | 41 | ${RUBY_VENDORLIB}/rubygems/dependency_list.rb | |
@@ -55,39 +57,41 @@ ${RUBY_VENDORLIB}/rubygems/gem_runner.rb | @@ -55,39 +57,41 @@ ${RUBY_VENDORLIB}/rubygems/gem_runner.rb | |||
55 | ${RUBY_VENDORLIB}/rubygems/indexer.rb | 57 | ${RUBY_VENDORLIB}/rubygems/indexer.rb | |
56 | ${RUBY_VENDORLIB}/rubygems/install_update_options.rb | 58 | ${RUBY_VENDORLIB}/rubygems/install_update_options.rb | |
57 | ${RUBY_VENDORLIB}/rubygems/installer.rb | 59 | ${RUBY_VENDORLIB}/rubygems/installer.rb | |
58 | ${RUBY_VENDORLIB}/rubygems/local_remote_options.rb | 60 | ${RUBY_VENDORLIB}/rubygems/local_remote_options.rb | |
59 | ${RUBY_VENDORLIB}/rubygems/old_format.rb | 61 | ${RUBY_VENDORLIB}/rubygems/old_format.rb | |
60 | ${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb | 62 | ${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb | |
61 | ${RUBY_VENDORLIB}/rubygems/package/tar_header.rb | 63 | ${RUBY_VENDORLIB}/rubygems/package/tar_header.rb | |
62 | ${RUBY_VENDORLIB}/rubygems/package/tar_input.rb | 64 | ${RUBY_VENDORLIB}/rubygems/package/tar_input.rb | |
63 | ${RUBY_VENDORLIB}/rubygems/package/tar_output.rb | 65 | ${RUBY_VENDORLIB}/rubygems/package/tar_output.rb | |
64 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb | 66 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb | |
65 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb | 67 | ${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb | |
66 | ${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb | 68 | ${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb | |
67 | ${RUBY_VENDORLIB}/rubygems/package.rb | 69 | ${RUBY_VENDORLIB}/rubygems/package.rb | |
70 | ${RUBY_VENDORLIB}/rubygems/package_task.rb | |||
68 | ${RUBY_VENDORLIB}/rubygems/platform.rb | 71 | ${RUBY_VENDORLIB}/rubygems/platform.rb | |
69 | ${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb | 72 | ${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb | |
70 | ${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb | 73 | ${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb | |
71 | ${RUBY_VENDORLIB}/rubygems/requirement.rb | 74 | ${RUBY_VENDORLIB}/rubygems/requirement.rb | |
72 | ${RUBY_VENDORLIB}/rubygems/rubygems_version.rb | 75 | ${RUBY_VENDORLIB}/rubygems/rubygems_version.rb | |
73 | ${RUBY_VENDORLIB}/rubygems/security.rb | 76 | ${RUBY_VENDORLIB}/rubygems/security.rb | |
74 | ${RUBY_VENDORLIB}/rubygems/server.rb | 77 | ${RUBY_VENDORLIB}/rubygems/server.rb | |
75 | ${RUBY_VENDORLIB}/rubygems/source_index.rb | 78 | ${RUBY_VENDORLIB}/rubygems/source_index.rb | |
76 | ${RUBY_VENDORLIB}/rubygems/source_info_cache.rb | 79 | ${RUBY_VENDORLIB}/rubygems/source_info_cache.rb | |
77 | ${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb | 80 | ${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb | |
78 | ${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb | 81 | ${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb | |
79 | ${RUBY_VENDORLIB}/rubygems/specification.rb | 82 | ${RUBY_VENDORLIB}/rubygems/specification.rb | |
80 | ${RUBY_VENDORLIB}/rubygems/test_utilities.rb | 83 | ${RUBY_VENDORLIB}/rubygems/test_utilities.rb | |
84 | ${RUBY_VENDORLIB}/rubygems/text.rb | |||
81 | ${RUBY_VENDORLIB}/rubygems/timer.rb | 85 | ${RUBY_VENDORLIB}/rubygems/timer.rb | |
82 | ${RUBY_VENDORLIB}/rubygems/uninstaller.rb | 86 | ${RUBY_VENDORLIB}/rubygems/uninstaller.rb | |
83 | ${RUBY_VENDORLIB}/rubygems/user_interaction.rb | 87 | ${RUBY_VENDORLIB}/rubygems/user_interaction.rb | |
84 | ${RUBY_VENDORLIB}/rubygems/validator.rb | 88 | ${RUBY_VENDORLIB}/rubygems/validator.rb | |
85 | ${RUBY_VENDORLIB}/rubygems/version.rb | 89 | ${RUBY_VENDORLIB}/rubygems/version.rb | |
86 | ${RUBY_VENDORLIB}/rubygems/version_option.rb | 90 | ${RUBY_VENDORLIB}/rubygems/version_option.rb | |
87 | ${RUBY_VENDORLIB}/rubygems.rb | 91 | ${RUBY_VENDORLIB}/rubygems.rb | |
88 | ${RUBY_VENDORLIB}/ubygems.rb | 92 | ${RUBY_VENDORLIB}/ubygems.rb | |
89 | @dirrm ${RUBY_VENDORLIB}/rubygems/package/tar_reader | 93 | @dirrm ${RUBY_VENDORLIB}/rubygems/package/tar_reader | |
90 | @dirrm ${RUBY_VENDORLIB}/rubygems/package | 94 | @dirrm ${RUBY_VENDORLIB}/rubygems/package | |
91 | @dirrm ${RUBY_VENDORLIB}/rubygems/ext | 95 | @dirrm ${RUBY_VENDORLIB}/rubygems/ext | |
92 | @dirrm ${RUBY_VENDORLIB}/rubygems/digest | 96 | @dirrm ${RUBY_VENDORLIB}/rubygems/digest | |
93 | @dirrm ${RUBY_VENDORLIB}/rubygems/commands | 97 | @dirrm ${RUBY_VENDORLIB}/rubygems/commands |
@@ -1,14 +1,13 @@ | @@ -1,14 +1,13 @@ | |||
1 | $NetBSD: distinfo,v 1.19 2009/04/07 07:35:44 minskim Exp $ | 1 | $NetBSD: distinfo,v 1.20 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | SHA1 (rubygems-1.3.1.tgz) = a21ae466146bffb28ece05cddbdced0b908ca74f | 3 | SHA1 (rubygems-1.3.4.tgz) = b973b4748c0bc08f9a62b3312bde935dda2eac6f | |
4 | RMD160 (rubygems-1.3.1.tgz) = 898f33bf49ac6d29d8980cb4feaf30ade0125248 | 4 | RMD160 (rubygems-1.3.4.tgz) = 451797299921cac9997fc93a85601d6f28f17cf5 | |
5 | Size (rubygems-1.3.1.tgz) = 263748 bytes | 5 | Size (rubygems-1.3.4.tgz) = 293275 bytes | |
6 | SHA1 (patch-aa) = c504f63e6279a99ddc76a03c0978b89ae2e81024 | 6 | SHA1 (patch-ab) = b38026920e31ae7782df6bbd7d7285d18dcf6ece | |
7 | SHA1 (patch-ab) = b5a0de2c565ba15e2b0fd34993ead019ddee4469 | 7 | SHA1 (patch-ac) = 30ff76c661575d9c51051bb207363f3d2d8b5283 | |
8 | SHA1 (patch-ac) = 5f744d9556855f7a430401c855e288b42669c808 | 8 | SHA1 (patch-ad) = 9e6b11f5edae0656a59d623f4dae05ca7ecbdfaf | |
9 | SHA1 (patch-ad) = 84e1399a671d1888d330bace930fe44c2e72037a | 9 | SHA1 (patch-af) = a89a1e21fa6389359653c21ed5eac02d84114b51 | |
10 | SHA1 (patch-af) = 75f7fe5c777c4eef652e537ba91c2977ee2cfdd6 | 10 | SHA1 (patch-ag) = 20d4bf48fc13409107fcaa7c730b0a8c4641de15 | |
11 | SHA1 (patch-ag) = 9f18db21fcd77d09f810913dd90eecd88cec6250 | 11 | SHA1 (patch-ah) = 015aaccf066333d057997404f43b126e648ff379 | |
12 | SHA1 (patch-ah) = 0dcf44dfaaa1ae5d2b4165c8b1431ddbe46b4b24 | 12 | SHA1 (patch-aj) = fa2192319a01e7a9dc50e497de5d3d52ab9f5768 | |
13 | SHA1 (patch-aj) = 8b8c76daf32564eae2150a4262a85180f0cb0af7 | |||
14 | SHA1 (patch-ak) = 999b52ab6f61dd1c81608d08418b9bb34bdc8aa6 | 13 | SHA1 (patch-ak) = 999b52ab6f61dd1c81608d08418b9bb34bdc8aa6 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: rubygem.mk,v 1.40 2009/04/07 07:35:44 minskim Exp $ | 1 | # $NetBSD: rubygem.mk,v 1.41 2009/06/10 21:44:31 minskim Exp $ | |
2 | # | 2 | # | |
3 | # This Makefile fragment is intended to be included by packages that build | 3 | # This Makefile fragment is intended to be included by packages that build | |
4 | # and install Ruby gems. | 4 | # and install Ruby gems. | |
5 | # | 5 | # | |
6 | # Package-settable variables: | 6 | # Package-settable variables: | |
7 | # | 7 | # | |
8 | # BUILD_TARGET | 8 | # BUILD_TARGET | |
9 | # The Rakefile target that creates a local gem if using the | 9 | # The Rakefile target that creates a local gem if using the | |
10 | # ``rake'' GEM_BUILD method. | 10 | # ``rake'' GEM_BUILD method. | |
11 | # | 11 | # | |
12 | # Default: gem | 12 | # Default: gem | |
13 | # | 13 | # | |
14 | # GEM_BUILD | 14 | # GEM_BUILD | |
@@ -93,26 +93,27 @@ MASTER_SITES?= http://gems.rubyforge.org | @@ -93,26 +93,27 @@ MASTER_SITES?= http://gems.rubyforge.org | |||
93 | 93 | |||
94 | EXTRACT_SUFX?= .gem | 94 | EXTRACT_SUFX?= .gem | |
95 | DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} | 95 | DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} | |
96 | 96 | |||
97 | # If any of the DISTFILES are gems, then skip the normal do-extract actions | 97 | # If any of the DISTFILES are gems, then skip the normal do-extract actions | |
98 | # and extract them ourselves in gem-extract. | 98 | # and extract them ourselves in gem-extract. | |
99 | # | 99 | # | |
100 | .if !empty(DISTFILES:M*.gem) | 100 | .if !empty(DISTFILES:M*.gem) | |
101 | EXTRACT_ONLY?= # empty | 101 | EXTRACT_ONLY?= # empty | |
102 | .endif | 102 | .endif | |
103 | 103 | |||
104 | # Base directory for Gems | 104 | # Base directory for Gems | |
105 | GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} | 105 | GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} | |
106 | MAKE_ENV+= GEM_PATH=${GEM_HOME} | |||
106 | 107 | |||
107 | # Directory for the Gem to install | 108 | # Directory for the Gem to install | |
108 | GEM_NAME?= ${DISTNAME} | 109 | GEM_NAME?= ${DISTNAME} | |
109 | GEM_LIBDIR= ${GEM_HOME}/gems/${GEM_NAME} | 110 | GEM_LIBDIR= ${GEM_HOME}/gems/${GEM_NAME} | |
110 | GEM_DOCDIR= ${GEM_HOME}/doc/${GEM_NAME} | 111 | GEM_DOCDIR= ${GEM_HOME}/doc/${GEM_NAME} | |
111 | GEM_CACHEDIR= ${GEM_HOME}/cache | 112 | GEM_CACHEDIR= ${GEM_HOME}/cache | |
112 | 113 | |||
113 | # Installed gems have wrapper scripts that call the right interpreter, | 114 | # Installed gems have wrapper scripts that call the right interpreter, | |
114 | # regardless of the #! line at the head of a script, so we can skip | 115 | # regardless of the #! line at the head of a script, so we can skip | |
115 | # the interpreter path check for gems. | 116 | # the interpreter path check for gems. | |
116 | # | 117 | # | |
117 | CHECK_INTERPRETER_SKIP= ${GEM_LIBDIR:S|^${PREFIX}/||}/* | 118 | CHECK_INTERPRETER_SKIP= ${GEM_LIBDIR:S|^${PREFIX}/||}/* | |
118 | 119 | |||
@@ -176,79 +177,80 @@ gem-extract: fake-home | @@ -176,79 +177,80 @@ gem-extract: fake-home | |||
176 | GEM_CLEANBUILD?= ext/* | 177 | GEM_CLEANBUILD?= ext/* | |
177 | .if !empty(GEM_CLEANBUILD:M/*) || !empty(GEM_CLEANBUILD:M*../*) | 178 | .if !empty(GEM_CLEANBUILD:M/*) || !empty(GEM_CLEANBUILD:M*../*) | |
178 | PKG_FAIL_REASON= "GEM_CLEANBUILD must be relative to "${GEM_LIBDIR:Q}"." | 179 | PKG_FAIL_REASON= "GEM_CLEANBUILD must be relative to "${GEM_LIBDIR:Q}"." | |
179 | .endif | 180 | .endif | |
180 | 181 | |||
181 | .PHONY: gem-build | 182 | .PHONY: gem-build | |
182 | do-build: gem-build | 183 | do-build: gem-build | |
183 | gem-build: _gem-${GEM_BUILD}-build | 184 | gem-build: _gem-${GEM_BUILD}-build | |
184 | 185 | |||
185 | .PHONY: _gem-gemspec-build | 186 | .PHONY: _gem-gemspec-build | |
186 | _gem-gemspec-build: | 187 | _gem-gemspec-build: | |
187 | ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | 188 | ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | |
188 | ${RUBYGEM} build ${GEM_SPECFILE} | 189 | ${RUBYGEM} build ${GEM_SPECFILE} | |
189 | ${RUN} test -f ${WRKSRC}/${GEM_NAME}.gem || \ | 190 | ${RUN} ${TEST} -f ${WRKSRC}/${GEM_NAME}.gem || \ | |
190 | ${FAIL_MSG} "Build of ${GEM_NAME}.gem failed." | 191 | ${FAIL_MSG} "Build of ${GEM_NAME}.gem failed." | |
191 | 192 | |||
192 | BUILD_TARGET?= gem | 193 | BUILD_TARGET?= gem | |
193 | 194 | |||
194 | .PHONY: _gem-rake-build | 195 | .PHONY: _gem-rake-build | |
195 | _gem-rake-build: | 196 | _gem-rake-build: | |
196 | ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${RAKE} ${BUILD_TARGET} | 197 | ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${RAKE} ${BUILD_TARGET} | |
197 | ${RUN} cd ${WRKSRC} && rm -f ${GEM_NAME}.gem | 198 | ${RUN} cd ${WRKSRC} && rm -f ${GEM_NAME}.gem | |
198 | ${RUN} cd ${WRKSRC} && find . -name ${GEM_NAME}.gem -print | \ | 199 | ${RUN} cd ${WRKSRC} && find . -name ${GEM_NAME}.gem -print | \ | |
199 | while read file; do \ | 200 | while read file; do \ | |
200 | ln -fs "$$file" ${GEM_NAME}.gem; \ | 201 | ln -fs "$$file" ${GEM_NAME}.gem; \ | |
201 | exit 0; \ | 202 | exit 0; \ | |
202 | done | 203 | done | |
203 | 204 | |||
204 | _RUBYGEM_INSTALL_ROOT= ${WRKDIR}/.inst | 205 | _RUBYGEM_INSTALL_ROOT= ${WRKDIR}/.inst | |
205 | _RUBYGEM_OPTIONS= --no-update-sources # don't cache the gem index | 206 | _RUBYGEM_OPTIONS= --no-update-sources # don't cache the gem index | |
206 | _RUBYGEM_OPTIONS+= --install-dir ${GEM_HOME} | 207 | _RUBYGEM_OPTIONS+= --install-dir ${GEM_HOME} | |
207 | _RUBYGEM_OPTIONS+= --install-root ${_RUBYGEM_INSTALL_ROOT} | 208 | _RUBYGEM_OPTIONS+= --install-root ${_RUBYGEM_INSTALL_ROOT} | |
209 | _RUBYGEM_OPTIONS+= --ignore-dependencies | |||
208 | _RUBYGEM_OPTIONS+= --local ${WRKSRC}/${GEM_NAME}.gem | 210 | _RUBYGEM_OPTIONS+= --local ${WRKSRC}/${GEM_NAME}.gem | |
209 | _RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS} | 211 | _RUBYGEM_OPTIONS+= -- --build-args ${CONFIGURE_ARGS} | |
210 | 212 | |||
211 | .PHONY: _gem-build-install-root | 213 | .PHONY: _gem-build-install-root | |
212 | _gem-build-install-root: | 214 | _gem-build-install-root: | |
213 | @${STEP_MSG} "Installing gem into installation root" | 215 | @${STEP_MSG} "Installing gem into installation root" | |
214 | ${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM} install ${_RUBYGEM_OPTIONS} | 216 | ${RUN} ${SETENV} ${MAKE_ENV} ${RUBYGEM} install ${_RUBYGEM_OPTIONS} | |
215 | 217 | |||
216 | # The ``gem'' command doesn't exit with a non-zero result even if the | 218 | # The ``gem'' command doesn't exit with a non-zero result even if the | |
217 | # install of the gem failed, so we do the check and return the proper exit | 219 | # install of the gem failed, so we do the check and return the proper exit | |
218 | # code ourselves. | 220 | # code ourselves. | |
219 | # | 221 | # | |
220 | .PHONY: _gem-build-install-root-check | 222 | .PHONY: _gem-build-install-root-check | |
221 | _gem-build-install-root-check: | 223 | _gem-build-install-root-check: | |
222 | ${RUN} test -f ${_RUBYGEM_INSTALL_ROOT}${GEM_CACHEDIR}/${GEM_NAME}.gem || \ | 224 | ${RUN} ${TEST} -f ${_RUBYGEM_INSTALL_ROOT}${GEM_CACHEDIR}/${GEM_NAME}.gem || \ | |
223 | ${FAIL_MSG} "Installing ${GEM_NAME}.gem into installation root failed." | 225 | ${FAIL_MSG} "Installing ${GEM_NAME}.gem into installation root failed." | |
224 | 226 | |||
225 | .if !empty(GEM_CLEANBUILD) | 227 | .if !empty(GEM_CLEANBUILD) | |
226 | .PHONY: _gem-build-cleanbuild | 228 | .PHONY: _gem-build-cleanbuild | |
227 | _gem-build-cleanbuild: | 229 | _gem-build-cleanbuild: | |
228 | @${STEP_MSG} "Cleaning intermediate gem build files" | 230 | @${STEP_MSG} "Cleaning intermediate gem build files" | |
229 | ${RUN} cd ${_RUBYGEM_INSTALL_ROOT}${GEM_LIBDIR} && \ | 231 | ${RUN} cd ${_RUBYGEM_INSTALL_ROOT}${GEM_LIBDIR} && \ | |
230 | find . -print | sort -r | \ | 232 | find . -print | sort -r | \ | |
231 | while read file; do \ | 233 | while read file; do \ | |
232 | case $$file in \ | 234 | case $$file in \ | |
233 | ${GEM_CLEANBUILD:@.p.@./${.p.}) ;;@} \ | 235 | ${GEM_CLEANBUILD:@.p.@./${.p.}) ;;@} \ | |
234 | *) continue ;; \ | 236 | *) continue ;; \ | |
235 | esac; \ | 237 | esac; \ | |
236 | [ ! -e ${WRKSRC:Q}"/$$file" ] || continue; \ | 238 | [ ! -e ${WRKSRC:Q}"/$$file" ] || continue; \ | |
237 | if [ -d "$$file" ]; then \ | 239 | if [ -d "$$file" ]; then \ | |
238 | echo "rmdir "${GEM_LIBDIR:T}"/$$file"; \ | 240 | ${ECHO} "rmdir "${GEM_LIBDIR:T}"/$$file"; \ | |
239 | rmdir $$file; \ | 241 | rmdir $$file; \ | |
240 | else \ | 242 | else \ | |
241 | echo "rm "${GEM_LIBDIR:T}"/$$file"; \ | 243 | ${ECHO} "rm "${GEM_LIBDIR:T}"/$$file"; \ | |
242 | rm -f $$file; \ | 244 | rm -f $$file; \ | |
243 | fi; \ | 245 | fi; \ | |
244 | done | 246 | done | |
245 | .endif | 247 | .endif | |
246 | 248 | |||
247 | ### | 249 | ### | |
248 | ### gem-install | 250 | ### gem-install | |
249 | ### | 251 | ### | |
250 | ### The gem-install target installs the gem in ${_RUBY_INSTALL_ROOT} into | 252 | ### The gem-install target installs the gem in ${_RUBY_INSTALL_ROOT} into | |
251 | ### the actual gem repository. | 253 | ### the actual gem repository. | |
252 | ### | 254 | ### | |
253 | GENERATE_PLIST+= ${RUBYGEM_GENERATE_PLIST} | 255 | GENERATE_PLIST+= ${RUBYGEM_GENERATE_PLIST} | |
254 | RUBYGEM_GENERATE_PLIST= \ | 256 | RUBYGEM_GENERATE_PLIST= \ |
@@ -1,46 +1,47 @@ | @@ -1,46 +1,47 @@ | |||
1 | $NetBSD: patch-ab,v 1.9 2009/04/07 07:35:44 minskim Exp $ | 1 | $NetBSD: patch-ab,v 1.10 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/dependency_installer.rb.orig 2008-08-12 14:50:22.000000000 -0700 | 3 | --- lib/rubygems/dependency_installer.rb.orig 2009-03-04 17:07:04.000000000 -0800 | |
4 | +++ lib/rubygems/dependency_installer.rb | 4 | +++ lib/rubygems/dependency_installer.rb | |
5 | @@ -37,13 +37,18 @@ class Gem::DependencyInstaller | 5 | @@ -38,6 +38,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 | # :prerelease:: Allow prerelease versions | |||
10 | # :security_policy:: See Gem::Installer::new and Gem::Security. | 11 | # :security_policy:: See Gem::Installer::new and Gem::Security. | |
11 | # :user_install:: See Gem::Installer.new | 12 | # :user_install:: See Gem::Installer.new | |
12 | # :wrappers:: See Gem::Installer::new | 13 | @@ -45,7 +46,11 @@ class Gem::DependencyInstaller | |
13 | 14 | |||
14 | def initialize(options = {}) | 15 | def initialize(options = {}) | |
15 | if options[:install_dir] then | 16 | if options[:install_dir] then | |
16 | - spec_dir = options[:install_dir], 'specifications' | 17 | - spec_dir = options[:install_dir], 'specifications' | |
17 | + if options[:install_root].nil? or options[:install_root] == "" then | 18 | + if options[:install_root].nil? or options[:install_root] == "" then | |
18 | + spec_dir = options[:install_root], options[:install_dir], 'specifications' | |||
19 | + else | |||
20 | + spec_dir = options[:install_dir], 'specifications' | 19 | + spec_dir = options[:install_dir], 'specifications' | |
20 | + else | |||
21 | + spec_dir = options[:install_root], options[:install_dir], 'specifications' | |||
21 | + end | 22 | + end | |
22 | @source_index = Gem::SourceIndex.from_gems_in spec_dir | 23 | @source_index = Gem::SourceIndex.from_gems_in spec_dir | |
23 | else | 24 | else | |
24 | @source_index = Gem.source_index | 25 | @source_index = Gem.source_index | |
25 | @@ -65,7 +70,12 @@ class Gem::DependencyInstaller | 26 | @@ -68,7 +73,12 @@ class Gem::DependencyInstaller | |
26 | @installed_gems = [] | 27 | @installed_gems = [] | |
27 | 28 | |||
28 | @install_dir = options[:install_dir] || Gem.dir | 29 | @install_dir = options[:install_dir] || Gem.dir | |
29 | - @cache_dir = options[:cache_dir] || @install_dir | 30 | - @cache_dir = options[:cache_dir] || @install_dir | |
30 | + @install_root = options[:install_root] | 31 | + @install_root = options[:install_root] | |
31 | + install_dir = @install_dir | 32 | + install_dir = @install_dir | |
32 | + unless @install_root.nil? or @install_root == "" | 33 | + unless @install_root.nil? or @install_root == "" | |
33 | + install_dir = File.join(@install_root, @install_dir) | 34 | + install_dir = File.join(@install_root, @install_dir) | |
34 | + end | 35 | + end | |
35 | + @cache_dir = options[:cache_dir] || install_dir | 36 | + @cache_dir = options[:cache_dir] || install_dir | |
36 | end | 37 | end | |
37 | 38 | |||
38 | ## | 39 | ## | |
39 | @@ -241,6 +251,7 @@ class Gem::DependencyInstaller | 40 | @@ -244,6 +254,7 @@ class Gem::DependencyInstaller | |
40 | :format_executable => @format_executable, | 41 | :format_executable => @format_executable, | |
41 | :ignore_dependencies => @ignore_dependencies, | 42 | :ignore_dependencies => @ignore_dependencies, | |
42 | :install_dir => @install_dir, | 43 | :install_dir => @install_dir, | |
43 | + :install_root => @install_root, | 44 | + :install_root => @install_root, | |
44 | :security_policy => @security_policy, | 45 | :security_policy => @security_policy, | |
45 | :source_index => @source_index, | 46 | :source_index => @source_index, | |
46 | :user_install => @user_install, | 47 | :user_install => @user_install, |
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | $NetBSD: patch-ac,v 1.3 2008/09/15 08:43:44 taca Exp $ | 1 | $NetBSD: patch-ac,v 1.4 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/install_update_options.rb.orig 2008-05-07 11:15:51.000000000 +0900 | 3 | --- lib/rubygems/install_update_options.rb.orig 2009-03-13 16:01:10.000000000 -0700 | |
4 | +++ lib/rubygems/install_update_options.rb | 4 | +++ lib/rubygems/install_update_options.rb | |
5 | @@ -31,6 +31,11 @@ module Gem::InstallUpdateOptions | 5 | @@ -34,6 +34,12 @@ 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 | + Gem.ensure_gem_subdirectories File.join options[:install_root], Gem.dir | |||
12 | + end | 13 | + end | |
13 | + | 14 | + | |
14 | add_option(:"Install/Update", '-d', '--[no-]rdoc', | 15 | add_option(:"Install/Update", '-d', '--[no-]rdoc', | |
15 | 'Generate RDoc documentation for the gem on', | 16 | 'Generate RDoc documentation for the gem on', | |
16 | 'install') do |value, options| | 17 | 'install') do |value, options| |
@@ -1,29 +1,29 @@ | @@ -1,29 +1,29 @@ | |||
1 | $NetBSD: patch-ag,v 1.3 2009/04/07 07:35:44 minskim Exp $ | 1 | $NetBSD: patch-ag,v 1.4 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/uninstaller.rb.orig 2008-08-14 15:57:27.000000000 -0700 | 3 | --- lib/rubygems/uninstaller.rb.orig 2009-05-15 11:32:23.000000000 -0700 | |
4 | +++ lib/rubygems/uninstaller.rb | 4 | +++ lib/rubygems/uninstaller.rb | |
5 | @@ -45,6 +45,11 @@ class Gem::Uninstaller | 5 | @@ -55,6 +55,12 @@ class Gem::Uninstaller | |
6 | @force_all = options[:all] | 6 | @user_install = false | |
7 | @force_ignore = options[:ignore] | 7 | @user_install = options[:user_install] unless options[:install_dir] | |
8 | @bin_dir = options[:bin_dir] | 8 | ||
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 | 14 | + | ||
15 | spec_dir = File.join @gem_home, 'specifications' | 15 | spec_dir = File.join @gem_home, 'specifications' | |
16 | @source_index = Gem::SourceIndex.from_gems_in spec_dir | 16 | @source_index = Gem::SourceIndex.from_gems_in spec_dir | |
17 | @@ -109,7 +114,11 @@ class Gem::Uninstaller | |||
18 | return if gemspec.nil? | |||
19 | 17 | |||
20 | if gemspec.executables.size > 0 then | 18 | @@ -125,6 +131,11 @@ class Gem::Uninstaller | |
21 | - bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home) | 19 | ||
22 | + bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root) | 20 | unless spec.executables.empty? then | |
21 | bindir = @bin_dir ? @bin_dir : Gem.bindir(spec.installation_path) | |||
22 | + bindir = @bin_dir ? @bin_dir : Gem.bindir(sepc_installation_path, @install_root) | |||
23 | + | 23 | + | |
24 | + unless @install_root.nil? or @install_root == "" | 24 | + unless @install_root.nil? or @install_root == "" | |
25 | + bindir = File.join(@install_root, bindir) | 25 | + bindir = File.join(@install_root, bindir) | |
26 | + end | 26 | + end | |
27 | 27 | |||
28 | list = @source_index.find_name(gemspec.name).delete_if { |spec| | 28 | list = @source_index.find_name(spec.name).delete_if { |s| | |
29 | spec.version == gemspec.version | 29 | s.version == spec.version |
@@ -1,13 +1,13 @@ | @@ -1,13 +1,13 @@ | |||
1 | $NetBSD: patch-aj,v 1.3 2009/04/07 07:35:44 minskim Exp $ | 1 | $NetBSD: patch-aj,v 1.4 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/defaults.rb.orig 2008-10-10 13:29:53.000000000 -0700 | 3 | --- lib/rubygems/defaults.rb.orig 2009-05-20 16:30:35.000000000 -0700 | |
4 | +++ lib/rubygems/defaults.rb | 4 | +++ lib/rubygems/defaults.rb | |
5 | @@ -18,7 +18,7 @@ module Gem | 5 | @@ -18,7 +18,7 @@ module Gem | |
6 | 6 | |||
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 | else | 12 | # 1.9.2dev reverted to 1.8 style path | |
13 | File.join(ConfigMap[:libdir], ruby_engine, 'gems', | 13 | elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' then |
@@ -1,47 +1,47 @@ | @@ -1,47 +1,47 @@ | |||
1 | $NetBSD: patch-ad,v 1.4 2009/04/07 07:35:44 minskim Exp $ | 1 | $NetBSD: patch-ad,v 1.5 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/installer.rb.orig 2008-10-10 11:22:39.000000000 -0700 | 3 | --- lib/rubygems/installer.rb.orig 2009-03-31 21:06:19.000000000 -0700 | |
4 | +++ lib/rubygems/installer.rb | 4 | +++ lib/rubygems/installer.rb | |
5 | @@ -80,6 +80,9 @@ class Gem::Installer | 5 | @@ -85,6 +85,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 | @@ -95,6 +98,7 @@ class Gem::Installer | 15 | @@ -100,6 +103,7 @@ class Gem::Installer | |
16 | :exec_format => false, | 16 | :exec_format => false, | |
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 | :source_index => Gem.source_index, | 20 | :source_index => Gem.source_index, | |
21 | }.merge options | 21 | }.merge options | |
22 | 22 | |||
23 | @@ -109,6 +113,11 @@ class Gem::Installer | 23 | @@ -114,6 +118,11 @@ class Gem::Installer | |
24 | @bin_dir = options[:bin_dir] | 24 | @bin_dir = options[:bin_dir] | |
25 | @development = options[:development] | 25 | @development = options[:development] | |
26 | @source_index = options[:source_index] | 26 | @source_index = options[:source_index] | |
27 | + install_root = options[:install_root] | 27 | + install_root = options[:install_root] | |
28 | + unless install_root.nil? or install_root == "" | 28 | + unless install_root.nil? or install_root == "" | |
29 | + @install_root = File.expand_path install_root | 29 | + @install_root = File.expand_path install_root | |
30 | + @gem_home = File.join(@install_root, @gem_home) | 30 | + @gem_home = File.join(@install_root, @gem_home) | |
31 | + end | 31 | + end | |
32 | 32 | |||
33 | begin | 33 | begin | |
34 | @format = Gem::Format.from_file_by_path @gem, @security_policy | 34 | @format = Gem::Format.from_file_by_path @gem, @security_policy | |
35 | @@ -310,7 +319,11 @@ class Gem::Installer | 35 | @@ -312,7 +321,11 @@ class Gem::Installer | |
36 | # 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 | |
37 | # 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 | |
38 | # (or use) a new bin dir under the gem_home. | 38 | # (or use) a new bin dir under the gem_home. | |
39 | - bindir = @bin_dir ? @bin_dir : Gem.bindir(@gem_home) | 39 | - bindir = @bin_dir ? @bin_dir : Gem.bindir(@gem_home) | |
40 | + bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root) | 40 | + bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root) | |
41 | + | 41 | + | |
42 | + unless @install_root.nil? or @install_root == "" | 42 | + unless @install_root.nil? or @install_root == "" | |
43 | + bindir = File.join(@install_root, bindir) | 43 | + bindir = File.join(@install_root, bindir) | |
44 | + end | 44 | + end | |
45 | 45 | |||
46 | Dir.mkdir bindir unless File.exist? bindir | 46 | Dir.mkdir bindir unless File.exist? bindir | |
47 | raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir | 47 | raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir |
@@ -1,44 +1,44 @@ | @@ -1,44 +1,44 @@ | |||
1 | $NetBSD: patch-ah,v 1.4 2008/09/15 08:43:44 taca Exp $ | 1 | $NetBSD: patch-ah,v 1.5 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems.rb.orig 2008-06-21 04:54:57.000000000 +0900 | 3 | --- lib/rubygems.rb.orig 2009-05-21 14:44:06.000000000 -0700 | |
4 | +++ lib/rubygems.rb | 4 | +++ lib/rubygems.rb | |
5 | @@ -230,7 +230,13 @@ module Gem | 5 | @@ -396,7 +396,13 @@ module Gem | |
6 | ## | 6 | ## | |
7 | # The path where gem executables are to be installed. | 7 | # The path where gem executables are to be installed. | |
8 | 8 | |||
9 | - def self.bindir(install_dir=Gem.dir) | 9 | - def self.bindir(install_dir=Gem.dir) | |
10 | + def self.bindir(install_dir=Gem.dir, install_root=nil) | 10 | + def self.bindir(install_dir=Gem.dir, install_root=nil) | |
11 | + unless install_root.nil? | 11 | + unless install_root.nil? | |
12 | + install_root_path = Pathname.new install_root | 12 | + install_root_path = Pathname.new install_root | |
13 | + install_dir_path = Pathname.new install_dir | 13 | + install_dir_path = Pathname.new install_dir | |
14 | + 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 | |
15 | + install_dir = install_dir_path.expand_path File::SEPARATOR | 15 | + install_dir = install_dir_path.expand_path File::SEPARATOR | |
16 | + end | 16 | + end | |
17 | return File.join(install_dir, 'bin') unless | 17 | return File.join(install_dir, 'bin') unless | |
18 | install_dir.to_s == Gem.default_dir | 18 | install_dir.to_s == Gem.default_dir | |
19 | Gem.default_bindir | 19 | Gem.default_bindir | |
20 | @@ -435,12 +441,12 @@ module Gem | 20 | @@ -637,12 +643,12 @@ module Gem | |
21 | ## | 21 | ## | |
22 | # The index to insert activated gem paths into the $LOAD_PATH. | 22 | # The index to insert activated gem paths into the $LOAD_PATH. | |
23 | # | 23 | # | |
24 | - # Defaults to the site lib directory unless gem_prelude.rb has loaded paths, | 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, | 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 | 26 | # then it inserts the activated gem's paths before the gem_prelude.rb paths | |
27 | # 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. | |
28 | 28 | |||
29 | def self.load_path_insert_index | 29 | def self.load_path_insert_index | |
30 | - index = $LOAD_PATH.index ConfigMap[:sitelibdir] | 30 | - index = $LOAD_PATH.index ConfigMap[:sitelibdir] | |
31 | + index = $LOAD_PATH.index ConfigMap[:vendorlibdir] | 31 | + index = $LOAD_PATH.index ConfigMap[:vendorlibdir] | |
32 | 32 | |||
33 | $LOAD_PATH.each_with_index do |path, i| | 33 | $LOAD_PATH.each_with_index do |path, i| | |
34 | if path.instance_variables.include?(:@gem_prelude_index) or | 34 | if path.instance_variables.include?(:@gem_prelude_index) or | |
35 | @@ -529,7 +535,8 @@ module Gem | 35 | @@ -750,7 +756,8 @@ module Gem | |
36 | def self.prefix | 36 | def self.prefix | |
37 | prefix = File.dirname File.expand_path(__FILE__) | 37 | prefix = File.dirname File.expand_path(__FILE__) | |
38 | 38 | |||
39 | - if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | 39 | - if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | |
40 | + if File.dirname(prefix) == File.expand_path(ConfigMap[:vendorlibdir]) or | 40 | + if File.dirname(prefix) == File.expand_path(ConfigMap[:vendorlibdir]) or | |
41 | + File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | 41 | + File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or | |
42 | File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or | 42 | File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or | |
43 | 'lib' != File.basename(prefix) then | 43 | 'lib' != File.basename(prefix) then | |
44 | nil | 44 | nil |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | $NetBSD: patch-af,v 1.2 2008/09/15 08:43:44 taca Exp $ | 1 | $NetBSD: patch-af,v 1.3 2009/06/10 21:44:31 minskim Exp $ | |
2 | 2 | |||
3 | --- lib/rubygems/commands/uninstall_command.rb.orig 2008-02-24 11:26:47.000000000 +0900 | 3 | --- lib/rubygems/commands/uninstall_command.rb.orig 2009-03-13 16:16:55.000000000 -0700 | |
4 | +++ lib/rubygems/commands/uninstall_command.rb | 4 | +++ lib/rubygems/commands/uninstall_command.rb | |
5 | @@ -40,6 +40,11 @@ module Gem | 5 | @@ -49,6 +49,11 @@ class Gem::Commands::UninstallCommand < | |
6 | options[:bin_dir] = File.expand_path(value) | 6 | options[:user_install] = 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 |