ruby: update to 2.2.0

For ruby changes since 2.1.x:

 https://github.com/ruby/ruby/blob/v2_2_0/NEWS

Relevant changes for OpenWRT:

* all patches for ruby-core where merged upstream and
  they are not needed anymore (only rdoc patch remains)
 - PR for the rdoc github project was added to the patch header
   (https://github.com/rdoc/rdoc/pull/340)
* new package ruby-powerassert for introduced new bundled gem power_assert
* new package ruby-unicodenormalize for Unicode normalization files
* removed ruby-dl as DL was removed after being deprecated
* ruby-{minitest,testunit} where removed from ruby library. Now they
  are bundled gems
* test and sample files where removed from gems in order to save resources
  and reduce pkgs dependencies
* script ruby_find_pkgsdeps was updated to match upstream changes

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
This commit is contained in:
Luiz Angelo Daros de Luca
2015-01-14 22:45:13 -02:00
parent a9981d0b1f
commit 2ffaee345c
6 changed files with 102 additions and 201 deletions
@@ -1,3 +1,7 @@
References:
https://github.com/rdoc/rdoc/pull/340
--- ruby-2.1.2.orig/lib/rdoc.rb 2014-09-02 17:14:28.719224215 -0300
+++ ruby-2.1.2/lib/rdoc.rb 2014-09-02 17:14:28.762223911 -0300
@@ -109,6 +109,8 @@
@@ -1,13 +0,0 @@
--- ruby-2.1.2.orig/lib/minitest/autorun.rb 2014-09-03 02:22:29.769909573 -0300
+++ ruby-2.1.2/lib/minitest/autorun.rb 2014-09-03 02:22:29.768909580 -0300
@@ -6,8 +6,9 @@
######################################################################
begin
- require 'rubygems'
gem 'minitest'
+rescue NameError => e # --disable-gems
+ raise unless e.name == :gem
rescue Gem::LoadError
# do nothing
end
@@ -1,12 +0,0 @@
diff -r -u ruby-2.1.2.old/ext/digest/rmd160/extconf.rb ruby-2.1.2/ext/digest/rmd160/extconf.rb
--- ruby-2.1.2.old/ext/digest/rmd160/extconf.rb 2012-11-26 22:58:52.000000000 -0200
+++ ruby-2.1.2/ext/digest/rmd160/extconf.rb 2014-09-17 14:20:57.537367488 -0300
@@ -14,7 +14,7 @@
require File.expand_path('../../../openssl/deprecation', __FILE__)
if !with_config("bundled-rmd160") &&
- have_library("crypto") && OpenSSL.check_func("RMD160_Transform", "openssl/ripemd.h")
+ have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
$objs << "rmd160ossl.#{$OBJEXT}"
else
$objs << "rmd160.#{$OBJEXT}"
@@ -1,117 +0,0 @@
--- ruby-2.1.2/ext/digest/md5/extconf.rb 2012-11-26 22:58:52.000000000 -0200
+++ ruby-2.1.2/ext/digest/md5/extconf.rb 2014-09-16 19:25:21.120457409 -0300
@@ -9,14 +9,21 @@
$objs = [ "md5init.#{$OBJEXT}" ]
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
+if !with_config("bundled-md5")
+ dir_config("openssl")
+ pkg_config("openssl")
+ require File.expand_path('../../../openssl/deprecation', __FILE__)
+ if have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
+ $use_bundled=false
+ else
+ $use_bundled=true
+ end
+else
+ $use_bundled=true
+end
-if !with_config("bundled-md5") &&
- have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
+if !$use_bundled
$objs << "md5ossl.#{$OBJEXT}"
-
else
$objs << "md5.#{$OBJEXT}"
end
--- ruby-2.1.2/ext/digest/rmd160/extconf.rb 2012-11-26 22:58:52.000000000 -0200
+++ ruby-2.1.2/ext/digest/rmd160/extconf.rb 2014-09-16 19:29:11.425628541 -0300
@@ -9,12 +9,20 @@
$objs = [ "rmd160init.#{$OBJEXT}" ]
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
+if !with_config("bundled-rmd160")
+ dir_config("openssl")
+ pkg_config("openssl")
+ require File.expand_path('../../../openssl/deprecation', __FILE__)
+ if have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
+ $use_bundled=false
+ else
+ $use_bundled=true
+ end
+else
+ $use_bundled=true
+end
-if !with_config("bundled-rmd160") &&
- have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
+if !$use_bundled
$objs << "rmd160ossl.#{$OBJEXT}"
else
$objs << "rmd160.#{$OBJEXT}"
--- ruby-2.1.2/ext/digest/sha1/extconf.rb 2012-11-26 22:58:52.000000000 -0200
+++ ruby-2.1.2/ext/digest/sha1/extconf.rb 2014-09-16 19:30:09.359168494 -0300
@@ -9,12 +9,20 @@
$objs = [ "sha1init.#{$OBJEXT}" ]
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
+if !with_config("bundled-sha1")
+ dir_config("openssl")
+ pkg_config("openssl")
+ require File.expand_path('../../../openssl/deprecation', __FILE__)
+ if have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
+ $use_bundled=false
+ else
+ $use_bundled=true
+ end
+else
+ $use_bundled=true
+end
-if !with_config("bundled-sha1") &&
- have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
+if !$use_bundled
$objs << "sha1ossl.#{$OBJEXT}"
else
$objs << "sha1.#{$OBJEXT}"
--- ruby-2.1.2/ext/digest/sha2/extconf.rb 2012-11-26 22:58:52.000000000 -0200
+++ ruby-2.1.2/ext/digest/sha2/extconf.rb 2014-09-16 19:31:31.833513570 -0300
@@ -9,14 +9,22 @@
$objs = [ "sha2init.#{$OBJEXT}" ]
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
-
-if !with_config("bundled-sha2") &&
- have_library("crypto") &&
+if !with_config("bundled-sha2")
+ dir_config("openssl")
+ pkg_config("openssl")
+ require File.expand_path('../../../openssl/deprecation', __FILE__)
+ if have_library("crypto") &&
%w[SHA256 SHA512].all? {|d| OpenSSL.check_func("#{d}_Transform", "openssl/sha.h")} &&
%w[SHA256 SHA512].all? {|d| have_type("#{d}_CTX", "openssl/sha.h")}
+ $use_bundled=false
+ else
+ $use_bundled=true
+ end
+else
+ $use_bundled=true
+end
+
+if !$use_bundled
$objs << "sha2ossl.#{$OBJEXT}"
$defs << "-DSHA2_USE_OPENSSL"
else