From 6ee15abe7878496e4274fdb1e557e7f16e78f9a2 Mon Sep 17 00:00:00 2001 From: taca Date: Wed, 6 Oct 2010 12:27:24 +0000 Subject: Add fix for Ruby 1.9 from http://gist.github.com/611956. Bump PKGREVISION. --- archivers/ruby-zip/Makefile | 3 ++- archivers/ruby-zip/distinfo | 4 +++- archivers/ruby-zip/patches/patch-aa | 17 +++++++++++++++++ archivers/ruby-zip/patches/patch-ab | 24 ++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 archivers/ruby-zip/patches/patch-aa create mode 100644 archivers/ruby-zip/patches/patch-ab 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 + -- cgit v1.2.3