Add patch to fix building of C-based extensions, see bug #143974. Thanks to John...
authorDiego Elio Pettenò <flameeyes@gentoo.org>
Wed, 1 Nov 2006 17:56:32 +0000 (17:56 +0000)
committerDiego Elio Pettenò <flameeyes@gentoo.org>
Wed, 1 Nov 2006 17:56:32 +0000 (17:56 +0000)
Package-Manager: portage-2.1.2_rc1-r2

dev-ruby/rubygems/ChangeLog
dev-ruby/rubygems/Manifest
dev-ruby/rubygems/files/digest-rubygems-0.9.0-r1 [new file with mode: 0644]
dev-ruby/rubygems/files/rubygems-0.9.0-build-c-extensions.patch [new file with mode: 0644]
dev-ruby/rubygems/rubygems-0.9.0-r1.ebuild [new file with mode: 0644]

index 6e6df0e455ba8dd43878edb67e7c2f53a58ee79c..3762aeed819a3a45cde30c4c7855145e7df64712 100644 (file)
@@ -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.
index 1408345300faf37179928245505ca0a90c3e20cd..48d6d0e14b9fc4246c019f0dc50a89b44f978e8e 100644 (file)
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 AUX 10rubygems 21 RMD160 02441be7de6307bbb859fbc2bf5891809fe9ecf8 SHA1 3f98150bfb39a3f3f1dfabcf2d9bf80051960d81 SHA256 8c30de9ba7f327237af47f85d8f7f6701d34c9a8780ff7303244667568ca5833
 MD5 15ffbd574f0d1b8f0e79d060c92749b4 files/10rubygems 21
 RMD160 02441be7de6307bbb859fbc2bf5891809fe9ecf8 files/10rubygems 21
@@ -10,6 +13,10 @@ AUX no_post_install.patch 204 RMD160 e903ea665032f9695b7a05ec4b7b46f1351afcc2 SH
 MD5 664d3edb96dfbb4c5e2a3f6cbb12d566 files/no_post_install.patch 204
 RMD160 e903ea665032f9695b7a05ec4b7b46f1351afcc2 files/no_post_install.patch 204
 SHA256 85fb8720c63c3b3ff5257acd7b3be9a370f13364c800189006f7b9d4954ad536 files/no_post_install.patch 204
+AUX rubygems-0.9.0-build-c-extensions.patch 3392 RMD160 212f9e3a5b19c5aec2a0a0205004bfbb77230d78 SHA1 a8d818735bc176de8f7da87dabfe2ef550794bf4 SHA256 d17f8c750e7c423a029792e87e3a61a355e931363890ff2a4032538538606469
+MD5 0295637467ebc9c5fc5441f04e73d599 files/rubygems-0.9.0-build-c-extensions.patch 3392
+RMD160 212f9e3a5b19c5aec2a0a0205004bfbb77230d78 files/rubygems-0.9.0-build-c-extensions.patch 3392
+SHA256 d17f8c750e7c423a029792e87e3a61a355e931363890ff2a4032538538606469 files/rubygems-0.9.0-build-c-extensions.patch 3392
 DIST rubygems-0.8.11.tgz 160265 RMD160 381ef7f088b3b439f28797d6d7a3257b3e28d6e4 SHA1 6a7d047349a073f24621e589f50a6a6548f943be SHA256 6ad2b857248aef0e9a5297f708f9988fbade78e16d670109937a73e56fdbae6d
 DIST rubygems-0.9.0.tgz 174321 RMD160 7d2a4ec1a615f608e75c68ee346d957efbb34ed1 SHA1 90d2193e9bb91dbbfbb81ce749abcd827e3b6b53 SHA256 6e90baff5ec951939ffcec569b9e1829e46da56cd320b1de1c8e2f5be828fef0
 EBUILD rubygems-0.8.11-r5.ebuild 1494 RMD160 3899bdc08cb4c1f0ab7b9bbd6f82d8ce30545546 SHA1 73e528262d5669c13fae7a549b0ad16073339462 SHA256 5e517fa0fa94c98208cae9277144b781ec0dc888cb92626573a9b8e2ef247cdd
@@ -20,14 +27,18 @@ EBUILD rubygems-0.8.11.ebuild 899 RMD160 c41058590c5b28e351a83bb00e7e952cca30bd8
 MD5 ed04a907d861cd1bc1ca9aa0835e355d rubygems-0.8.11.ebuild 899
 RMD160 c41058590c5b28e351a83bb00e7e952cca30bd86 rubygems-0.8.11.ebuild 899
 SHA256 04013266a83dfdbd3a0dc68f4430da1a7a51f4e314dce1b5c8873f504560e36d rubygems-0.8.11.ebuild 899
