Fri Sep 10 03:48:40 2010 UTC ()
* take maintainer ship.
* Add LICENSE.
* Adjust new ruby packages' framework.
* Command name is gem${RUBY_VER} == gem18 now and add ALTERNATIVES.
* Add comments to patches.
* Overhalt --install_root option.
* Avoid access HOME when --install_root is enabled.
* honor PKG_SYSCONFDIR.

Bump PKGREVISION.


(taca)
diff -r0 -r1.1 pkgsrc/misc/rubygems/ALTERNATIVES
diff -r1.31 -r1.32 pkgsrc/misc/rubygems/Makefile
diff -r1.13 -r1.14 pkgsrc/misc/rubygems/PLIST
diff -r1.24 -r1.25 pkgsrc/misc/rubygems/distinfo
diff -r1.7 -r1.8 pkgsrc/misc/rubygems/patches/patch-aa
diff -r1.10 -r1.11 pkgsrc/misc/rubygems/patches/patch-ab
diff -r1.4 -r1.5 pkgsrc/misc/rubygems/patches/patch-ac
diff -r1.4 -r1.5 pkgsrc/misc/rubygems/patches/patch-aj
diff -r1.5 -r1.6 pkgsrc/misc/rubygems/patches/patch-ad
diff -r1.5 -r1.6 pkgsrc/misc/rubygems/patches/patch-ah
diff -r1.3 -r1.4 pkgsrc/misc/rubygems/patches/patch-af
diff -r1.3 -r1.4 pkgsrc/misc/rubygems/patches/patch-ak
diff -r1.6 -r1.7 pkgsrc/misc/rubygems/patches/patch-ag
diff -r0 -r1.1 pkgsrc/misc/rubygems/patches/patch-al
diff -r0 -r1.1 pkgsrc/misc/rubygems/patches/patch-am
diff -r0 -r1.1 pkgsrc/misc/rubygems/patches/patch-an
diff -r0 -r1.1 pkgsrc/misc/rubygems/patches/patch-ao
diff -r0 -r1.1 pkgsrc/misc/rubygems/patches/patch-ap

File Added: pkgsrc/misc/rubygems/Attic/ALTERNATIVES
bin/gem @PREFIX@/bin/gem@RUBY_VER@

cvs diff -r1.31 -r1.32 pkgsrc/misc/rubygems/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/Attic/Makefile 2010/09/07 17:20:26 1.31
+++ pkgsrc/misc/rubygems/Attic/Makefile 2010/09/10 03:48:40 1.32
@@ -1,71 +1,69 @@ @@ -1,71 +1,69 @@
1# $NetBSD: Makefile,v 1.31 2010/09/07 17:20:26 taca Exp $ 1# $NetBSD: Makefile,v 1.32 2010/09/10 03:48:40 taca Exp $
2 2
3DISTNAME= rubygems-1.3.5 3DISTNAME= rubygems-1.3.5
4PKGREVISION= 2 4PKGREVISION= 3
5CATEGORIES= misc ruby 5CATEGORIES= misc ruby
6MASTER_SITES= http://rubyforge.org/frs/download.php/60718/ 6MASTER_SITES= http://rubyforge.org/frs/download.php/60718/
7EXTRACT_SUFX= .tgz 7EXTRACT_SUFX= .tgz
8 8
9MAINTAINER= minskim@NetBSD.org 9MAINTAINER= taca@NetBSD.org
10HOMEPAGE= http://www.rubygems.org/ 10HOMEPAGE= http://www.rubygems.org/
11COMMENT= Ruby standard for publishing and managing third party libraries 11COMMENT= Ruby standard for publishing and managing third party libraries
 12LICENSE= gnu-gpl-v2 OR ruby-license
12 13
13PKG_DESTDIR_SUPPORT= user-destdir 14PKG_DESTDIR_SUPPORT= user-destdir
14 15
15.include "../../mk/bsd.prefs.mk" 16.include "../../mk/bsd.prefs.mk"
16 17
17NO_CONFIGURE= yes 18NO_CONFIGURE= yes
18NO_BUILD= yes 19NO_BUILD= yes
19RUBY_REQD= 1.8.7 20RUBY_REQD= 1.8.7
 21RUBY_VERSION= ${RUBY18_VERSION}
20 22
21RUBY_VERSION_SUPPORTED= 18 23RUBY_VERSION_SUPPORTED= 18
22REPLACE_RUBY_DIRS= bin 24REPLACE_RUBY_DIRS= bin
23REPLACE_RUBY_PAT= [a-z]* 25REPLACE_RUBY_PAT= [a-z]*
24 26
25GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} 
26GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME} 27GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME}
27 28
28REQD_DIRS= ${GEM_HOME:H} 29REQD_DIRS= ${GEM_HOME:H}
29REQD_DIRS+= ${GEM_HOME} 30REQD_DIRS+= ${GEM_HOME}
30REQD_DIRS+= ${GEM_HOME}/cache 31REQD_DIRS+= ${GEM_HOME}/cache
31REQD_DIRS+= ${GEM_HOME}/doc 32REQD_DIRS+= ${GEM_HOME}/doc
32REQD_DIRS+= ${GEM_HOME}/gems 33REQD_DIRS+= ${GEM_HOME}/gems
33REQD_DIRS+= ${GEM_HOME}/specifications 34REQD_DIRS+= ${GEM_HOME}/specifications
34 35
35SUBST_CLASSES+= conf 36SUBST_CLASSES+= conf
36SUBST_STAGE.conf= pre-install 37SUBST_STAGE.conf= pre-install
37SUBST_FILES.conf= lib/rubygems/config_file.rb 38SUBST_FILES.conf= lib/rubygems/config_file.rb
38SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" 39SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
39SUBST_MESSAGE.conf= Fixing configuration files. 40SUBST_MESSAGE.conf= Fixing configuration files.
40 41
41 
42# Generate a dynamic PLIST for the rubygems documentation directory. 42# Generate a dynamic PLIST for the rubygems documentation directory.
43GENERATE_PLIST+= \ 43GENERATE_PLIST+= \
44 ${ECHO} "@comment The following lines are automatically generated." && \ 44 ${ECHO} "@comment The following lines are automatically generated." && \
45 cd ${DESTDIR}${PREFIX} && \ 45 cd ${DESTDIR}${PREFIX} && \
46 ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \ 46 ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \
47 ${SORT}; 47 ${SORT};
48 48
49.include "../../lang/ruby/modules.mk" 
50 
51# Force the Gem repository to be under ${DESTDIR}. This is harmless 49# Force the Gem repository to be under ${DESTDIR}. This is harmless
52# because this package depends on no other gems. 50# because this package depends on no other gems.
53# 51#
54INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME} 52INSTALL_ENV+= GEM_HOME=${DESTDIR}${PREFIX}/${GEM_HOME}
55INSTALL_ENV+= GEM_PATH=${DESTDIR}${GEM_HOME} 53INSTALL_ENV+= GEM_PATH=${DESTDIR}${PREFIX}/${GEM_HOME}
56 54
57INSTALL_TARGET= install 55INSTALL_TARGET= install
58INSTALL_TARGET+= --vendor 56INSTALL_TARGET+= --vendor
59INSTALL_TARGET+= --no-format-executable # "bin/gem", not "bin/gem18" 
60.if ${_USE_DESTDIR} != "no" 57.if ${_USE_DESTDIR} != "no"
61INSTALL_TARGET+= --destdir=${DESTDIR:Q} 58INSTALL_TARGET+= --destdir=${DESTDIR:Q}
62.endif 59.endif
63 60
64# rubygem's setup.rb is not the typical setup.rb -- manually run the 61# rubygem's setup.rb is not the typical setup.rb -- manually run the
65# command to install. 62# command to install.
66# 63#
67do-install: 64do-install:
68 cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ 65 cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
69 ${RUBY} setup.rb ${INSTALL_TARGET} 66 ${RUBY} setup.rb ${INSTALL_TARGET}
70 67
 68.include "../../lang/ruby/modules.mk"
