debian/0000755000000000000000000000000012265523570007175 5ustar debian/ruby-exif.lintian-overrides0000644000000000000000000000007612256544242014471 0ustar # no upstream homepage available ruby-exif: no-homepage-field debian/exiftest.rb0000644000000000000000000000035112133037655011352 0ustar #!/usr/bin/ruby require 'exif' if ARGV.size < 1 STDERR.puts "Usage: #{$0} filename [filenames...]" exit 0 end ARGV.each do |f| exif = Exif.new(f) puts "#{f}:" exif.each_entry { |a,b| printf "TAG %-40.40s %s\n",a,b } end debian/copyright0000644000000000000000000000173712256544242011137 0ustar Formatn: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Ryuichi Tamura Upstream-Source: http://raa.ruby-lang.org/project/ruby-libexif/ Upstream-Name: ruby-libexif Disclaimer: Real upstream webpage is http://tam.0xfa.com/ruby-libexif/ but no longer exists since 2009-04-19. Files: * Copyright: 2002 Ryuichi Tamura License: LGPL-2+ Files: debian/* Copyright: 2005-2009 Taku YASUI 2013 Jonas Genannt License: LGPL-2+ License: LGPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-2'. debian/rules0000755000000000000000000000071012256544242010252 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=debian/exif.gemspec %: dh $@ --buildsystem=ruby --with ruby debian/source/0000755000000000000000000000000012256544242010474 5ustar debian/source/format0000644000000000000000000000001412256544242011702 0ustar 3.0 (quilt) debian/source/lintian-overrides0000644000000000000000000000012012256544242014046 0ustar # no upstream homepage available ruby-exif source: debian-watch-file-is-missing debian/exif.gemspec0000644000000000000000000000053012256544242011472 0ustar Gem::Specification.new do |spec| spec.name = "exif" spec.version = "0.1.2" spec.author = "Ryuichi Tamura" spec.email = "r-tam@fsinet.or.jp" spec.description = %q{Ruby library for EXIF tag parsing} spec.summary = %q{Ruby library for EXIF tag parsing} spec.homepage = "" spec.license = "LGPL-2+" s.extension = "extconf.rb" end debian/control0000644000000000000000000000167412265523570010610 0ustar Source: ruby-exif Section: ruby Priority: extra Maintainer: Debian Ruby Extras Maintainers Uploaders: Taku YASUI , Paul van Tilburg Build-Depends: debhelper (>= 7.0.50~), libexif-dev (>= 0.6.9), gem2deb (>= 0.3.0~) Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-exif.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-exif.git;a=summary XS-Ruby-Versions: all Package: ruby-exif Architecture: any XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter Description: Ruby library for EXIF tag parsing ruby-exif is a library for parsing, editing, and saving EXIF data. You can retrieve useful information from EXIF tags contained in images created by recording equipments(for example, digital camera). . ruby-exif provides a simple interface to this library. debian/ruby-exif.examples0000644000000000000000000000002312133037655012640 0ustar debian/exiftest.rb debian/changelog0000644000000000000000000001260512265523570011053 0ustar ruby-exif (0.1.2-21) unstable; urgency=low * Team upload. [ Cédric Boutillier ] * use canonical URI in Vcs-* fields [ Jonas Genannt ] * change package to gem2deb helper (Closes: #733106) - bumped compat level to 7 - bumped standards version to 3.9.5 (no changes needed) - changed source format to quilt 3.0 - removed transitional packages - added patch from debian diff file with DEP3 header * added lintian override - watch file / homepage), because no upstream homepage is available * d/copyright - added myself to copyright - update to format 1.0 * added gemspec file -- Jonas Genannt Thu, 19 Dec 2013 18:03:10 +0100 ruby-exif (0.1.2-20) unstable; urgency=low * debian/control: added a missing depend on ruby | ruby-interpreter as per Debian policy. -- Paul van Tilburg Tue, 29 May 2012 21:25:42 +0200 ruby-exif (0.1.2-19) unstable; urgency=low * debian/control: added myself to uploaders. * debian/rules: install to /usr/lib/ruby/vendor_ruby as per Debian Ruby policy. -- Paul van Tilburg Fri, 11 May 2012 22:49:58 +0200 ruby-exif (0.1.2-18) unstable; urgency=low * Change Maintainer to Debian Ruby Extras Maintainers -- Taku YASUI Sat, 14 Apr 2012 10:35:25 +0900 ruby-exif (0.1.2-17) unstable; urgency=low * Ruby package transition - Change package name from libexif-ruby to ruby-exif * Move repository to git.debian.org - git://git.debian.org/pkg-ruby-extras/ruby-exif.git -- Taku YASUI Tue, 10 Apr 2012 02:54:02 +0900 libexif-ruby (0.1.2-16) unstable; urgency=low * Bump Standards-Version to 3.9.3 * Move repository to svn.debian.org - svn://svn.debian.org/svn/collab-maint/deb-maint/libexif-ruby -- Taku YASUI Tue, 27 Mar 2012 00:39:46 +0900 libexif-ruby (0.1.2-15) unstable; urgency=low * Add ruby-1.9.1 support instead of ruby-1.9 (closes: #565828) * New Standards-Version: 3.8.3 -- Taku YASUI Sat, 23 Jan 2010 16:29:08 +0900 libexif-ruby (0.1.2-14) unstable; urgency=low * Change Section: ruby * Change maintainer email address: tach@debian.org * New debhelper compat version: 5 * New Standards-Version: 3.8.1 * New style debian/copyright format http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=454 -- Taku YASUI Sun, 19 Apr 2009 08:22:02 +0900 libexif-ruby (0.1.2-13) unstable; urgency=low * Fix typo in package description * New Standards-Version: 3.8.0 -- Taku YASUI Fri, 20 Feb 2009 02:58:22 +0900 libexif-ruby (0.1.2-12) unstable; urgency=low * Add sample script (closes: #420494) -- Taku YASUI Wed, 30 Jan 2008 01:28:02 +0900 libexif-ruby (0.1.2-11) unstable; urgency=low * Add libexif-ruby1.9 for Ruby 1.9 * Fix exif.c for Ruby 1.9 -- Taku YASUI Sat, 26 Jan 2008 07:32:40 +0900 libexif-ruby (0.1.2-10) unstable; urgency=low * Fix: FTBFS at amd64 architecture (compile with -fPIC) (closes: #424857) -- Taku YASUI Fri, 18 May 2007 01:47:57 +0900 libexif-ruby (0.1.2-9) unstable; urgency=low * Fix to build twice (closes: #424518) * The download site has been closed and I cannot find the new site. Add that to copyright file (closes: #420493) -- Taku YASUI Thu, 17 May 2007 04:03:48 +0900 libexif-ruby (0.1.2-8) unstable; urgency=low * Apply NMU patch (closes: #381278, #366567) * Use cdbs for build -- Taku YASUI Mon, 7 Aug 2006 01:46:02 +0900 libexif-ruby (0.1.2-7.1) unstable; urgency=low * Non-maintainer upload * Do not build Module for soon-to-be-obsolete ruby1.6 (Closes: #366567) -- Michael Ablassmeier Thu, 3 Aug 2006 13:20:10 +0200 libexif-ruby (0.1.2-7) unstable; urgency=low * Build for libexif12 -- Taku YASUI Mon, 18 Jul 2005 05:50:52 +0900 libexif-ruby (0.1.2-6) unstable; urgency=low * Add version dependency to Build-Deps: for libexif-dev -- Taku YASUI Tue, 13 Jul 2004 16:39:48 +0900 libexif-ruby (0.1.2-5) unstable; urgency=low * Rebuild for new libexif - fix for new exif_entry_get_value() args (closes: #258762) * Remove Suggests: of libexif-ruby package because it needs only Depends: -- Taku YASUI Tue, 13 Jul 2004 01:10:46 +0900 libexif-ruby (0.1.2-4) unstable; urgency=low * Make compliant with new Debian Ruby Policy -- Taku YASUI Sun, 21 Sep 2003 00:44:07 +0900 libexif-ruby (0.1.2-3) unstable; urgency=low * Make compliant with Debian Ruby Policy -- Taku YASUI Wed, 10 Sep 2003 15:26:05 +0900 libexif-ruby (0.1.2-2) unstable; urgency=low * Rebuild with new libexif (closes: #204738) -- Taku YASUI Fri, 22 Aug 2003 01:49:22 +0900 libexif-ruby (0.1.2-1) unstable; urgency=low * New upstream release (closes: #182377) -- Taku YASUI Tue, 25 Feb 2003 11:45:38 +0900 libexif-ruby (0.1.1-1) unstable; urgency=low * New upstream release * Initial Upload to Debian Official Archive. (closes: #168379) -- Taku YASUI Sun, 24 Nov 2002 23:48:53 +0900 libexif-ruby (0.1-1) unstable; urgency=low * Initial Release. -- Taku YASUI Sat, 9 Nov 2002 10:23:44 +0900 debian/compat0000644000000000000000000000000212256544242010372 0ustar 7 debian/ruby-exif.docs0000644000000000000000000000003512133037655011755 0ustar README exif.rd.en exif.rd.ja debian/patches/0000755000000000000000000000000012256544242010623 5ustar debian/patches/series0000644000000000000000000000001712256544242012036 0ustar ruby_191.patch debian/patches/ruby_191.patch0000644000000000000000000001212012256544242013213 0ustar Description: Ruby1.9.1 support Author: Taku YASUI diff --git a/extconf.rb b/extconf.rb index 9269679..437f85d 100644 --- a/extconf.rb +++ b/extconf.rb @@ -5,7 +5,7 @@ dir_config("exif", "/usr/local/include", "/usr/local/lib") def have_libexif_header have_header('libexif/exif-ifd.h') and have_header('libexif/exif-data.h') and - have_header('libexif/exif-note.h') and +# have_header('libexif/exif-note.h') and have_header('libexif/exif-utils.h') and have_header('libexif/exif-tag.h') end diff --git a/exif.c b/exif.c index af4d82d..b1f5a71 100644 --- a/exif.c +++ b/exif.c @@ -7,10 +7,10 @@ vim:sts=4:ts=4:sw=4 *******************************************************************************/ -#include "ruby.h" +#include #include #include -#include +/* #include */ #include #include @@ -62,16 +62,16 @@ rb_exif_data_new_from_file(VALUE fpath) { ExifData *data; Check_Type(fpath, T_STRING); - data = exif_data_new_from_file(RSTRING(fpath)->ptr); + data = exif_data_new_from_file(RSTRING_PTR(fpath)); if (!data){ FILE *f; - f = fopen(RSTRING(fpath)->ptr,"rb"); + f = fopen(RSTRING_PTR(fpath),"rb"); if (!f) rb_raise(rb_eArgError, "unable to open file - '%s'", - RSTRING(fpath)->ptr); + RSTRING_PTR(fpath)); fclose(f); rb_raise(eExifInvalidFormat, - "'%s' does not contain EXIF data", RSTRING(fpath)->ptr); + "'%s' does not contain EXIF data", RSTRING_PTR(fpath)); } return data; } @@ -100,7 +100,7 @@ rb_exif_data_new_from_data(ExifData *ed, VALUE str) exif_data_free(ed); ed = NULL; } - ed = exif_data_new_from_data((unsigned char *)RSTRING(str)->ptr, RSTRING(str)->len); + ed = exif_data_new_from_data((unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str)); } static VALUE @@ -134,11 +134,12 @@ rb_exif_yield_tag_value(ExifEntry *entry, void *data) { VALUE k, v; char buf[7]; + char value[1024]; unsigned char *ids = data; memset(buf, 0, sizeof(buf)); sprintf(buf, "0x%04x", entry->tag); k = *ids ? rb_str_new2(buf) : rb_str_new2(exif_tag_get_title(entry->tag)); - v = rb_str_new2(exif_entry_get_value(entry)); + v = rb_str_new2(exif_entry_get_value(entry, value, sizeof(value))); rb_yield(rb_assoc_new(k, v)); } @@ -179,9 +180,9 @@ rb_exif_set_ifd(VALUE obj, VALUE ifd) } break; case T_STRING: - i = exif_ifd_from_string(RSTRING(ifd)->ptr); + i = exif_ifd_from_string(RSTRING_PTR(ifd)); if (i == -1){ - rb_raise(rb_eRuntimeError, "unknown IFD: '%s'", RSTRING(ifd)->ptr); + rb_raise(rb_eRuntimeError, "unknown IFD: '%s'", RSTRING_PTR(ifd)); } break; default: @@ -215,13 +216,14 @@ rb_exif_get_tag(VALUE obj, VALUE tagid) ExifEntry *e; const char *found; int i; + char value[1024]; Get_Exif(obj, exif); switch (TYPE(tagid)) { case T_STRING: - tag = exif_tag_from_string(RSTRING(tagid)->ptr); + tag = exif_tag_from_string(RSTRING_PTR(tagid)); if (!tag){ - rb_raise(eExifError, "invalid tag: '%s'", RSTRING(tagid)->ptr); + rb_raise(eExifError, "invalid tag: '%s'", RSTRING_PTR(tagid)); } break; case T_FIXNUM: @@ -241,14 +243,14 @@ rb_exif_get_tag(VALUE obj, VALUE tagid) "IFD '%s' does not contain tag '%s'(0x%04x)", exif_ifd_get_name(exif->ifd), exif_tag_get_title(tag), tag); } - return rb_str_new2(exif_entry_get_value(e)); + return rb_str_new2(exif_entry_get_value(e, value, sizeof(value))); } for (i = 0; i < EXIF_IFD_COUNT; i++){ e = exif_content_get_entry(exif->ed->ifd[i], tag); if (e) break; } - found = exif_entry_get_value(e); + found = exif_entry_get_value(e, value, sizeof(value)); return found ? rb_str_new2(found) : Qnil; } @@ -272,9 +274,9 @@ rb_exif_set_tag(VALUE obj, VALUE tagid, VALUE val) Check_Type(tagid, T_STRING); Check_Type(val, T_STRING); Get_Exif(obj, exif); - tag = exif_tag_from_string(RSTRING(tagid)->ptr); + tag = exif_tag_from_string(RSTRING_PTR(tagid)); if (!tag || !exif_tag_get_name(tag)){ - rb_raise(eExifError, "invalid tag: '%s'", RSTRING(tagid)->ptr); + rb_raise(eExifError, "invalid tag: '%s'", RSTRING_PTR(tagid)); } e = exif_content_get_entry(exif->ed->ifd[exif->ifd], tag); if (!e){ @@ -326,9 +328,9 @@ rb_exif_s_get_tag_description(VALUE klass, VALUE tagid) FIX2INT(tagid), FIX2INT(tagid)); break; case T_STRING: - tag = exif_tag_from_string(RSTRING(tagid)->ptr); + tag = exif_tag_from_string(RSTRING_PTR(tagid)); if (!tag || !exif_tag_get_name(tag)) { - rb_raise(eExifError, "invalid tag: '%s'", RSTRING(tagid)->ptr); + rb_raise(eExifError, "invalid tag: '%s'", RSTRING_PTR(tagid)); } break; default: @@ -366,9 +368,9 @@ rb_exif_set_thumbnail(VALUE obj, VALUE src) exif->ed->size = 0; } Check_Type(src, T_STRING); - exif->ed->size = RSTRING(src)->len; + exif->ed->size = RSTRING_LEN(src); exif->ed->data = xmalloc(sizeof(char)*exif->ed->size); - MEMMOVE(exif->ed->data, RSTRING(src)->ptr, char, exif->ed->size); + MEMMOVE(exif->ed->data, RSTRING_PTR(src), char, exif->ed->size); return obj; }