From 6da00be3ef6535add61cc60691f469b1f03cd9d9 Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Wed, 16 May 2007 07:28:04 +0000 Subject: Add rubygems-0.9.3 svn path=/; revision=18 --- .../files/0.8.11-install.rb.extract_files.patch | 42 +++++++++ dev-ruby/rubygems/files/10rubygems | 1 + dev-ruby/rubygems/files/auto_gem.rb | 7 ++ dev-ruby/rubygems/files/digest-rubygems-0.8.11-r6 | 3 + dev-ruby/rubygems/files/digest-rubygems-0.9.0-r2 | 3 + dev-ruby/rubygems/files/digest-rubygems-0.9.2 | 3 + dev-ruby/rubygems/files/no-manage_gems.patch | 13 +++ dev-ruby/rubygems/files/no-system-rubygems.patch | 12 +++ dev-ruby/rubygems/files/no_post_install.patch | 9 ++ .../files/rubygems-0.9.0-build-c-extensions.patch | 104 +++++++++++++++++++++ .../files/rubygems-0.9.0-build-from-yaml.patch | 12 +++ .../files/rubygems-0.9.1-no_post_install.patch | 9 ++ .../files/rubygems-0.9.1-no_rdoc_install.patch | 11 +++ dev-ruby/rubygems/rubygems-0.9.3.ebuild | 70 ++++++++++++++ dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild | 2 +- 15 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 dev-ruby/rubygems/files/0.8.11-install.rb.extract_files.patch create mode 100644 dev-ruby/rubygems/files/10rubygems create mode 100644 dev-ruby/rubygems/files/auto_gem.rb create mode 100644 dev-ruby/rubygems/files/digest-rubygems-0.8.11-r6 create mode 100644 dev-ruby/rubygems/files/digest-rubygems-0.9.0-r2 create mode 100644 dev-ruby/rubygems/files/digest-rubygems-0.9.2 create mode 100644 dev-ruby/rubygems/files/no-manage_gems.patch create mode 100644 dev-ruby/rubygems/files/no-system-rubygems.patch create mode 100644 dev-ruby/rubygems/files/no_post_install.patch create mode 100644 dev-ruby/rubygems/files/rubygems-0.9.0-build-c-extensions.patch create mode 100644 dev-ruby/rubygems/files/rubygems-0.9.0-build-from-yaml.patch create mode 100644 dev-ruby/rubygems/files/rubygems-0.9.1-no_post_install.patch create mode 100644 dev-ruby/rubygems/files/rubygems-0.9.1-no_rdoc_install.patch create mode 100644 dev-ruby/rubygems/rubygems-0.9.3.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 0000000..d1e3779 --- /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(File.expand_path(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/10rubygems b/dev-ruby/rubygems/files/10rubygems new file mode 100644 index 0000000..f512216 --- /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 0000000..5c4f540 --- /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/digest-rubygems-0.8.11-r6 b/dev-ruby/rubygems/files/digest-rubygems-0.8.11-r6 new file mode 100644 index 0000000..337bb33 --- /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/digest-rubygems-0.9.0-r2 b/dev-ruby/rubygems/files/digest-rubygems-0.9.0-r2 new file mode 100644 index 0000000..5b13f74 --- /dev/null +++ b/dev-ruby/rubygems/files/digest-rubygems-0.9.0-r2 @@ -0,0 +1,3 @@ +MD5 5d496e1f415b8b4033ab867f01d1161f rubygems-0.9.0.tgz 174321 +RMD160 7d2a4ec1a615f608e75c68ee346d957efbb34ed1 rubygems-0.9.0.tgz 174321 +SHA256 6e90baff5ec951939ffcec569b9e1829e46da56cd320b1de1c8e2f5be828fef0 rubygems-0.9.0.tgz 174321 diff --git a/dev-ruby/rubygems/files/digest-rubygems-0.9.2 b/dev-ruby/rubygems/files/digest-rubygems-0.9.2 new file mode 100644 index 0000000..57bc76d --- /dev/null +++ b/dev-ruby/rubygems/files/digest-rubygems-0.9.2 @@ -0,0 +1,3 @@ +MD5 cc525053dd465ab6e33af382166fa808 rubygems-0.9.2.tgz 197256 +RMD160 377695029d862b46dd196ec82a13f1c99fc1a633 rubygems-0.9.2.tgz 197256 +SHA256 2c78ce49761c2d0f3026d3d64197f275e84fc499297f2663bb099c686065ae3a rubygems-0.9.2.tgz 197256 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 0000000..9f9d7e6 --- /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/files/no-system-rubygems.patch b/dev-ruby/rubygems/files/no-system-rubygems.patch new file mode 100644 index 0000000..9685546 --- /dev/null +++ b/dev-ruby/rubygems/files/no-system-rubygems.patch @@ -0,0 +1,12 @@ +diff -ur rubygems-0.9.0/post-install.rb rubygems-0.9.0.new/post-install.rb +--- rubygems-0.9.0/post-install.rb 2006-06-07 10:39:53.000000000 +0700 ++++ rubygems-0.9.0.new/post-install.rb 2007-01-28 16:53:13.000000000 +0700 +@@ -65,7 +65,7 @@ + end + + def install_sources +- $: << "lib" ++ $:.unshift "lib" + require 'rubygems' + Gem::manage_gems + Dir.chdir("pkgs/sources") do diff --git a/dev-ruby/rubygems/files/no_post_install.patch b/dev-ruby/rubygems/files/no_post_install.patch new file mode 100644 index 0000000..68de503 --- /dev/null +++ b/dev-ruby/rubygems/files/no_post_install.patch @@ -0,0 +1,9 @@ +--- post-install.rb.orig 2005-10-20 10:46:25.000000000 -0500 ++++ post-install.rb 2005-10-20 10:46:29.000000000 -0500 +@@ -71,6 +71,5 @@ + end + + install_windows_batch_files +-remove_stubs + install_sources + diff --git a/dev-ruby/rubygems/files/rubygems-0.9.0-build-c-extensions.patch b/dev-ruby/rubygems/files/rubygems-0.9.0-build-c-extensions.patch new file mode 100644 index 0000000..5ab5872 --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-0.9.0-build-c-extensions.patch @@ -0,0 +1,104 @@ +--- trunk/lib/rubygems/installer.rb 2006/08/10 18:06:59 1060 ++++ trunk/lib/rubygems/installer.rb 2006/08/10 18:15:28 1062 +@@ -292,9 +292,12 @@ + say "Building native extensions. This could take a while..." + start_dir = Dir.pwd + dest_path = File.join(directory, spec.require_paths[0]) ++ ran_rake = false # only run rake once + +- results = [] + spec.extensions.each do |extension| ++ break if ran_rake ++ results = [] ++ + case extension + when /extconf/ then + builder = ExtExtConfBuilder +@@ -302,6 +305,7 @@ + builder = ExtConfigureBuilder + when /rakefile/i then + builder = ExtRakeBuilder ++ ran_rake = true + else + builder = nil + results = ["No builder for extension '#{extension}'"] +@@ -310,7 +314,7 @@ + begin + err = false + Dir.chdir File.join(directory, File.dirname(extension)) +- results = builder.build(extension, directory, dest_path) ++ results = builder.build(extension, directory, dest_path, results) + rescue => ex + err = true + end +@@ -551,29 +555,27 @@ + end # class Uninstaller + + class ExtConfigureBuilder +- def self.build(extension, directory, dest_path) +- results = [] ++ def self.build(extension, directory, dest_path, results) + unless File.exist?('Makefile') then + cmd = "sh ./configure --prefix=#{dest_path}" + results << cmd + results << `#{cmd}` + end + +- results.push(*ExtExtConfBuilder.make(dest_path)) ++ ExtExtConfBuilder.make(dest_path, results) + results + end + end + + class ExtExtConfBuilder +- def self.build(extension, directory, dest_path) +- results = ["#{Gem.ruby} #{File.basename(extension)} #{ARGV.join(" ")}"] ++ def self.build(extension, directory, dest_path, results) ++ results << "#{Gem.ruby} #{File.basename(extension)} #{ARGV.join(" ")}" + results << `#{Gem.ruby} #{File.basename(extension)} #{ARGV.join(" ")}` +- results.push(*make(dest_path)) ++ make(dest_path, results) + results + end + +- def self.make(dest_path) +- results = [] ++ def self.make(dest_path, results) + raise unless File.exist?('Makefile') + mf = File.read('Makefile') + mf = mf.gsub(/^RUBYARCHDIR\s*=\s*\$[^$]*/, "RUBYARCHDIR = #{dest_path}") +@@ -585,27 +587,25 @@ + make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make' + end + +- ['', 'install', 'clean'].each do |target| ++ ['', 'install'].each do |target| + results << "#{make_program} #{target}".strip + results << `#{make_program} #{target}` +- end + +- results ++ raise unless $?.exitstatus.zero? ++ end + end + + end + + class ExtRakeBuilder +- def ExtRakeBuilder.build(ext, directory, dest_path) ++ def ExtRakeBuilder.build(ext, directory, dest_path, results) + make_program = ENV['rake'] || 'rake' + make_program += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" + +- results = [] ++ results << "#{make_program} extension".strip ++ results << `#{make_program} extension` + +- ['', 'install', 'clean'].each do |target| +- results << "#{make_program} #{target}".strip +- results << `#{make_program} #{target}` +- end ++ raise unless $?.exitstatus.zero? + + results + end diff --git a/dev-ruby/rubygems/files/rubygems-0.9.0-build-from-yaml.patch b/dev-ruby/rubygems/files/rubygems-0.9.0-build-from-yaml.patch new file mode 100644 index 0000000..62f09b3 --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-0.9.0-build-from-yaml.patch @@ -0,0 +1,12 @@ +diff -ur rubygems-0.9.0/lib/rubygems/specification.rb rubygems-0.9.0.new/lib/rubygems/specification.rb +--- rubygems-0.9.0/lib/rubygems/specification.rb 2006-06-27 01:46:30.000000000 +0700 ++++ rubygems-0.9.0.new/lib/rubygems/specification.rb 2006-12-16 21:27:10.000000000 +0700 +@@ -412,7 +412,7 @@ + def Specification.from_yaml(input) + input = normalize_yaml_input(input) + spec = YAML.load(input) +- if(spec.class == FalseClass) then ++ if(spec.nil? || spec.class == FalseClass) then + raise Gem::EndOfYAMLException + end + unless Specification === spec diff --git a/dev-ruby/rubygems/files/rubygems-0.9.1-no_post_install.patch b/dev-ruby/rubygems/files/rubygems-0.9.1-no_post_install.patch new file mode 100644 index 0000000..4324d00 --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-0.9.1-no_post_install.patch @@ -0,0 +1,9 @@ +diff -ur rubygems-0.9.1/post-install.rb rubygems-0.9.1.new/post-install.rb +--- rubygems-0.9.1/post-install.rb 2007-01-16 07:31:27.000000000 +0700 ++++ rubygems-0.9.1.new/post-install.rb 2007-01-17 20:05:04.000000000 +0700 +@@ -117,5 +117,4 @@ + remove_old_rdoc + install_rdoc + install_windows_batch_files +-remove_stubs + diff --git a/dev-ruby/rubygems/files/rubygems-0.9.1-no_rdoc_install.patch b/dev-ruby/rubygems/files/rubygems-0.9.1-no_rdoc_install.patch new file mode 100644 index 0000000..a7bb19a --- /dev/null +++ b/dev-ruby/rubygems/files/rubygems-0.9.1-no_rdoc_install.patch @@ -0,0 +1,11 @@ +diff -ur rubygems-0.9.1/post-install.rb rubygems-0.9.1.new/post-install.rb +--- rubygems-0.9.1/post-install.rb 2007-01-17 20:18:48.000000000 +0700 ++++ rubygems-0.9.1.new/post-install.rb 2007-01-17 20:18:24.000000000 +0700 +@@ -114,7 +114,5 @@ + end + + install_sources +-remove_old_rdoc +-install_rdoc + install_windows_batch_files + diff --git a/dev-ruby/rubygems/rubygems-0.9.3.ebuild b/dev-ruby/rubygems/rubygems-0.9.3.ebuild new file mode 100644 index 0000000..b76ac12 --- /dev/null +++ b/dev-ruby/rubygems/rubygems-0.9.3.ebuild @@ -0,0 +1,70 @@ +# 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.2.ebuild,v 1.1 2007/03/31 18:11:00 pclouds Exp $ + +inherit ruby + +DESCRIPTION="Centralized Ruby extension management system" +HOMEPAGE="http://rubyforge.org/projects/rubygems/" +LICENSE="Ruby" +RESTRICT="test" + +# 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/20585/${P}.tgz" + +KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +SLOT="0" +IUSE="doc server examples" +DEPEND=">=dev-lang/ruby-1.8" +PDEPEND="server? ( dev-ruby/builder )" # index_gem_repository.rb + +PATCHES="${FILESDIR}/${PN}-0.9.1-no_post_install.patch + ${FILESDIR}/no-system-rubygems.patch" +USE_RUBY="ruby18" + +src_unpack() { + ruby_src_unpack + use doc || epatch "${FILESDIR}/${PN}-0.9.1-no_rdoc_install.patch" + cd ${S} + find -name '.*' -type f -print0|xargs -0 rm +} + +src_compile() { + ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["ruby_version"]') + export GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}" + ${RUBY} setup.rb config --libruby="/usr/$(get_libdir)/ruby" || die "setup.rb config failed" + ${RUBY} setup.rb setup || die "setup.rb setup failed" +} + +src_test() { + #for i in test/{test,functional}*.rb; do + # ruby -I pkgs/sources/lib/ -I lib ${i} # || die "$i failed" + #done + ruby setup.rb test +} + +src_install() { + # RUBYOPT=-rauto_gem without rubygems installed will cause ruby to fail, bug #158455 + export RUBYOPT="${GENTOO_RUBYOPT}" + ver=$(${RUBY} -r rbconfig -e 'print Config::CONFIG["MAJOR"] + "." + Config::CONFIG["MINOR"]') + GEM_HOME="${D}usr/$(get_libdir)/ruby/gems/${ver}" ${RUBY} setup.rb install --prefix=${D} || die "setup.rb install failed" + cp "${FILESDIR}/auto_gem.rb" "${D}"/$(${RUBY} -r rbconfig -e 'print Config::CONFIG["sitedir"]') + keepdir /usr/$(get_libdir)/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() +{ + ewarn "You have removed 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" +} diff --git a/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild b/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild index 305cfcd..96957b8 100644 --- a/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild +++ b/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild @@ -11,7 +11,7 @@ EAPI="paludis-1" SRC_URI="http://rubyforge.org/frs/download.php/17096/${P}.tar.bz2" -KEYWORDS="~sparc ~x86" +KEYWORDS="~sparc ~x86 amd64 ~amd64" SLOT="0" IUSE="doc swig" -- cgit v1.2.3-65-gdbad