diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-11-01 17:56:32 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2006-11-01 17:56:32 +0000 |
commit | 653eba577d21fdd0c0e78733de6f818ba6c95db3 (patch) | |
tree | cfc97724385016c92ca15f999085abccf1ad3f6d /dev-ruby | |
parent | Added ~ppc keyword. (diff) | |
download | gentoo-2-653eba577d21fdd0c0e78733de6f818ba6c95db3.tar.gz gentoo-2-653eba577d21fdd0c0e78733de6f818ba6c95db3.tar.bz2 gentoo-2-653eba577d21fdd0c0e78733de6f818ba6c95db3.zip |
Add patch to fix building of C-based extensions, see bug #143974. Thanks to John W Higgins for suggesting the course of action.
(Portage version: 2.1.2_rc1-r2)
Diffstat (limited to 'dev-ruby')
-rw-r--r-- | dev-ruby/rubygems/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/digest-rubygems-0.9.0-r1 | 3 | ||||
-rw-r--r-- | dev-ruby/rubygems/files/rubygems-0.9.0-build-c-extensions.patch | 104 | ||||
-rw-r--r-- | dev-ruby/rubygems/rubygems-0.9.0-r1.ebuild | 48 |
4 files changed, 163 insertions, 1 deletions
diff --git a/dev-ruby/rubygems/ChangeLog b/dev-ruby/rubygems/ChangeLog index 6e6df0e455ba..3762aeed819a 100644 --- a/dev-ruby/rubygems/ChangeLog +++ b/dev-ruby/rubygems/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/rubygems # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.36 2006/09/16 12:18:52 killerfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rubygems/ChangeLog,v 1.37 2006/11/01 17:56:32 flameeyes Exp $ + +*rubygems-0.9.0-r1 (01 Nov 2006) + + 01 Nov 2006; Diego Pettenò <flameeyes@gentoo.org> + +files/rubygems-0.9.0-build-c-extensions.patch, +rubygems-0.9.0-r1.ebuild: + Add patch to fix building of C-based extensions, see bug #143974. Thanks to + John W Higgins for suggesting the course of action. 16 Sep 2006; Rene Nussbaumer <killerfox@gentoo.org> rubygems-0.9.0.ebuild: Added to ~hppa. diff --git a/dev-ruby/rubygems/files/digest-rubygems-0.9.0-r1 b/dev-ruby/rubygems/files/digest-rubygems-0.9.0-r1 new file mode 100644 index 000000000000..5b13f741f2b3 --- /dev/null +++ b/dev-ruby/rubygems/files/digest-rubygems-0.9.0-r1 @@ -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/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 000000000000..5ab58723d8ad --- /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/rubygems-0.9.0-r1.ebuild b/dev-ruby/rubygems/rubygems-0.9.0-r1.ebuild new file mode 100644 index 000000000000..158b39537b0a --- /dev/null +++ b/dev-ruby/rubygems/rubygems-0.9.0-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2006 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-r1.ebuild,v 1.1 2006/11/01 17:56:32 flameeyes 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/11289/${P}.tgz" + +KEYWORDS="~amd64 ~hppa ~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}/${P}-build-c-extensions.patch" +USE_RUBY="ruby18" + +src_compile() { + return +} + +src_install() { + 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 +} |