# ChangeLog for dev-ruby/rubygems
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.41 2007/01/21 08:15:04 pclouds Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.42 2007/01/26 15:39:10 pclouds Exp $
+
+*rubygems-0.8.11-r6 (26 Jan 2007)
+
+ 26 Jan 2007; Nguyễn Thái Ngọc Duy <pclouds@gentoo.org>
+ +files/0.8.11-install.rb.extract_files.patch, +files/no-manage_gems.patch,
+ -rubygems-0.8.11.ebuild, rubygems-0.8.11-r5.ebuild,
+ +rubygems-0.8.11-r6.ebuild, -rubygems-0.9.0.ebuild,
+ -rubygems-0.9.0-r1.ebuild, rubygems-0.9.0-r2.ebuild:
+ Added 0.8.11-r6 (#163536)
+ Patched other ebuilds so that downgrading from rubygems-0.9.1 will not fail
+ Removed old ebuilds
21 Jan 2007; Nguyễn Thái Ngọc Duy <pclouds@gentoo.org>
rubygems-0.8.11.ebuild, rubygems-0.9.0.ebuild, rubygems-0.9.0-r1.ebuild,
--- /dev/null
+Index: lib/rubygems/installer.rb
+===================================================================
+--- lib/rubygems/installer.rb (revision 1195)
++++ lib/rubygems/installer.rb (working copy)
+@@ -7,6 +7,8 @@ require 'rubygems/dependency_list'
+
+ module Gem
+
++ class InstallError < Gem::Exception; end
++
+ class DependencyRemovalException < Gem::Exception; end
+
+ ##
+@@ -321,14 +323,20 @@ TEXT
+ #
+ def extract_files(directory, format)
+ require 'fileutils'
+- wd = Dir.getwd
+- Dir.chdir directory do
+- format.file_entries.each do |entry, file_data|
+- path = entry['path']
+- FileUtils.mkdir_p File.dirname(path)
+- File.open(path, "wb") do |out|
+- out.write file_data
+- end
++ format.file_entries.each do |entry, file_data|
++ path = entry['path']
++ if path =~ /\A\// then # for extra sanity
++ raise Gem::InstallError,
++ "attempt to install file into #{entry['path'].inspect}"
++ end
++ path = File.expand_path File.join(directory, path)
++ if path !~ /\A#{Regexp.escape directory}/ then
++ raise Gem::InstallError,
++ "attempt to install file into #{entry['path'].inspect}"
++ end
++ FileUtils.mkdir_p File.dirname(path)
++ File.open(path, "wb") do |out|
++ out.write file_data
+ end
+ end
+ end
--- /dev/null
+MD5 aa363b428c4c1fc2e076a4ff77b957d7 rubygems-0.8.11.tgz 160265
+RMD160 381ef7f088b3b439f28797d6d7a3257b3e28d6e4 rubygems-0.8.11.tgz 160265
+SHA256 6ad2b857248aef0e9a5297f708f9988fbade78e16d670109937a73e56fdbae6d rubygems-0.8.11.tgz 160265
--- /dev/null
+diff -ur rubygems-0.8.11/post-install.rb rubygems-0.8.11.new/post-install.rb
+--- rubygems-0.8.11/post-install.rb 2005-07-10 06:18:40.000000000 +0700
++++ rubygems-0.8.11.new/post-install.rb 2007-01-26 22:05:18.000000000 +0700
+@@ -61,7 +61,8 @@
+ def install_sources
+ $: << "lib"
+ require 'rubygems'
+- Gem::manage_gems
++ require 'rubygems/builder'
++ require 'rubygems/installer'
+ Dir.chdir("pkgs/sources") do
+ load "sources.gemspec"
+ spec = Gem.sources_spec
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.8.11-r5.ebuild,v 1.8 2006/12/23 01:27:10 pclouds Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.8.11-r5.ebuild,v 1.9 2007/01/26 15:39:10 pclouds Exp $
inherit ruby
IUSE=""
DEPEND=">=dev-lang/ruby-1.8"
-PATCHES="${FILESDIR}/no_post_install.patch"
+PATCHES="${FILESDIR}/no_post_install.patch
+ ${FILESDIR}/no-manage_gems.patch"
USE_RUBY="ruby18"
src_compile() {
# RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
unset RUBYOPT
ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["MAJOR"] + "." + Config::CONFIG["MINOR"]')
- GEM_HOME=${D}/usr/lib/ruby/gems/$ver ruby_src_install
+ GEM_HOME=${D}usr/lib/ruby/gems/$ver ruby_src_install
cp ${FILESDIR}/auto_gem.rb ${D}/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
keepdir /usr/lib/ruby/gems/$ver/doc
doenvd ${FILESDIR}/10rubygems
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.8.11-r6.ebuild,v 1.1 2007/01/26 15:39:10 pclouds Exp $
+
+inherit ruby
+
+DESCRIPTION="Centralized Ruby extension management system"
+HOMEPAGE="http://rubyforge.org/projects/rubygems/"
+LICENSE="Ruby"
+
+# The URL depends implicitly on the version, unfortunately. Even if you
+# change the filename on the end, it still downloads the same file.
+SRC_URI="http://rubyforge.org/frs/download.php/5207/${P}.tgz"
+
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc-macos ~ppc64 ~sparc ~x86 ~x86-fbsd"
+SLOT="0"
+IUSE=""
+DEPEND=">=dev-lang/ruby-1.8"
+
+PATCHES="${FILESDIR}/no_post_install.patch
+ ${FILESDIR}/no-manage_gems.patch
+ ${FILESDIR}/${PV}-install.rb.extract_files.patch"
+USE_RUBY="ruby18"
+
+src_compile() {
+ return
+}
+
+src_install() {
+ # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
+ unset RUBYOPT
+ ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["MAJOR"] + "." + Config::CONFIG["MINOR"]')
+ GEM_HOME=${D}usr/lib/ruby/gems/$ver ruby_src_install
+ cp ${FILESDIR}/auto_gem.rb ${D}/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
+ keepdir /usr/lib/ruby/gems/$ver/doc
+ doenvd ${FILESDIR}/10rubygems
+}
+
+pkg_postinst()
+{
+ ewarn "If you have previously switched to using ruby18_with_gems using ruby-config, this"
+ ewarn "package has removed that file and makes it unnecessary anymore. Please use ruby-config"
+ ewarn "to revert back to ruby18."
+}
+
+pkg_postrm()
+{
+ # If we potentially downgraded, then getting rid of RUBYOPT from env.d is probably a smart idea.
+ env-update
+ source /etc/profile
+}
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.0-r2.ebuild,v 1.2 2006/12/23 01:27:10 pclouds Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/rubygems-0.9.0-r2.ebuild,v 1.3 2007/01/26 15:39:10 pclouds Exp $
inherit ruby
# RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455
unset RUBYOPT
ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["MAJOR"] + "." + Config::CONFIG["MINOR"]')
- GEM_HOME=${D}/usr/lib/ruby/gems/$ver ruby_src_install
+ GEM_HOME=${D}usr/lib/ruby/gems/$ver ruby_src_install
cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]')
keepdir /usr/lib/ruby/gems/$ver/doc
doenvd "${FILESDIR}/10rubygems"