diff options
Diffstat (limited to 'dev-ruby/RubyInline/files/ruby-inline-3.8.4-gentoo.patch')
-rw-r--r-- | dev-ruby/RubyInline/files/ruby-inline-3.8.4-gentoo.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-ruby/RubyInline/files/ruby-inline-3.8.4-gentoo.patch b/dev-ruby/RubyInline/files/ruby-inline-3.8.4-gentoo.patch new file mode 100644 index 000000000000..42690b364050 --- /dev/null +++ b/dev-ruby/RubyInline/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")); |