ruby-changes:46327
From: nobu <ko1@a...>
Date: Sat, 22 Apr 2017 09:27:19 +0900 (JST)
Subject: [ruby-changes:46327] nobu:r58441 (trunk): Add sha512
nobu 2017-04-22 09:27:14 +0900 (Sat, 22 Apr 2017) New Revision: 58441 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58441 Log: Add sha512 Modified files: trunk/ext/fiddle/extlibs trunk/tool/extlibs.rb Index: ext/fiddle/extlibs =================================================================== --- ext/fiddle/extlibs (revision 58440) +++ ext/fiddle/extlibs (revision 58441) @@ -1,2 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extlibs#L1 -ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz md5:83b89587607e3eb65c70d361f13bab43 +ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz \ + md5:83b89587607e3eb65c70d361f13bab43 \ + sha512:980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 \ + # win32/libffi-3.2.1-mswin.patch -p0 Index: tool/extlibs.rb =================================================================== --- tool/extlibs.rb (revision 58440) +++ tool/extlibs.rb (revision 58441) @@ -142,16 +142,24 @@ class ExtLibs https://github.com/ruby/ruby/blob/trunk/tool/extlibs.rb#L142 end extracted = false dest = File.dirname(list) + url = chksums = nil IO.foreach(list) do |line| line.sub!(/\s*#.*/, '') - if /^\t/ =~ line + if chksums + chksums.concat(line.split) + elsif /^\t/ =~ line if extracted and (mode == :all or mode == :patch) patch, *args = line.split do_patch(dest, patch, args) end next + else + url, *chksums = line.split(' ') + end + if chksums.last == '\\' + chksums.pop + next end - url, *chksums = line.split(' ') next unless url begin extracted = do_command(mode, dest, url, cache_dir, chksums) @@ -159,6 +167,7 @@ class ExtLibs https://github.com/ruby/ruby/blob/trunk/tool/extlibs.rb#L167 warn e.inspect success = false end + url = chksums = nil end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/