diff options
author | taca <taca@pkgsrc.org> | 2010-10-06 12:27:24 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2010-10-06 12:27:24 +0000 |
commit | 6ee15abe7878496e4274fdb1e557e7f16e78f9a2 (patch) | |
tree | 5e410ca2d2baa73d1b4ef325c1764bf4d3ad3152 /archivers/ruby-zip/patches | |
parent | 03951426d5ee496f7a357380ab1b7425cd72bc52 (diff) | |
download | pkgsrc-6ee15abe7878496e4274fdb1e557e7f16e78f9a2.tar.gz |
Add fix for Ruby 1.9 from http://gist.github.com/611956.
Bump PKGREVISION.
Diffstat (limited to 'archivers/ruby-zip/patches')
-rw-r--r-- | archivers/ruby-zip/patches/patch-aa | 17 | ||||
-rw-r--r-- | archivers/ruby-zip/patches/patch-ab | 24 |
2 files changed, 41 insertions, 0 deletions
diff --git a/archivers/ruby-zip/patches/patch-aa b/archivers/ruby-zip/patches/patch-aa new file mode 100644 index 00000000000..ecf9c13e78f --- /dev/null +++ b/archivers/ruby-zip/patches/patch-aa @@ -0,0 +1,17 @@ +$NetBSD: patch-aa,v 1.1 2010/10/06 12:27:25 taca Exp $ + +* Fix for Ruby 1.9 from http://gist.github.com/611956. + +--- lib/zip/stdrubyext.rb.orig 2010-10-06 01:16:09.000000000 +0000 ++++ lib/zip/stdrubyext.rb +@@ -48,6 +48,10 @@ class String #:nodoc:all + def lchop + slice(1, length) + end ++ ++ if "".respond_to?(:bytesize) ++ alias :bytesize :size ++ end + end + + class Time #:nodoc:all diff --git a/archivers/ruby-zip/patches/patch-ab b/archivers/ruby-zip/patches/patch-ab new file mode 100644 index 00000000000..9e5aebc177e --- /dev/null +++ b/archivers/ruby-zip/patches/patch-ab @@ -0,0 +1,24 @@ +$NetBSD: patch-ab,v 1.1 2010/10/06 12:27:25 taca Exp $ + +* Fix for Ruby 1.9 from http://gist.github.com/611956. + +--- lib/zip/zip.rb.orig 2010-10-06 01:16:09.000000000 +0000 ++++ lib/zip/zip.rb +@@ -1080,7 +1080,7 @@ module Zip + def << (data) + val = data.to_s + @crc = Zlib::crc32(val, @crc) +- @size += val.size ++ @size += val.bytesize + @outputStream << val + end + +@@ -1109,7 +1109,7 @@ module Zip + def << (data) + val = data.to_s + @crc = Zlib::crc32(val, @crc) +- @size += val.size ++ @size += val.bytesize + @outputStream << @zlibDeflater.deflate(data) + end + |