17409417 change vim to use ruby 1.9.3 instead of ruby 1.8.7
18685997 subversion build should not use ruby 1.8
18685306 swig should switch to using ruby 1.9
--- a/components/subversion/Makefile Tue Feb 24 12:51:27 2015 -0700
+++ b/components/subversion/Makefile Wed Feb 25 16:04:16 2015 -0800
@@ -20,7 +20,7 @@
#
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
@@ -90,10 +90,6 @@
CONFIGURE_ENV += JAVA_ROOT="$(JAVA_ROOT)"
CONFIGURE_ENV += PERL="$(PERL)"
CONFIGURE_ENV += PLMODS="$(PLMODS)"
-# Current version of subversion only supports ruby 1.8, not 1.9.
-# Until subversion is updated to 1.8.0 (ruby 1.9 support added)
-# or later, use ruby 1.8.
-CONFIGURE_ENV += RUBY="$(RUBY.1.8)"
# Let's make noise just because we have to override --libdir
CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
--- a/components/swig/Makefile Tue Feb 24 12:51:27 2015 -0700
+++ b/components/swig/Makefile Wed Feb 25 16:04:16 2015 -0800
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
@@ -47,8 +47,6 @@
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
CONFIGURE_OPTIONS += --with-javaincl="$(JAVA_HOME)/include"
-# keep swig building with ruby 1.8 for now
-CONFIGURE_OPTIONS += --with-ruby=$(RUBY.1.8)
# common targets
build: $(BUILD_32)
--- a/components/vim/Makefile Tue Feb 24 12:51:27 2015 -0700
+++ b/components/vim/Makefile Wed Feb 25 16:04:16 2015 -0800
@@ -20,7 +20,7 @@
#
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
include ../../make-rules/shared-macros.mk
@@ -79,23 +79,32 @@
PKG_MACROS += VIMVER=vim73
-X_VARIANT = $(BUILD_DIR)/$(MACH32)-gvim
-NOX_VARIANT = $(BUILD_DIR)/$(MACH32)-vim
+X_VARIANT = $(BUILD_DIR)/$(MACH64)-gvim
+NOX_VARIANT = $(BUILD_DIR)/$(MACH64)-vim
VARIANTS = $(X_VARIANT) $(NOX_VARIANT)
-$(VARIANTS:%=%/.configured): BITS=32
+$(VARIANTS:%=%/.configured): BITS=64
-BUILD_32 = $(VARIANTS:%=%/.built)
+BUILD_64 = $(VARIANTS:%=%/.built)
# Only install the non-X variant. We will cherry-pick gvim out of the build
# directory to avoid re-installing everything.
-INSTALL_32 = $(NOX_VARIANT)/.installed
+INSTALL_64 = $(NOX_VARIANT)/.installed
+
+TEST_64 = $(NOX_VARIANT)/.tested
+
+# Necessary to pass 64-bit flags to the link stage.
+CC += $(CC_BITS)
-TEST_32 = $(NOX_VARIANT)/.tested
+# Put all the binaries directly in /usr/bin, not in /usr/bin/64.
+CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
-# Override a broken imake that's always providing a 64-bit library directory.
-CONFIGURE_OPTIONS += --x-libraries=$(CONFIGURE_LIBDIR.$(BITS))
+# Use the 64-bit versions of pkg-config files (or GTK+ will add -R/usr/lib)
+CONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
+
+# Necessary to pass 64-bit flags to the compilation stage.
+CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
CONFIGURE_OPTIONS += --with-features=huge
CONFIGURE_OPTIONS += --with-compiledby="the Solaris Userland build environment"
CONFIGURE_OPTIONS += --with-modified-by="Solaris Userland <[email protected]>"
@@ -111,11 +120,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
@@ -138,11 +143,11 @@
nawk '/begin of license/ {p=1; getline; next} /end of license/ {p=0} p == 1 {print}' $< > $@
# common targets
-build: $(BUILD_32)
+build: $(BUILD_64)
-install: $(INSTALL_32) $(X_VARIANT)/.built $(BUILD_DIR)/license
+install: $(INSTALL_64) $(X_VARIANT)/.built $(BUILD_DIR)/license
-test: $(TEST_32)
+test: $(TEST_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
--- a/components/vim/gvim.p5m Tue Feb 24 12:51:27 2015 -0700
+++ b/components/vim/gvim.p5m Wed Feb 25 16:04:16 2015 -0800
@@ -40,7 +40,7 @@
set name=org.opensolaris.arc-caseid value=PSARC/2007/267 value=PSARC/2008/546
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
link path=usr/bin/gview target=gvim
-file $(MACH32)-gvim/src/gvim path=usr/bin/gvim
+file $(MACH64)-gvim/src/gvim path=usr/bin/gvim
link path=usr/bin/gvimdiff target=gvim
link path=usr/bin/rgview target=gvim
link path=usr/bin/rgvim target=gvim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/vim/patches/configure.patch Wed Feb 25 16:04:16 2015 -0800
@@ -0,0 +1,89 @@
+Fixes from vim v7.4 configure for Ruby 1.9 and later versions--
+uses RbConfig instead of Config (deprecated in Ruby 1.9) and changes
+vim to use libruby.so.# from /usr/lib/$(MACH64) rather than libruby.so.
+
+Patching configure instead of configure.in; attempts to
+run autoreconf against the patched configure.in produced errors.
+Remove this patch once the vim upgrade to version 7.4 or later
+is backported.
+
+--- src/auto/configure Tue Jul 10 13:28:45 2012
++++ src/auto/configure Mon Feb 23 17:51:02 2015
+@@ -6327,42 +6327,55 @@
+ if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
+ $as_echo "OK" >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
++$as_echo_n "checking Ruby rbconfig... " >&6; }
++ ruby_rbconfig="RbConfig"
++ if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
++ ruby_rbconfig="Config"
++ fi
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
++$as_echo "$ruby_rbconfig" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
+ $as_echo_n "checking Ruby header files... " >&6; }
+- rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
++ rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
+ if test "X$rubyhdrdir" != "X"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
+ $as_echo "$rubyhdrdir" >&6; }
+ RUBY_CFLAGS="-I$rubyhdrdir"
+- rubyarch=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["arch"]'`
++ rubyarch=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['arch']"`
+ if test -d "$rubyhdrdir/$rubyarch"; then
+ RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyhdrdir/$rubyarch"
+ fi
+- rubyversion=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["ruby_version"].gsub(/\./, "")[0,2]'`
++ rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
++ if test "X$rubyversion" = "X"; then
++ rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"`
++ fi
+ RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
+- rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
++ rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
+ if test "X$rubylibs" != "X"; then
+ RUBY_LIBS="$rubylibs"
+ fi
+- librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
+- librubya=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBY_A"])'`
+- rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
++ librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
++ librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
++ rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
+ if test -f "$rubylibdir/$librubya"; then
+ librubyarg="$librubyarg"
+- RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
+- elif test "$librubyarg" = "libruby.a"; then
+- librubyarg="-lruby"
+- RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
++ RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
++ elif test "$librubyarg" = "libruby.a"; then
++ librubyarg="-lruby"
++ RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
+ fi
+
+ if test "X$librubyarg" != "X"; then
+ RUBY_LIBS="$librubyarg $RUBY_LIBS"
+ fi
+- rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
++ rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
+ if test "X$rubyldflags" != "X"; then
+ rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
+ if test "X$rubyldflags" != "X"; then
+- LDFLAGS="$rubyldflags $LDFLAGS"
++ if test "X`echo \"$LDFLAGS\" | grep -F -e \"$rubyldflags\"`" = "X"; then
++ LDFLAGS="$rubyldflags $LDFLAGS"
++ fi
+ fi
+ fi
+ RUBY_SRC="if_ruby.c"
+@@ -6371,7 +6384,7 @@
+ $as_echo "#define FEAT_RUBY 1" >>confdefs.h
+
+ if test "$enable_rubyinterp" = "dynamic"; then
+- libruby=`$vi_cv_path_ruby -r rbconfig -e 'printf "lib%s.%s\n", Config::CONFIG["RUBY_SO_NAME"], Config::CONFIG["DLEXT"]'`
++ libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
+ $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
+
+ RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/vim/patches/if_ruby_c.patch Wed Feb 25 16:04:16 2015 -0800
@@ -0,0 +1,80 @@
+# Apply ruby 2.0 fix to ruby 1.9 as well. Needed to allow
+# vim to build with ruby 1.9.
+# Includes changes from vim v7.4 plus a patch
+# applied upstream to vim 7.4.224. See
+# https://groups.google.com/forum/#!msg/vim_dev/r8wzUVNYIfQ/m0DM8Wt97vkJ
+
+--- src/if_ruby.c Tue Jul 10 13:28:45 2012
++++ src/if_ruby.c Fri Feb 20 19:55:21 2015
+@@ -85,6 +85,14 @@
+ # define rb_int2big rb_int2big_stub
+ #endif
+
++#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
++ && SIZEOF_INT < SIZEOF_LONG
++/* 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
++#endif
++
+ #include <ruby.h>
+ #ifdef RUBY19_OR_LATER
+ # include <ruby/encoding.h>
+@@ -178,6 +186,13 @@
+ #define rb_hash_new dll_rb_hash_new
+ #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
+ #define rb_lastline_set dll_rb_lastline_set
+ #define rb_load_protect dll_rb_load_protect
+@@ -269,6 +284,11 @@
+ static VALUE (*dll_rb_inspect) (VALUE);
+ static VALUE (*dll_rb_int2inum) (long);
+ static VALUE (*dll_rb_int2inum) (long);
++# if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
++static long (*dll_rb_fix2int) (VALUE);
++static long (*dll_rb_num2int) (VALUE);
++static unsigned long (*dll_rb_num2uint) (VALUE);
++# endif
+ static VALUE (*dll_rb_lastline_get) (void);
+ static void (*dll_rb_lastline_set) (VALUE);
+ static void (*dll_rb_load_protect) (VALUE, int, int*);
+@@ -336,7 +356,17 @@
+ return dll_rb_int2big(x);
+ }
+ #endif
+-
++# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \
++ && SIZEOF_INT < SIZEOF_LONG
++long rb_fix2int_stub(VALUE x)
++{
++ return dll_rb_fix2int(x);
++}
++long rb_num2int_stub(VALUE x)
++{
++ return dll_rb_num2int(x);
++}
++# endif
+ static HINSTANCE hinstRuby = NULL; /* Instance of ruby.dll */
+
+ /*
+@@ -377,6 +407,11 @@
+ {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
+ {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
+ {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
++# if SIZEOF_INT < SIZEOF_LONG /* 64 bits only */
++ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
++ {"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
++ {"rb_num2uint", (RUBY_PROC*)&dll_rb_num2uint},
++# endif
+ {"rb_lastline_get", (RUBY_PROC*)&dll_rb_lastline_get},
+ {"rb_lastline_set", (RUBY_PROC*)&dll_rb_lastline_set},
+ {"rb_load_protect", (RUBY_PROC*)&dll_rb_load_protect},