From 98e0a8ee970ffca05f01c3bbdb700d890cd11a17 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 25 Dec 2015 16:35:13 -0500 Subject: [PATCH] ruby: Update from 2.2.4 to 2.3.0 (closes #114) --- packages/ruby/Makefile.in.patch | 12 ++++++------ packages/ruby/build.sh | 4 ++-- packages/ruby/process.c.patch | 22 +++++++++++----------- packages/ruby/rbinstall.rb.patch | 32 ++++++++++++++++---------------- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/ruby/Makefile.in.patch b/packages/ruby/Makefile.in.patch index 8ede0bb76..dfe202541 100644 --- a/packages/ruby/Makefile.in.patch +++ b/packages/ruby/Makefile.in.patch @@ -1,12 +1,12 @@ -diff -u -r ../ruby-2.2.1/Makefile.in ./Makefile.in ---- ../ruby-2.2.1/Makefile.in 2015-02-22 03:12:34.000000000 -0500 -+++ ./Makefile.in 2015-03-06 15:08:36.956142630 -0500 -@@ -238,7 +238,7 @@ +diff -u -r ../ruby-2.3.0/Makefile.in ./Makefile.in +--- ../ruby-2.3.0/Makefile.in 2015-12-19 20:15:12.000000000 -0500 ++++ ./Makefile.in 2015-12-25 15:58:35.632836837 -0500 +@@ -240,7 +240,7 @@ $(LIBRUBY_SO): @-$(PRE_LIBRUBY_UPDATE) $(ECHO) linking shared-library $@ - $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@ + $(Q) $(LDSHARED) $(LDFLAGS) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@ - -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@ + -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \ + -L '$(SYMBOL_PREFIX)*_threadptr_*' $@ $(Q) $(POSTLINK) - @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \ diff --git a/packages/ruby/build.sh b/packages/ruby/build.sh index 3c5e3b2b2..e4ba9a4e0 100644 --- a/packages/ruby/build.sh +++ b/packages/ruby/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/ TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity" -_MAJOR_VERSION=2.2 -TERMUX_PKG_VERSION=${_MAJOR_VERSION}.4 +_MAJOR_VERSION=2.3 +TERMUX_PKG_VERSION=${_MAJOR_VERSION}.0 TERMUX_PKG_SRCURL=http://cache.ruby-lang.org/pub/ruby/${_MAJOR_VERSION}/ruby-${TERMUX_PKG_VERSION}.tar.xz # libbffi is used by the fiddle extension module: TERMUX_PKG_DEPENDS="libffi, libgmp, readline, openssl, libutil" diff --git a/packages/ruby/process.c.patch b/packages/ruby/process.c.patch index 20f3b1f20..93ea132e6 100644 --- a/packages/ruby/process.c.patch +++ b/packages/ruby/process.c.patch @@ -1,31 +1,31 @@ -diff -u -r ../ruby-2.1.2/process.c ./process.c ---- ../ruby-2.1.2/process.c 2014-02-20 05:44:35.000000000 +0100 -+++ ./process.c 2014-06-27 09:37:35.479988774 +0200 -@@ -1148,9 +1148,9 @@ +diff -u -r ../ruby-2.3.0/process.c ./process.c +--- ../ruby-2.3.0/process.c 2015-12-23 03:57:48.000000000 -0500 ++++ ./process.c 2015-12-25 15:40:56.370279634 -0500 +@@ -1227,9 +1227,9 @@ *argv = (char *)prog; *--argv = (char *)"sh"; if (envp) - execve("/bin/sh", argv, envp); /* async-signal-safe */ + execve("@TERMUX_PREFIX@/bin/sh", argv, envp); /* async-signal-safe */ else -- execv("/bin/sh", argv); /* async-signal-safe */ -+ execv("@TERMUX_PREFIX@/bin/sh", argv); /* async-signal-safe */ +- execv("/bin/sh", argv); /* async-signal-safe (since SUSv4) */ ++ execv("@TERMUX_PREFIX@/bin/sh", argv); /* async-signal-safe (since SUSv4) */ } #else -@@ -1307,9 +1307,9 @@ +@@ -1301,9 +1301,9 @@ } #else if (envp_str) - execle("/bin/sh", "sh", "-c", str, (char *)NULL, (char **)RSTRING_PTR(envp_str)); /* async-signal-safe */ + execle("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL, (char **)RSTRING_PTR(envp_str)); /* async-signal-safe */ else -- execl("/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe */ -+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe */ +- execl("/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe (since SUSv4) */ ++ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe (since SUSv4) */ #endif return -1; #endif /* _WIN32 */ -@@ -1418,7 +1418,7 @@ +@@ -1406,7 +1406,7 @@ if (status == -1 && errno == ENOEXEC) { *argv = (char *)prog; *--argv = (char *)"sh"; @@ -34,7 +34,7 @@ diff -u -r ../ruby-2.1.2/process.c ./process.c after_exec(); if (status == -1) errno = ENOEXEC; } -@@ -1456,7 +1456,7 @@ +@@ -1444,7 +1444,7 @@ char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf)); before_exec(); diff --git a/packages/ruby/rbinstall.rb.patch b/packages/ruby/rbinstall.rb.patch index 9ac899b94..75f0e7549 100644 --- a/packages/ruby/rbinstall.rb.patch +++ b/packages/ruby/rbinstall.rb.patch @@ -1,21 +1,21 @@ -diff -u -r ../ruby-2.2.1/tool/rbinstall.rb ./tool/rbinstall.rb ---- ../ruby-2.2.1/tool/rbinstall.rb 2014-12-26 01:44:52.000000000 -0500 -+++ ./tool/rbinstall.rb 2015-03-06 15:12:16.276142782 -0500 -@@ -656,7 +656,7 @@ +diff -u -r ../ruby-2.3.0/tool/rbinstall.rb ./tool/rbinstall.rb +--- ../ruby-2.3.0/tool/rbinstall.rb 2015-11-16 01:33:17.000000000 -0500 ++++ ./tool/rbinstall.rb 2015-12-25 15:43:04.756646343 -0500 +@@ -696,7 +696,7 @@ + # :startdoc: + install?(:ext, :comm, :gem) do - $:.unshift(File.join(srcdir, "lib")) - require("rubygems.rb") - gem_dir = Gem.default_dir -+ gem_dir = '@TERMUX_PREFIX@/var/lib/gems/2.2.0' ++ gem_dir = "@TERMUX_PREFIX@/var/lib/gems/2.3.0" directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) prepare "default gems", gem_dir, directories -@@ -715,7 +715,7 @@ - end - if defined?(Zlib) - require 'pathname' -- gem_dir = Gem.default_dir -+ gem_dir = '@TERMUX_PREFIX@/var/lib/gems/2.2.0' - directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) - prepare "bundle gems", gem_dir, directories - Dir.glob(srcdir+'/gems/*.gem').each do |gem| +@@ -732,7 +732,7 @@ + end + + install?(:ext, :comm, :gem) do +- gem_dir = Gem.default_dir ++ gem_dir = "@TERMUX_PREFIX@/var/lib/gems/2.3.0" + directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) + prepare "bundle gems", gem_dir, directories + install_dir = with_destdir(gem_dir)