--- libexif-ruby-0.1.2.orig/extconf.rb +++ libexif-ruby-0.1.2/extconf.rb @@ -5,7 +5,7 @@ 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 --- libexif-ruby-0.1.2.orig/exif.c +++ libexif-ruby-0.1.2/exif.c @@ -7,10 +7,10 @@ *******************************************************************************/ -#include "ruby.h" +#include #include #include -#include +/* #include */ #include #include @@ -62,16 +62,16 @@ { 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 @@ 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 @@ { 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 @@ } 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 @@ 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 @@ "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 @@ 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 @@ 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 @@ 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; } --- libexif-ruby-0.1.2.orig/debian/docs +++ libexif-ruby-0.1.2/debian/docs @@ -0,0 +1,3 @@ +README +exif.rd.en +exif.rd.ja --- libexif-ruby-0.1.2.orig/debian/control +++ libexif-ruby-0.1.2/debian/control @@ -0,0 +1,44 @@ +Source: libexif-ruby +Section: ruby +Priority: optional +Maintainer: Taku YASUI +Build-Depends: debhelper (>= 5.0.0), libexif-dev (>= 0.6.9), ruby1.8-dev, ruby1.8, ruby1.9.1-dev, ruby1.9.1, cdbs +Standards-Version: 3.8.3 + +Package: libexif-ruby1.8 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: libexif-ruby (<< 0.1.2-3) +Replaces: libexif-ruby (<< 0.1.2-3) +Provides: libexif-ruby +Description: EXIF tag parsing Library for ruby1.8 + libexif 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). + . + libexif-ruby provides a simple interface to this library. + +Package: libexif-ruby1.9.1 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: libexif-ruby (<< 0.1.2-3) +Replaces: libexif-ruby (<< 0.1.2-3) +Provides: libexif-ruby +Description: EXIF tag parsing Library for ruby1.9.1 + libexif 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). + . + libexif-ruby provides a simple interface to this library. + +Package: libexif-ruby +Architecture: all +Depends: libexif-ruby1.8, ${misc:Depends} +Description: EXIF tag parsing Library for ruby (dummy package) + libexif 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). + . + libexif-ruby provides a simple interface to this library. + . + This is dummy package for Debian default version of Ruby. --- libexif-ruby-0.1.2.orig/debian/rules +++ libexif-ruby-0.1.2/debian/rules @@ -0,0 +1,24 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/langcore.mk + +CUR_RUBYVER=$(subst libexif-ruby,,$(cdbs_curpkg)) +CUR_PKGDIR=$(CURDIR)/debian/$(cdbs_curpkg) +DEB_OPT_FLAG = -fPIC + +$(patsubst %,makebuilddir/%,$(DEB_ARCH_PACKAGES)):: + mkdir -p build-$(cdbs_curpkg) + cp exif.c extconf.rb build-$(cdbs_curpkg) + +$(patsubst %,configure/%,$(DEB_ARCH_PACKAGES)):: + cd build-$(cdbs_curpkg) && \ + ruby$(CUR_RUBYVER) extconf.rb + +$(patsubst %,build/%,$(DEB_ARCH_PACKAGES)):: + cd build-$(cdbs_curpkg) && \ + $(MAKE) + +$(patsubst %,install/%,$(DEB_ARCH_PACKAGES)):: + cd build-$(cdbs_curpkg) && \ + make install DESTDIR=$(DEB_DESTDIR) sitedir='$$(prefix)/lib/ruby' --- libexif-ruby-0.1.2.orig/debian/exiftest.rb +++ libexif-ruby-0.1.2/debian/exiftest.rb @@ -0,0 +1,14 @@ +#!/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 --- libexif-ruby-0.1.2.orig/debian/changelog +++ libexif-ruby-0.1.2/debian/changelog @@ -0,0 +1,133 @@ +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 + --- libexif-ruby-0.1.2.orig/debian/compat +++ libexif-ruby-0.1.2/debian/compat @@ -0,0 +1 @@ +5 --- libexif-ruby-0.1.2.orig/debian/libexif-ruby1.9.1.install +++ libexif-ruby-0.1.2/debian/libexif-ruby1.9.1.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/ruby/1.9.1/* --- libexif-ruby-0.1.2.orig/debian/libexif-ruby1.8.install +++ libexif-ruby-0.1.2/debian/libexif-ruby1.8.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/ruby/1.8/* --- libexif-ruby-0.1.2.orig/debian/libexif-ruby1.8.examples +++ libexif-ruby-0.1.2/debian/libexif-ruby1.8.examples @@ -0,0 +1 @@ +debian/exiftest.rb --- libexif-ruby-0.1.2.orig/debian/copyright +++ libexif-ruby-0.1.2/debian/copyright @@ -0,0 +1,24 @@ +Format-Specification: + http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=454 +Upstream-Maintainer: 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: Copyright (C) 2002 Ryuichi Tamura (r-tam@fsinet.or.jp) +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'. + +Files: debian/* +Copyright: Copyright (C) 2005-2009 Taku YASUI +License: LGPL-2+ + On Debian GNU/Linux systems, the complete text of the GNU Lesser General + Public License can be found in `/usr/share/common-licenses/LGPL'. --- libexif-ruby-0.1.2.orig/debian/libexif-ruby1.9.1.examples +++ libexif-ruby-0.1.2/debian/libexif-ruby1.9.1.examples @@ -0,0 +1 @@ +debian/exiftest.rb