summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-05-23 20:49:10 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-05-23 20:49:10 +0000
commit7e5a49bcea4770cb0ba4dcaa9c3c84c0c4711ed9 (patch)
tree39ae8fada66e85021044befda7bebc73ad79e30e /dev-ruby/ruby-inline
parentMask release candidate for openoffice-bin-3.2.1 (diff)
downloadgentoo-2-7e5a49bcea4770cb0ba4dcaa9c3c84c0c4711ed9.tar.gz
gentoo-2-7e5a49bcea4770cb0ba4dcaa9c3c84c0c4711ed9.tar.bz2
gentoo-2-7e5a49bcea4770cb0ba4dcaa9c3c84c0c4711ed9.zip
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.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/ruby-inline')
-rw-r--r--dev-ruby/ruby-inline/ChangeLog11
-rw-r--r--dev-ruby/ruby-inline/files/ruby-inline-3.8.4-gentoo.patch61
-rw-r--r--dev-ruby/ruby-inline/ruby-inline-3.8.4-r1.ebuild52
-rw-r--r--dev-ruby/ruby-inline/ruby-inline-3.8.4.ebuild4
4 files changed, 125 insertions, 3 deletions
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ò <flameeyes@gentoo.org>
+ 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 <a3li@gentoo.org> ruby-inline-3.8.4.ebuild:
Add REE18 support
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"