+EBUILD rubygems-0.9.0-r1.ebuild 1553 RMD160 62759f44067be4f0a53e3f4c7d18cb9fd96dd56b SHA1 67053a1ffd768d5b3110a7b1bb03083c034c291f SHA256 21f76e510e1004cf9b80e5d3ddcf40ce19aa6f3fea5fd5b3cfcffa89e264f8ec
+MD5 df07525c9ce2f70028fd70b42009eb47 rubygems-0.9.0-r1.ebuild 1553
+RMD160 62759f44067be4f0a53e3f4c7d18cb9fd96dd56b rubygems-0.9.0-r1.ebuild 1553
+SHA256 21f76e510e1004cf9b80e5d3ddcf40ce19aa6f3fea5fd5b3cfcffa89e264f8ec rubygems-0.9.0-r1.ebuild 1553
 EBUILD rubygems-0.9.0.ebuild 1507 RMD160 752f72b8c2d186c3f7a5fe21b410f96728d914c1 SHA1 4d505d7e0ab7549f8397d21a3af241476d36c781 SHA256 37dabd14849905a252fb01cba43bb91dcad64e539dba0e5176a9785f2e13a9a3
 MD5 8ece8145793c0f44d3ed9d582a103dd0 rubygems-0.9.0.ebuild 1507
 RMD160 752f72b8c2d186c3f7a5fe21b410f96728d914c1 rubygems-0.9.0.ebuild 1507
 SHA256 37dabd14849905a252fb01cba43bb91dcad64e539dba0e5176a9785f2e13a9a3 rubygems-0.9.0.ebuild 1507
-MISC ChangeLog 5200 RMD160 2fb984c9acc7512f535e3b348e2069594488309a SHA1 2ed8c17ce0826fc09ab28ba2f7458f2b5164b872 SHA256 50a8b54a061fa7f1902e0d9d5aaceb2df58b78c48474e049872370e5ceba2a5c
-MD5 ddfd404b35546e15c927275110f7d606 ChangeLog 5200
-RMD160 2fb984c9acc7512f535e3b348e2069594488309a ChangeLog 5200
-SHA256 50a8b54a061fa7f1902e0d9d5aaceb2df58b78c48474e049872370e5ceba2a5c ChangeLog 5200
+MISC ChangeLog 5497 RMD160 ef2dd034ea5e2ff21da106cf5b1a61a29d77d144 SHA1 adeae9d0423c954ccfea5577c5dc513b5227417b SHA256 6c55ae2604d94dbee312ec665346c7bb7f76bc124ba936dec1e9076f1f542d0a
+MD5 9f2827a70a7c35b1100adad29288a67e ChangeLog 5497
+RMD160 ef2dd034ea5e2ff21da106cf5b1a61a29d77d144 ChangeLog 5497
+SHA256 6c55ae2604d94dbee312ec665346c7bb7f76bc124ba936dec1e9076f1f542d0a ChangeLog 5497
 MISC metadata.xml 157 RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 SHA1 8ce15dcc608eeb5616aeec610dc695cbe6f93e02 SHA256 11fba03a217e2d996f5cd8895493a5692ece8ddac2c1a2dfc71d0e830555121c
 MD5 3eec9f3fe48b51f49dbc1f171a3b026f metadata.xml 157
 RMD160 5d9e2c7ecba96ffebd936d38acedf859cdea84e1 metadata.xml 157
@@ -41,3 +52,13 @@ SHA256 e671d8919c23100c53c004393e4e030ff284ee0fef8021d6611db28fd8a90da3 files/di
 MD5 4c7cb65883b2c77de5ec840e74eca652 files/digest-rubygems-0.9.0 235
 RMD160 14cda89d31f6391477c71b22c23c9a4ade30e301 files/digest-rubygems-0.9.0 235
 SHA256 70a1185b3b03d3e319df2082ac691e533568859a4f8ee26de4898a35806aa378 files/digest-rubygems-0.9.0 235
+MD5 4c7cb65883b2c77de5ec840e74eca652 files/digest-rubygems-0.9.0-r1 235
+RMD160 14cda89d31f6391477c71b22c23c9a4ade30e301 files/digest-rubygems-0.9.0-r1 235
+SHA256 70a1185b3b03d3e319df2082ac691e533568859a4f8ee26de4898a35806aa378 files/digest-rubygems-0.9.0-r1 235
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+iD8DBQFFSNztAiZjviIA2XgRAkGiAJsEeD/y1Z8PhAUXCSXjpstf3lQ5tQCg1QYB
+FHWcQCxtsW/YvxbGpVT99Yc=
+=yGM6
+-----END PGP SIGNATURE-----
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 (file)
index 0000000..5b13f74
--- /dev/null
@@ -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 (file)
index 0000000..5ab5872
--- /dev/null
@@ -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 (file)
index 0000000..158b395
--- /dev/null
@@ -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
+}