You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.5 KiB

  1. --- ruby-2.1.2/ext/digest/md5/extconf.rb 2012-11-26 22:58:52.000000000 -0200
  2. +++ ruby-2.1.2/ext/digest/md5/extconf.rb 2014-09-16 19:25:21.120457409 -0300
  3. @@ -9,14 +9,21 @@
  4. $objs = [ "md5init.#{$OBJEXT}" ]
  5. -dir_config("openssl")
  6. -pkg_config("openssl")
  7. -require File.expand_path('../../../openssl/deprecation', __FILE__)
  8. +if !with_config("bundled-md5")
  9. + dir_config("openssl")
  10. + pkg_config("openssl")
  11. + require File.expand_path('../../../openssl/deprecation', __FILE__)
  12. + if have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
  13. + $use_bundled=false
  14. + else
  15. + $use_bundled=true
  16. + end
  17. +else
  18. + $use_bundled=true
  19. +end
  20. -if !with_config("bundled-md5") &&
  21. - have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
  22. +if !$use_bundled
  23. $objs << "md5ossl.#{$OBJEXT}"
  24. -
  25. else
  26. $objs << "md5.#{$OBJEXT}"
  27. end
  28. --- ruby-2.1.2/ext/digest/rmd160/extconf.rb 2012-11-26 22:58:52.000000000 -0200
  29. +++ ruby-2.1.2/ext/digest/rmd160/extconf.rb 2014-09-16 19:29:11.425628541 -0300
  30. @@ -9,12 +9,20 @@
  31. $objs = [ "rmd160init.#{$OBJEXT}" ]
  32. -dir_config("openssl")
  33. -pkg_config("openssl")
  34. -require File.expand_path('../../../openssl/deprecation', __FILE__)
  35. +if !with_config("bundled-rmd160")
  36. + dir_config("openssl")
  37. + pkg_config("openssl")
  38. + require File.expand_path('../../../openssl/deprecation', __FILE__)
  39. + if have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
  40. + $use_bundled=false
  41. + else
  42. + $use_bundled=true
  43. + end
  44. +else
  45. + $use_bundled=true
  46. +end
  47. -if !with_config("bundled-rmd160") &&
  48. - have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
  49. +if !$use_bundled
  50. $objs << "rmd160ossl.#{$OBJEXT}"
  51. else
  52. $objs << "rmd160.#{$OBJEXT}"
  53. --- ruby-2.1.2/ext/digest/sha1/extconf.rb 2012-11-26 22:58:52.000000000 -0200
  54. +++ ruby-2.1.2/ext/digest/sha1/extconf.rb 2014-09-16 19:30:09.359168494 -0300
  55. @@ -9,12 +9,20 @@
  56. $objs = [ "sha1init.#{$OBJEXT}" ]
  57. -dir_config("openssl")
  58. -pkg_config("openssl")
  59. -require File.expand_path('../../../openssl/deprecation', __FILE__)
  60. +if !with_config("bundled-sha1")
  61. + dir_config("openssl")
  62. + pkg_config("openssl")
  63. + require File.expand_path('../../../openssl/deprecation', __FILE__)
  64. + if have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
  65. + $use_bundled=false
  66. + else
  67. + $use_bundled=true
  68. + end
  69. +else
  70. + $use_bundled=true
  71. +end
  72. -if !with_config("bundled-sha1") &&
  73. - have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
  74. +if !$use_bundled
  75. $objs << "sha1ossl.#{$OBJEXT}"
  76. else
  77. $objs << "sha1.#{$OBJEXT}"
  78. --- ruby-2.1.2/ext/digest/sha2/extconf.rb 2012-11-26 22:58:52.000000000 -0200
  79. +++ ruby-2.1.2/ext/digest/sha2/extconf.rb 2014-09-16 19:31:31.833513570 -0300
  80. @@ -9,14 +9,22 @@
  81. $objs = [ "sha2init.#{$OBJEXT}" ]
  82. -dir_config("openssl")
  83. -pkg_config("openssl")
  84. -require File.expand_path('../../../openssl/deprecation', __FILE__)
  85. -
  86. -if !with_config("bundled-sha2") &&
  87. - have_library("crypto") &&
  88. +if !with_config("bundled-sha2")
  89. + dir_config("openssl")
  90. + pkg_config("openssl")
  91. + require File.expand_path('../../../openssl/deprecation', __FILE__)
  92. + if have_library("crypto") &&
  93. %w[SHA256 SHA512].all? {|d| OpenSSL.check_func("#{d}_Transform", "openssl/sha.h")} &&
  94. %w[SHA256 SHA512].all? {|d| have_type("#{d}_CTX", "openssl/sha.h")}
  95. + $use_bundled=false
  96. + else
  97. + $use_bundled=true
  98. + end
  99. +else
  100. + $use_bundled=true
  101. +end
  102. +
  103. +if !$use_bundled
  104. $objs << "sha2ossl.#{$OBJEXT}"
  105. $defs << "-DSHA2_USE_OPENSSL"
  106. else