summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <a3li@gentoo.org>2010-08-24 18:10:01 +0000
committerAlex Legler <a3li@gentoo.org>2010-08-24 18:10:01 +0000
commit81316784fa11985788a84475ce0bb38c8195f4e4 (patch)
tree8c81f34bd699718ec17c7e9d5540c6b0a66b5bf5 /dev-ruby/rubygems
parentVersion bump. Fixes rdoc handling wrt bug 333897 by Park Ji-in. Drop hppa and... (diff)
downloadhistorical-81316784fa11985788a84475ce0bb38c8195f4e4.tar.gz
historical-81316784fa11985788a84475ce0bb38c8195f4e4.tar.bz2
historical-81316784fa11985788a84475ce0bb38c8195f4e4.zip
Revbump to include ruby-1.9.2 fixes.
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'dev-ruby/rubygems')
-rw-r--r--dev-ruby/rubygems/ChangeLog8
-rw-r--r--dev-ruby/rubygems/Manifest12
-rw-r--r--dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch306
-rw-r--r--dev-ruby/rubygems/rubygems-1.3.7-r4.ebuild129
4 files changed, 449 insertions, 6 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog
index 266a549bc9e2..49b67b1e5b55 100644
--- a/dev-ruby/rubygems/ChangeLog
+++ b/dev-ruby/rubygems/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/rubygems
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.153 2010/08/18 10:29:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.154 2010/08/24 18:10:01 a3li Exp $
+
+*rubygems-1.3.7-r4 (24 Aug 2010)
+
+ 24 Aug 2010; Alex Legler <a3li@gentoo.org> +rubygems-1.3.7-r4.ebuild,
+ +files/rubygems-1.3.7-ruby19.patch:
+ Revbump to include ruby-1.9.2 fixes.
18 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org>
rubygems-1.3.7-r3.ebuild:
diff --git a/dev-ruby/rubygems/Manifest b/dev-ruby/rubygems/Manifest
index a53c73b96015..5ef84dd806f1 100644
--- a/dev-ruby/rubygems/Manifest
+++ b/dev-ruby/rubygems/Manifest
@@ -1,5 +1,5 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX 10rubygems 21 RMD160 02441be7de6307bbb859fbc2bf5891809fe9ecf8 SHA1 3f98150bfb39a3f3f1dfabcf2d9bf80051960d81 SHA256 8c30de9ba7f327237af47f85d8f7f6701d34c9a8780ff7303244667568ca5833
AUX auto_gem.rb 159 RMD160 fbf261e5cf0a8450c51c33a7ad4dafbab21bd518 SHA1 8dde3d73f65998f4c5552924ad49e1441e1b211d SHA256 fe1efe24cd0ba36c55449e9623cd0be394980f37d12468624dad7ffdef72f4dc
@@ -10,6 +10,7 @@ AUX init.d-gem_server2 502 RMD160 baf764bc5ad41adce73576b2376093744ddd3917 SHA1
AUX rubygems-1.3.3-gentoo.patch 1422 RMD160 e39a2042170399d0e98c772b0572026d6057353d SHA1 11cb4656b77185c78df809d3180061e5fe41139b SHA256 95e6c7ea38177b0798562be5abaf040e72db4a27f851502d91c4453890e630b0
AUX rubygems-1.3.5-setup.patch 942 RMD160 69e8714f72482387019bad7b9254110c6bb8b957 SHA1 ba58de08e29731de4ce820f7d8e4c60de2fcee6e SHA256 d3e7c43ff20a649d1c731e27b0791f110b920201a28607091da0166495709b97
AUX rubygems-1.3.7-gentoo.patch 3935 RMD160 cb01379f53d78688f700c23adf4fb5bf1244da59 SHA1 cbb9a8f473a4762e1c2d09b8bf109f751383a430 SHA256 fbe2ec29bd9f8f7701819c779d8f18e5124d427d4febae5a2b5b9a92a62e6c57
+AUX rubygems-1.3.7-ruby19.patch 8765 RMD160 2f95a4ad50e2c13b14096fa16f07c6e193caa019 SHA1 78b526d634eddfc119ec7b02c486426dcd2ad5b2 SHA256 fd438576410e0e4d7772d8762994ae04761f9535bcc097dd92bece1d17838f3c
DIST rubygems-1.3.5.tgz 278469 RMD160 2d17f0de2d387bd2a034916cb79531110f3be196 SHA1 8545f25d00c757a310b879a2580e56d6012fc981 SHA256 c0928cc1ae54dedfb5f57ad3829882c1f90e42bc17bf50491aa6f93a937546ac
DIST rubygems-1.3.6.tgz 285167 RMD160 f2aa5155a79f07a3f9106e90a4d1e4d39d31cc5a SHA1 ad6606d1eae82cb69381e4f5b2022d2f3f2733f3 SHA256 5c6e6ca672b68acccb8f898670f1661307dea8668fc7f71bb421cab51208d7b0
DIST rubygems-1.3.7.tgz 290986 RMD160 2ea8e16d1535216045798258603d5f2f9e3dbfea SHA1 68ad2970963db9893b76acc8777be72a77c4bee4 SHA256 388b90ae6273f655507b10c8ba6bee9ea72e7d49c3e610025531cb8c3ba67c9d
@@ -17,13 +18,14 @@ EBUILD rubygems-1.3.5-r1.ebuild 2809 RMD160 beafa61db1cc38a9ddfdb33ec70109bfbf13
EBUILD rubygems-1.3.5.ebuild 3166 RMD160 95a7edee644212eabf8a86f1dc42d06c14a3deed SHA1 8c1b5af2fd039e655628a1884697883824b0bafc SHA256 14822c8c0b156a93a8ab2215b5502f7cea55c2cbce8a57b5ddd7eec2753338b1
EBUILD rubygems-1.3.6-r2.ebuild 2997 RMD160 c8496bebae44151a36eb9f553ceca30c0a5e3acc SHA1 33702cadaeba81f923bee1a0202098fb7e4b61cd SHA256 81c1eec7512baa6f61ad060227604934f68b4b60b36c33c2eee7c569a980a9cc
EBUILD rubygems-1.3.7-r3.ebuild 3295 RMD160 553b7e78c0429978f85af19c525616716d715daf SHA1 3c19b7f5a7a5aedeaf607a168c6d5585a370645d SHA256 8416729483c8ab0f83ff5c86f8fae5ef9cbc2b3553df3ff67d2802f6adbc7b64
+EBUILD rubygems-1.3.7-r4.ebuild 3402 RMD160 6f3ebd7de1a3be99dbdeaf588948e2c7a1555502 SHA1 3b2157c7f79f34a6f50cae915efc8d3231f85e81 SHA256 16fb29652a0cce1bd60324eed1788c9ea11a25b61d7989b2c42dbf738e579b72
EBUILD rubygems-1.3.7.ebuild 2987 RMD160 603faf2df43cd6aab881c1a803f5deecfa44d382 SHA1 358a8ddaae8e300a1dedcfd6da352fa7bfca60ff SHA256 db1b221ffec1ea2912010fa896381ba0a4a3362a1adb8d3df8f3acaf05efa729
-MISC ChangeLog 24852 RMD160 20bc5b536a2eff2550ce9b80f26a7e806758676e SHA1 d17046e943c781ccf4ecf10fe897447048e70cd1 SHA256 0fedd757bfcef82d1c59ae0ce858e732449469bbcb6b6bb11aad6b301b4c00d3
+MISC ChangeLog 25031 RMD160 14633a556fba7f184db3552a83a85a4f50364a6a SHA1 5b96be1a56fe8a846c080101c78b741cecf5129f SHA256 25f7db63d34a3b68c6f70aca07fe2262eac98a102b5ee789bfa39e7b24221045
MISC metadata.xml 247 RMD160 eb1d10b4366542ce2f232dcaf7317341b6b5608f SHA1 fcb6e2a1d6cda6d45640f9c5a5dfcc0fd4f3ab3b SHA256 633ae9912e8dd27f76b9cf53f5ad0d3222db85d9a19a76da7fd5e26f40b144e3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
-iEYEARECAAYFAkxrthcACgkQAiZjviIA2XhDfgCdG3jJKWHGtI8PJ7WpLMCG6H9r
-AOMAniV1C6AmOCNUxQSFFn+WpqFdz+qN
-=QGm5
+iF4EAREIAAYFAkx0CvkACgkQ3Ca6Xy8+rvRmYgD/b4qypP3wufU1dOeHVSaPZoKS
+Nj/gbO4KrLlB6R+P5VcA/07fbFkNODTkNZeG+Al+bqq23KfNUMV7pf2qHlJbeTgI
+=A/QU
-----END PGP SIGNATURE-----
diff --git a/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch b/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch
new file mode 100644
index 000000000000..b2a253c81643
--- /dev/null
+++ b/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch
@@ -0,0 +1,306 @@
+Port the changes made in the ruby repository back to the official(?) rubygems repo.
+This is also the official nomination for the 'most retarded upstream' award.
+
+Upstream: yes, at one of two
+Reference: http://redmine.ruby-lang.org/issues/show/3607
+
+diff -Naur site_ruby/1.9.1/rubygems/config_file.rb lib/rubygems/config_file.rb
+--- site_ruby/1.9.1/rubygems/config_file.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems/config_file.rb 2010-06-08 15:14:51.000000000 +0200
+@@ -46,29 +46,12 @@
+ PLATFORM_DEFAULTS = {}
+
+ system_config_path =
+- if Gem.respond_to? :system_config_path
+- Gem::system_config_path
+- else
+ 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
++ require 'etc.so'
++ Etc.sysconfdir
+ rescue LoadError
+ '/etc'
+ end
+- end
+
+ SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc'
+
+diff -Naur site_ruby/1.9.1/rubygems/custom_require.rb lib/rubygems/custom_require.rb
+--- site_ruby/1.9.1/rubygems/custom_require.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems/custom_require.rb 2010-07-29 17:14:57.000000000 +0200
+@@ -4,8 +4,6 @@
+ # See LICENSE.txt for permissions.
+ #++
+
+-require 'rubygems'
+-
+ module Kernel
+
+ ##
+@@ -30,17 +28,17 @@
+ def require(path) # :doc:
+ gem_original_require path
+ rescue LoadError => load_error
+- if load_error.message =~ /#{Regexp.escape path}\z/ and
+- spec = Gem.searcher.find(path) then
+- Gem.activate(spec.name, "= #{spec.version}")
+- gem_original_require path
+- else
+- raise load_error
++ if load_error.message.end_with?(path)
++ if Gem.try_activate(path)
++ return gem_original_require(path)
++ end
+ end
++
++ raise load_error
+ end
+
+ private :require
+ private :gem_original_require
+
+-end
++end unless Kernel.private_method_defined?(:gem_original_require)
+
+diff -Naur site_ruby/1.9.1/rubygems/install_update_options.rb lib/rubygems/install_update_options.rb
+--- site_ruby/1.9.1/rubygems/install_update_options.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems/install_update_options.rb 2010-06-11 16:02:18.000000000 +0200
+@@ -59,8 +59,7 @@
+ end
+
+ add_option(:"Install/Update", '-t', '--[no-]test',
+- 'Run unit tests prior to installation') do |value, options|
+- options[:test] = value
++ 'Ignored; just for compatiblity') do |value, options|
+ end
+
+ add_option(:"Install/Update", '-w', '--[no-]wrappers',
+@@ -110,7 +109,7 @@
+ # Default options for the gem install command.
+
+ def install_update_defaults_str
+- '--rdoc --no-force --no-test --wrappers'
++ '--rdoc --no-force --wrappers'
+ end
+
+ end
+diff -Naur site_ruby/1.9.1/rubygems/require_paths_builder.rb lib/rubygems/require_paths_builder.rb
+--- site_ruby/1.9.1/rubygems/require_paths_builder.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems/require_paths_builder.rb 2010-06-27 03:41:40.000000000 +0200
+@@ -2,15 +2,11 @@
+
+ module Gem::RequirePathsBuilder
+ def write_require_paths_file_if_needed(spec = @spec, gem_home = @gem_home)
+- return if spec.require_paths == ["lib"] &&
+- (spec.bindir.nil? || spec.bindir == "bin")
+- file_name = File.join(gem_home, 'gems', "#{@spec.full_name}", ".require_paths")
+- file_name.untaint
+- File.open(file_name, "w") do |file|
+- spec.require_paths.each do |path|
+- file.puts path
+- end
+- file.puts spec.bindir if spec.bindir
++ require_paths = spec.require_paths
++ return if require_paths.size == 1 and require_paths.first == "lib"
++ file_name = "#{gem_home}/gems/#{@spec.full_name}/.require_paths".untaint
++ File.open(file_name, "wb") do |file|
++ file.puts require_paths
+ end
+ end
+ end
+diff -Naur site_ruby/1.9.1/rubygems/test_utilities.rb lib/rubygems/test_utilities.rb
+--- site_ruby/1.9.1/rubygems/test_utilities.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems/test_utilities.rb 2010-02-22 03:52:35.000000000 +0100
+@@ -131,30 +131,17 @@
+ #--
+ # This class was added to flush out problems in Rubinius' IO implementation.
+
+-class TempIO
+-
+- @@count = 0
+-
++class TempIO < Tempfile
+ def initialize(string = '')
+- @tempfile = Tempfile.new "TempIO-#{@@count += 1}"
+- @tempfile.binmode
+- @tempfile.write string
+- @tempfile.rewind
+- end
+-
+- def method_missing(meth, *args, &block)
+- @tempfile.send(meth, *args, &block)
+- end
+-
+- def respond_to?(meth)
+- @tempfile.respond_to? meth
++ super "TempIO"
++ binmode
++ write string
++ rewind
+ end
+
+ def string
+- @tempfile.flush
+-
+- Gem.read_binary @tempfile.path
++ flush
++ Gem.read_binary path
+ end
+-
+ end
+
+diff -Naur site_ruby/1.9.1/rubygems/validator.rb lib/rubygems/validator.rb
+--- site_ruby/1.9.1/rubygems/validator.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems/validator.rb 2010-04-22 10:24:42.000000000 +0200
+@@ -165,6 +165,7 @@
+ errors
+ end
+
++=begin
+ if RUBY_VERSION < '1.9' then
+ class TestRunner
+ def initialize(suite, ui)
+@@ -192,6 +193,7 @@
+
+ autoload :TestRunner, 'test/unit/ui/testrunnerutilities'
+ end
++=end
+
+ ##
+ # Runs unit tests for a given gem specification
+@@ -212,6 +214,7 @@
+
+ test_files.each do |f| require f end
+
++=begin
+ if RUBY_VERSION < '1.9' then
+ suite = Test::Unit::TestSuite.new("#{gem_spec.name}-#{gem_spec.version}")
+
+@@ -226,6 +229,9 @@
+ result = MiniTest::Unit.new
+ result.run
+ end
++=end
++ result = MiniTest::Unit.new
++ result.run
+
+ result
+ ensure
+--- site_ruby/1.9.1/rubygems.rb 2010-08-24 13:01:50.000000000 +0200
++++ lib/rubygems.rb 2010-07-29 17:14:57.000000000 +0200
+@@ -7,6 +7,11 @@
+
+ gem_disabled = !defined? Gem
+
++unless gem_disabled
++ # Nuke the Quickloader stuff
++ Gem::QuickLoader.remove
++end
++
+ require 'rubygems/defaults'
+ require 'thread'
+ require 'etc'
+@@ -487,26 +492,8 @@
+
+ ##
+ # Finds the user's home directory.
+- #--
+- # Some comments from the ruby-talk list regarding finding the home
+- # directory:
+- #
+- # I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems
+- # to be depending on HOME in those code samples. I propose that
+- # it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at
+- # least on Win32).
+
+ def self.find_home
+- unless RUBY_VERSION > '1.9' then
+- ['HOME', 'USERPROFILE'].each do |homekey|
+- return ENV[homekey] if ENV[homekey]
+- end
+-
+- if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] then
+- return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}"
+- end
+- end
+-
+ File.expand_path "~"
+ rescue
+ if File::ALT_SEPARATOR then
+@@ -594,17 +581,13 @@
+ # so you can override the gem_prelude.rb default $LOAD_PATH paths.
+
+ def self.load_path_insert_index
+- index = $LOAD_PATH.index ConfigMap[:sitelibdir]
++ $LOAD_PATH.index { |p| p.instance_variable_defined? :@gem_prelude_index }
++ end
+
+- $LOAD_PATH.each_with_index do |path, i|
+- if path.instance_variables.include?(:@gem_prelude_index) or
+- path.instance_variables.include?('@gem_prelude_index') then
+- index = i
+- break
+- end
++ def self.remove_prelude_paths
++ Gem::QuickLoader::GemLoadPaths.each do |path|
++ $LOAD_PATH.delete(path)
+ end
+-
+- index
+ end
+
+ ##
+@@ -1048,7 +1031,7 @@
+
+ module Kernel
+
+- undef gem if respond_to? :gem # defined in gem_prelude.rb on 1.9
++ remove_method :gem if respond_to?(:gem, true) # defined in gem_prelude.rb on 1.9
+
+ ##
+ # Use Kernel#gem to activate a specific version of +gem_name+.
+@@ -1126,13 +1109,27 @@
+
+ require 'rubygems/config_file'
+
++class << Gem
++ remove_method :try_activate if Gem.respond_to?(:try_activate, true)
++
++ def try_activate(path)
++ spec = Gem.searcher.find(path)
++ return false unless spec
++
++ Gem.activate(spec.name, "= #{spec.version}")
++ return true
++ end
++end
++
+ ##
+ # Enables the require hook for RubyGems.
+ #
+-# Ruby 1.9 allows --disable-gems, so we require it when we didn't detect a Gem
+-# constant at rubygems.rb load time.
++# if --disable-rubygems was used, then the prelude wasn't loaded, so
++# we need to load the custom_require now.
+
+-require 'rubygems/custom_require' if gem_disabled or RUBY_VERSION < '1.9'
++if gem_disabled
++ require 'rubygems/custom_require'
++end
+
+ Gem.clear_paths
+
diff --git a/dev-ruby/rubygems/rubygems-1.3.7-r4.ebuild b/dev-ruby/rubygems/rubygems-1.3.7-r4.ebuild
new file mode 100644
index 000000000000..c435381be0e6
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-1.3.7-r4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.7-r4.ebuild,v 1.1 2010/08/24 18:10:01 a3li Exp $
+
+EAPI="3"
+
+USE_RUBY="ruby18 ruby19 ree18 jruby"
+
+inherit ruby-ng prefix
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="|| ( Ruby GPL-2 )"
+
+SRC_URI="mirror://rubyforge/${PN}/${P}.tgz"
+
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
+SLOT="0"
+IUSE="server test"
+
+RDEPEND="
+ ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )
+ ruby_targets_ruby19? ( >=dev-lang/ruby-1.9.2 )"
+
+# index_gem_repository.rb
+PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )"
+
+# Tests fail _badly_ when YARD is installed.. but just the
+# rdoc-related stuff, so it's not a mistake.
+ruby_add_bdepend "
+ test? (
+ dev-ruby/minitest
+ virtual/ruby-rdoc
+ !dev-ruby/yard
+ !dev-ruby/test-unit:2
+ )"
+
+# Until all the JRuby tests' failures are sorted out
+RESTRICT="ruby_targets_jruby? ( test )"
+
+RUBY_PATCHES=(
+ "${FILESDIR}/${P}-gentoo.patch"
+)
+
+all_ruby_prepare() {
+ mkdir -p lib/rubygems/defaults || die
+ cp "${FILESDIR}/gentoo-defaults.rb" lib/rubygems/defaults/operating_system.rb || die
+
+ eprefixify lib/rubygems/defaults/operating_system.rb
+
+ # Disable broken tests when changing default values:
+ sed -i -e '/^ def test_self_bindir_default_dir/, /^ end/ s:^:#:' \
+ -e '/^ def test_self_default_dir/, /^ end/ s:^:#:' \
+ test/test_gem.rb || die
+}
+
+each_ruby_prepare() {
+ case "${RUBY}" in
+ *ruby19)
+ epatch "${FILESDIR}/${P}-ruby19.patch" || die
+ ;;
+ esac
+}
+
+each_ruby_compile() {
+ # Not really a build but...
+ sed -i -e 's:#!.*:#!'"${RUBY}"':' bin/gem
+}
+
+each_ruby_test() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+
+ RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -Ilib:test \
+ -e 'Dir["./test/test_*.rb"].each { |tu| require tu }' || die "tests failed"
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+
+ pushd lib &>/dev/null
+ doruby -r *
+ popd &>/dev/null
+
+ case "${RUBY}" in
+ *ruby19)
+ insinto $(ruby_rbconfig_value 'sitelibdir')
+ newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
+ ;;
+ *)
+ doruby "${FILESDIR}/auto_gem.rb" || die
+ ;;
+ esac
+
+ newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
+}
+
+all_ruby_install() {
+ dodoc README || die "dodoc README failed"
+
+ doenvd "${FILESDIR}/10rubygems" || die "doenvd 10rubygems failed"
+
+ if use server; then
+ newinitd "${FILESDIR}/init.d-gem_server2" gem_server || die "newinitd failed"
+ newconfd "${FILESDIR}/conf.d-gem_server" gem_server || die "newconfd failed"
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then
+ eselect ruby set $(eselect --brief --no-color ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(18|19|...)"
+ ewarn
+}
+
+pkg_postrm() {
+ ewarn "If you have uninstalled dev-ruby/rubygems, Ruby applications are unlikely"
+ ewarn "to run in current shells because of missing auto_gem."
+ ewarn "Please run \"unset RUBYOPT\" in your shells before using ruby"
+ ewarn "or start new shells"
+ ewarn
+ ewarn "If you have not uninstalled dev-ruby/rubygems, please do not unset "
+ ewarn "RUBYOPT"
+}