Browse Source

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>
lilik-openwrt-22.03
Luiz Angelo Daros de Luca 10 years ago
parent
commit
2ffaee345c
6 changed files with 102 additions and 201 deletions
  1. +82
    -48
      lang/ruby/Makefile
  2. +4
    -0
      lang/ruby/patches/001-rdoc-remove_gems_dep.patch
  3. +0
    -13
      lang/ruby/patches/002-minitest-remove_gems_dep.patch
  4. +0
    -12
      lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch
  5. +0
    -117
      lang/ruby/patches/004-digest_dont-link-ssl-if-not-needed.patch
  6. +16
    -11
      lang/ruby/ruby_find_pkgsdeps

+ 82
- 48
lang/ruby/Makefile View File

@ -10,14 +10,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ruby
PKG_VERSION:=2.1.5
PKG_VERSION:=2.2.0
PKG_RELEASE:=1
PKG_LIBVER:=2.1
PKG_LIBVER:=2.2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://cache.ruby-lang.org/pub/ruby/$(PKG_LIBVER)/
PKG_MD5SUM:=a7c3e5fec47eff23091b566e9e1dac1b
PKG_MD5SUM:=d03cd4690fec1fff81d096d1c1255fde
PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca@gmail.com>
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING
@ -70,12 +70,13 @@ define Package/ruby-stdlib
$(call Package/ruby/Default)
TITLE:=Ruby standard libraries (metadata for all stdlib subsets)
DEPENDS:=ruby +ruby-misc +ruby-bigdecimal +ruby-cgi +ruby-csv +ruby-datetime +ruby-dbm +ruby-debuglib\
+ruby-digest +ruby-dl +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
+ruby-digest +ruby-drb +ruby-enc +ruby-enc-extra +ruby-erb +ruby-gdbm +ruby-gems \
+ruby-json +ruby-io-console +ruby-irb +ruby-fiddle +ruby-filelib +ruby-logger +ruby-math \
+ruby-minitest +ruby-mkmf +ruby-multithread +ruby-nkf +ruby-net +ruby-openssl +ruby-optparse \
+ruby-patterns +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake +ruby-rbconfig \
+ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm +ruby-shell \
+ruby-socket +ruby-testunit +ruby-uri +ruby-webrick +ruby-xmlrpc +ruby-yaml +ruby-zlib
+ruby-patterns +ruby-powerassert +ruby-prettyprint +ruby-pstore +ruby-psych +ruby-racc +ruby-rake \
+ruby-rbconfig +ruby-rdoc +ruby-readline +ruby-rexml +ruby-rinda +ruby-ripper +ruby-rss +ruby-sdbm \
+ruby-shell +ruby-socket +ruby-testunit +ruby-unicodenormalize +ruby-uri +ruby-webrick +ruby-xmlrpc \
+ruby-yaml +ruby-zlib
endef
define Package/ruby-stdlib/description
@ -182,17 +183,6 @@ define Package/ruby-digest/config
endef
define Package/ruby-dl
$(call Package/ruby/Default)
TITLE+= (dynamic linker support)
DEPENDS:=ruby +ruby-fiddle +ruby-multithread
endef
define Package/ruby-dl/description
Provides dl* files. This is deprecated, use fiddle.
endef
define Package/ruby-drb
$(call Package/ruby/Default)
TITLE:=Ruby distributed object system
@ -306,7 +296,7 @@ endef
define Package/ruby-filelib
$(call Package/ruby/Default)
TITLE+= File utils library
DEPENDS:=ruby +ruby-multithread +ruby-enc
DEPENDS:=ruby +ruby-enc +ruby-misc
endef
define Package/ruby-filelib/description
@ -335,7 +325,7 @@ endef
define Package/ruby-gems
$(call Package/ruby/Default)
TITLE:=Ruby gems packet management
DEPENDS:=ruby +ruby-net +ruby-rdoc +ruby-zlib
DEPENDS:=ruby +ruby-net +ruby-rdoc
endef
define Package/ruby-gems/description
@ -413,12 +403,12 @@ endef
define Package/ruby-minitest
$(call Package/ruby/Default)
TITLE+= minitest bundled with Ruby
DEPENDS:=ruby +ruby-filelib +ruby-optparse +ruby-prettyprint +ruby-rbconfig
TITLE:=Gem minitest shipped with Ruby
DEPENDS:=ruby +ruby-gems
endef
define Package/ruby-minitest/description
Provides minitest* files
Provides minitest gem
endef
@ -545,6 +535,19 @@ define Package/ruby-patterns/description
endef
define Package/ruby-powerassert
$(call Package/ruby/Default)
TITLE:=Gem power_assert shipped with Ruby
DEPENDS:=ruby +ruby-ripper
endef
define Package/ruby-powerassert/description
Power Assert gem for Ruby. Power Assert shows each value of variables
and method calls in the expression. It is useful for testing, providing
which value wasn't correct when the condition is not satisfied
endef
define Package/ruby-prettyprint
$(call Package/ruby/Default)
TITLE:=Ruby PrettyPrint librart
@ -616,7 +619,7 @@ endef
define Package/ruby-rdoc
$(call Package/ruby/Default)
TITLE+= (documentation generator)
DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml
DEPENDS:=ruby +ruby-erb +ruby-irb +ruby-json +ruby-racc +ruby-rake +ruby-yaml +ruby-zlib
endef
define Package/ruby-rdoc/description
@ -720,8 +723,8 @@ endef
define Package/ruby-testunit
$(call Package/ruby/Default)
TITLE:=Ruby Test Unit toolkit
DEPENDS:=ruby +ruby-minitest
TITLE:=Gem test-unit shipped with Ruby
DEPENDS:=ruby +ruby-csv +ruby-erb +ruby-optparse +ruby-powerassert +ruby-prettyprint +ruby-rexml +ruby-yaml
endef
define Package/ruby-testunit/description
@ -729,6 +732,17 @@ define Package/ruby-testunit/description
endef
define Package/ruby-unicodenormalize
$(call Package/ruby/Default)
TITLE:=Ruby String additions for Unicode normalization
DEPENDS:=ruby +ruby-enc +ruby-enc-extra
endef
define Package/ruby-unicodenormalize/description
Additions to class String for Unicode normalization
endef
define Package/ruby-uri
$(call Package/ruby/Default)
TITLE:=Ruby library to handle URI
@ -822,6 +836,8 @@ define Package/ruby/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ruby $(1)/usr/lib/ruby/ruby$(PKG_LIBVER)-bin
$(INSTALL_BIN) ./files/ruby $(1)/usr/bin/ruby
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/vendor_ruby/$(PKG_LIBVER)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/* $(1)/usr/lib/ruby/site_ruby/$(PKG_LIBVER)/
sed -i -e "s%@RUBY_LIBPATH@%/usr/lib/ruby/$(PKG_LIBVER)%" $(1)/usr/bin/ruby
sed -i -e "s%@RUBY_BINPATH@%/usr/lib/ruby/ruby$(PKG_LIBVER)-bin%" $(1)/usr/bin/ruby
endef
@ -889,15 +905,6 @@ define Package/ruby-digest/install
) | ( cd $(1); $(TAR) -xf - )
endef
define Package/ruby-dl/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/dl.rb \
usr/lib/ruby/$(PKG_LIBVER)/dl \
usr/lib/ruby/$(PKG_LIBVER)/*/dl.so \
usr/lib/ruby/$(PKG_LIBVER)/*/dl/ \
) | ( cd $(1); $(TAR) -xf - )
endef
define Package/ruby-drb/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/drb.rb \
@ -963,6 +970,10 @@ define Package/ruby-gems/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/ubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
# Remove tests (avoids extra deps)
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/package/tar_test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems/installer_test_case.rb
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rubygems $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
@ -1012,8 +1023,6 @@ define Package/ruby-math/install
usr/lib/ruby/$(PKG_LIBVER)/prime.rb \
usr/lib/ruby/$(PKG_LIBVER)/mathn.rb \
usr/lib/ruby/$(PKG_LIBVER)/cmath.rb \
usr/lib/ruby/$(PKG_LIBVER)/complex.rb \
usr/lib/ruby/$(PKG_LIBVER)/rational.rb \
usr/lib/ruby/$(PKG_LIBVER)/*/mathn \
usr/lib/ruby/$(PKG_LIBVER)/matrix.rb \
usr/lib/ruby/$(PKG_LIBVER)/matrix \
@ -1021,10 +1030,12 @@ define Package/ruby-math/install
endef
define Package/ruby-minitest/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/minitest/ \
usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/minitest-*.gemspec \
) | ( cd $(1); $(TAR) -xf - )
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/minitest-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
# Remove tests (avoids extra deps)
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-*/test
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/minitest-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
endef
define Package/ruby-misc/install
@ -1103,6 +1114,7 @@ endef
define Package/ruby-optparse/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/optparse.rb \
usr/lib/ruby/$(PKG_LIBVER)/optionparser.rb \
usr/lib/ruby/$(PKG_LIBVER)/optparse \
) | ( cd $(1); $(TAR) -xf - )
endef
@ -1115,6 +1127,15 @@ define Package/ruby-patterns/install
) | ( cd $(1); $(TAR) -xf - )
endef
define Package/ruby-powerassert/install
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/power_assert-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
# Remove tests (avoids extra deps)
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-*/test
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/power_assert-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
endef
define Package/ruby-prettyprint/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/pp.rb \
@ -1148,6 +1169,8 @@ define Package/ruby-rake/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rake $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
# Remove tests (avoids extra deps)
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake/runtest.rb
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rake $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
@ -1169,6 +1192,10 @@ define Package/ruby-rdoc/install
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdoc $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ri $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
# Remove tests (avoids extra deps)
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/formatter_test_case.rb
$(RM) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc/markup/text_formatter_test_case.rb
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc.rb $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/rdoc $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
@ -1235,16 +1262,22 @@ define Package/ruby-socket/install
endef
define Package/ruby-testunit/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/testrb $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/ruby/$(PKG_LIBVER)
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/$(PKG_LIBVER)/test $(1)/usr/lib/ruby/$(PKG_LIBVER)/
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications
$(INSTALL_DIR) $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/default/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/test-unit-*.gemspec $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/specifications/
# Remove tests (avoids extra deps)
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/test
$(RM) -rf $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-*/sample
$(CP) $(PKG_INSTALL_DIR)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/test-unit-* $(1)/usr/lib/ruby/gems/$(PKG_LIBVER)/gems/
endef
define Package/ruby-unicodenormalize/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize.rb \
usr/lib/ruby/$(PKG_LIBVER)/unicode_normalize \
) | ( cd $(1); $(TAR) -xf - )
endef
define Package/ruby-uri/install
( cd $(PKG_INSTALL_DIR); $(TAR) -cf - \
usr/lib/ruby/$(PKG_LIBVER)/uri.rb \
@ -1293,7 +1326,6 @@ $(eval $(call BuildPackage,ruby-datetime))
$(eval $(call BuildPackage,ruby-dbm))
$(eval $(call BuildPackage,ruby-debuglib))
$(eval $(call BuildPackage,ruby-digest))
$(eval $(call BuildPackage,ruby-dl))
$(eval $(call BuildPackage,ruby-drb))
$(eval $(call BuildPackage,ruby-enc))
$(eval $(call BuildPackage,ruby-enc-extra))
@ -1316,6 +1348,7 @@ $(eval $(call BuildPackage,ruby-nkf))
$(eval $(call BuildPackage,ruby-openssl))
$(eval $(call BuildPackage,ruby-optparse))
$(eval $(call BuildPackage,ruby-patterns))
$(eval $(call BuildPackage,ruby-powerassert))
$(eval $(call BuildPackage,ruby-prettyprint))
$(eval $(call BuildPackage,ruby-pstore))
$(eval $(call BuildPackage,ruby-psych))
@ -1332,6 +1365,7 @@ $(eval $(call BuildPackage,ruby-sdbm))
$(eval $(call BuildPackage,ruby-shell))
$(eval $(call BuildPackage,ruby-socket))
$(eval $(call BuildPackage,ruby-testunit))
$(eval $(call BuildPackage,ruby-unicodenormalize))
$(eval $(call BuildPackage,ruby-uri))
$(eval $(call BuildPackage,ruby-webrick))
$(eval $(call BuildPackage,ruby-xmlrpc))


+ 4
- 0
lang/ruby/patches/001-rdoc-remove_gems_dep.patch View File

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


+ 0
- 13
lang/ruby/patches/002-minitest-remove_gems_dep.patch View File

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

+ 0
- 12
lang/ruby/patches/003-digest_rmd160_wrong_name_fix.patch View File

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

+ 0
- 117
lang/ruby/patches/004-digest_dont-link-ssl-if-not-needed.patch View File

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

+ 16
- 11
lang/ruby/ruby_find_pkgsdeps View File

@ -24,7 +24,7 @@ require_regex_ignore=/^require ([a-zA-Z\$]|["']$|.*\/$)/
require_ignore=%w{drb/invokemethod16 foo rubygems/defaults/operating_system win32console java Win32API
builder/xchar json/pure simplecov win32/sspi rdoc/markdown/literals_1_8 enumerator win32/resolv rbtree
nqxml/streamingparser nqxml/treeparser xmlscan/parser xmlscan/scanner xmltreebuilder xml/parser xmlparser xml/encoding-ja xmlencoding-ja
iconv uconv}
iconv uconv win32ole gettext/po_parser gettext/mo libxml}
builtin_enc=[
Encoding.find("ASCII-8BIT"),
@ -124,22 +124,23 @@ package_requires = Hash[packages.collect { |pkg| [pkg, package_files[pkg].collec
weak_dependency=Hash.new([])
weak_dependency.merge!({
"ruby-misc"=>["ruby-openssl"], #securerandom.rb
"ruby-misc"=>["ruby-openssl","ruby-fiddle"], #securerandom.rb
"ruby-debuglib"=>["ruby-readline"], #debug.rb
"ruby-drb"=>["ruby-openssl"], #drb/ssl.rb
"ruby-irb"=>["ruby-rdoc", "ruby-readline"], #irb/cmd/help.rb
"ruby-gems"=>["ruby-openssl","ruby-io-console", #rubygems/commands/cert_command.rb rubygems/user_interaction.rb
"ruby-minitest", "ruby-webrick"], #rubygems/test_case.rb rubygems/server.rb
"ruby-gems"=>["ruby-openssl","ruby-io-console","ruby-webrick"], #rubygems/commands/cert_command.rb rubygems/user_interaction.rb rubygems/server.rb
"ruby-mkmf"=>["ruby-webrick"], #un.rb
"ruby-net"=>["ruby-openssl","ruby-io-console","ruby-zlib"], #net/*.rb
"ruby-optparse"=>["ruby-uri","ruby-datetime"], #optparse/date.rb optparse/uri.rb
"ruby-rake"=>["ruby-net","ruby-testunit","ruby-gems"], #rake/contrib/ftptools.rb rake/runtest.rb /usr/bin/rake
"ruby-rdoc"=>["ruby-gems","ruby-readline","ruby-webrick",
"ruby-minitest"], #/usr/bin/rdoc and others
"ruby-testunit"=>["ruby-gems", "ruby-io-console"], #test/unit/parallel.rb test/unit.rb
"ruby-rake"=>["ruby-net","ruby-gems"], #rake/contrib/ftptools.rb /usr/bin/rake
"ruby-rdoc"=>["ruby-gems","ruby-readline","ruby-webrick", #/usr/bin/rdoc and others
"ruby-io-console"], #rdoc/stats/normal.rb
"ruby-webrick"=>["ruby-openssl"], #webrick/ssl.rb
})
puts "Preloading gems..."
Gem::Specification.all.each{ |x| gem x.name }
puts "Looking for package dependencies..."
package_provides = {}
package_dependencies = Hash.new([])
@ -153,7 +154,7 @@ package_requires.each do
else
found = package_files.detect {|(pkg,files)| files.detect {|file| $:.detect {|path| "#{path}/#{require}" == file.gsub(/\.(so|rb)$/,"") } } }
if not found
$stderr.puts "#{pkg}: Nobody provides #{require}"
$stderr.puts "#{pkg}: Nothing provides #{require}"
failed = true
next
end
@ -168,7 +169,11 @@ package_requires.each do
end
end
end
exit(1) if failed
if failed
puts "There is some missing requirements not mapped to files in packages."
puts "Please, fix the missing files or ignore them on require_ignore var"
exit(1)
end
package_dependencies.each do
|(pkg,deps)|
@ -240,7 +245,7 @@ package_dependencies.each do
extra_dep = current_deps - deps
$stderr.puts "Package #{pkg} does not need to depend on #{extra_dep.join(" ")} " if not extra_dep.empty?
missing_dep = deps - current_deps
$stderr.puts "Package #{pkg} need to depend on #{missing_dep.join(" ")} " if not missing_dep.empty?
$stderr.puts "Package #{pkg} needs to depend on #{missing_dep.join(" ")} " if not missing_dep.empty?
if not extra_dep.empty? or not missing_dep.empty?
$stderr.puts "define Package/#{pkg}"


Loading…
Cancel
Save