summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-ruby/rubygems
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-ruby/rubygems')
-rw-r--r--dev-ruby/rubygems/Manifest4
-rw-r--r--dev-ruby/rubygems/files/10rubygems1
-rw-r--r--dev-ruby/rubygems/files/auto_gem.rb7
-rw-r--r--dev-ruby/rubygems/files/auto_gem.rb.ruby1910
-rw-r--r--dev-ruby/rubygems/files/conf.d-gem_server5
-rw-r--r--dev-ruby/rubygems/files/gentoo-defaults.rb42
-rw-r--r--dev-ruby/rubygems/files/init.d-gem_server222
-rw-r--r--dev-ruby/rubygems/metadata.xml11
-rw-r--r--dev-ruby/rubygems/rubygems-2.2.2.ebuild121
-rw-r--r--dev-ruby/rubygems/rubygems-2.2.5-r1.ebuild121
-rw-r--r--dev-ruby/rubygems/rubygems-2.2.5.ebuild121
-rw-r--r--dev-ruby/rubygems/rubygems-2.4.6.ebuild113
-rw-r--r--dev-ruby/rubygems/rubygems-2.4.8.ebuild113
13 files changed, 691 insertions, 0 deletions
diff --git a/dev-ruby/rubygems/Manifest b/dev-ruby/rubygems/Manifest
new file mode 100644
index 000000000000..c6d445896691
--- /dev/null
+++ b/dev-ruby/rubygems/Manifest
@@ -0,0 +1,4 @@
+DIST rubygems-2.2.2.tgz 414111 SHA256 572dd13baa1dfb9756db9fbfeb629be1634efddb7014c552845c0e9a5a643009 SHA512 574d72436356ae66834ee6991e4a886e37babc98ca5b270086f43b5a85f8fdb50365f5a2109e937163dad5a1b8a4d66f16d2308ed27438c99be036b3e56d3dd1 WHIRLPOOL 442efa9ed4bf4e39802f5c9307e0d4ae55372daf47e7a3d98d55a3d9e79afdb10f8e32e95ea0166d2fa264dc0c8d2bc01b8ec4de31fc022ef950b0cb8794a4bd
+DIST rubygems-2.2.5.tgz 416772 SHA256 0f015d63ee3f48be2cc440332d992a33f6df113ced25b7a0007372d304bfeaa4 SHA512 eac6d7c4801d7bf65ac8e244ff88677929e491db8c5054a31d936eaf1e1fabfc8c4b560040c01c7d9707758cfbad9a8063144bb37b494dd1b6f66a0222871e03 WHIRLPOOL 6e02359ce84352f39b13c3f59d9fd82788a5a2ae88d069df05642d5349cb33c06c3477de56c937a44742fb6aa6cfdb7b32dbadac131fb12e6387f983564879c6
+DIST rubygems-2.4.6.tgz 447588 SHA256 76d3f3b10aa824d23a511f098ab777c6473b98ffa733f7be4222408897b68db9 SHA512 2cf5447e0de8e8f85916e91774eba1f2113397d3ed7147671b74443696574ba0478d8f2aec789d024eabcd5afc1c4910dbe71f389b30045fa50bde14d2bb1cb1 WHIRLPOOL e901f4354c706666b8f85cd0d345c8ad04eecb88914927e9b213bd7a83fd9be42c3d1082da87cafce0cc05deafa70436250a2fee92b62f91e6e113fbfa66c1b0
+DIST rubygems-2.4.8.tgz 447712 SHA256 5a4335fef5904ceb76d912a9d4a2464fbbb172df3b2abcb0c67003e77764845e SHA512 1cc2e9e19d665268f475ce90547377d41a4ea5ce9a9afab4979de0247a0dd82b04529c087c899d9ced5564fa9051e1d2fe23ddb764ba411915bab2ce344ac419 WHIRLPOOL e9fa65b3ff24a05082fd6ded221706c45e8d7c6677ccc31e6971991320800d47fef99651fb338c797e20ab4ab7775c7192e09f4575fc815640c4f2a8d5ea273b
diff --git a/dev-ruby/rubygems/files/10rubygems b/dev-ruby/rubygems/files/10rubygems
new file mode 100644
index 000000000000..f5122167c704
--- /dev/null
+++ b/dev-ruby/rubygems/files/10rubygems
@@ -0,0 +1 @@
+RUBYOPT="-rauto_gem"
diff --git a/dev-ruby/rubygems/files/auto_gem.rb b/dev-ruby/rubygems/files/auto_gem.rb
new file mode 100644
index 000000000000..5c4f540a92df
--- /dev/null
+++ b/dev-ruby/rubygems/files/auto_gem.rb
@@ -0,0 +1,7 @@
+# This file is installed by Gentoo's rubygems package.
+# It's intended to help automate the loading of rubygems
+
+begin
+require 'rubygems'
+rescue LoadError
+end
diff --git a/dev-ruby/rubygems/files/auto_gem.rb.ruby19 b/dev-ruby/rubygems/files/auto_gem.rb.ruby19
new file mode 100644
index 000000000000..e7d564264d68
--- /dev/null
+++ b/dev-ruby/rubygems/files/auto_gem.rb.ruby19
@@ -0,0 +1,10 @@
+# DO NOT USE THIS FILE!
+# ---------------------
+# This file is a placebo for Ruby 1.9 to work with a legacy feature, Gentoo
+# added to Ruby 1.8 and earlier, loading rubygems automatically (auto_gem).
+# It is no longer needed, but ruby19 needs this file to operate properly on
+# a system containing older versions of Ruby and thus the legacy feature.
+#
+# REMOVAL NOTE:
+# You may remove this file if you are running a Ruby >=1.9.1 *only* system
+# or have disabled the Gentoo auto_gem.rb/RUBYOPT=auto_gem magic.
diff --git a/dev-ruby/rubygems/files/conf.d-gem_server b/dev-ruby/rubygems/files/conf.d-gem_server
new file mode 100644
index 000000000000..b9cfa3f557ee
--- /dev/null
+++ b/dev-ruby/rubygems/files/conf.d-gem_server
@@ -0,0 +1,5 @@
+# /etc/conf.d/gem_server
+
+# See `gem_server --help` for more
+
+GEM_SERVER_OPTS=""
diff --git a/dev-ruby/rubygems/files/gentoo-defaults.rb b/dev-ruby/rubygems/files/gentoo-defaults.rb
new file mode 100644
index 000000000000..a645f4868281
--- /dev/null
+++ b/dev-ruby/rubygems/files/gentoo-defaults.rb
@@ -0,0 +1,42 @@
+module Gem
+
+ class << self
+ def portage_gems_dir
+ ConfigMap[:sitelibdir].gsub('site_ruby', 'gems')
+ end
+
+ def local_dir
+ portage_gems_dir.gsub('@GENTOO_PORTAGE_EPREFIX@/usr', '@GENTOO_PORTAGE_EPREFIX@/usr/local')
+ end
+
+ undef :default_dir
+ def default_dir
+ Process.euid == 0 ? local_dir : user_dir
+ end
+
+ undef :default_path
+ def default_path
+ [user_dir, local_dir, portage_gems_dir]
+ end
+
+ undef :default_bindir
+ def default_bindir
+ Process.euid == 0 ? "@GENTOO_PORTAGE_EPREFIX@/usr/local/bin" : File.join(user_dir, 'bin')
+ end
+
+ undef :ruby_engine
+ def ruby_engine
+ if defined? RUBY_DESCRIPTION and RUBY_DESCRIPTION =~ /Ruby Enterprise Edition/
+ "rubyee"
+ else
+ # Ruby 1.8 and Ruby 1.9.2_rc2 and later install here, and JRuby
+ # rewrites that anyway.
+ "ruby"
+ end
+ end
+
+ def system_config_path
+ "@GENTOO_PORTAGE_EPREFIX@/etc"
+ end
+ end
+end
diff --git a/dev-ruby/rubygems/files/init.d-gem_server2 b/dev-ruby/rubygems/files/init.d-gem_server2
new file mode 100644
index 000000000000..49af38318fda
--- /dev/null
+++ b/dev-ruby/rubygems/files/init.d-gem_server2
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PID=/var/run/gem_server.pid
+
+depend() {
+ need localmount net
+}
+
+start() {
+ ebegin "Starting gem_server"
+ start-stop-daemon --start --chuid nobody --quiet --background --make-pidfile \
+ --pidfile ${PID} --exec /usr/bin/ruby -- /usr/bin/gem server ${GEM_SERVER_OPTS}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping gem_server"
+ start-stop-daemon --stop --pidfile ${PID}
+ eend ${?}
+}
diff --git a/dev-ruby/rubygems/metadata.xml b/dev-ruby/rubygems/metadata.xml
new file mode 100644
index 000000000000..90fadbcaa2f1
--- /dev/null
+++ b/dev-ruby/rubygems/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>ruby</herd>
+ <use>
+ <flag name="server">Install support for the rubygems server</flag>
+ </use>
+ <upstream>
+ <remote-id type="rubyforge">rubygems</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ruby/rubygems/rubygems-2.2.2.ebuild b/dev-ruby/rubygems/rubygems-2.2.2.ebuild
new file mode 100644
index 000000000000..3a42ee5a4757
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-2.2.2.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19 ruby20"
+
+inherit ruby-ng prefix
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="|| ( Ruby MIT )"
+
+SRC_URI="http://production.cf.rubygems.org/rubygems/${P}.tgz"
+
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+SLOT="0"
+IUSE="server test"
+
+PDEPEND="server? ( >=dev-ruby/builder-2.1 )"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/minitest-4:0
+ dev-ruby/rdoc
+ )"
+
+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 '/test_check_executable_overwrite_default_bin_dir/,/^ end/ s:^:#:' test/rubygems/test_gem_installer.rb || die
+
+ # Remove a test that fails when yard is installed.
+ sed -i -e '/test_self_attribute_names/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+
+ # Skip tests for default gems that all fail
+ sed -i -e '/test_default_gems_use_full_paths/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+ sed -i -e '/test_execute_ignore_default_gem_verbose/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_cleanup_command.rb || die
+ sed -i -e '/test_execute_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_contents_command.rb test/rubygems/test_gem_commands_pristine_command.rb || die
+ sed -i -e '/test_execute_default_details/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_query_command.rb || die
+ sed -i -e '/test_execute_all/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_uninstall_command.rb || die
+ sed -i -e '/test_load_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+ sed -i -e '/test_uninstall_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_uninstaller.rb || die
+ sed -i -e '/test_alien_default/,/^ end/ s:^:#:' test/rubygems/test_gem_validator.rb || die
+
+ # Avoid tests playing tricks with ruby engine that don't seem to
+ # work for us.
+ rm test/rubygems/test_gem_request_set_gem_dependency_api.rb || die
+
+ # Avoid test requiring network access
+ sed -i -e '/test_download_to_cache/askip "requires network access"' test/rubygems/test_gem_remote_fetcher.rb || die
+}
+
+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
+
+ if [[ "${EUID}" -ne "0" ]]; then
+ RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -I.:lib:test \
+ -e 'Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed"
+ else
+ ewarn "The userpriv feature must be enabled to run tests, bug 408951."
+ eerror "Testsuite will not be run."
+ fi
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+ export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}"
+
+ pushd lib &>/dev/null
+ doruby -r *
+ popd &>/dev/null
+
+ local sld=$(ruby_rbconfig_value 'sitelibdir')
+ insinto "${sld#${EPREFIX}}" # bug #320813
+ newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
+
+ newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
+}
+
+all_ruby_install() {
+ dodoc History.txt README.rdoc
+
+ 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 --colour=no ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(19|20|...)"
+ 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"
+}
diff --git a/dev-ruby/rubygems/rubygems-2.2.5-r1.ebuild b/dev-ruby/rubygems/rubygems-2.2.5-r1.ebuild
new file mode 100644
index 000000000000..7069af94a180
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-2.2.5-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19 ruby20 ruby21"
+
+inherit ruby-ng prefix
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="|| ( Ruby MIT )"
+
+SRC_URI="http://production.cf.rubygems.org/rubygems/${P}.tgz"
+
+KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+SLOT="0"
+IUSE="server test"
+
+PDEPEND="server? ( >=dev-ruby/builder-2.1 )"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/minitest-4:0
+ dev-ruby/rdoc
+ )"
+
+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 '/test_check_executable_overwrite_default_bin_dir/,/^ end/ s:^:#:' test/rubygems/test_gem_installer.rb || die
+
+ # Remove a test that fails when yard is installed.
+ sed -i -e '/test_self_attribute_names/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+
+ # Skip tests for default gems that all fail
+ sed -i -e '/test_default_gems_use_full_paths/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+ sed -i -e '/test_execute_ignore_default_gem_verbose/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_cleanup_command.rb || die
+ sed -i -e '/test_execute_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_contents_command.rb test/rubygems/test_gem_commands_pristine_command.rb || die
+ sed -i -e '/test_execute_default_details/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_query_command.rb || die
+ sed -i -e '/test_execute_all/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_uninstall_command.rb || die
+ sed -i -e '/test_load_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+ sed -i -e '/test_uninstall_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_uninstaller.rb || die
+ sed -i -e '/test_alien_default/,/^ end/ s:^:#:' test/rubygems/test_gem_validator.rb || die
+
+ # Avoid tests playing tricks with ruby engine that don't seem to
+ # work for us.
+ rm test/rubygems/test_gem_request_set_gem_dependency_api.rb || die
+
+ # Avoid test requiring network access
+ sed -i -e '/test_download_to_cache/askip "requires network access"' test/rubygems/test_gem_remote_fetcher.rb || die
+}
+
+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
+
+ if [[ "${EUID}" -ne "0" ]]; then
+ RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -I.:lib:test \
+ -e 'Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed"
+ else
+ ewarn "The userpriv feature must be enabled to run tests, bug 408951."
+ eerror "Testsuite will not be run."
+ fi
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+ export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}"
+
+ pushd lib &>/dev/null
+ doruby -r *
+ popd &>/dev/null
+
+ local sld=$(ruby_rbconfig_value 'sitelibdir')
+ insinto "${sld#${EPREFIX}}" # bug #320813
+ newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
+
+ newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
+}
+
+all_ruby_install() {
+ dodoc History.txt README.rdoc
+
+ 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 --colour=no ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(19|20|...)"
+ 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"
+}
diff --git a/dev-ruby/rubygems/rubygems-2.2.5.ebuild b/dev-ruby/rubygems/rubygems-2.2.5.ebuild
new file mode 100644
index 000000000000..12045b8cc6e4
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-2.2.5.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19 ruby20"
+
+inherit ruby-ng prefix
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="|| ( Ruby MIT )"
+
+SRC_URI="http://production.cf.rubygems.org/rubygems/${P}.tgz"
+
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+SLOT="0"
+IUSE="server test"
+
+PDEPEND="server? ( >=dev-ruby/builder-2.1 )"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/minitest-4:0
+ dev-ruby/rdoc
+ )"
+
+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 '/test_check_executable_overwrite_default_bin_dir/,/^ end/ s:^:#:' test/rubygems/test_gem_installer.rb || die
+
+ # Remove a test that fails when yard is installed.
+ sed -i -e '/test_self_attribute_names/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+
+ # Skip tests for default gems that all fail
+ sed -i -e '/test_default_gems_use_full_paths/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+ sed -i -e '/test_execute_ignore_default_gem_verbose/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_cleanup_command.rb || die
+ sed -i -e '/test_execute_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_contents_command.rb test/rubygems/test_gem_commands_pristine_command.rb || die
+ sed -i -e '/test_execute_default_details/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_query_command.rb || die
+ sed -i -e '/test_execute_all/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_uninstall_command.rb || die
+ sed -i -e '/test_load_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+ sed -i -e '/test_uninstall_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_uninstaller.rb || die
+ sed -i -e '/test_alien_default/,/^ end/ s:^:#:' test/rubygems/test_gem_validator.rb || die
+
+ # Avoid tests playing tricks with ruby engine that don't seem to
+ # work for us.
+ rm test/rubygems/test_gem_request_set_gem_dependency_api.rb || die
+
+ # Avoid test requiring network access
+ sed -i -e '/test_download_to_cache/askip "requires network access"' test/rubygems/test_gem_remote_fetcher.rb || die
+}
+
+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
+
+ if [[ "${EUID}" -ne "0" ]]; then
+ RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -I.:lib:test \
+ -e 'Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed"
+ else
+ ewarn "The userpriv feature must be enabled to run tests, bug 408951."
+ eerror "Testsuite will not be run."
+ fi
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+ export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}"
+
+ pushd lib &>/dev/null
+ doruby -r *
+ popd &>/dev/null
+
+ local sld=$(ruby_rbconfig_value 'sitelibdir')
+ insinto "${sld#${EPREFIX}}" # bug #320813
+ newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
+
+ newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
+}
+
+all_ruby_install() {
+ dodoc History.txt README.rdoc
+
+ 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 --colour=no ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(19|20|...)"
+ 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"
+}
diff --git a/dev-ruby/rubygems/rubygems-2.4.6.ebuild b/dev-ruby/rubygems/rubygems-2.4.6.ebuild
new file mode 100644
index 000000000000..5b40d83ceca0
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-2.4.6.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19 ruby20 ruby21 ruby22"
+
+inherit ruby-ng prefix
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="|| ( Ruby MIT )"
+
+SRC_URI="http://production.cf.rubygems.org/rubygems/${P}.tgz"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+SLOT="0"
+IUSE="server test"
+
+PDEPEND="server? ( >=dev-ruby/builder-2.1 )"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/minitest-4:0
+ dev-ruby/rdoc
+ )"
+
+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 '/test_check_executable_overwrite_default_bin_dir/,/^ end/ s:^:#:' test/rubygems/test_gem_installer.rb || die
+ sed -i -e '/test_default_path/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+
+ # Remove a test that fails when yard is installed.
+ sed -i -e '/test_self_attribute_names/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+
+ # Skip tests for default gems that all fail
+ sed -i -e '/test_default_gems_use_full_paths/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+ sed -i -e '/test_execute_ignore_default_gem_verbose/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_cleanup_command.rb || die
+ sed -i -e '/test_execute_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_contents_command.rb test/rubygems/test_gem_commands_pristine_command.rb || die
+ sed -i -e '/test_execute_default_details/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_query_command.rb || die
+ sed -i -e '/test_execute_all/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_uninstall_command.rb || die
+ sed -i -e '/test_load_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+ sed -i -e '/test_uninstall_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_uninstaller.rb || die
+ sed -i -e '/test_alien_default/,/^ end/ s:^:#:' test/rubygems/test_gem_validator.rb || die
+
+ # Avoid tests playing tricks with ruby engine that don't seem to
+ # work for us.
+ rm test/rubygems/test_gem_request_set_gem_dependency_api.rb || die
+
+ # Avoid test requiring network access
+ sed -i -e '/test_download_to_cache/askip "requires network access"' test/rubygems/test_gem_remote_fetcher.rb || die
+}
+
+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
+
+ if [[ "${EUID}" -ne "0" ]]; then
+ RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -I.:lib:test \
+ -e 'Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed"
+ else
+ ewarn "The userpriv feature must be enabled to run tests, bug 408951."
+ eerror "Testsuite will not be run."
+ fi
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+ export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}"
+
+ pushd lib &>/dev/null
+ doruby -r *
+ popd &>/dev/null
+
+ local sld=$(ruby_rbconfig_value 'sitelibdir')
+ insinto "${sld#${EPREFIX}}" # bug #320813
+ newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
+
+ newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
+}
+
+all_ruby_install() {
+ dodoc History.txt README.rdoc
+
+ 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 --colour=no ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(20|21|...)"
+ ewarn
+}
diff --git a/dev-ruby/rubygems/rubygems-2.4.8.ebuild b/dev-ruby/rubygems/rubygems-2.4.8.ebuild
new file mode 100644
index 000000000000..5b40d83ceca0
--- /dev/null
+++ b/dev-ruby/rubygems/rubygems-2.4.8.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+USE_RUBY="ruby19 ruby20 ruby21 ruby22"
+
+inherit ruby-ng prefix
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="|| ( Ruby MIT )"
+
+SRC_URI="http://production.cf.rubygems.org/rubygems/${P}.tgz"
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+SLOT="0"
+IUSE="server test"
+
+PDEPEND="server? ( >=dev-ruby/builder-2.1 )"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/minitest-4:0
+ dev-ruby/rdoc
+ )"
+
+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 '/test_check_executable_overwrite_default_bin_dir/,/^ end/ s:^:#:' test/rubygems/test_gem_installer.rb || die
+ sed -i -e '/test_default_path/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+
+ # Remove a test that fails when yard is installed.
+ sed -i -e '/test_self_attribute_names/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+
+ # Skip tests for default gems that all fail
+ sed -i -e '/test_default_gems_use_full_paths/,/^ end/ s:^:#:' test/rubygems/test_gem.rb || die
+ sed -i -e '/test_execute_ignore_default_gem_verbose/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_cleanup_command.rb || die
+ sed -i -e '/test_execute_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_contents_command.rb test/rubygems/test_gem_commands_pristine_command.rb || die
+ sed -i -e '/test_execute_default_details/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_query_command.rb || die
+ sed -i -e '/test_execute_all/,/^ end/ s:^:#:' test/rubygems/test_gem_commands_uninstall_command.rb || die
+ sed -i -e '/test_load_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_specification.rb || die
+ sed -i -e '/test_uninstall_default_gem/,/^ end/ s:^:#:' test/rubygems/test_gem_uninstaller.rb || die
+ sed -i -e '/test_alien_default/,/^ end/ s:^:#:' test/rubygems/test_gem_validator.rb || die
+
+ # Avoid tests playing tricks with ruby engine that don't seem to
+ # work for us.
+ rm test/rubygems/test_gem_request_set_gem_dependency_api.rb || die
+
+ # Avoid test requiring network access
+ sed -i -e '/test_download_to_cache/askip "requires network access"' test/rubygems/test_gem_remote_fetcher.rb || die
+}
+
+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
+
+ if [[ "${EUID}" -ne "0" ]]; then
+ RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -I.:lib:test \
+ -e 'Dir["test/**/test_*.rb"].each { |tu| require tu }' || die "tests failed"
+ else
+ ewarn "The userpriv feature must be enabled to run tests, bug 408951."
+ eerror "Testsuite will not be run."
+ fi
+}
+
+each_ruby_install() {
+ # Unset RUBYOPT to avoid interferences, bug #158455 et. al.
+ unset RUBYOPT
+ export RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}"
+
+ pushd lib &>/dev/null
+ doruby -r *
+ popd &>/dev/null
+
+ local sld=$(ruby_rbconfig_value 'sitelibdir')
+ insinto "${sld#${EPREFIX}}" # bug #320813
+ newins "${FILESDIR}/auto_gem.rb.ruby19" auto_gem.rb || die
+
+ newbin bin/gem $(basename ${RUBY} | sed -e 's:ruby:gem:') || die
+}
+
+all_ruby_install() {
+ dodoc History.txt README.rdoc
+
+ 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 --colour=no ruby show | head -n1)
+ fi
+
+ ewarn
+ ewarn "To switch between available Ruby profiles, execute as root:"
+ ewarn "\teselect ruby set ruby(20|21|...)"
+ ewarn
+}