diff --git a/ext/fiddle/extlibs b/ext/fiddle/extlibs index 7d5fda5247..92025952da 100644 --- a/ext/fiddle/extlibs +++ b/ext/fiddle/extlibs @@ -1,2 +1,5 @@ -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 diff --git a/tool/extlibs.rb b/tool/extlibs.rb index d59a139b0f..10609ebb16 100755 --- a/tool/extlibs.rb +++ b/tool/extlibs.rb @@ -142,16 +142,24 @@ class ExtLibs 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 warn e.inspect success = false end + url = chksums = nil end end end