libimage-size-ruby (1:0.1.1-4.1) debian-dir only changes

Summary

 debian/README.source                                                    |   38 +++++
 debian/changelog                                                        |   55 +++++++
 debian/compat                                                           |    1 
 debian/control                                                          |   30 ++++
 debian/copyright                                                        |   69 ++++++++++
 debian/dirs                                                             |    1 
 debian/docs                                                             |    1 
 debian/libimage-size-ruby1.8.docs                                       |    1 
 debian/libimage-size-ruby1.9.1.docs                                     |    1 
 debian/patches/00list                                                   |    3 
 debian/patches/10_change-require-statements-using-relative-paths.dpatch |   17 ++
 debian/patches/10_comapt-ruby1.9.dpatch                                 |   59 ++++++++
 debian/patches/10_missing-ppm-test.dpatch                               |   17 ++
 debian/rules                                                            |   23 +++
 debian/watch                                                            |    8 +
 15 files changed, 324 insertions(+)

    
download this patch

Patch contents

--- libimage-size-ruby-0.1.1.orig/debian/libimage-size-ruby1.8.docs
+++ libimage-size-ruby-0.1.1/debian/libimage-size-ruby1.8.docs
@@ -0,0 +1 @@
+README.txt
--- libimage-size-ruby-0.1.1.orig/debian/copyright
+++ libimage-size-ruby-0.1.1/debian/copyright
@@ -0,0 +1,69 @@
+This package was debianized by Tatsuki Sugiura <sugi@nemui.org> on
+Thu, 25 Dec 2003 05:26:22 +0900.
+
+It was downloaded from http://raa.ruby-lang.org/list.rhtml?name=image_size
+
+Upstream Author: Keisuke Minami <keisuke@rccn.com>
+
+Copyright: Ruby's
+
+---------------------------------------------------------------------------
+You can redistribute it and/or modify it under either the terms of the GPL
+(see COPYING file), or the conditions below:
+
+  1. You may make and give away verbatim copies of the source form of the
+     software without restriction, provided that you duplicate all of the
+     original copyright notices and associated disclaimers.
+
+  2. You may modify your copy of the software in any way, provided that
+     you do at least ONE of the following:
+
+       a) place your modifications in the Public Domain or otherwise
+          make them Freely Available, such as by posting said
+	  modifications to Usenet or an equivalent medium, or by allowing
+	  the author to include your modifications in the software.
+
+       b) use the modified software only within your corporation or
+          organization.
+
+       c) rename any non-standard executables so the names do not conflict
+	  with standard executables, which must also be provided.
+
+       d) make other distribution arrangements with the author.
+
+  3. You may distribute the software in object code or executable
+     form, provided that you do at least ONE of the following:
+
+       a) distribute the executables and library files of the software,
+	  together with instructions (in the manual page or equivalent)
+	  on where to get the original distribution.
+
+       b) accompany the distribution with the machine-readable source of
+	  the software.
+
+       c) give non-standard executables non-standard names, with
+          instructions on where to get the original software distribution.
+
+       d) make other distribution arrangements with the author.
+
+  4. You may modify and include the part of the software into any other
+     software (possibly commercial).  But some files in the distribution
+     are not written by the author, so that they are not under this terms.
+     They are gc.c(partly), utils.c(partly), regex.[ch], fnmatch.[ch],
+     glob.c, st.[ch] and some files under the ./missing directory.  See
+     each file for the copying condition.
+
+  5. The scripts and library files supplied as input to or produced as 
+     output from the software do not automatically fall under the
+     copyright of the software, but belong to whomever generated them, 
+     and may be sold commercially, and may be aggregated with this
+     software.
+
+  6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+     IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+     WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+     PURPOSE.
+
+-- 
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
--- libimage-size-ruby-0.1.1.orig/debian/compat
+++ libimage-size-ruby-0.1.1/debian/compat
@@ -0,0 +1 @@
+5
--- libimage-size-ruby-0.1.1.orig/debian/dirs
+++ libimage-size-ruby-0.1.1/debian/dirs
@@ -0,0 +1 @@
+usr/lib/ruby
--- libimage-size-ruby-0.1.1.orig/debian/rules
+++ libimage-size-ruby-0.1.1/debian/rules
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/dpatch.mk
+
+TARGETDIR=$(CURDIR)/debian/$(cdbs_curpkg)
+CUR_RUBYVER=$(lastword $(subst -ruby, ,$(cdbs_curpkg)))
+RBCONFIG=ruby -rrbconfig -e 'print RbConfig::CONFIG[ARGV[0]]'
+
+$(patsubst %,build/%,$(DEB_ALL_PACKAGES))::
+	ruby$(CUR_RUBYVER) -I lib test/test_image_size.rb
+
+$(patsubst %,install/%,$(DEB_ALL_PACKAGES))::
+	#mkdir -p $(TARGETDIR)/usr/lib/ruby/$(CUR_RUBYVER)
+	#cp -a lib/* $(TARGETDIR)/usr/lib/ruby/$(CUR_RUBYVER)
+	rm -f .config
+	ruby$(CUR_RUBYVER) setup.rb config \
+		--siterubyver='$$prefix'/lib/ruby/$(CUR_RUBYVER)
+	ruby$(CUR_RUBYVER) setup.rb setup
+	ruby$(CUR_RUBYVER) setup.rb install \
+		--prefix=$(TARGETDIR)
+
+clean::
+	rm -f .config InstalledFiles
--- libimage-size-ruby-0.1.1.orig/debian/watch
+++ libimage-size-ruby-0.1.1/debian/watch
@@ -0,0 +1,8 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# Site		Directory		Pattern			Version	Script
+version=2
+http://rubyforge.org/frs/?group_id=3460 \
+	.*/?imagesize-([\d.]+)\.tgz \
+	debian	uupdate
--- libimage-size-ruby-0.1.1.orig/debian/control
+++ libimage-size-ruby-0.1.1/debian/control
@@ -0,0 +1,30 @@
+Source: libimage-size-ruby
+Section: ruby
+Priority: optional
+Maintainer: Tatsuki Sugiura <sugi@nemui.org>
+Build-Depends: debhelper (>= 5.0.0), cdbs, dpatch, ruby1.8, ruby1.9.1
+Standards-Version: 3.9.1
+Uploaders: Taku YASUI <tach@debian.or.jp>
+Homepage: http://rubyforge.org/projects/imagesize/
+
+Package: libimage-size-ruby1.8
+Provides: libimage-size-ruby
+Architecture: all
+Depends: ${misc:Depends}, libruby1.8
+Description: ruby extension to measure image (GIF, PNG, JPEG ,,, etc) size
+ Pure ruby library to measure size of images.
+ You can get size information for many types of image easily.
+ .
+ Supported types:
+   PCX, PSD, XPM, TIFF, XBM, PGM, PBM, PPM, BMP, JPEG, PNG, GIF, SWF
+
+Package: libimage-size-ruby1.9.1
+Provides: libimage-size-ruby
+Architecture: all
+Depends: ${misc:Depends}, libruby1.9.1
+Description: ruby extension to measure image (GIF, PNG, JPEG ,,, etc) size
+ Pure ruby library to measure size of images.
+ You can get size information for many types of image easily.
+ .
+ Supported types:
+   PCX, PSD, XPM, TIFF, XBM, PGM, PBM, PPM, BMP, JPEG, PNG, GIF, SWF
--- libimage-size-ruby-0.1.1.orig/debian/changelog
+++ libimage-size-ruby-0.1.1/debian/changelog
@@ -0,0 +1,55 @@
+libimage-size-ruby (1:0.1.1-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix build problem with ruby1.9.2 (Closes: #593035)
+  * Bump Standards-Version to 3.9.1.
+    (clean files: .config, InstalledFiles)
+
+ -- Laurent Arnoud <laurent@spkdev.net>  Sat, 25 Sep 2010 18:04:57 +0200
+
+libimage-size-ruby (1:0.1.1-4) unstable; urgency=medium
+
+  * ruby1.9.1 transition.
+
+ -- Tatsuki Sugiura <sugi@nemui.org>  Thu, 18 Feb 2010 17:05:53 +0900
+
+libimage-size-ruby (1:0.1.1-3) unstable; urgency=low
+
+  * ruby1.9 support
+
+ -- Tatsuki Sugiura <sugi@nemui.org>  Sun, 04 Jan 2009 01:16:28 +0900
+
+libimage-size-ruby (1:0.1.1-2) unstable; urgency=low
+
+  * Fix build problem (add ruby1.8 to build-depends) (Closes: #441085)
+
+ -- Tatsuki Sugiura <sugi@nemui.org>  Sat, 25 Aug 2007 15:46:28 +0900
+
+libimage-size-ruby (1:0.1.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Add little detailed description.. (Closes: #383280)
+  * NMU pachtch was merged to stop make ruby1.6 lib.
+    Thanks Michael Ablassmeier (Closes: #381285)
+
+ -- Tatsuki Sugiura <sugi@nemui.org>  Sat, 25 Aug 2007 12:48:17 +0900
+
+libimage-size-ruby (20040618-1.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Stop building packages for soon-to-be-obsolete ruby1.6 (Closes: #366571)
+
+ -- Michael Ablassmeier <abi@debian.org>  Thu,  3 Aug 2006 13:56:47 +0200
+
+libimage-size-ruby (20040618-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Tatsuki Sugiura <sugi@nemui.org>  Sat, 19 Jun 2004 19:26:13 +0900
+
+libimage-size-ruby (20030420-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Tatsuki Sugiura <sugi@nemui.org>  Thu, 25 Dec 2003 05:26:22 +0900
+
--- libimage-size-ruby-0.1.1.orig/debian/docs
+++ libimage-size-ruby-0.1.1/debian/docs
@@ -0,0 +1 @@
+README.txt
--- libimage-size-ruby-0.1.1.orig/debian/libimage-size-ruby1.9.1.docs
+++ libimage-size-ruby-0.1.1/debian/libimage-size-ruby1.9.1.docs
@@ -0,0 +1 @@
+README.txt
--- libimage-size-ruby-0.1.1.orig/debian/README.source
+++ libimage-size-ruby-0.1.1/debian/README.source
@@ -0,0 +1,38 @@
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To get the fully patched source after unpacking the source package, cd
+to the root level of the source package and run:
+
+    debian/rules patch
+
+Removing a patch is as simple as removing its entry from the
+debian/patches/00list file, and please also remove the patch file
+itself.
+
+Creating a new patch is done with "dpatch-edit-patch patch XX_patchname"
+where you should replace XX with a new number and patchname with a
+descriptive shortname of the patch. You can then simply edit all the
+files your patch wants to edit, and then simply "exit 0" from the shell
+to actually create the patch file.
+
+To tweak an already existing patch, call "dpatch-edit-patch XX_patchname"
+and replace XX_patchname with the actual filename from debian/patches
+you want to use.
+
+To clean up afterwards again, "debian/rules unpatch" will do the
+work for you - or you can of course choose to call
+"fakeroot debian/rules clean" all together.
+
+
+--- 
+
+this documentation is part of dpatch package, and may be used by
+packages using dpatch to comply with policy on README.source. This
+documentation is meant to be useful to users who are not proficient in
+dpatch in doing work with dpatch-based packages. Please send any
+improvements to the BTS of dpatch package.
+
+original text by Gerfried Fuchs, edited by Junichi Uekawa <dancer@debian.org>
+10 Aug 2008.
--- libimage-size-ruby-0.1.1.orig/debian/patches/10_missing-ppm-test.dpatch
+++ libimage-size-ruby-0.1.1/debian/patches/10_missing-ppm-test.dpatch
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_missing-ppm-test.dpatch by  <sugi@nemui.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add missing test/ppm.ppm file.
+
+@DPATCH@
+diff -urNad libimage-size-ruby~/test/ppm.ppm libimage-size-ruby/test/ppm.ppm
+--- libimage-size-ruby~/test/ppm.ppm	1970-01-01 09:00:00.000000000 +0900
++++ libimage-size-ruby/test/ppm.ppm	2009-01-04 01:11:07.948209743 +0900
+@@ -0,0 +1,5 @@
++P6
++#Created with The GIMP
++80 50
++255
++??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]?]?]?]?]?9??????????????]?]?]?]?]?]?r???????????U??]?]??????????U??]?]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]?U??U??U??9??]?o??????????]?o?U??U??U??o?]?U????????U??]?]??????????U??]?]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]?????????????U??]?r????????]?U??????????????o?]???????U??]?]??????????]?]?]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????]?o???????]?U?????????????????]?r?????U??]?]??????????]?]?]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????]?]???????]?U?????????????????]?U?????U??]?]?U????????]?U??]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????]?o???????]?U?????????????????]?r?????U??]?U??U????????]????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????]?U????????]?U??????????????9??]???????U??]?U??]????U??]????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]??????????r??]?]??????????]?9???????????9??]?9????????U??]????]????U??U?????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]?]?]?]?]?o?????????????]?]?]?]?]?]?9???????????U??]????]????]?U?????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?9??????????????????????????U??]????]????]???????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?U??????????????????????????U??]????]?]?]???????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?U??????????????????????????U??]????U??]?]???????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?U??????????????????????????U??]????U??]?]???????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?U??????????????????????????U??]???????]?9????????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?U??????????????????????????U??]???????]?U????????]???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????]?]????????????????????????????]?U??????????????????????????U??]???????]??????????]?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
+\ No newline at end of file
--- libimage-size-ruby-0.1.1.orig/debian/patches/10_change-require-statements-using-relative-paths.dpatch
+++ libimage-size-ruby-0.1.1/debian/patches/10_change-require-statements-using-relative-paths.dpatch
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_change-require-statements-using-relative-paths.dpatch
+## by Laurent Arnoud <laurent@spkdev.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change require statements using relative paths for Ruby 1.9.2
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' libimage-size-ruby-0.1.1~/test/test_image_size.rb libimage-size-ruby-0.1.1/test/test_image_size.rb
+--- libimage-size-ruby-0.1.1~/test/test_image_size.rb	2007-04-19 14:34:43.000000000 +0000
++++ libimage-size-ruby-0.1.1/test/test_image_size.rb	2010-09-25 16:16:04.369258208 +0000
+@@ -1,4 +1,4 @@
+-require File.dirname(__FILE__) + '/test_helper.rb'
++require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper'))
+
+ class TestImageSize < Test::Unit::TestCase
+
--- libimage-size-ruby-0.1.1.orig/debian/patches/10_comapt-ruby1.9.dpatch
+++ libimage-size-ruby-0.1.1/debian/patches/10_comapt-ruby1.9.dpatch
@@ -0,0 +1,59 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_comapt-ruby1.9.dpatch by  <sugi@nemui.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fixes to compat with ruby 1.9.
+
+@DPATCH@
+diff -urNad libimage-size-ruby~/lib/image_size.rb libimage-size-ruby/lib/image_size.rb
+--- libimage-size-ruby~/lib/image_size.rb	2009-01-04 01:07:03.000000000 +0900
++++ libimage-size-ruby/lib/image_size.rb	2009-01-04 01:08:56.000000000 +0900
+@@ -44,16 +44,20 @@
+     @img_type   = nil
+ 
+     if @img_data.is_a?(IO)
++      RUBY_VERSION >= '1.9.0' and @img_data.set_encoding('ascii-8bit')
+       img_top = @img_data.read(1024)
+       img_io = def_read_o(@img_data)
+     elsif @img_data.is_a?(StringIO)
++      RUBY_VERSION >= '1.9.1' and @img_data.set_encoding('ascii-8bit')
+       img_top = @img_data.read(1024)
+       img_io = def_read_o(@img_data)
+     elsif @img_data.is_a?(String)
+-      img_top = @img_data[0, 1024]
+ #      img_io = StringIO.open(@img_data){|sio| io = def_read_o(sio); io }
+-      img_io = StringIO.open(@img_data)
++      img_io = StringIO.open(@img_data, 'r:ascii-8bit')
+       img_io = def_read_o(img_io)
++      img_top = img_io.read(1024)
++      img_io.rewind
++      RUBY_VERSION > '1.8.999' && RUBY_VERSION < '1.9.1' and img_top.force_encoding('ascii-8bit')
+     else
+       raise "argument class error!! #{img_data.type}"
+     end
+@@ -115,6 +119,7 @@
+       self.seek(offset, 0) if offset
+       ret = self.read(length)
+       raise "cannot read!!" unless ret
++      RUBY_VERSION >= '1.9.0' and ret.force_encoding('ascii-8bit')
+       ret
+     end
+     io
+@@ -132,7 +137,7 @@
+     elsif img_top =~ /\/\* XPM \*\//                 then Type::XPM
+     elsif img_top[0, 4] == "8BPS"                    then Type::PSD
+     elsif img_top[1, 2] == "WS"                      then Type::SWF
+-    elsif img_top[0] == 10                           then Type::PCX
++    elsif img_top[0, 1] == "\x0a"                    then Type::PCX
+     else Type::OTHER
+     end
+   end
+@@ -271,7 +276,7 @@
+       raise("This file is not SWF.")
+     end
+ 
+-    bit_length = Integer("0b#{header.unpack('@8B5')}")
++    bit_length = Integer("0b#{header.unpack('@8B5').join('')}")
+     header << img_io.read_o(bit_length*4/8+1)
+     str = header.unpack("@8B#{5+bit_length*4}")[0]
+     last = 5
--- libimage-size-ruby-0.1.1.orig/debian/patches/00list
+++ libimage-size-ruby-0.1.1/debian/patches/00list
@@ -0,0 +1,3 @@
+10_comapt-ruby1.9.dpatch
+10_missing-ppm-test.dpatch
+10_change-require-statements-using-relative-paths.dpatch