From fab43d7b268916d0936a3857ec86edf145f11ce0 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 24 Feb 2019 19:00:08 +0100 Subject: [PATCH] ruby: Update from 2.5.3 to 2.6.1 --- packages/ruby/build.sh | 7 +++--- packages/ruby/configure.ac.patch | 21 ---------------- packages/ruby/configure.patch | 21 ---------------- packages/ruby/fix-paths.patch | 24 ------------------- packages/ruby/lib-fileutils.rb.patch | 13 ---------- packages/ruby/lib-rubygems-defaults.rb.patch | 14 ----------- packages/ruby/lib-rubygems-installer.rb.patch | 12 ---------- packages/ruby/process.c.patch | 17 ++++++------- .../ruby/template-configure-ext.mk.tmpl.patch | 11 --------- packages/ruby/tool-rbinstall.rb.patch | 4 ++-- 10 files changed, 14 insertions(+), 130 deletions(-) delete mode 100644 packages/ruby/configure.ac.patch delete mode 100644 packages/ruby/configure.patch delete mode 100644 packages/ruby/lib-fileutils.rb.patch delete mode 100644 packages/ruby/lib-rubygems-defaults.rb.patch delete mode 100644 packages/ruby/lib-rubygems-installer.rb.patch delete mode 100644 packages/ruby/template-configure-ext.mk.tmpl.patch diff --git a/packages/ruby/build.sh b/packages/ruby/build.sh index c95729314..442e0163c 100644 --- a/packages/ruby/build.sh +++ b/packages/ruby/build.sh @@ -1,10 +1,9 @@ TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/ TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity" TERMUX_PKG_LICENSE="BSD 2-Clause" -_MAJOR_VERSION=2.5 -TERMUX_PKG_VERSION=${_MAJOR_VERSION}.3 -TERMUX_PKG_REVISION=1 -TERMUX_PKG_SHA256=1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f +_MAJOR_VERSION=2.6 +TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1 +TERMUX_PKG_SHA256=47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2 TERMUX_PKG_SRCURL=https://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="libandroid-support, libffi, libgmp, readline, openssl, libutil, libyaml" diff --git a/packages/ruby/configure.ac.patch b/packages/ruby/configure.ac.patch deleted file mode 100644 index 9e08f332e..000000000 --- a/packages/ruby/configure.ac.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- /home/vagrant/ruby-2.5.0/configure.ac 2017-12-15 09:43:40.000000000 +0000 -+++ src/configure.ac 2018-02-14 19:07:11.272257521 +0000 -@@ -742,7 +742,7 @@ - rb_cv_warnflags="$warnflags" - AS_IF([test "$GCC:${warnflags+set}:no" = yes::no], [ - AS_IF([test $gcc_major -ge 4], [ -- extra_warning=-Werror=extra-tokens -+ extra_warning= - ], [ - extra_warning= - ]) -@@ -765,9 +765,7 @@ - -Werror=pointer-arith \ - -Werror=write-strings \ - -Werror=declaration-after-statement \ -- -Werror=shorten-64-to-32 \ - -Werror=implicit-function-declaration \ -- -Werror=division-by-zero \ - -Werror=deprecated-declarations \ - -Werror=misleading-indentation \ - -Wno-packed-bitfield-compat \ diff --git a/packages/ruby/configure.patch b/packages/ruby/configure.patch deleted file mode 100644 index 76e68ed98..000000000 --- a/packages/ruby/configure.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- /home/vagrant/ruby-2.5.0/configure 2017-12-25 07:00:28.000000000 +0000 -+++ src/configure 2018-02-14 19:06:28.742701948 +0000 -@@ -7434,7 +7434,7 @@ - - if test $gcc_major -ge 4; then : - -- extra_warning=-Werror=extra-tokens -+ extra_warning= - - else - -@@ -7464,9 +7464,7 @@ - -Werror=pointer-arith \ - -Werror=write-strings \ - -Werror=declaration-after-statement \ -- -Werror=shorten-64-to-32 \ - -Werror=implicit-function-declaration \ -- -Werror=division-by-zero \ - -Werror=deprecated-declarations \ - -Werror=misleading-indentation \ - -Wno-packed-bitfield-compat \ diff --git a/packages/ruby/fix-paths.patch b/packages/ruby/fix-paths.patch index ac934fd57..8d3d790dd 100644 --- a/packages/ruby/fix-paths.patch +++ b/packages/ruby/fix-paths.patch @@ -95,30 +95,6 @@ diff -uNr ruby-2.4.2/lib/resolv.rb ruby-2.4.2.mod/lib/resolv.rb if File.exist? filename config_hash = Config.parse_resolv_conf(filename) else -diff -uNr ruby-2.4.2/lib/rubygems/config_file.rb ruby-2.4.2.mod/lib/rubygems/config_file.rb ---- ruby-2.4.2/lib/rubygems/config_file.rb 2016-09-28 03:57:53.000000000 +0300 -+++ ruby-2.4.2.mod/lib/rubygems/config_file.rb 2017-09-15 13:47:05.912800582 +0300 -@@ -81,7 +81,7 @@ - - path.strip - rescue LoadError -- RbConfig::CONFIG["sysconfdir"] || "/etc" -+ RbConfig::CONFIG["sysconfdir"] || "@TERMUX_PREFIX@/etc" - end - end - -diff -uNr ruby-2.4.2/lib/rubygems/defaults.rb ruby-2.4.2.mod/lib/rubygems/defaults.rb ---- ruby-2.4.2/lib/rubygems/defaults.rb 2017-09-15 11:42:55.262805911 +0300 -+++ ruby-2.4.2.mod/lib/rubygems/defaults.rb 2017-09-15 13:59:05.152800068 +0300 -@@ -116,7 +116,7 @@ - - def self.default_bindir - if defined? RUBY_FRAMEWORK_VERSION then # mac framework support -- '/usr/bin' -+ '@TERMUX_PREFIX@/bin' - else # generic install - RbConfig::CONFIG['bindir'] - end diff -uNr ruby-2.4.2/lib/webrick/config.rb ruby-2.4.2.mod/lib/webrick/config.rb --- ruby-2.4.2/lib/webrick/config.rb 2016-12-07 14:59:48.000000000 +0200 +++ ruby-2.4.2.mod/lib/webrick/config.rb 2017-09-15 12:03:02.402805048 +0300 diff --git a/packages/ruby/lib-fileutils.rb.patch b/packages/ruby/lib-fileutils.rb.patch deleted file mode 100644 index 56991b558..000000000 --- a/packages/ruby/lib-fileutils.rb.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- /home/vagrant/ruby-2.5.0/lib/fileutils.rb 2017-12-22 08:00:10.000000000 +0000 -+++ ./lib/fileutils.rb 2018-02-17 23:19:55.344655246 +0000 -@@ -744,8 +744,8 @@ - # - def compare_stream(a, b) - bsize = fu_stream_blksize(a, b) -- sa = String.new(capacity: bsize) -- sb = String.new(capacity: bsize) -+ sa = String.new -+ sb = String.new - begin - a.read(bsize, sa) - b.read(bsize, sb) diff --git a/packages/ruby/lib-rubygems-defaults.rb.patch b/packages/ruby/lib-rubygems-defaults.rb.patch deleted file mode 100644 index 33d14ccd8..000000000 --- a/packages/ruby/lib-rubygems-defaults.rb.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -u -r ../ruby-2.4.0/lib/rubygems/defaults.rb ./lib/rubygems/defaults.rb ---- ../ruby-2.4.0/lib/rubygems/defaults.rb 2016-06-24 06:13:11.000000000 +0200 -+++ ./lib/rubygems/defaults.rb 2017-01-31 22:53:59.125074751 +0100 -@@ -191,6 +191,9 @@ - # end - - def self.platform_defaults -- {} -+ { -+ 'install' => '--no-rdoc --no-ri --env-shebang', -+ 'update' => '--no-rdoc --no-ri --env-shebang' -+ } - end - end diff --git a/packages/ruby/lib-rubygems-installer.rb.patch b/packages/ruby/lib-rubygems-installer.rb.patch deleted file mode 100644 index 5ae54e410..000000000 --- a/packages/ruby/lib-rubygems-installer.rb.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../ruby-2.4.0/lib/rubygems/installer.rb ./lib/rubygems/installer.rb ---- ../ruby-2.4.0/lib/rubygems/installer.rb 2016-09-28 03:16:43.000000000 +0200 -+++ ./lib/rubygems/installer.rb 2017-01-31 22:49:11.992624578 +0100 -@@ -31,7 +31,7 @@ - # Paths where env(1) might live. Some systems are broken and have it in - # /bin - -- ENV_PATHS = %w[/usr/bin/env /bin/env] -+ ENV_PATHS = %w[@TERMUX_PREFIX@/bin/env /usr/bin/env] - - ## - # Deprecated in favor of Gem::Ext::BuildError diff --git a/packages/ruby/process.c.patch b/packages/ruby/process.c.patch index ffd099e3a..90a42e9fb 100644 --- a/packages/ruby/process.c.patch +++ b/packages/ruby/process.c.patch @@ -1,6 +1,7 @@ ---- /home/vagrant/ruby-2.5.0/process.c 2017-12-14 10:24:38.000000000 +0000 -+++ src/process.c 2018-02-14 18:48:50.591627727 +0000 -@@ -1240,9 +1240,9 @@ +diff -u -r ../ruby-2.6.1/process.c ./process.c +--- ../ruby-2.6.1/process.c 2018-12-22 10:23:06.000000000 +0000 ++++ ./process.c 2019-02-16 09:27:04.713434722 +0000 +@@ -1569,9 +1569,9 @@ *argv = (char *)prog; *--argv = (char *)"sh"; if (envp) @@ -12,19 +13,19 @@ } #else -@@ -1310,9 +1310,9 @@ +@@ -1639,9 +1639,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 */ +- execle("/bin/sh", "sh", "-c", str, (char *)NULL, RB_IMEMO_TMPBUF_PTR(envp_str)); /* async-signal-safe */ ++ execle("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL, RB_IMEMO_TMPBUF_PTR(envp_str)); /* async-signal-safe */ else - 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 /* _WIN32 */ return errno; } -@@ -1415,7 +1415,7 @@ +@@ -1744,7 +1744,7 @@ if (status == -1 && errno == ENOEXEC) { *argv = (char *)prog; *--argv = (char *)"sh"; @@ -33,7 +34,7 @@ after_exec(); if (status == -1) errno = ENOEXEC; } -@@ -1453,7 +1453,7 @@ +@@ -1782,7 +1782,7 @@ char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf)); before_exec(); diff --git a/packages/ruby/template-configure-ext.mk.tmpl.patch b/packages/ruby/template-configure-ext.mk.tmpl.patch deleted file mode 100644 index e57330914..000000000 --- a/packages/ruby/template-configure-ext.mk.tmpl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /home/vagrant/ruby-2.5.0/template/configure-ext.mk.tmpl 2017-04-23 16:19:22.000000000 +0000 -+++ ./template/configure-ext.mk.tmpl 2018-02-17 23:31:02.304445580 +0000 -@@ -24,7 +24,7 @@ - MINIRUBY = <%=miniruby%> - SCRIPT_ARGS = <%=script_args%> - EXTMK_ARGS = $(SCRIPT_ARGS) --gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \ -- --make-flags='MINIRUBY=$(MINIRUBY)' -+ --make-flags="MINIRUBY='$(MINIRUBY)'" - - all: exts gems - exts: diff --git a/packages/ruby/tool-rbinstall.rb.patch b/packages/ruby/tool-rbinstall.rb.patch index 71a80d826..879d337de 100644 --- a/packages/ruby/tool-rbinstall.rb.patch +++ b/packages/ruby/tool-rbinstall.rb.patch @@ -5,7 +5,7 @@ def install_default_gem(dir, srcdir) - gem_dir = Gem.default_dir -+ gem_dir = "@TERMUX_PREFIX@/lib/ruby/gems/2.5.0" ++ gem_dir = "@TERMUX_PREFIX@/lib/ruby/gems/2.6.0" directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) prepare "default gems from #{dir}", gem_dir, directories @@ -14,7 +14,7 @@ install?(:ext, :comm, :gem, :'bundled-gems') do - gem_dir = Gem.default_dir -+ gem_dir = "@TERMUX_PREFIX@/lib/ruby/gems/2.5.0" ++ gem_dir = "@TERMUX_PREFIX@/lib/ruby/gems/2.6.0" directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) prepare "bundled gems", gem_dir, directories install_dir = with_destdir(gem_dir)