17409417 change vim to use ruby 1.9.3 instead of ruby 1.8.7
authorApril Chin <april.chin@oracle.com>
Fri, 02 May 2014 19:59:18 -0700
changeset 1871 0a2201439908
parent 1870 993a6ce85d32
child 1872 0b81e3d9f3ae
17409417 change vim to use ruby 1.9.3 instead of ruby 1.8.7
components/vim/Makefile
components/vim/patches/if_ruby_c.patch
--- a/components/vim/Makefile	Fri May 02 18:05:00 2014 -0700
+++ b/components/vim/Makefile	Fri May 02 19:59:18 2014 -0700
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
@@ -114,11 +114,7 @@
 # CONFIGURE_OPTIONS +=	--enable-perlinterp=dynamic
 CONFIGURE_OPTIONS +=	--enable-pythoninterp=dynamic
 CONFIGURE_OPTIONS +=	--enable-rubyinterp=dynamic
-
-# Below option keeps using ruby 1.8, no matter which ruby version is the default.
-# When ruby 1.9 becomes available, we may change
-# the below to explicitly call $(RUBY.1.9).
-CONFIGURE_OPTIONS +=	--with-ruby-command=$(RUBY.1.8)
+CONFIGURE_OPTIONS +=	--with-ruby-command=$(RUBY.1.9)
 
 # We build two variants: with and without X support.
 $(NOX_VARIANT)/.configured:	CONFIGURE_OPTIONS += --without-x
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/vim/patches/if_ruby_c.patch	Fri May 02 19:59:18 2014 -0700
@@ -0,0 +1,39 @@
+# Apply ruby 2.0 fix to ruby 1.9 as well.  Needed to allow
+# vim to build with ruby 1.9.
+# This patch has been applied upstream to vim 7.4.224.  See
+# https://groups.google.com/forum/#!msg/vim_dev/r8wzUVNYIfQ/m0DM8Wt97vkJ
+
+--- src/if_ruby.c	Sat Aug 10 06:00:24 2013
++++ src/if_ruby.c	Tue Apr 29 14:17:02 2014
+@@ -88,9 +88,9 @@
+ # define rb_int2big rb_int2big_stub
+ #endif
+ 
+-#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
++#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+ 	&& SIZEOF_INT < SIZEOF_LONG
+-/* Ruby 2.0 defines a number of static functions which use rb_fix2int and
++/* Ruby 1.9 defines a number of static functions which use rb_fix2int and
+  * rb_num2int if SIZEOF_INT < SIZEOF_LONG (64bit) */
+ # define rb_fix2int rb_fix2int_stub
+ # define rb_num2int rb_num2int_stub
+@@ -197,8 +197,10 @@
+ # define rb_inspect			dll_rb_inspect
+ # define rb_int2inum			dll_rb_int2inum
+ # if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
++# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
+ #  define rb_fix2int			dll_rb_fix2int
+ #  define rb_num2int			dll_rb_num2int
++# endif
+ #  define rb_num2uint			dll_rb_num2uint
+ # endif
+ # define rb_lastline_get			dll_rb_lastline_get
+@@ -382,7 +384,7 @@
+ {
+     return dll_rb_int2big(x);
+ }
+-#  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20 \
++#  if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
+ 	&& SIZEOF_INT < SIZEOF_LONG
+ long rb_fix2int_stub(VALUE x)
+ {