[前][次][番号順一覧][スレッド一覧]

ruby-changes:35720

From: nobu <ko1@a...>
Date: Sun, 5 Oct 2014 11:04:10 +0900 (JST)
Subject: [ruby-changes:35720] nobu:r47802 (trunk): digest/*/extconf.rb: do not link openssl when using bundled

nobu	2014-10-05 11:03:55 +0900 (Sun, 05 Oct 2014)

  New Revision: 47802

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47802

  Log:
    digest/*/extconf.rb: do not link openssl when using bundled
    
    * ext/digest/{md5,rmd160,sha1,sha2}/extconf.rb: configure OpenSSL
      only if bundled libraries is not used, so that OpenSSL is not
      linked unnecessarily.  [ruby-core:65404] [Bug #10324]

  Modified files:
    trunk/ChangeLog
    trunk/ext/digest/md5/extconf.rb
    trunk/ext/digest/rmd160/extconf.rb
    trunk/ext/digest/sha1/extconf.rb
    trunk/ext/digest/sha2/extconf.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47801)
+++ ChangeLog	(revision 47802)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Oct  5 11:04:13 2014  Luiz Angelo Daros de Luca  <luizluca@g...>
+
+	* ext/digest/{md5,rmd160,sha1,sha2}/extconf.rb: configure OpenSSL
+	  only if bundled libraries is not used, so that OpenSSL is not
+	  linked unnecessarily.  [ruby-core:65404] [Bug #10324]
+
 Sun Oct  5 10:39:11 2014  Luiz Angelo Daros de Luca  <luizluca@g...>
 
 	* ext/digest/rmd160/extconf.rb: fix transform function name to
Index: ext/digest/md5/extconf.rb
===================================================================
--- ext/digest/md5/extconf.rb	(revision 47801)
+++ ext/digest/md5/extconf.rb	(revision 47802)
@@ -9,14 +9,13 @@ $INCFLAGS << " -I$(srcdir)/.." https://github.com/ruby/ruby/blob/trunk/ext/digest/md5/extconf.rb#L9
 
 $objs = [ "md5init.#{$OBJEXT}" ]
 
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
-
 if !with_config("bundled-md5") &&
-    have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
+    (dir_config("openssl")
+     pkg_config("openssl")
+     require File.expand_path('../../../openssl/deprecation', __FILE__)
+     have_library("crypto")) &&
+    OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
   $objs << "md5ossl.#{$OBJEXT}"
-
 else
   $objs << "md5.#{$OBJEXT}"
 end
Index: ext/digest/rmd160/extconf.rb
===================================================================
--- ext/digest/rmd160/extconf.rb	(revision 47801)
+++ ext/digest/rmd160/extconf.rb	(revision 47802)
@@ -9,12 +9,12 @@ $INCFLAGS << " -I$(srcdir)/.." https://github.com/ruby/ruby/blob/trunk/ext/digest/rmd160/extconf.rb#L9
 
 $objs = [ "rmd160init.#{$OBJEXT}" ]
 
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
-
 if !with_config("bundled-rmd160") &&
-    have_library("crypto") && OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
+    (dir_config("openssl")
+     pkg_config("openssl")
+     require File.expand_path('../../../openssl/deprecation', __FILE__)
+     have_library("crypto")) &&
+    OpenSSL.check_func("RIPEMD160_Transform", "openssl/ripemd.h")
   $objs << "rmd160ossl.#{$OBJEXT}"
 else
   $objs << "rmd160.#{$OBJEXT}"
Index: ext/digest/sha1/extconf.rb
===================================================================
--- ext/digest/sha1/extconf.rb	(revision 47801)
+++ ext/digest/sha1/extconf.rb	(revision 47802)
@@ -9,12 +9,12 @@ $INCFLAGS << " -I$(srcdir)/.." https://github.com/ruby/ruby/blob/trunk/ext/digest/sha1/extconf.rb#L9
 
 $objs = [ "sha1init.#{$OBJEXT}" ]
 
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
-
 if !with_config("bundled-sha1") &&
-    have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
+    (dir_config("openssl")
+     pkg_config("openssl")
+     require File.expand_path('../../../openssl/deprecation', __FILE__)
+     have_library("crypto")) &&
+    OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
   $objs << "sha1ossl.#{$OBJEXT}"
 else
   $objs << "sha1.#{$OBJEXT}"
Index: ext/digest/sha2/extconf.rb
===================================================================
--- ext/digest/sha2/extconf.rb	(revision 47801)
+++ ext/digest/sha2/extconf.rb	(revision 47802)
@@ -9,12 +9,11 @@ $INCFLAGS << " -I$(srcdir)/.." https://github.com/ruby/ruby/blob/trunk/ext/digest/sha2/extconf.rb#L9
 
 $objs = [ "sha2init.#{$OBJEXT}" ]
 
-dir_config("openssl")
-pkg_config("openssl")
-require File.expand_path('../../../openssl/deprecation', __FILE__)
-
 if !with_config("bundled-sha2") &&
-    have_library("crypto") &&
+    (dir_config("openssl")
+     pkg_config("openssl")
+     require File.expand_path('../../../openssl/deprecation', __FILE__)
+     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")}
   $objs << "sha2ossl.#{$OBJEXT}"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]