summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2013-04-27 06:08:08 +0000
committerHans de Graaff <graaff@gentoo.org>2013-04-27 06:08:08 +0000
commit7aaff37965f735fbe9a68ea36cd3c3084e8395a8 (patch)
tree21f62977df8cb50b87c8ac2997b8f0688121ab01 /dev-ruby/RubyInline
parentCleanup. (diff)
downloadgentoo-2-7aaff37965f735fbe9a68ea36cd3c3084e8395a8.tar.gz
gentoo-2-7aaff37965f735fbe9a68ea36cd3c3084e8395a8.tar.bz2
gentoo-2-7aaff37965f735fbe9a68ea36cd3c3084e8395a8.zip
Version bump.
(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0x8883FA56A308A8D7!)
Diffstat (limited to 'dev-ruby/RubyInline')
-rw-r--r--dev-ruby/RubyInline/ChangeLog8
-rw-r--r--dev-ruby/RubyInline/RubyInline-3.12.2.ebuild46
-rw-r--r--dev-ruby/RubyInline/files/ruby-inline-3.12.2-gentoo.patch67
3 files changed, 120 insertions, 1 deletions
diff --git a/dev-ruby/RubyInline/ChangeLog b/dev-ruby/RubyInline/ChangeLog
index 87b8ab700228..14f61d72697d 100644
--- a/dev-ruby/RubyInline/ChangeLog
+++ b/dev-ruby/RubyInline/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-ruby/RubyInline
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/RubyInline/ChangeLog,v 1.6 2013/02/23 07:14:20 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/RubyInline/ChangeLog,v 1.7 2013/04/27 06:08:07 graaff Exp $
+
+*RubyInline-3.12.2 (27 Apr 2013)
+
+ 27 Apr 2013; Hans de Graaff <graaff@gentoo.org> +RubyInline-3.12.2.ebuild,
+ +files/ruby-inline-3.12.2-gentoo.patch:
+ Version bump.
*RubyInline-3.12.1 (23 Feb 2013)
diff --git a/dev-ruby/RubyInline/RubyInline-3.12.2.ebuild b/dev-ruby/RubyInline/RubyInline-3.12.2.ebuild
new file mode 100644
index 000000000000..d8fd5b070fbb
--- /dev/null
+++ b/dev-ruby/RubyInline/RubyInline-3.12.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/RubyInline/RubyInline-3.12.2.ebuild,v 1.1 2013/04/27 06:08:07 graaff Exp $
+
+EAPI=5
+
+USE_RUBY="ruby18 ruby19"
+
+RUBY_FAKEGEM_RECIPE_DOC="rdoc"
+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="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="doc test"
+
+ruby_add_rdepend dev-ruby/zentest
+
+ruby_add_bdepend "
+ test? (
+ dev-ruby/hoe
+ dev-ruby/hoe-seattlerb
+ virtual/ruby-minitest
+ )"
+
+RUBY_PATCHES=(
+ ruby-inline-3.12.2-gentoo.patch
+ ruby-inline-3.11.1-ldflags.patch
+)
+
+all_ruby_prepare() {
+ sed -i -e '/isolate/ s:^:#:' Rakefile || die
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ docinto examples
+ dodoc example.rb example2.rb demo/*.rb
+}
diff --git a/dev-ruby/RubyInline/files/ruby-inline-3.12.2-gentoo.patch b/dev-ruby/RubyInline/files/ruby-inline-3.12.2-gentoo.patch
new file mode 100644
index 000000000000..2acd527cdcb4
--- /dev/null
+++ b/dev-ruby/RubyInline/files/ruby-inline-3.12.2-gentoo.patch
@@ -0,0 +1,67 @@
+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.
+
+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,13 +360,18 @@ 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
+ @pre.each { |m| md5 << m.to_s }
+ @sig.keys.sort_by { |x| x.to_s }.each { |m| md5 << m.to_s }
+- @module_name = "Inline_#{module_name}_#{md5}"
++ @module_name = "Inline_#{module_name}_#{md5}_#{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,6 +412,6 @@ static VALUE method_name_equals(VALUE se
+ md5 << signature.to_s
+ end
+
+- assert_equal("Inline_TestInline__TestC_#{md5}", @builder.module_name)
++ assert_equal("Inline_TestInline__TestC_#{md5}_#{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_3ab8c09639e499394bb1f0a0194a839f() {
++ void Init_Inline_TestInline__TestC_3ab8c09639e499394bb1f0a0194a839f_#{implementation}() {
+ VALUE c = rb_cObject;
+ c = rb_const_get(c, rb_intern("TestInline"));
+ c = rb_const_get(c, rb_intern("TestC"));