From 7dad5d128e587089e14e42e1d127b18dd80ed872 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 23 May 2010 20:49:10 +0000 Subject: [PATCH] Drop REE18 from 3.8.4 vanilla, add a patched version that can work with different Ruby implementations (otherwise the same extensions will be used for both MRI and REE, and the two are not binary compatible. Package-Manager: portage-2.2_rc67/cvs/Linux x86_64 --- dev-ruby/ruby-inline/ChangeLog | 11 +++- dev-ruby/ruby-inline/Manifest | 12 ++-- .../files/ruby-inline-3.8.4-gentoo.patch | 61 +++++++++++++++++++ .../ruby-inline/ruby-inline-3.8.4-r1.ebuild | 52 ++++++++++++++++ dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild | 4 +- 5 files changed, 132 insertions(+), 8 deletions(-) create mode 100644 dev-ruby/ruby-inline/files/ruby-inline-3.8.4-gentoo.patch create mode 100644 dev-ruby/ruby-inline/ruby-inline-3.8.4-r1.ebuild diff --git a/dev-ruby/ruby-inline/ChangeLog b/dev-ruby/ruby-inline/ChangeLog index 7f1d2e06efa9..794c1e46c8d4 100644 --- a/dev-ruby/ruby-inline/ChangeLog +++ b/dev-ruby/ruby-inline/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-ruby/ruby-inline # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-inline/ChangeLog,v 1.24 2010/05/22 23:08:53 a3li Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-inline/ChangeLog,v 1.25 2010/05/23 20:49:10 flameeyes Exp $ + +*ruby-inline-3.8.4-r1 (23 May 2010) + + 23 May 2010; Diego E. Pettenò + ruby-inline-3.8.4.ebuild, +ruby-inline-3.8.4-r1.ebuild, + +files/ruby-inline-3.8.4-gentoo.patch: + Drop REE18 from 3.8.4 vanilla, add a patched version that can work with + different Ruby implementations (otherwise the same extensions will be used + for both MRI and REE, and the two are not binary compatible. 22 May 2010; Alex Legler ruby-inline-3.8.4.ebuild: Add REE18 support diff --git a/dev-ruby/ruby-inline/Manifest b/dev-ruby/ruby-inline/Manifest index e2456be7862e..a8bf4ea5d6b1 100644 --- a/dev-ruby/ruby-inline/Manifest +++ b/dev-ruby/ruby-inline/Manifest @@ -1,14 +1,16 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX ruby-inline-3.8.4-gentoo.patch 2166 RMD160 604ef0cc018e37e9962c1ae8640cc51e55f72fcd SHA1 c1b8c3a363aa7c76ca8df0e058f7034f6881fbdd SHA256 22ee2a71d82bae991d58a59cb81331e840210de0e51a8d25ffed2bd20b6ff258 DIST RubyInline-3.8.4.gem 28160 RMD160 c89dedd0dddd77351e6113486b38a8722e56bee7 SHA1 5f334b2ca63a464ff260de0cafd2f55741344020 SHA256 58a7899dd5db81070cae58f3c9e1083117abf533d7ccb4addc16d40bd5aadc7e -EBUILD ruby-inline-3.8.4.ebuild 967 RMD160 f59afe68c9c4eede44f548befc575fb62f5993d5 SHA1 37dfcb8959774ab6ae125435bc631431725281a6 SHA256 c98c99e92a919691a787bece24f84754b0dd7c4557ffbcec33b158947c46f623 -MISC ChangeLog 3466 RMD160 77351046cb7e057afd1106fc1dc12fad31498389 SHA1 02fddac7eb1fa4bca1a0bb537d78f60b48a945d0 SHA256 e7fcf96532a237fe81413803e35bf45b93e74c01ff50b28ce8700816d1ab999b +EBUILD ruby-inline-3.8.4-r1.ebuild 1361 RMD160 2bf67cd7476d4ff15128c3dc875425ac69792338 SHA1 0d8e35e7f41f9d000f50e0d4579ac455bd91c7e0 SHA256 c80c5bdfc0a9ae62411910984da405c2022d4d72d1e671987e5b3eca86c79095 +EBUILD ruby-inline-3.8.4.ebuild 967 RMD160 630c3c891fc25c2ff09e53b140b6eea93d3def4c SHA1 0fd4f12d543ea58a8d9e4ecc31f79ae23ef6ae5a SHA256 76adb2c59defbf1ca69f9eaa5adb5b45e9a572c67a17f410c7134f9365f90101 +MISC ChangeLog 3878 RMD160 59d4281c3c077e5884b98076ca4c3f344f57f954 SHA1 0913bfbcc7c8286852edc7e7fd3f30a48b504db6 SHA256 2237452ad6f2fcc303d9d64f84bab233625da982fa0a9a2abcc51814dfc21667 MISC metadata.xml 158 RMD160 097f8145a9994f98be4971b43b23b9e5e8bccb66 SHA1 7ac646714b1ab83fda98f3ccdd8b48a31c148b27 SHA256 70b396ab3c7a63a81cb895b7728bd9eccdc9770afdb9919f2c54694b685f7032 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) -iEYEARECAAYFAkv4ZBAACgkQ+tgfDpkAy6Bl8QCggMljmtlTsPyZU8RGjEFQ3WPH -L+kAn13PCE+a1vSp4k27T4KD5X8xi8+y -=KcJC +iEYEARECAAYFAkv5lIoACgkQAiZjviIA2Xh3hgCfbRbdUB6a2XCDlsA/gj5Q30Uq +y7cAoMcYelzXtL8UeFN3jIXMtyLTb/xF +=XKPT -----END PGP SIGNATURE----- diff --git a/dev-ruby/ruby-inline/files/ruby-inline-3.8.4-gentoo.patch b/dev-ruby/ruby-inline/files/ruby-inline-3.8.4-gentoo.patch new file mode 100644 index 000000000000..42690b364050 --- /dev/null +++ b/dev-ruby/ruby-inline/files/ruby-inline-3.8.4-gentoo.patch @@ -0,0 +1,61 @@ +Index: ruby-inline-3.8.4/lib/inline.rb +=================================================================== +--- ruby-inline-3.8.4.orig/lib/inline.rb ++++ ruby-inline-3.8.4/lib/inline.rb +@@ -360,12 +360,17 @@ module Inline + ext.join "\n" + end + ++ def implementation_checksum ++ @implementation_checksum ||= ++ (Digest::MD5.new << RUBY_DESCRIPTION).to_s[0,4] ++ end ++ + def module_name + unless defined? @module_name then + module_name = @mod.name.gsub('::','__') + md5 = Digest::MD5.new + @sig.keys.sort_by { |x| x.to_s }.each { |m| md5 << m.to_s } +- @module_name = "Inline_#{module_name}_#{md5.to_s[0,4]}" ++ @module_name = "Inline_#{module_name}_#{md5.to_s[0,4]}_#{implementation_checksum}" + end + @module_name + end +Index: ruby-inline-3.8.4/test/test_inline.rb +=================================================================== +--- ruby-inline-3.8.4.orig/test/test_inline.rb ++++ ruby-inline-3.8.4/test/test_inline.rb +@@ -404,6 +404,7 @@ static VALUE method_name_equals(VALUE se + end + + def util_module_name(*signatures) ++ implementation = (Digest::MD5.new << RUBY_DESCRIPTION).to_s[0,4] + md5 = Digest::MD5.new + + signatures.each do |signature| +@@ -411,7 +412,7 @@ static VALUE method_name_equals(VALUE se + md5 << signature.to_s + end + +- assert_equal("Inline_TestInline__TestC_#{md5.to_s[0,4]}", ++ assert_equal("Inline_TestInline__TestC_#{md5.to_s[0,4]}_#{implementation}", + @builder.module_name) + end + +@@ -757,6 +758,7 @@ puts(s); return rb_str_new2(s)}" + @builder.c "VALUE my_method() { return Qnil; }" + + windoze = "\n __declspec(dllexport)" if Inline::WINDOZE ++ implementation = (Digest::MD5.new << RUBY_DESCRIPTION).to_s[0,4] + + expected = <<-EXT + #include "ruby.h" +@@ -773,7 +775,7 @@ static VALUE my_method(VALUE self) { + #ifdef __cplusplus + extern \"C\" { + #endif#{windoze} +- void Init_Inline_TestInline__TestC_eba5() { ++ void Init_Inline_TestInline__TestC_eba5_#{implementation}() { + VALUE c = rb_cObject; + c = rb_const_get(c, rb_intern("TestInline")); + c = rb_const_get(c, rb_intern("TestC")); diff --git a/dev-ruby/ruby-inline/ruby-inline-3.8.4-r1.ebuild b/dev-ruby/ruby-inline/ruby-inline-3.8.4-r1.ebuild new file mode 100644 index 000000000000..d3d16795e296 --- /dev/null +++ b/dev-ruby/ruby-inline/ruby-inline-3.8.4-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-inline/ruby-inline-3.8.4-r1.ebuild,v 1.1 2010/05/23 20:49:10 flameeyes Exp $ + +EAPI=2 + +USE_RUBY="ruby18 ree18 ruby19" + +RUBY_FAKEGEM_NAME="RubyInline" + +RUBY_FAKEGEM_TASK_DOC="docs" +RUBY_FAKEGEM_DOCDIR="doc" +RUBY_FAKEGEM_EXTRADOC="README.txt History.txt" + +inherit ruby-fakegem + +DESCRIPTION="Allows to embed C/C++ in Ruby code" +HOMEPAGE="http://www.zenspider.com/ZSS/Products/RubyInline/" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" +IUSE="" + +ruby_add_rdepend dev-ruby/zentest + +ruby_add_bdepend " + doc? ( + dev-ruby/hoe + dev-ruby/hoe-seattlerb + ) + test? ( + dev-ruby/hoe + dev-ruby/hoe-seattlerb + virtual/ruby-test-unit + )" + +all_ruby_prepare() { + # we have to patch the code so that it takes the RUBY_DESCRIPTION + # into consideration, to avoid loading Ruby-Enterprise (REE18) + # objects in MRI and vice-versa; we're a bit “greedier” since we + # will rebuild objects even when just switching versions, but + # it'll be better this way than being too conservatives. + epatch "${FILESDIR}/${P}-gentoo.patch" +} + +all_ruby_install() { + all_fakegem_install + + docinto examples + dodoc example.rb example2.rb demo/*.rb || die +} diff --git a/dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild b/dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild index 121e91d904f1..6456b504981f 100644 --- a/dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild +++ b/dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild,v 1.9 2010/05/22 23:08:53 a3li Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild,v 1.10 2010/05/23 20:49:10 flameeyes Exp $ EAPI=2 -USE_RUBY="ruby18 ree18 ruby19" +USE_RUBY="ruby18 ruby19" RUBY_FAKEGEM_NAME="RubyInline" -- 2.26.2