From: Nguyen Thai Ngoc Duy Date: Fri, 26 Jan 2007 15:39:10 +0000 (+0000) Subject: #163536 and cleanup for 0.9.1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5430340e0b26421c28129557b02cba2cd8dd1726;p=gentoo.git #163536 and cleanup for 0.9.1 Package-Manager: portage-2.1.2_rc4-r5 --- diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog index f6b3ab0d5f42..ecbfaba23a66 100644 --- a/dev-ruby/rubygems/ChangeLog +++ b/dev-ruby/rubygems/ChangeLog @@ -1,6 +1,17 @@ # 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 + +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 rubygems-0.8.11.ebuild, rubygems-0.9.0.ebuild, rubygems-0.9.0-r1.ebuild, diff --git a/dev-ruby/rubygems/files/0.8.11-install.rb.extract_files.patch b/dev-ruby/rubygems/files/0.8.11-install.rb.extract_files.patch new file mode 100644 index 000000000000..d02a809874c0 --- /dev/null +++ b/dev-ruby/rubygems/files/0.8.11-install.rb.extract_files.patch @@ -0,0 +1,42 @@ +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 diff --git a/dev-ruby/rubygems/files/digest-rubygems-0.8.11-r6 b/dev-ruby/rubygems/files/digest-rubygems-0.8.11-r6 new file mode 100644 index 000000000000..337bb332079b --- /dev/null +++ b/dev-ruby/rubygems/files/digest-rubygems-0.8.11-r6 @@ -0,0 +1,3 @@ +MD5 aa363b428c4c1fc2e076a4ff77b957d7 rubygems-0.8.11.tgz 160265 +RMD160 381ef7f088b3b439f28797d6d7a3257b3e28d6e4 rubygems-0.8.11.tgz 160265 +SHA256 6ad2b857248aef0e9a5297f708f9988fbade78e16d670109937a73e56fdbae6d rubygems-0.8.11.tgz 160265 diff --git a/dev-ruby/rubygems/files/no-manage_gems.patch b/dev-ruby/rubygems/files/no-manage_gems.patch new file mode 100644 index 000000000000..9f9d7e60e5a4 --- /dev/null +++ b/dev-ruby/rubygems/files/no-manage_gems.patch @@ -0,0 +1,13 @@ +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 diff --git a/dev-ruby/rubygems/rubygems-0.8.11-r5.ebuild b/dev-ruby/rubygems/rubygems-0.8.11-r5.ebuild index 45251cb3e731..e2c10eb850e1 100644 --- a/dev-ruby/rubygems/rubygems-0.8.11-r5.ebuild +++ b/dev-ruby/rubygems/rubygems-0.8.11-r5.ebuild @@ -1,6 +1,6 @@ -# 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 @@ -17,7 +17,8 @@ SLOT="0" 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() { @@ -28,7 +29,7 @@ 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 + 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 diff --git a/dev-ruby/rubygems/rubygems-0.8.11-r6.ebuild b/dev-ruby/rubygems/rubygems-0.8.11-r6.ebuild new file mode 100644 index 000000000000..c38f11294151 --- /dev/null +++ b/dev-ruby/rubygems/rubygems-0.8.11-r6.ebuild @@ -0,0 +1,51 @@ +# 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 +} diff --git a/dev-ruby/rubygems/rubygems-0.9.0-r2.ebuild b/dev-ruby/rubygems/rubygems-0.9.0-r2.ebuild index c2567d9f1c5d..defcb14d6c82 100644 --- a/dev-ruby/rubygems/rubygems-0.9.0-r2.ebuild +++ b/dev-ruby/rubygems/rubygems-0.9.0-r2.ebuild @@ -1,6 +1,6 @@ -# 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 @@ -30,7 +30,7 @@ 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 + 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"