Accepting request 213402 from openSUSE:Factory:Staging:Ruby21
- Fix dynamic loading of Ruby for Ruby 2.1 Add patch vim-7.4-ruby21.patch OBS-URL: https://build.opensuse.org/request/show/213402 OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=179
This commit is contained in:
parent
dd00c31c92
commit
677f2ec6b0
57
vim-7.4-ruby21.patch
Normal file
57
vim-7.4-ruby21.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-vim74/src/if_ruby.c ./src/if_ruby.c
|
||||
--- ../orig-vim74/src/if_ruby.c 2013-05-20 12:47:48.000000000 +0200
|
||||
+++ ./src/if_ruby.c 2014-01-10 09:04:58.926094655 +0100
|
||||
@@ -96,6 +96,10 @@
|
||||
# define rb_num2int rb_num2int_stub
|
||||
#endif
|
||||
|
||||
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER > 20
|
||||
+# define rb_gc_writebarrier_unprotect_promoted rb_gc_writebarrier_unprotect_promoted_stub
|
||||
+# endif
|
||||
+
|
||||
#include <ruby.h>
|
||||
#ifdef RUBY19_OR_LATER
|
||||
# include <ruby/encoding.h>
|
||||
@@ -213,6 +217,9 @@
|
||||
# define rb_obj_alloc dll_rb_obj_alloc
|
||||
# define rb_obj_as_string dll_rb_obj_as_string
|
||||
# define rb_obj_id dll_rb_obj_id
|
||||
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER > 20
|
||||
+# define rb_gc_writebarrier_unprotect_promoted dll_rb_gc_writebarrier_unprotect_promoted
|
||||
+# endif
|
||||
# define rb_raise dll_rb_raise
|
||||
# define rb_str_cat dll_rb_str_cat
|
||||
# define rb_str_concat dll_rb_str_concat
|
||||
@@ -317,6 +324,9 @@
|
||||
static VALUE (*dll_rb_obj_alloc) (VALUE);
|
||||
static VALUE (*dll_rb_obj_as_string) (VALUE);
|
||||
static VALUE (*dll_rb_obj_id) (VALUE);
|
||||
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER > 20
|
||||
+static void (*dll_rb_gc_writebarrier_unprotect_promoted) (VALUE);
|
||||
+# endif
|
||||
static void (*dll_rb_raise) (VALUE, const char*, ...);
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||
static VALUE (*dll_rb_string_value) (volatile VALUE*);
|
||||
@@ -393,6 +403,12 @@
|
||||
return dll_rb_num2int(x);
|
||||
}
|
||||
# endif
|
||||
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER > 20
|
||||
+void rb_gc_writebarrier_unprotect_promoted_stub(VALUE obj)
|
||||
+{
|
||||
+ dll_rb_gc_writebarrier_unprotect_promoted(obj);
|
||||
+}
|
||||
+# endif
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20
|
||||
VALUE
|
||||
rb_float_new_in_heap(double d)
|
||||
@@ -462,6 +478,9 @@
|
||||
{"rb_obj_alloc", (RUBY_PROC*)&dll_rb_obj_alloc},
|
||||
{"rb_obj_as_string", (RUBY_PROC*)&dll_rb_obj_as_string},
|
||||
{"rb_obj_id", (RUBY_PROC*)&dll_rb_obj_id},
|
||||
+# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER > 20
|
||||
+ {"dll_rb_gc_writebarrier_unprotect_promoted", (RUBY_PROC*)&dll_rb_gc_writebarrier_unprotect_promoted},
|
||||
+# endif
|
||||
{"rb_raise", (RUBY_PROC*)&dll_rb_raise},
|
||||
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
|
||||
{"rb_string_value", (RUBY_PROC*)&dll_rb_string_value},
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 10 08:10:52 UTC 2014 - kkaempf@suse.com
|
||||
|
||||
- Fix dynamic loading of Ruby for Ruby 2.1
|
||||
Add patch vim-7.4-ruby21.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 17 12:10:00 UTC 2013 - idonmez@suse.com
|
||||
|
||||
|
10
vim.spec
10
vim.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package vim
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -104,6 +104,11 @@ Patch21: %{name}-7.3-filetype_changes.patch
|
||||
Patch22: %{name}-7.4-filetype_mine.patch
|
||||
Patch100: vim-7.1.314-CVE-2009-0316-debian.patch
|
||||
Patch101: vim73-no-static-libpython.patch
|
||||
%if 0%{?suse_version} > 1310
|
||||
# Ruby 2.1 calls rb_gc_writebarrier_unprotect_promoted in RARRAY_PTR,
|
||||
# stub it for dynamic loading, kkaempf@suse.de
|
||||
Patch102: vim-7.4-ruby21.patch
|
||||
%endif
|
||||
%{perl_requires}
|
||||
%{?libperl_requires}
|
||||
|
||||
@ -192,6 +197,9 @@ cp %{SOURCE23} runtime/syntax/apparmor.vim
|
||||
%patch22 -p1
|
||||
%patch100 -p1
|
||||
%patch101
|
||||
%if 0%{?suse_version} > 1310
|
||||
%patch102 -p1
|
||||
%endif
|
||||
cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE8} %{SOURCE10} .
|
||||
|
||||
# newer perl? ugly hack to fix build anyway.
|
||||
|
Loading…
Reference in New Issue
Block a user