diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-08-03 16:07:36 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-08-03 16:07:36 +0000 |
commit | 7cf6d6f43cb7c2c2c16d600dc3519f8ceb5d6310 (patch) | |
tree | 5b52bec7b536e579d799bb501413b90242fb7edb /dev-ruby/rubygems | |
parent | ppc64 stable wrt #327777 (diff) | |
download | gentoo-2-7cf6d6f43cb7c2c2c16d600dc3519f8ceb5d6310.tar.gz gentoo-2-7cf6d6f43cb7c2c2c16d600dc3519f8ceb5d6310.tar.bz2 gentoo-2-7cf6d6f43cb7c2c2c16d600dc3519f8ceb5d6310.zip |
Un-hack rubygems. With the new version, we're patching only tests and one customisation, all clear for upstream, while we install our own defaults in a separate file exactly as upstream intended.
This new version installs in /usr/local rather than /usr, so that whatever the user installs, it's not going to collide or mess with Portage-installed gems. Also, we no longer do any per-implementation patching, and we only special-case Ruby 1.9 for what concern the auto_gem file (instead of keeping four copies of the same identical file in files/).
Documentation is not currently building right, but tests are executed (they fail for JRuby, that is known.
Note that the -r1 version has been dropped, so for ~alpha and ~arm (which will have to re-keyword -r2) this causes a faux-downgrade to 1.3.7, but the changes in -r1 only related to Ruby 1.9 anyway.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/rubygems')
-rw-r--r-- | dev-ruby/rubygems/ChangeLog | 28 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/auto_gem.rb.jruby | 7 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/auto_gem.rb.ruby18 | 7 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/auto_gem.rb.rubyee18 | 7 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/gentoo-defaults.rb | 38 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/init.d-gem_server | 22 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.3.7-gentoo.patch | 132 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch | 14 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-1.3.7-rubyee.patch | 25 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-rubyee.patch | 28 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.5-r3.ebuild | 99 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.6-r2.ebuild | 15 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.6.ebuild | 108 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild | 119 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild | 121 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-1.3.7.ebuild | 22 |
16 files changed, 324 insertions, 468 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog index e54af6eac209..f6263c4569a2 100644 --- a/dev-ruby/rubygems/ChangeLog +++ b/dev-ruby/rubygems/ChangeLog @@ -1,6 +1,32 @@ # 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.147 2010/07/23 13:08:09 klausman Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.148 2010/08/03 16:07:36 flameeyes Exp $ + +*rubygems-1.3.7-r2 (03 Aug 2010) + + 03 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org> + -rubygems-1.3.5-r3.ebuild, -rubygems-1.3.6.ebuild, + rubygems-1.3.6-r2.ebuild, rubygems-1.3.7.ebuild, + -rubygems-1.3.7-r1.ebuild, +rubygems-1.3.7-r2.ebuild, + +files/rubygems-1.3.7-gentoo.patch, -files/rubygems-1.3.7-ruby19.patch, + -files/rubygems-1.3.7-rubyee.patch, -files/auto_gem.rb.jruby, + -files/auto_gem.rb.ruby18, -files/auto_gem.rb.rubyee18, + +files/gentoo-defaults.rb, -files/init.d-gem_server, + -files/rubygems-rubyee.patch: + Un-hack rubygems. With the new version, we're patching only tests and one + customisation, all clear for upstream, while we install our own defaults + in a separate file exactly as upstream intended. + This new version installs in /usr/local rather than /usr, so that whatever + the user installs, it's not going to collide or mess with + Portage-installed gems. Also, we no longer do any per-implementation + patching, and we only special-case Ruby 1.9 for what concern the auto_gem + file (instead of keeping four copies of the same identical file in + files/). + Documentation is not currently building right, but tests are executed + (they fail for JRuby, that is known. + Note that the -r1 version has been dropped, so for ~alpha and ~arm (which + will have to re-keyword -r2) this causes a faux-downgrade to 1.3.7, but + the changes in -r1 only related to Ruby 1.9 anyway. 23 Jul 2010; Tobias Klausmann <klausman@gentoo.org> rubygems-1.3.6-r2.ebuild: diff --git a/dev-ruby/rubygems/files/auto_gem.rb.jruby b/dev-ruby/rubygems/files/auto_gem.rb.jruby deleted file mode 100644 index 5c4f540a92df..000000000000 --- a/dev-ruby/rubygems/files/auto_gem.rb.jruby +++ /dev/null @@ -1,7 +0,0 @@ -# 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.ruby18 b/dev-ruby/rubygems/files/auto_gem.rb.ruby18 deleted file mode 100644 index 5c4f540a92df..000000000000 --- a/dev-ruby/rubygems/files/auto_gem.rb.ruby18 +++ /dev/null @@ -1,7 +0,0 @@ -# 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.rubyee18 b/dev-ruby/rubygems/files/auto_gem.rb.rubyee18 deleted file mode 100644 index 5c4f540a92df..000000000000 --- a/dev-ruby/rubygems/files/auto_gem.rb.rubyee18 +++ /dev/null @@ -1,7 +0,0 @@ -# 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/gentoo-defaults.rb b/dev-ruby/rubygems/files/gentoo-defaults.rb new file mode 100644 index 000000000000..dba852e4203d --- /dev/null +++ b/dev-ruby/rubygems/files/gentoo-defaults.rb @@ -0,0 +1,38 @@ +module Gem + + class << self + def portage_gems_dir + ConfigMap[:sitelibdir].gsub('site_ruby', 'gems') + end + + undef :default_dir + def default_dir + portage_gems_dir.gsub('@GENTOO_PORTAGE_EPREFIX@/usr', '@GENTOO_PORTAGE_EPREFIX@/usr/local') + end + + undef :default_path + def default_path + [user_dir, default_dir, portage_gems_dir] + end + + undef :default_bindir + def default_bindir + "@GENTOO_PORTAGE_EPREFIX@/usr/local/bin" + end + + undef :ruby_engine + def ruby_engine + if 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_server b/dev-ruby/rubygems/files/init.d-gem_server deleted file mode 100644 index 1600bdc12349..000000000000 --- a/dev-ruby/rubygems/files/init.d-gem_server +++ /dev/null @@ -1,22 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 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/files/rubygems-1.3.7-gentoo.patch b/dev-ruby/rubygems/files/rubygems-1.3.7-gentoo.patch new file mode 100644 index 000000000000..88f03d10eeed --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-1.3.7-gentoo.patch @@ -0,0 +1,132 @@ +diff --git a/Rakefile b/Rakefile +index 51a7e4e..08592c2 100644 +--- a/Rakefile ++++ b/Rakefile +@@ -68,6 +68,8 @@ task :prerelease => [:clobber, :sanity_check, :test, :test_functional] + + task :postrelease => [:tag, :publish_docs] + ++# don't assume it's always defined, as it requires OpenSSL ++if defined? Hoe::RubyForge + Rake::Task[:release_to_rubyforge].clear_actions + + task :release_to_rubyforge do +@@ -76,6 +78,7 @@ task :release_to_rubyforge do + rf.login + rf.add_file hoe.rubyforge_name, hoe.rubyforge_name, hoe.version, files.first + end ++end + + pkg_dir_path = "pkg/rubygems-update-#{hoe.version}" + task pkg_dir_path do +diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb +index 7eb755a..6154fac 100644 +--- a/lib/rubygems/config_file.rb ++++ b/lib/rubygems/config_file.rb +@@ -46,6 +46,9 @@ class Gem::ConfigFile + PLATFORM_DEFAULTS = {} + + system_config_path = ++ if Gem.respond_to? :system_config_path ++ Gem::system_config_path ++ else + begin + require 'Win32API' + +@@ -65,6 +68,7 @@ class Gem::ConfigFile + rescue LoadError + '/etc' + end ++ end + + SYSTEM_WIDE_CONFIG_FILE = File.join system_config_path, 'gemrc' + +diff --git a/test/gemutilities.rb b/test/gemutilities.rb +index 63c9510..2c75319 100644 +--- a/test/gemutilities.rb ++++ b/test/gemutilities.rb +@@ -469,6 +469,14 @@ Also, a list: + RUBY_PLATFORM.match('mswin') + end + ++ def self.jruby? ++ RUBY_PLATFORM == "java" ++ end ++ ++ def jruby? ++ RUBY_PLATFORM == "java" ++ end ++ + # Returns the make command for the current platform. For versions of Ruby + # built on MS Windows with VC++ or Borland it will return 'nmake'. On all + # other platforms, including Cygwin, it will return 'make'. +diff --git a/test/test_gem_ext_ext_conf_builder.rb b/test/test_gem_ext_ext_conf_builder.rb +index bc95fb1..c4a778b 100644 +--- a/test/test_gem_ext_ext_conf_builder.rb ++++ b/test/test_gem_ext_ext_conf_builder.rb +@@ -14,6 +14,8 @@ class TestGemExtExtConfBuilder < RubyGemTestCase + end + + def test_class_build ++ skip("test_class_build skipped - mkmf/extconf not supported on JRuby") if jruby? ++ + if vc_windows? && !nmake_found? + skip("test_class_build skipped - nmake not found") + end +@@ -50,6 +52,8 @@ class TestGemExtExtConfBuilder < RubyGemTestCase + end + + def test_class_build_extconf_fail ++ skip("test_class_build_extconf_fail skipped - mkmf/extconf not supported on JRuby") if jruby? ++ + if vc_windows? && !nmake_found? + skip("test_class_build_extconf_fail skipped - nmake not found") + end +@@ -77,6 +81,8 @@ checking for main\(\) in .*?nonexistent/m, error.message) + end + + def test_class_make ++ skip("test_class_make skipped - mkmf/extconf not supported on JRuby") if jruby? ++ + if vc_windows? && !nmake_found? + skip("test_class_make skipped - nmake not found") + end +@@ -108,6 +114,8 @@ install: + end + + def test_class_make_no_Makefile ++ skip("test_class_make_no_Makefile skipped - mkmf/extconf not supported on JRuby") if jruby? ++ + error = assert_raises Gem::InstallError do + Dir.chdir @ext do + Gem::Ext::ExtConfBuilder.make @ext, ['output'] +diff --git a/test/test_gem_remote_fetcher.rb b/test/test_gem_remote_fetcher.rb +index 570d2b4..c94112b 100644 +--- a/test/test_gem_remote_fetcher.rb ++++ b/test/test_gem_remote_fetcher.rb +@@ -695,7 +695,6 @@ gems: + private + + def start_server(port, data) +- Thread.new do + begin + null_logger = NilLog.new + s = WEBrick::HTTPServer.new( +@@ -726,7 +725,9 @@ gems: + res['Content-Type'] = 'text/html' + end + } ++ Thread.new do + s.start ++ end + rescue Exception => ex + abort ex.message + puts "ERROR during server thread: #{ex.message}" +@@ -734,7 +735,6 @@ gems: + end + sleep 0.2 # Give the servers time to startup + end +- end + + end + diff --git a/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch b/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch deleted file mode 100644 index 6d71989f8c3d..000000000000 --- a/dev-ruby/rubygems/files/rubygems-1.3.7-ruby19.patch +++ /dev/null @@ -1,14 +0,0 @@ -Smaller portion of the REE patch. -We still need to bend the gem installation path until we install 1.9 in /usr/lib/ruby/ just like 1.8. - ---- lib/rubygems/defaults.rb.orig 2010-05-16 15:11:19.359858029 +0200 -+++ lib/rubygems/defaults.rb 2010-05-16 15:11:43.855868924 +0200 -@@ -24,7 +24,7 @@ - File.join(ConfigMap[:rubylibprefix], 'gems', - ConfigMap[:ruby_version]) - else -- File.join(ConfigMap[:libdir], ruby_engine, 'gems', -+ File.join(ConfigMap[:sitedir].gsub(/site_ruby\/?$/, ''), 'gems', - ConfigMap[:ruby_version]) - end - end diff --git a/dev-ruby/rubygems/files/rubygems-1.3.7-rubyee.patch b/dev-ruby/rubygems/files/rubygems-1.3.7-rubyee.patch deleted file mode 100644 index 7e40ad575807..000000000000 --- a/dev-ruby/rubygems/files/rubygems-1.3.7-rubyee.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- lib/rubygems/defaults.rb.orig 2010-05-14 20:43:47.051675672 +0200 -+++ lib/rubygems/defaults.rb 2010-05-14 20:50:32.023684192 +0200 -@@ -1,3 +1,4 @@ -+# This file is altered for Ruby Enterprise Edition on Gentoo. - module Gem - - @post_install_hooks ||= [] -@@ -24,7 +25,7 @@ - File.join(ConfigMap[:rubylibprefix], 'gems', - ConfigMap[:ruby_version]) - else -- File.join(ConfigMap[:libdir], ruby_engine, 'gems', -+ File.join(ConfigMap[:sitedir].gsub(/site_ruby\/?$/, ''), 'gems', - ConfigMap[:ruby_version]) - end - end -@@ -33,7 +34,7 @@ - # Path for gems in the user's home directory - - def self.user_dir -- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version] -+ File.join Gem.user_home, '.gem', 'rubyee', ConfigMap[:ruby_version] - end - - ## diff --git a/dev-ruby/rubygems/files/rubygems-rubyee.patch b/dev-ruby/rubygems/files/rubygems-rubyee.patch deleted file mode 100644 index da8d382429fe..000000000000 --- a/dev-ruby/rubygems/files/rubygems-rubyee.patch +++ /dev/null @@ -1,28 +0,0 @@ -This patch makes RubyGems look inside ${libdir}/rubyee/ for -Gems. This separates vanilla MRI 1.8 from REE. --a3li - ---- lib/rubygems/defaults.rb.orig 2010-05-13 12:33:03.771476368 +0200 -+++ lib/rubygems/defaults.rb 2010-05-13 12:32:50.395473295 +0200 -@@ -1,3 +1,4 @@ -+# This file is altered for Ruby Enterprise Edition on Gentoo. - module Gem - - @post_install_hooks ||= [] -@@ -25,7 +26,7 @@ - File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems', - ConfigMap[:ruby_version]) - else -- File.join(ConfigMap[:libdir], ruby_engine, 'gems', -+ File.join(ConfigMap[:sitedir].gsub(/site_ruby\/?$/, ''), 'gems', - ConfigMap[:ruby_version]) - end - end -@@ -34,7 +35,7 @@ - # Path for gems in the user's home directory - - def self.user_dir -- File.join(Gem.user_home, '.gem', ruby_engine, -+ File.join(Gem.user_home, '.gem', 'rubyee', - ConfigMap[:ruby_version]) - end - diff --git a/dev-ruby/rubygems/rubygems-1.3.5-r3.ebuild b/dev-ruby/rubygems/rubygems-1.3.5-r3.ebuild deleted file mode 100644 index 6c0d63cf2d9c..000000000000 --- a/dev-ruby/rubygems/rubygems-1.3.5-r3.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# 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.5-r3.ebuild,v 1.1 2010/02/14 23:37:10 flameeyes Exp $ - -EAPI="2" - -USE_RUBY="ruby18 jruby" - -inherit ruby-ng - -DESCRIPTION="Centralized Ruby extension management system" -HOMEPAGE="http://rubyforge.org/projects/rubygems/" -LICENSE="|| ( Ruby GPL-2 )" - -# Needs to be installed first -RESTRICT="test" - -SRC_URI="mirror://rubyforge/${PN}/${P}.tgz" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd" -SLOT="0" -IUSE="doc server" - -# previous versions had rubygems bundled, so it would collide badly -RDEPEND="ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )" - -# index_gem_repository.rb -PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )" - -all_ruby_prepare() { - epatch "${FILESDIR}/${PN}-1.3.5-setup.patch" - # Fixes a new "feature" that would prevent us from recognizing installed - # gems inside the sandbox - epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch" -} - -each_ruby_install() { - # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455 - export RUBYOPT="${GENTOO_RUBYOPT}" - ewarn "RUBYOPT=${RUBYOPT}" - - local gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:') - - # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox, - # bug #202109. Since 1.2.0 we also need to set GEM_PATH - # for this reason, bug #230163. - export GEM_HOME="${D}${gemsitedir}" - export GEM_PATH="${GEM_HOME}/" - keepdir ${gemsitedir}/{doc,gems,cache,specifications} - - myconf="" - if ! use doc; then - myconf="${myconf} --no-ri" - myconf="${myconf} --no-rdoc" - fi - - ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed" - - doruby "${FILESDIR}/auto_gem.rb" -} - -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() { - local gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:') - SOURCE_CACHE="${gemsitedir}/source_cache" - if [[ -e "${SOURCE_CACHE}" ]]; then - rm "${SOURCE_CACHE}" - fi - - if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then - eselect ruby set ruby18 - fi - - ewarn - ewarn "This ebuild is compatible to eselect-ruby" - 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" -} diff --git a/dev-ruby/rubygems/rubygems-1.3.6-r2.ebuild b/dev-ruby/rubygems/rubygems-1.3.6-r2.ebuild index 554ad812052a..60f8b12bb709 100644 --- a/dev-ruby/rubygems/rubygems-1.3.6-r2.ebuild +++ b/dev-ruby/rubygems/rubygems-1.3.6-r2.ebuild @@ -1,6 +1,6 @@ # 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.6-r2.ebuild,v 1.8 2010/07/23 13:08:09 klausman Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.6-r2.ebuild,v 1.9 2010/08/03 16:07:36 flameeyes Exp $ EAPI="2" @@ -36,16 +36,6 @@ all_ruby_prepare() { epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch" } -each_ruby_prepare() { - case ${RUBY} in - *rubyee18) - epatch "${FILESDIR}/${PN}-rubyee.patch" || die "ree patch failed" - ;; - *) - ;; - esac -} - each_ruby_install() { # Unset RUBYOPT to avoid interferences, bug #158455 et. al. unset RUBYOPT @@ -66,8 +56,7 @@ each_ruby_install() { ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed" - insinto $(ruby_rbconfig_value 'sitelibdir') - newins "${FILESDIR}/auto_gem.rb.$(basename ${RUBY})" auto_gem.rb || die "newins auto_gem failed" + doruby "${FILESDIR}/auto_gem.rb" } all_ruby_install() { diff --git a/dev-ruby/rubygems/rubygems-1.3.6.ebuild b/dev-ruby/rubygems/rubygems-1.3.6.ebuild deleted file mode 100644 index 00982ac488c4..000000000000 --- a/dev-ruby/rubygems/rubygems-1.3.6.ebuild +++ /dev/null @@ -1,108 +0,0 @@ -# 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.6.ebuild,v 1.1 2010/04/03 06:42:03 a3li Exp $ - -EAPI="2" - -USE_RUBY="ruby18 ree18 jruby" - -inherit ruby-ng - -DESCRIPTION="Centralized Ruby extension management system" -HOMEPAGE="http://rubyforge.org/projects/rubygems/" -LICENSE="|| ( Ruby GPL-2 )" - -# Needs to be installed first -RESTRICT="test" - -SRC_URI="mirror://rubyforge/${PN}/${P}.tgz" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd" -SLOT="0" -IUSE="doc server" - -# previous versions had rubygems bundled, so it would collide badly -RDEPEND="ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )" - -# index_gem_repository.rb -PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )" - -all_ruby_prepare() { - epatch "${FILESDIR}/${PN}-1.3.5-setup.patch" - # Fixes a new "feature" that would prevent us from recognizing installed - # gems inside the sandbox - epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch" -} - -each_ruby_prepare() { - case ${RUBY} in - *rubyee18) - epatch "${FILESDIR}/${PN}-rubyee.patch" - ;; - *) - ;; - esac -} - -each_ruby_install() { - # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455 - export RUBYOPT="${GENTOO_RUBYOPT}" - ewarn "RUBYOPT=${RUBYOPT}" - - local gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:') - - # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox, - # bug #202109. Since 1.2.0 we also need to set GEM_PATH - # for this reason, bug #230163. - export GEM_HOME="${D}${gemsitedir}" - export GEM_PATH="${GEM_HOME}/" - keepdir ${gemsitedir}/{doc,gems,cache,specifications} - - myconf="" - if ! use doc; then - myconf="${myconf} --no-ri" - myconf="${myconf} --no-rdoc" - fi - - ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed" - - doruby "${FILESDIR}/auto_gem.rb" -} - -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() { - local gemsitedir=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitelibdir"]' | sed -e 's:site_ruby:gems:') - SOURCE_CACHE="${gemsitedir}/source_cache" - if [[ -e "${SOURCE_CACHE}" ]]; then - rm "${SOURCE_CACHE}" - fi - - if [[ ! -n $(readlink "${ROOT}"usr/bin/gem) ]] ; then - eselect ruby set ruby18 - 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" -} diff --git a/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild b/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild deleted file mode 100644 index 3adf527a16bc..000000000000 --- a/dev-ruby/rubygems/rubygems-1.3.7-r1.ebuild +++ /dev/null @@ -1,119 +0,0 @@ -# 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-r1.ebuild,v 1.1 2010/05/16 13:30:02 a3li Exp $ - -EAPI="2" - -USE_RUBY="ruby18 ruby19 ree18 jruby" - -inherit ruby-ng - -DESCRIPTION="Centralized Ruby extension management system" -HOMEPAGE="http://rubyforge.org/projects/rubygems/" -LICENSE="|| ( Ruby GPL-2 )" - -# Needs to be installed first -RESTRICT="test" - -SRC_URI="mirror://rubyforge/${PN}/${P}.tgz" - -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd" -SLOT="0" -IUSE="doc server" - -# previous versions had rubygems bundled, so it would collide badly -RDEPEND=" - ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 ) - ruby_targets_ruby19? ( >=dev-lang/ruby-1.9.1_p376 ) -" - -# index_gem_repository.rb -PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )" - -all_ruby_prepare() { - epatch "${FILESDIR}/${PN}-1.3.5-setup.patch" - # Fixes a new "feature" that would prevent us from recognizing installed - # gems inside the sandbox - epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch" -} - -each_ruby_prepare() { - case ${RUBY} in - *rubyee18) - epatch "${FILESDIR}/${P}-rubyee.patch" || die "ree patch failed" - ;; - *ruby19) - epatch "${FILESDIR}/${P}-ruby19.patch" || die "ruby19 patch failed" - ;; - *) - ;; - esac -} - -each_ruby_install() { - # Unset RUBYOPT to avoid interferences, bug #158455 et. al. - unset RUBYOPT - - local gemsitedir=$(ruby_rbconfig_value 'sitelibdir' | sed -e 's:site_ruby:gems:') - - # rubygems tries to create GEM_HOME if it doesn't exist, upsetting sandbox, - # bug #202109. Since 1.2.0 we also need to set GEM_PATH for this reason, bug #230163 - export GEM_HOME="${D}${gemsitedir}" - export GEM_PATH="${GEM_HOME}/" - keepdir ${gemsitedir}/{doc,gems,cache,specifications} - - myconf="" - if ! use doc; then - myconf="${myconf} --no-ri" - myconf="${myconf} --no-rdoc" - fi - - ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed" - - insinto $(ruby_rbconfig_value 'sitelibdir') - newins "${FILESDIR}/auto_gem.rb.$(basename ${RUBY})" auto_gem.rb || die "newins auto_gem failed" -} - -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 -} - -clear_source_cache() { - local gemsitedir=$(ruby_rbconfig_value 'sitelibdir' | sed -e 's:site_ruby:gems:') - SOURCE_CACHE="${gemsitedir}/source_cache" - - if [[ -e "${SOURCE_CACHE}" ]]; then - rm "${SOURCE_CACHE}" - einfo "Cleared gem source cache." - fi -} - -pkg_postinst() { - _ruby_each_implementation clear_source_cache - - 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" -} diff --git a/dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild b/dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild new file mode 100644 index 000000000000..fd464a176198 --- /dev/null +++ b/dev-ruby/rubygems/rubygems-1.3.7-r2.ebuild @@ -0,0 +1,121 @@ +# 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-r2.ebuild,v 1.1 2010/08/03 16:07:36 flameeyes 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 ~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_rc2 )" + +# 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/rake + dev-ruby/hoe + virtual/ruby-minitest + dev-ruby/builder + !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 defaults: + sed -i -e '/^ def test_self_bindir_default_dir/, /^ end/ s:^:#:' \ + test/test_gem.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 + + RUBYLIB="$(pwd)/lib${RUBYLIB+:${RUBYLIB}}" ${RUBY} -S rake test || 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" +} diff --git a/dev-ruby/rubygems/rubygems-1.3.7.ebuild b/dev-ruby/rubygems/rubygems-1.3.7.ebuild index a532397e8a47..af53c4a697fa 100644 --- a/dev-ruby/rubygems/rubygems-1.3.7.ebuild +++ b/dev-ruby/rubygems/rubygems-1.3.7.ebuild @@ -1,10 +1,10 @@ # 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.ebuild,v 1.1 2010/05/14 19:04:17 a3li Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-1.3.7.ebuild,v 1.2 2010/08/03 16:07:36 flameeyes Exp $ EAPI="2" -USE_RUBY="ruby18 ruby19 ree18 jruby" +USE_RUBY="ruby18 jruby" inherit ruby-ng @@ -22,10 +22,7 @@ SLOT="0" IUSE="doc server" # previous versions had rubygems bundled, so it would collide badly -RDEPEND=" - ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 ) - ruby_targets_ruby19? ( >=dev-lang/ruby-1.9.1_p376 ) -" +RDEPEND="ruby_targets_jruby? ( >=dev-java/jruby-1.4.0-r5 )" # index_gem_repository.rb PDEPEND="server? ( dev-ruby/builder[ruby_targets_ruby18] )" @@ -37,16 +34,6 @@ all_ruby_prepare() { epatch "${FILESDIR}/${PN}-1.3.3-gentoo.patch" } -each_ruby_prepare() { - case ${RUBY} in - *rubyee18) - epatch "${FILESDIR}/${P}-rubyee.patch" || die "ree patch failed" - ;; - *) - ;; - esac -} - each_ruby_install() { # Unset RUBYOPT to avoid interferences, bug #158455 et. al. unset RUBYOPT @@ -67,8 +54,7 @@ each_ruby_install() { ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb install failed" - insinto $(ruby_rbconfig_value 'sitelibdir') - newins "${FILESDIR}/auto_gem.rb.$(basename ${RUBY})" auto_gem.rb || die "newins auto_gem failed" + doruby "${FILESDIR}/auto_gem.rb" } all_ruby_install() { |