Browse Source

ruby: Update from 2.5.3 to 2.6.1

android-5
Fredrik Fornwall 6 years ago
parent
commit
fab43d7b26
  1. 7
      packages/ruby/build.sh
  2. 21
      packages/ruby/configure.ac.patch
  3. 21
      packages/ruby/configure.patch
  4. 24
      packages/ruby/fix-paths.patch
  5. 13
      packages/ruby/lib-fileutils.rb.patch
  6. 14
      packages/ruby/lib-rubygems-defaults.rb.patch
  7. 12
      packages/ruby/lib-rubygems-installer.rb.patch
  8. 17
      packages/ruby/process.c.patch
  9. 11
      packages/ruby/template-configure-ext.mk.tmpl.patch
  10. 4
      packages/ruby/tool-rbinstall.rb.patch

7
packages/ruby/build.sh

@ -1,10 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/ TERMUX_PKG_HOMEPAGE=https://www.ruby-lang.org/
TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity" TERMUX_PKG_DESCRIPTION="Dynamic programming language with a focus on simplicity and productivity"
TERMUX_PKG_LICENSE="BSD 2-Clause" TERMUX_PKG_LICENSE="BSD 2-Clause"
_MAJOR_VERSION=2.5 _MAJOR_VERSION=2.6
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.3 TERMUX_PKG_VERSION=${_MAJOR_VERSION}.1
TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=47b629808e9fd44ce1f760cdf3ed14875fc9b19d4f334e82e2cf25cb2898f2f2
TERMUX_PKG_SHA256=1cc9d0359a8ea35fc6111ec830d12e60168f3b9b305a3c2578357d360fcf306f
TERMUX_PKG_SRCURL=https://cache.ruby-lang.org/pub/ruby/${_MAJOR_VERSION}/ruby-${TERMUX_PKG_VERSION}.tar.xz 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: # libbffi is used by the fiddle extension module:
TERMUX_PKG_DEPENDS="libandroid-support, libffi, libgmp, readline, openssl, libutil, libyaml" TERMUX_PKG_DEPENDS="libandroid-support, libffi, libgmp, readline, openssl, libutil, libyaml"

21
packages/ruby/configure.ac.patch

@ -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 \

21
packages/ruby/configure.patch

@ -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 \

24
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 if File.exist? filename
config_hash = Config.parse_resolv_conf(filename) config_hash = Config.parse_resolv_conf(filename)
else 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 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/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 +++ ruby-2.4.2.mod/lib/webrick/config.rb 2017-09-15 12:03:02.402805048 +0300

13
packages/ruby/lib-fileutils.rb.patch

@ -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)

14
packages/ruby/lib-rubygems-defaults.rb.patch

@ -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

12
packages/ruby/lib-rubygems-installer.rb.patch

@ -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

17
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 diff -u -r ../ruby-2.6.1/process.c ./process.c
+++ src/process.c 2018-02-14 18:48:50.591627727 +0000 --- ../ruby-2.6.1/process.c 2018-12-22 10:23:06.000000000 +0000
@@ -1240,9 +1240,9 @@ +++ ./process.c 2019-02-16 09:27:04.713434722 +0000
@@ -1569,9 +1569,9 @@
*argv = (char *)prog; *argv = (char *)prog;
*--argv = (char *)"sh"; *--argv = (char *)"sh";
if (envp) if (envp)
@ -12,19 +13,19 @@
} }
#else #else
@@ -1310,9 +1310,9 @@ @@ -1639,9 +1639,9 @@
} }
#else #else
if (envp_str) if (envp_str)
- execle("/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, (char **)RSTRING_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 else
- execl("/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe (since SUSv4) */ - 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) */ + execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", str, (char *)NULL); /* async-signal-safe (since SUSv4) */
#endif /* _WIN32 */ #endif /* _WIN32 */
return errno; return errno;
} }
@@ -1415,7 +1415,7 @@ @@ -1744,7 +1744,7 @@
if (status == -1 && errno == ENOEXEC) { if (status == -1 && errno == ENOEXEC) {
*argv = (char *)prog; *argv = (char *)prog;
*--argv = (char *)"sh"; *--argv = (char *)"sh";
@ -33,7 +34,7 @@
after_exec(); after_exec();
if (status == -1) errno = ENOEXEC; if (status == -1) errno = ENOEXEC;
} }
@@ -1453,7 +1453,7 @@ @@ -1782,7 +1782,7 @@
char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf)); char *shell = dln_find_exe_r("sh", 0, fbuf, sizeof(fbuf));
before_exec(); before_exec();

11
packages/ruby/template-configure-ext.mk.tmpl.patch

@ -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:

4
packages/ruby/tool-rbinstall.rb.patch

@ -5,7 +5,7 @@
def install_default_gem(dir, srcdir) def install_default_gem(dir, srcdir)
- gem_dir = Gem.default_dir - 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) directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
prepare "default gems from #{dir}", gem_dir, directories prepare "default gems from #{dir}", gem_dir, directories
@ -14,7 +14,7 @@
install?(:ext, :comm, :gem, :'bundled-gems') do install?(:ext, :comm, :gem, :'bundled-gems') do
- gem_dir = Gem.default_dir - 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) directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
prepare "bundled gems", gem_dir, directories prepare "bundled gems", gem_dir, directories
install_dir = with_destdir(gem_dir) install_dir = with_destdir(gem_dir)

Loading…
Cancel
Save