debian/0002775000000000000000000000000011750265146007201 5ustar debian/copyright0000664000000000000000000000566211747777655011166 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Name: imagesize Source: http://raa.ruby-lang.org/list.rhtml?name=image_size Files: * Copyright: Keisuke Minami License: 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. Files: debian/* Copyright: 2012 License: GPL2 On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. debian/watch0000664000000000000000000000014711747777655010255 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/imagesize .*/imagesize-(.*).tar.gz debian/patches/0002775000000000000000000000000011750265145010627 5ustar debian/patches/create-missing-ppm-for-test0000664000000000000000000002752711747777655016056 0ustar --- /dev/null +++ b/test/ppm.ppm @@ -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 debian/patches/series0000664000000000000000000000013211747777655012062 0ustar comapt-ruby1.9 change-require-statements-using-relative-paths create-missing-ppm-for-test debian/patches/comapt-ruby1.90000664000000000000000000000372211747777655013272 0ustar --- a/lib/image_size.rb +++ b/lib/image_size.rb @@ -44,16 +44,20 @@ class ImageSize @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 @@ class ImageSize 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 @@ class ImageSize 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 @@ class ImageSize 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 debian/patches/change-require-statements-using-relative-paths0000664000000000000000000000037411747777655021735 0ustar --- a/test/test_image_size.rb +++ b/test/test_image_size.rb @@ -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 debian/rules0000775000000000000000000000072011747777655010301 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby --with quilt debian/ruby-imagesize.docs0000664000000000000000000000004411747777655013026 0ustar # FIXME: READMEs found # README.txt debian/control0000664000000000000000000000335411750265012010577 0ustar Source: ruby-imagesize Section: ruby Priority: extra Maintainer: Tatsuki Sugiura Uploaders: Taku YASUI DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.13~), quilt Standards-Version: 3.9.3 #Vcs-Git: git://git.debian.org/pkg-ruby-extras/ruby-imagesize.git #Vcs-Browser: http://git.debian.org/?p=pkg-ruby-extras/ruby-imagesize.git;a=summary Homepage: http://rubyforge.org/projects/imagesize/ XS-Ruby-Versions: all Package: ruby-imagesize Architecture: all Provides: libimage-size-ruby, libimage-size-ruby1.8, libimage-size-ruby1.9.1 Breaks: libimage-size-ruby (<< 1:0.1.1-5~), libimage-size-ruby1.8 (<< 1:0.1.1-5~), libimage-size-ruby1.9.1 (<< 1:0.1.1-5~) Replaces: libimage-size-ruby (<< 1:0.1.1-5~), libimage-size-ruby1.8 (<< 1:0.1.1-5~), libimage-size-ruby1.9.1 (<< 1:0.1.1-5~) XB-Ruby-Versions: ${ruby:Versions} Depends: ${misc:Depends}, ruby | ruby-interpreter 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.8 Architecture: all Section: oldlibs Priority: extra Depends: ${misc:Depends}, ruby-imagesize Description: Transitional package for ruby-imagesize This is a transitional package to ease upgrades to the ruby-imagesize package. It can safely be removed. Package: libimage-size-ruby1.9.1 Architecture: all Section: oldlibs Priority: extra Depends: ${misc:Depends}, ruby-imagesize Description: Transitional package for ruby-imagesize This is a transitional package to ease upgrades to the ruby-imagesize package. It can safely be removed. debian/changelog0000664000000000000000000000360211747777655011075 0ustar ruby-imagesize (1:0.1.1-5) unstable; urgency=low * Rename package to ruby-imagesize. * Transition to gem2deb packaging. * Transition to 3.0 quilt format from dpatch. * Transition to dehelper 8 from cdbs. -- Tatsuki Sugiura Mon, 30 Apr 2012 19:03:26 +0900 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 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 Thu, 18 Feb 2010 17:05:53 +0900 libimage-size-ruby (1:0.1.1-3) unstable; urgency=low * ruby1.9 support -- Tatsuki Sugiura 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 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 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 Thu, 3 Aug 2006 13:56:47 +0200 libimage-size-ruby (20040618-1) unstable; urgency=low * New upstream release -- Tatsuki Sugiura Sat, 19 Jun 2004 19:26:13 +0900 libimage-size-ruby (20030420-1) unstable; urgency=low * Initial Release. -- Tatsuki Sugiura Thu, 25 Dec 2003 05:26:22 +0900 debian/ruby-test-files.yaml0000664000000000000000000000006511747777655013145 0ustar --- - test/test_helper.rb - test/test_image_size.rb debian/source/0002775000000000000000000000000011750265145010500 5ustar debian/source/format0000664000000000000000000000001411747777655011730 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000211747777655010420 0ustar 7