71.include "../../mk/bsd.pkg.mk" 69.include "../../mk/bsd.pkg.mk"

cvs diff -r1.13 -r1.14 pkgsrc/misc/rubygems/Attic/PLIST (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/Attic/PLIST 2009/07/24 06:38:53 1.13
+++ pkgsrc/misc/rubygems/Attic/PLIST 2010/09/10 03:48:40 1.14
@@ -1,17 +1,18 @@ @@ -1,17 +1,18 @@
1@comment $NetBSD: PLIST,v 1.13 2009/07/24 06:38:53 minskim Exp $ 1@comment $NetBSD: PLIST,v 1.14 2010/09/10 03:48:40 taca Exp $
2bin/gem 2bin/gem${RUBY_VER}
3${RUBY_VENDORLIB}/gauntlet_rubygems.rb 3${RUBY_VENDORLIB}/gauntlet_rubygems.rb
4${RUBY_VENDORLIB}/rbconfig/datadir.rb 4${RUBY_VENDORLIB}/rbconfig/datadir.rb
 5${RUBY_VENDORLIB}/rubygems.rb
5${RUBY_VENDORLIB}/rubygems/builder.rb 6${RUBY_VENDORLIB}/rubygems/builder.rb
6${RUBY_VENDORLIB}/rubygems/command.rb 7${RUBY_VENDORLIB}/rubygems/command.rb
7${RUBY_VENDORLIB}/rubygems/command_manager.rb 8${RUBY_VENDORLIB}/rubygems/command_manager.rb
8${RUBY_VENDORLIB}/rubygems/commands/build_command.rb 9${RUBY_VENDORLIB}/rubygems/commands/build_command.rb
9${RUBY_VENDORLIB}/rubygems/commands/cert_command.rb 10${RUBY_VENDORLIB}/rubygems/commands/cert_command.rb
10${RUBY_VENDORLIB}/rubygems/commands/check_command.rb 11${RUBY_VENDORLIB}/rubygems/commands/check_command.rb
11${RUBY_VENDORLIB}/rubygems/commands/cleanup_command.rb 12${RUBY_VENDORLIB}/rubygems/commands/cleanup_command.rb
12${RUBY_VENDORLIB}/rubygems/commands/contents_command.rb 13${RUBY_VENDORLIB}/rubygems/commands/contents_command.rb
13${RUBY_VENDORLIB}/rubygems/commands/dependency_command.rb 14${RUBY_VENDORLIB}/rubygems/commands/dependency_command.rb
14${RUBY_VENDORLIB}/rubygems/commands/environment_command.rb 15${RUBY_VENDORLIB}/rubygems/commands/environment_command.rb
15${RUBY_VENDORLIB}/rubygems/commands/fetch_command.rb 16${RUBY_VENDORLIB}/rubygems/commands/fetch_command.rb
16${RUBY_VENDORLIB}/rubygems/commands/generate_index_command.rb 17${RUBY_VENDORLIB}/rubygems/commands/generate_index_command.rb
17${RUBY_VENDORLIB}/rubygems/commands/help_command.rb 18${RUBY_VENDORLIB}/rubygems/commands/help_command.rb
@@ -35,57 +36,56 @@ ${RUBY_VENDORLIB}/rubygems/commands/upda @@ -35,57 +36,56 @@ ${RUBY_VENDORLIB}/rubygems/commands/upda
35${RUBY_VENDORLIB}/rubygems/commands/which_command.rb 36${RUBY_VENDORLIB}/rubygems/commands/which_command.rb
36${RUBY_VENDORLIB}/rubygems/config_file.rb 37${RUBY_VENDORLIB}/rubygems/config_file.rb
37${RUBY_VENDORLIB}/rubygems/custom_require.rb 38${RUBY_VENDORLIB}/rubygems/custom_require.rb
38${RUBY_VENDORLIB}/rubygems/defaults.rb 39${RUBY_VENDORLIB}/rubygems/defaults.rb
39${RUBY_VENDORLIB}/rubygems/dependency.rb 40${RUBY_VENDORLIB}/rubygems/dependency.rb
40${RUBY_VENDORLIB}/rubygems/dependency_installer.rb 41${RUBY_VENDORLIB}/rubygems/dependency_installer.rb
41${RUBY_VENDORLIB}/rubygems/dependency_list.rb 42${RUBY_VENDORLIB}/rubygems/dependency_list.rb
42${RUBY_VENDORLIB}/rubygems/digest/digest_adapter.rb 43${RUBY_VENDORLIB}/rubygems/digest/digest_adapter.rb
43${RUBY_VENDORLIB}/rubygems/digest/md5.rb 44${RUBY_VENDORLIB}/rubygems/digest/md5.rb
44${RUBY_VENDORLIB}/rubygems/digest/sha1.rb 45${RUBY_VENDORLIB}/rubygems/digest/sha1.rb
45${RUBY_VENDORLIB}/rubygems/digest/sha2.rb 46${RUBY_VENDORLIB}/rubygems/digest/sha2.rb
46${RUBY_VENDORLIB}/rubygems/doc_manager.rb 47${RUBY_VENDORLIB}/rubygems/doc_manager.rb
47${RUBY_VENDORLIB}/rubygems/exceptions.rb 48${RUBY_VENDORLIB}/rubygems/exceptions.rb
 49${RUBY_VENDORLIB}/rubygems/ext.rb
48${RUBY_VENDORLIB}/rubygems/ext/builder.rb 50${RUBY_VENDORLIB}/rubygems/ext/builder.rb
49${RUBY_VENDORLIB}/rubygems/ext/configure_builder.rb 51${RUBY_VENDORLIB}/rubygems/ext/configure_builder.rb
50${RUBY_VENDORLIB}/rubygems/ext/ext_conf_builder.rb 52${RUBY_VENDORLIB}/rubygems/ext/ext_conf_builder.rb
51${RUBY_VENDORLIB}/rubygems/ext/rake_builder.rb 53${RUBY_VENDORLIB}/rubygems/ext/rake_builder.rb
52${RUBY_VENDORLIB}/rubygems/ext.rb 
53${RUBY_VENDORLIB}/rubygems/format.rb 54${RUBY_VENDORLIB}/rubygems/format.rb
54${RUBY_VENDORLIB}/rubygems/gem_openssl.rb 55${RUBY_VENDORLIB}/rubygems/gem_openssl.rb
55${RUBY_VENDORLIB}/rubygems/gem_path_searcher.rb 56${RUBY_VENDORLIB}/rubygems/gem_path_searcher.rb
56${RUBY_VENDORLIB}/rubygems/gem_runner.rb 57${RUBY_VENDORLIB}/rubygems/gem_runner.rb
57${RUBY_VENDORLIB}/rubygems/indexer.rb 58${RUBY_VENDORLIB}/rubygems/indexer.rb
58${RUBY_VENDORLIB}/rubygems/install_update_options.rb 59${RUBY_VENDORLIB}/rubygems/install_update_options.rb
59${RUBY_VENDORLIB}/rubygems/installer.rb 60${RUBY_VENDORLIB}/rubygems/installer.rb
60${RUBY_VENDORLIB}/rubygems/local_remote_options.rb 61${RUBY_VENDORLIB}/rubygems/local_remote_options.rb
61${RUBY_VENDORLIB}/rubygems/old_format.rb 62${RUBY_VENDORLIB}/rubygems/old_format.rb
 63${RUBY_VENDORLIB}/rubygems/package.rb
62${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb 64${RUBY_VENDORLIB}/rubygems/package/f_sync_dir.rb
63${RUBY_VENDORLIB}/rubygems/package/tar_header.rb 65${RUBY_VENDORLIB}/rubygems/package/tar_header.rb
64${RUBY_VENDORLIB}/rubygems/package/tar_input.rb 66${RUBY_VENDORLIB}/rubygems/package/tar_input.rb
65${RUBY_VENDORLIB}/rubygems/package/tar_output.rb 67${RUBY_VENDORLIB}/rubygems/package/tar_output.rb
66${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb 
67${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb 68${RUBY_VENDORLIB}/rubygems/package/tar_reader.rb
 69${RUBY_VENDORLIB}/rubygems/package/tar_reader/entry.rb
68${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb 70${RUBY_VENDORLIB}/rubygems/package/tar_writer.rb
69${RUBY_VENDORLIB}/rubygems/package.rb 
70${RUBY_VENDORLIB}/rubygems/package_task.rb 71${RUBY_VENDORLIB}/rubygems/package_task.rb
71${RUBY_VENDORLIB}/rubygems/platform.rb 72${RUBY_VENDORLIB}/rubygems/platform.rb
72${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb 73${RUBY_VENDORLIB}/rubygems/remote_fetcher.rb
73${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb 74${RUBY_VENDORLIB}/rubygems/require_paths_builder.rb
74${RUBY_VENDORLIB}/rubygems/requirement.rb 75${RUBY_VENDORLIB}/rubygems/requirement.rb
75${RUBY_VENDORLIB}/rubygems/security.rb 76${RUBY_VENDORLIB}/rubygems/security.rb
76${RUBY_VENDORLIB}/rubygems/server.rb 77${RUBY_VENDORLIB}/rubygems/server.rb
77${RUBY_VENDORLIB}/rubygems/source_index.rb 78${RUBY_VENDORLIB}/rubygems/source_index.rb
78${RUBY_VENDORLIB}/rubygems/source_info_cache.rb 79${RUBY_VENDORLIB}/rubygems/source_info_cache.rb
79${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb 80${RUBY_VENDORLIB}/rubygems/source_info_cache_entry.rb
80${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb 81${RUBY_VENDORLIB}/rubygems/spec_fetcher.rb
81${RUBY_VENDORLIB}/rubygems/specification.rb 82${RUBY_VENDORLIB}/rubygems/specification.rb
82${RUBY_VENDORLIB}/rubygems/test_utilities.rb 83${RUBY_VENDORLIB}/rubygems/test_utilities.rb
83${RUBY_VENDORLIB}/rubygems/text.rb 84${RUBY_VENDORLIB}/rubygems/text.rb
84${RUBY_VENDORLIB}/rubygems/timer.rb 85${RUBY_VENDORLIB}/rubygems/timer.rb
85${RUBY_VENDORLIB}/rubygems/uninstaller.rb 86${RUBY_VENDORLIB}/rubygems/uninstaller.rb
86${RUBY_VENDORLIB}/rubygems/user_interaction.rb 87${RUBY_VENDORLIB}/rubygems/user_interaction.rb
87${RUBY_VENDORLIB}/rubygems/validator.rb 88${RUBY_VENDORLIB}/rubygems/validator.rb
88${RUBY_VENDORLIB}/rubygems/version.rb 89${RUBY_VENDORLIB}/rubygems/version.rb
89${RUBY_VENDORLIB}/rubygems/version_option.rb 90${RUBY_VENDORLIB}/rubygems/version_option.rb
90${RUBY_VENDORLIB}/rubygems.rb 
91${RUBY_VENDORLIB}/ubygems.rb 91${RUBY_VENDORLIB}/ubygems.rb

cvs diff -r1.24 -r1.25 pkgsrc/misc/rubygems/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/Attic/distinfo 2010/01/27 13:21:58 1.24
+++ pkgsrc/misc/rubygems/Attic/distinfo 2010/09/10 03:48:40 1.25
@@ -1,14 +1,19 @@ @@ -1,14 +1,19 @@
1$NetBSD: distinfo,v 1.24 2010/01/27 13:21:58 fhajny Exp $ 1$NetBSD: distinfo,v 1.25 2010/09/10 03:48:40 taca Exp $
2 2
3SHA1 (rubygems-1.3.5.tgz) = 8545f25d00c757a310b879a2580e56d6012fc981 3SHA1 (rubygems-1.3.5.tgz) = 8545f25d00c757a310b879a2580e56d6012fc981
4RMD160 (rubygems-1.3.5.tgz) = 2d17f0de2d387bd2a034916cb79531110f3be196 4RMD160 (rubygems-1.3.5.tgz) = 2d17f0de2d387bd2a034916cb79531110f3be196
5Size (rubygems-1.3.5.tgz) = 278469 bytes 5Size (rubygems-1.3.5.tgz) = 278469 bytes
6SHA1 (patch-aa) = 4c5085a9a7cee24fe42ddbfc3524588838af4e16 6SHA1 (patch-aa) = fc267424284e9e020c9b4643330f429b1b934512
7SHA1 (patch-ab) = b38026920e31ae7782df6bbd7d7285d18dcf6ece 7SHA1 (patch-ab) = b4c9df1c829ba5d2159f43e999a2b696ceaea96d
8SHA1 (patch-ac) = 30ff76c661575d9c51051bb207363f3d2d8b5283 8SHA1 (patch-ac) = de613df5f7b17e3a9fe5cbc4febe6bebe479dff8
9SHA1 (patch-ad) = 9e6b11f5edae0656a59d623f4dae05ca7ecbdfaf 9SHA1 (patch-ad) = 3bc027ca7a020edc158e01a71d4d3b55a994e2d0
10SHA1 (patch-af) = a89a1e21fa6389359653c21ed5eac02d84114b51 10SHA1 (patch-af) = f8ba8859790d55bfadee6aadff97eda8218b5811
11SHA1 (patch-ag) = 2892adb1fdfeac0d50b7ffea8b1f802094195ba3 11SHA1 (patch-ag) = c5bfa929fe235f13577a7430d270d90129e55e57
12SHA1 (patch-ah) = 015aaccf066333d057997404f43b126e648ff379 12SHA1 (patch-ah) = d7564cce46999d2d82b1290abddc863dea2498ab
13SHA1 (patch-aj) = fa2192319a01e7a9dc50e497de5d3d52ab9f5768 13SHA1 (patch-aj) = 5950f31e8e0c533663816bd8b8a592548f8b452b
14SHA1 (patch-ak) = 999b52ab6f61dd1c81608d08418b9bb34bdc8aa6 14SHA1 (patch-ak) = aa1aceba13e9b4c7d90ba28061fac5a502a5efbe
 15SHA1 (patch-al) = d0e26e23501274749831ff4bd9f4f8ff8bc774ab
 16SHA1 (patch-am) = 0d77f1d03ef372b1de337e332b4d669857bc4d98
 17SHA1 (patch-an) = 233524d9fc5522942989006d87afae13c46b818d
 18SHA1 (patch-ao) = b1d713a0cd10cae91657440cb97c4043a00d2ff8
 19SHA1 (patch-ap) = c70cd7cf263ef53fc4fde1fd9b499563dab1325b

cvs diff -r1.7 -r1.8 pkgsrc/misc/rubygems/patches/Attic/patch-aa (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-aa 2009/06/12 23:02:57 1.7
+++ pkgsrc/misc/rubygems/patches/Attic/patch-aa 2010/09/10 03:48:40 1.8
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: patch-aa,v 1.7 2009/06/12 23:02:57 minskim Exp $ 1$NetBSD: patch-aa,v 1.8 2010/09/10 03:48:40 taca Exp $
 2
 3* Avoid access nil.
2 4
3--- lib/rubygems/specification.rb.orig 2009-05-19 17:41:16.000000000 -0700 5--- lib/rubygems/specification.rb.orig 2009-05-19 17:41:16.000000000 -0700
4+++ lib/rubygems/specification.rb 6+++ lib/rubygems/specification.rb
5@@ -812,12 +812,12 @@ class Gem::Specification 7@@ -812,12 +812,12 @@ class Gem::Specification
6 end 8 end
7  9
8 @files.delete_if do |file| File.directory? file end 10 @files.delete_if do |file| File.directory? file end
9- @test_files.delete_if do |file| File.directory? file end 11- @test_files.delete_if do |file| File.directory? file end
10- @executables.delete_if do |file| 12- @executables.delete_if do |file|
11+ @test_files and @test_files.delete_if do |file| File.directory? file end 13+ @test_files and @test_files.delete_if do |file| File.directory? file end
12+ @executables and @executables.delete_if do |file| 14+ @executables and @executables.delete_if do |file|
13 File.directory? File.join(bindir, file) 15 File.directory? File.join(bindir, file)
14 end 16 end

cvs diff -r1.10 -r1.11 pkgsrc/misc/rubygems/patches/Attic/patch-ab (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-ab 2009/06/10 21:44:31 1.10
+++ pkgsrc/misc/rubygems/patches/Attic/patch-ab 2010/09/10 03:48:40 1.11
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: patch-ab,v 1.10 2009/06/10 21:44:31 minskim Exp $ 1$NetBSD: patch-ab,v 1.11 2010/09/10 03:48:40 taca Exp $
 2
 3Add install_root option for pkgsrc's rubygems support.
2 4
3--- lib/rubygems/dependency_installer.rb.orig 2009-03-04 17:07:04.000000000 -0800 5--- lib/rubygems/dependency_installer.rb.orig 2009-03-04 17:07:04.000000000 -0800
4+++ lib/rubygems/dependency_installer.rb 6+++ lib/rubygems/dependency_installer.rb
5@@ -38,6 +38,7 @@ class Gem::DependencyInstaller 7@@ -38,6 +38,7 @@ class Gem::DependencyInstaller
6 # :format_executable:: See Gem::Installer#initialize. 8 # :format_executable:: See Gem::Installer#initialize.
7 # :ignore_dependencies:: Don't install any dependencies. 9 # :ignore_dependencies:: Don't install any dependencies.
8 # :install_dir:: See Gem::Installer#install. 10 # :install_dir:: See Gem::Installer#install.
9+ # :install_root: See Gem::Installer#install. 11+ # :install_root: See Gem::Installer#install.
10 # :prerelease:: Allow prerelease versions 12 # :prerelease:: Allow prerelease versions
11 # :security_policy:: See Gem::Installer::new and Gem::Security. 13 # :security_policy:: See Gem::Installer::new and Gem::Security.
12 # :user_install:: See Gem::Installer.new 14 # :user_install:: See Gem::Installer.new
13@@ -45,7 +46,11 @@ class Gem::DependencyInstaller 15@@ -45,7 +46,11 @@ class Gem::DependencyInstaller
14  16

cvs diff -r1.4 -r1.5 pkgsrc/misc/rubygems/patches/Attic/patch-ac (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-ac 2009/06/10 21:44:31 1.4
+++ pkgsrc/misc/rubygems/patches/Attic/patch-ac 2010/09/10 03:48:40 1.5
@@ -1,17 +1,19 @@ @@ -1,17 +1,19 @@
1$NetBSD: patch-ac,v 1.4 2009/06/10 21:44:31 minskim Exp $ 1$NetBSD: patch-ac,v 1.5 2010/09/10 03:48:40 taca Exp $
2 2
3--- lib/rubygems/install_update_options.rb.orig 2009-03-13 16:01:10.000000000 -0700 3Add install_root option for pkgsrc's rubygems support.
 4
 5--- lib/rubygems/install_update_options.rb.orig 2009-06-22 22:54:36.000000000 +0000
4+++ lib/rubygems/install_update_options.rb 6+++ lib/rubygems/install_update_options.rb
5@@ -34,6 +34,12 @@ module Gem::InstallUpdateOptions 7@@ -34,6 +34,12 @@ module Gem::InstallUpdateOptions
6 options[:bin_dir] = File.expand_path(value) 8 options[:bin_dir] = File.expand_path(value)
7 end 9 end
8  10
9+ add_option(:"Install", '-B', '--install-root DIR', 11+ add_option(:"Install/Update", '-B', '--install-root DIR',
10+ 'Root directory for gem files on install') do |value, options| 12+ 'Root directory for gem files on install') do |value, options|
11+ options[:install_root] = File.expand_path(value) 13+ options[:install_root] = File.expand_path(value)
12+ Gem.ensure_gem_subdirectories File.join options[:install_root], Gem.dir 14+ Gem.ensure_gem_subdirectories File.join options[:install_root], Gem.dir
13+ end 15+ end
14+ 16+
15 add_option(:"Install/Update", '-d', '--[no-]rdoc', 17 add_option(:"Install/Update", '-d', '--[no-]rdoc',
16 'Generate RDoc documentation for the gem on', 18 'Generate RDoc documentation for the gem on',
17 'install') do |value, options| 19 'install') do |value, options|

cvs diff -r1.4 -r1.5 pkgsrc/misc/rubygems/patches/Attic/patch-aj (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-aj 2009/06/10 21:44:31 1.4
+++ pkgsrc/misc/rubygems/patches/Attic/patch-aj 2010/09/10 03:48:40 1.5
@@ -1,13 +1,15 @@ @@ -1,13 +1,15 @@
1$NetBSD: patch-aj,v 1.4 2009/06/10 21:44:31 minskim Exp $ 1$NetBSD: patch-aj,v 1.5 2010/09/10 03:48:40 taca Exp $
 2
 3Use vendordir instead of sitedir.
2 4
3--- lib/rubygems/defaults.rb.orig 2009-05-20 16:30:35.000000000 -0700 5--- lib/rubygems/defaults.rb.orig 2009-05-20 16:30:35.000000000 -0700
4+++ lib/rubygems/defaults.rb 6+++ lib/rubygems/defaults.rb
5@@ -18,7 +18,7 @@ module Gem 7@@ -18,7 +18,7 @@ module Gem
6  8
7 def self.default_dir 9 def self.default_dir
8 if defined? RUBY_FRAMEWORK_VERSION then 10 if defined? RUBY_FRAMEWORK_VERSION then
9- File.join File.dirname(ConfigMap[:sitedir]), 'Gems', 11- File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
10+ File.join File.dirname(ConfigMap[:vendordir]), 'Gems', 12+ File.join File.dirname(ConfigMap[:vendordir]), 'Gems',
11 ConfigMap[:ruby_version] 13 ConfigMap[:ruby_version]
12 # 1.9.2dev reverted to 1.8 style path 14 # 1.9.2dev reverted to 1.8 style path
13 elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' then 15 elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' then

cvs diff -r1.5 -r1.6 pkgsrc/misc/rubygems/patches/Attic/patch-ad (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-ad 2009/06/10 21:44:31 1.5
+++ pkgsrc/misc/rubygems/patches/Attic/patch-ad 2010/09/10 03:48:40 1.6
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: patch-ad,v 1.5 2009/06/10 21:44:31 minskim Exp $ 1$NetBSD: patch-ad,v 1.6 2010/09/10 03:48:40 taca Exp $
 2
 3Add install_root option for pkgsrc's rubygems support.
2 4
3--- lib/rubygems/installer.rb.orig 2009-03-31 21:06:19.000000000 -0700 5--- lib/rubygems/installer.rb.orig 2009-03-31 21:06:19.000000000 -0700
4+++ lib/rubygems/installer.rb 6+++ lib/rubygems/installer.rb
5@@ -85,6 +85,9 @@ class Gem::Installer 7@@ -85,6 +85,9 @@ class Gem::Installer
6 # for a signed-gems-only policy. 8 # for a signed-gems-only policy.
7 # :ignore_dependencies:: Don't raise if a dependency is missing. 9 # :ignore_dependencies:: Don't raise if a dependency is missing.
8 # :install_dir:: The directory to install the gem into. 10 # :install_dir:: The directory to install the gem into.
9+ # :install_root:: The directory to use as a buildroot for "destdir"-style 11+ # :install_root:: The directory to use as a buildroot for "destdir"-style
10+ # installation. All paths during installation are relative 12+ # installation. All paths during installation are relative
11+ # to the buildroot. 13+ # to the buildroot.
12 # :format_executable:: Format the executable the same as the ruby executable. 14 # :format_executable:: Format the executable the same as the ruby executable.
13 # If your ruby is ruby18, foo_exec will be installed as 15 # If your ruby is ruby18, foo_exec will be installed as
14 # foo_exec18. 16 # foo_exec18.

cvs diff -r1.5 -r1.6 pkgsrc/misc/rubygems/patches/Attic/patch-ah (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-ah 2009/06/10 21:44:31 1.5
+++ pkgsrc/misc/rubygems/patches/Attic/patch-ah 2010/09/10 03:48:40 1.6
@@ -1,44 +1,55 @@ @@ -1,44 +1,55 @@
1$NetBSD: patch-ah,v 1.5 2009/06/10 21:44:31 minskim Exp $ 1$NetBSD: patch-ah,v 1.6 2010/09/10 03:48:40 taca Exp $
2 2
3--- lib/rubygems.rb.orig 2009-05-21 14:44:06.000000000 -0700 3Add install_root option for pkgsrc's rubygems support.
 4
 5--- lib/rubygems.rb.orig 2009-07-21 23:46:08.000000000 +0000
4+++ lib/rubygems.rb 6+++ lib/rubygems.rb
5@@ -396,7 +396,13 @@ module Gem 7@@ -397,7 +397,10 @@ module Gem
6 ## 8 ##
7 # The path where gem executables are to be installed. 9 # The path where gem executables are to be installed.
8  10
9- def self.bindir(install_dir=Gem.dir) 11- def self.bindir(install_dir=Gem.dir)
10+ def self.bindir(install_dir=Gem.dir, install_root=nil) 12+ def self.bindir(install_dir=Gem.dir, install_root=nil)
11+ unless install_root.nil? 13+ unless install_root.nil?
12+ install_root_path = Pathname.new install_root 14+ install_dir = install_dir.sub(install_root, "")
13+ install_dir_path = Pathname.new install_dir 
14+ install_dir_path = install_dir_path.relative_path_from install_root_path 
15+ install_dir = install_dir_path.expand_path File::SEPARATOR 
16+ end 15+ end
17 return File.join(install_dir, 'bin') unless 16 return File.join(install_dir, 'bin') unless
18 install_dir.to_s == Gem.default_dir 17 install_dir.to_s == Gem.default_dir
19 Gem.default_bindir 18 Gem.default_bindir
20@@ -637,12 +643,12 @@ module Gem 19@@ -638,12 +641,12 @@ module Gem
21 ## 20 ##
22 # The index to insert activated gem paths into the $LOAD_PATH. 21 # The index to insert activated gem paths into the $LOAD_PATH.
23 # 22 #
24- # Defaults to the site lib directory unless gem_prelude.rb has loaded paths, 23- # 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, 24+ # 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 25 # 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. 26 # so you can override the gem_prelude.rb default $LOAD_PATH paths.
28  27
29 def self.load_path_insert_index 28 def self.load_path_insert_index
30- index = $LOAD_PATH.index ConfigMap[:sitelibdir] 29- index = $LOAD_PATH.index ConfigMap[:sitelibdir]
31+ index = $LOAD_PATH.index ConfigMap[:vendorlibdir] 30+ index = $LOAD_PATH.index ConfigMap[:vendorlibdir]
32  31
33 $LOAD_PATH.each_with_index do |path, i| 32 $LOAD_PATH.each_with_index do |path, i|
34 if path.instance_variables.include?(:@gem_prelude_index) or 33 if path.instance_variables.include?(:@gem_prelude_index) or
35@@ -750,7 +756,8 @@ module Gem 34@@ -749,14 +752,16 @@ module Gem
 35 # The directory prefix this RubyGems was installed at.
 36
36 def self.prefix 37 def self.prefix
37 prefix = File.dirname File.expand_path(__FILE__) 38- prefix = File.dirname File.expand_path(__FILE__)
 39+ dir = File.dirname File.expand_path(__FILE__)
 40+ prefix = File.dirname dir
38  41
39- if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or 42- if File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or
40+ if File.dirname(prefix) == File.expand_path(ConfigMap[:vendorlibdir]) or 43- File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or
41+ File.dirname(prefix) == File.expand_path(ConfigMap[:sitelibdir]) or 44- 'lib' != File.basename(prefix) then
42 File.dirname(prefix) == File.expand_path(ConfigMap[:libdir]) or 45+ if prefix == File.expand_path(ConfigMap[:sitelibdir]) or
43 'lib' != File.basename(prefix) then 46+ prefix == File.expand_path(ConfigMap[:vendorlibdir]) or
 47+ prefix == File.expand_path(ConfigMap[:libdir]) or
 48+ 'lib' != File.basename(dir) then
44 nil 49 nil
 50 else
 51- File.dirname prefix
 52+ prefix
 53 end
 54 end
 55

cvs diff -r1.3 -r1.4 pkgsrc/misc/rubygems/patches/Attic/patch-af (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-af 2009/06/10 21:44:31 1.3
+++ pkgsrc/misc/rubygems/patches/Attic/patch-af 2010/09/10 03:48:40 1.4
@@ -1,14 +1,16 @@ @@ -1,14 +1,16 @@
1$NetBSD: patch-af,v 1.3 2009/06/10 21:44:31 minskim Exp $ 1$NetBSD: patch-af,v 1.4 2010/09/10 03:48:40 taca Exp $
 2
 3Add install_root option for pkgsrc's rubygems support.
2 4
3--- lib/rubygems/commands/uninstall_command.rb.orig 2009-03-13 16:16:55.000000000 -0700 5--- lib/rubygems/commands/uninstall_command.rb.orig 2009-03-13 16:16:55.000000000 -0700
4+++ lib/rubygems/commands/uninstall_command.rb 6+++ lib/rubygems/commands/uninstall_command.rb
5@@ -49,6 +49,11 @@ class Gem::Commands::UninstallCommand <  7@@ -49,6 +49,11 @@ class Gem::Commands::UninstallCommand <
6 options[:user_install] = value 8 options[:user_install] = value
7 end 9 end
8  10
9+ add_option('-B', '--install-root DIR', 11+ add_option('-B', '--install-root DIR',
10+ 'Root directory for gem files') do |value, options| 12+ 'Root directory for gem files') do |value, options|
11+ options[:install_root] = File.expand_path(value) 13+ options[:install_root] = File.expand_path(value)
12+ end 14+ end
13+ 15+
14 add_version_option 16 add_version_option

cvs diff -r1.3 -r1.4 pkgsrc/misc/rubygems/patches/Attic/patch-ak (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-ak 2009/04/07 07:35:44 1.3
+++ pkgsrc/misc/rubygems/patches/Attic/patch-ak 2010/09/10 03:48:40 1.4
@@ -1,18 +1,20 @@ @@ -1,18 +1,20 @@
1$NetBSD: patch-ak,v 1.3 2009/04/07 07:35:44 minskim Exp $ 1$NetBSD: patch-ak,v 1.4 2010/09/10 03:48:40 taca Exp $
2 2
3--- test/test_gem.rb.orig 2008-10-09 15:42:25.000000000 -0700 3Use vendordir instead of sitedir.
 4
 5--- test/test_gem.rb.orig 2009-07-05 17:26:22.000000000 +0000
4+++ test/test_gem.rb 6+++ test/test_gem.rb
5@@ -384,18 +384,18 @@ class TestGem < RubyGemTestCase 7@@ -425,18 +425,18 @@ class TestGem < RubyGemTestCase
6 Gem::ConfigMap[:libdir] = orig_libdir 8 Gem::ConfigMap[:libdir] = orig_libdir
7 end 9 end
8  10
9- def test_self_prefix_sitelibdir 11- def test_self_prefix_sitelibdir
10- orig_sitelibdir = Gem::ConfigMap[:sitelibdir] 12- orig_sitelibdir = Gem::ConfigMap[:sitelibdir]
11+ def test_self_prefix_vendorlibdir 13+ def test_self_prefix_vendorlibdir
12+ orig_sitelibdir = Gem::ConfigMap[:vendorlibdir] 14+ orig_sitelibdir = Gem::ConfigMap[:vendorlibdir]
13  15
14 file_name = File.expand_path __FILE__ 16 file_name = File.expand_path __FILE__
15 prefix = File.dirname File.dirname(file_name) 17 prefix = File.dirname File.dirname(file_name)
16 prefix = File.dirname prefix if File.basename(prefix) == 'test' 18 prefix = File.dirname prefix if File.basename(prefix) == 'test'
17  19
18- Gem::ConfigMap[:sitelibdir] = prefix 20- Gem::ConfigMap[:sitelibdir] = prefix

cvs diff -r1.6 -r1.7 pkgsrc/misc/rubygems/patches/Attic/patch-ag (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/patches/Attic/patch-ag 2010/01/27 13:21:58 1.6
+++ pkgsrc/misc/rubygems/patches/Attic/patch-ag 2010/09/10 03:48:40 1.7
@@ -1,29 +1,32 @@ @@ -1,29 +1,32 @@
1$NetBSD: patch-ag,v 1.6 2010/01/27 13:21:58 fhajny Exp $ 1$NetBSD: patch-ag,v 1.7 2010/09/10 03:48:40 taca Exp $
2 2
3--- lib/rubygems/uninstaller.rb.orig 2009-05-15 11:32:23.000000000 -0700 3Add install_root option for pkgsrc's rubygems support.
 4
 5--- lib/rubygems/uninstaller.rb.orig 2009-06-22 22:54:36.000000000 +0000
4+++ lib/rubygems/uninstaller.rb 6+++ lib/rubygems/uninstaller.rb
5@@ -55,6 +55,12 @@ class Gem::Uninstaller 7@@ -51,6 +51,12 @@ class Gem::Uninstaller
6 @user_install = false 8 @force_ignore = options[:ignore]
7 @user_install = options[:user_install] unless options[:install_dir] 9 @bin_dir = options[:bin_dir]
8  10
9+ install_root = options[:install_root] 11+ install_root = options[:install_root]
10+ unless install_root.nil? or install_root == "" 12+ unless install_root.nil? or install_root == ""
11+ @install_root = File.expand_path install_root 13+ @install_root = File.expand_path install_root
12+ @gem_home = File.join(@install_root, @gem_home) 14+ @gem_home = File.join(@install_root, @gem_home)
13+ end 15+ end
14+ 16+
15 spec_dir = File.join @gem_home, 'specifications' 17 # only add user directory if install_dir is not set
16 @source_index = Gem::SourceIndex.from_gems_in spec_dir 18 @user_install = false
17  19 @user_install = options[:user_install] unless options[:install_dir]
18@@ -125,6 +131,11 @@ class Gem::Uninstaller 20@@ -124,7 +130,11 @@ class Gem::Uninstaller
 21 return if spec.nil?
19  22
20 unless spec.executables.empty? then 23 unless spec.executables.empty? then
21 bindir = @bin_dir ? @bin_dir : Gem.bindir(spec.installation_path) 24- bindir = @bin_dir ? @bin_dir : Gem.bindir(spec.installation_path)
22+ bindir = @bin_dir ? @bin_dir : Gem.bindir(spec.installation_path, @install_root) 25+ bindir = @bin_dir ? @bin_dir : (Gem.bindir @gem_home, @install_root)
23+ 26+
24+ unless @install_root.nil? or @install_root == "" 27+ unless @install_root.nil? or @install_root == ""
25+ bindir = File.join(@install_root, bindir) 28+ bindir = File.join(@install_root, bindir)
26+ end 29+ end
27  30
28 list = @source_index.find_name(spec.name).delete_if { |s| 31 list = @source_index.find_name(spec.name).delete_if { |s|
29 s.version == spec.version 32 s.version == spec.version

File Added: pkgsrc/misc/rubygems/patches/Attic/patch-al
$NetBSD: patch-al,v 1.1 2010/09/10 03:48:40 taca Exp $

Prevent access to HOME when --install-root is used.

--- lib/rubygems/commands/install_command.rb.orig	2009-06-22 22:54:36.000000000 +0000
+++ lib/rubygems/commands/install_command.rb
@@ -144,7 +144,7 @@ to write the specification by hand.  For
           Gem::DocManager.new(gem, options[:rdoc_args]).generate_ri
         end
 
-        Gem::DocManager.update_ri_cache
+        Gem::DocManager.update_ri_cache(options[:install_root])
       end
 
       if options[:generate_rdoc] then

File Added: pkgsrc/misc/rubygems/patches/Attic/patch-am
$NetBSD: patch-am,v 1.1 2010/09/10 03:48:40 taca Exp $

Make sure to setup under DESTDIR.

--- lib/rubygems/commands/setup_command.rb.orig	2009-06-26 00:43:45.000000000 +0000
+++ lib/rubygems/commands/setup_command.rb
@@ -117,7 +117,7 @@ By default, this RubyGems will install g
 
     say "RubyGems #{Gem::VERSION} installed"
 
-    install_rdoc
+    install_rdoc install_destdir
 
     say
     if @verbose then
@@ -228,16 +228,20 @@ TEXT
     end
   end
 
-  def install_rdoc
+  def install_rdoc(install_destdir)
     gem_doc_dir = File.join Gem.dir, 'doc'
     rubygems_name = "rubygems-#{Gem::RubyGemsVersion}"
     rubygems_doc_dir = File.join gem_doc_dir, rubygems_name
 
+    unless install_destdir.empty?
+      FileUtils.mkdir_p gem_doc_dir unless File.exist?(gem_doc_dir)
+    end
+
     if File.writable? gem_doc_dir and
        (not File.exist? rubygems_doc_dir or
         File.writable? rubygems_doc_dir) then
       say "Removing old RubyGems RDoc and ri" if @verbose
-      Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
+      Dir[File.join(gem_doc_dir, 'rubygems-[0-9]*')].each do |dir|
         rm_rf dir
       end
 

File Added: pkgsrc/misc/rubygems/patches/Attic/patch-an
$NetBSD: patch-an,v 1.1 2010/09/10 03:48:40 taca Exp $

Add install_root option for pkgsrc's rubygems support.

--- lib/rubygems/commands/unpack_command.rb.orig	2009-06-22 22:54:36.000000000 +0000
+++ lib/rubygems/commands/unpack_command.rb
@@ -12,6 +12,10 @@ class Gem::Commands::UnpackCommand < Gem
           :version => Gem::Requirement.default,
           :target  => Dir.pwd
 
+    add_option('--install-root DIR', 'Root directory for gem files on extract') do |value, options|
+      options[:install_root] = value
+    end
+
     add_option('--target=DIR', 'target directory for unpacking') do |value, options|
       options[:target] = value
     end
@@ -44,7 +48,8 @@ class Gem::Commands::UnpackCommand < Gem
         basename = File.basename(path).sub(/\.gem$/, '')
         target_dir = File.expand_path File.join(options[:target], basename)
         FileUtils.mkdir_p target_dir
-        Gem::Installer.new(path, :unpack => true).unpack target_dir
+        Gem::Installer.new(path, :unpack => true,
+                           :install_root => options[:install_root]).unpack target_dir
         say "Unpacked gem: '#{target_dir}'"
       else
         alert_error "Gem '#{name}' not installed."

File Added: pkgsrc/misc/rubygems/patches/Attic/patch-ao
$NetBSD: patch-ao,v 1.1 2010/09/10 03:48:40 taca Exp $

Don't hard code config file's path for gem.

--- lib/rubygems/config_file.rb.orig	2009-06-25 21:37:14.000000000 +0000
+++ lib/rubygems/config_file.rb
@@ -29,26 +29,7 @@ class Gem::ConfigFile
 
   PLATFORM_DEFAULTS = {}
 
-  system_config_path =
-    begin
-      require 'Win32API'
-
-      CSIDL_COMMON_APPDATA = 0x0023
-      path = 0.chr * 260
-      if RUBY_VERSION > '1.9' then
-        SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP',
-                                       'L', :stdcall
-        SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path
-      else
-        SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP',
-                                       'L'
-        SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path
-      end
-
-      path.strip
-    rescue LoadError
-      '/etc'
-    end
+  system_config_path = '@PKG_SYSCONFDIR@'
 
   SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc'
 

File Added: pkgsrc/misc/rubygems/patches/Attic/patch-ap
$NetBSD: patch-ap,v 1.1 2010/09/10 03:48:40 taca Exp $

Prevent access to HOME when --install-root is used.

--- lib/rubygems/doc_manager.rb.orig	2009-06-22 22:54:36.000000000 +0000
+++ lib/rubygems/doc_manager.rb
@@ -61,7 +61,7 @@ class Gem::DocManager
   ##
   # Updates the RI cache for RDoc 2 if it is installed
 
-  def self.update_ri_cache
+  def self.update_ri_cache(install_root = nil)
     load_rdoc rescue return
 
     return unless defined? RDoc::VERSION # RDoc 1 does not have VERSION
@@ -72,7 +72,7 @@ class Gem::DocManager
       :use_cache => true,
       :use_system => true,
       :use_site => true,
-      :use_home => true,
+      :use_home => (install_root == nil)? true: false,
       :use_gems => true,
       :formatter => RDoc::RI::Formatter,
     }