summaryrefslogtreecommitdiff
path: root/archivers/ruby-zip
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-10-06 12:27:24 +0000
committertaca <taca@pkgsrc.org>2010-10-06 12:27:24 +0000
commit6ee15abe7878496e4274fdb1e557e7f16e78f9a2 (patch)
tree5e410ca2d2baa73d1b4ef325c1764bf4d3ad3152 /archivers/ruby-zip
parent03951426d5ee496f7a357380ab1b7425cd72bc52 (diff)
downloadpkgsrc-6ee15abe7878496e4274fdb1e557e7f16e78f9a2.tar.gz
Add fix for Ruby 1.9 from http://gist.github.com/611956.
Bump PKGREVISION.
Diffstat (limited to 'archivers/ruby-zip')
-rw-r--r--archivers/ruby-zip/Makefile3
-rw-r--r--archivers/ruby-zip/distinfo4
-rw-r--r--archivers/ruby-zip/patches/patch-aa17
-rw-r--r--archivers/ruby-zip/patches/patch-ab24
4 files changed, 46 insertions, 2 deletions
diff --git a/archivers/ruby-zip/Makefile b/archivers/ruby-zip/Makefile
index bb1e78f5506..25f59d342e1 100644
--- a/archivers/ruby-zip/Makefile
+++ b/archivers/ruby-zip/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2010/09/10 03:59:20 taca Exp $
+# $NetBSD: Makefile,v 1.6 2010/10/06 12:27:24 taca Exp $
DISTNAME= rubyzip-0.9.4
PKGNAME= ${RUBY_PKGPREFIX}-${DISTNAME:S/ruby//}
+PKGREVISION= 1
CATEGORIES= archivers
MAINTAINER= minskim@NetBSD.org
diff --git a/archivers/ruby-zip/distinfo b/archivers/ruby-zip/distinfo
index 4bb94ad99f4..b2b5cdb84b5 100644
--- a/archivers/ruby-zip/distinfo
+++ b/archivers/ruby-zip/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.4 2010/09/10 03:59:20 taca Exp $
+$NetBSD: distinfo,v 1.5 2010/10/06 12:27:24 taca Exp $
SHA1 (rubyzip-0.9.4.gem) = ac20083eef1903cc5e4044ebb1ea3aad39a49e4a
RMD160 (rubyzip-0.9.4.gem) = b6b46d44d20bb26562e39d114191f6334ea707a0
Size (rubyzip-0.9.4.gem) = 66048 bytes
+SHA1 (patch-aa) = cf4a2adb1af57fdcb579ce2c32223bf30ca23504
+SHA1 (patch-ab) = 1de9812d6ec77594d0ee83b6aad94ec7346bfd94
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
+