Hello community, here is the log from the commit of package libgexiv2 for openSUSE:Factory checked in at Thu May 5 10:30:48 CEST 2011.
-------- --- GNOME/libgexiv2/libgexiv2.changes 2011-01-07 18:07:20.000000000 +0100 +++ /mounts/work_src_done/STABLE/libgexiv2/libgexiv2.changes 2011-04-28 16:31:02.000000000 +0200 @@ -1,0 +2,10 @@ +Thu Apr 28 15:58:50 UTC 2011 - [email protected] + +- Update to version 0.3.1: + + All debug and log messages from Exiv2 are now routed through + GLib's logging functions. +- Changes from version 0.3.0: + + Updated to work with Exiv2 0.21, which has an ABI/API change + from 0.20. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- libgexiv2-0.2.2.tar.bz2 New: ---- libgexiv2-0.3.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgexiv2.spec ++++++ --- /var/tmp/diff_new_pack.aoJnUJ/_old 2011-05-05 10:28:09.000000000 +0200 +++ /var/tmp/diff_new_pack.aoJnUJ/_new 2011-05-05 10:28:09.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package libgexiv2 (Version 0.2.2) +# spec file for package libgexiv2 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -18,7 +18,7 @@ Name: libgexiv2 -Version: 0.2.2 +Version: 0.3.1 Release: 1 License: GPLv2+ Summary: A GObject-based Exiv2 wrapper ++++++ libgexiv2-0.2.2.tar.bz2 -> libgexiv2-0.3.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/INSTALLING new/libgexiv2-0.3.1/INSTALLING --- old/libgexiv2-0.2.2/INSTALLING 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/INSTALLING 2011-03-23 00:33:47.000000000 +0100 @@ -16,5 +16,5 @@ if installing to system directories. - Copyright 2010 Yorba Foundation + Copyright 2011 Yorba Foundation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/Makefile new/libgexiv2-0.3.1/Makefile --- old/libgexiv2-0.2.2/Makefile 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/Makefile 2011-03-23 00:33:47.000000000 +0100 @@ -1,5 +1,5 @@ PKGNAME = gexiv2 -VERSION = 0.2.2 +VERSION = 0.3.1 LIBRARY = lib$(PKGNAME) LIBRARY_BIN = $(LIBRARY).la @@ -13,21 +13,6 @@ BUILD_DIR=gexiv2 LIB=lib -UNAME := $(shell uname) -SYSTEM := $(UNAME:MINGW32_%=MinGW) - -ifeq "$(SYSTEM)" "Linux" - LINUX = 1 -endif - -ifeq "$(SYSTEM)" "MinGW" - WINDOWS = 1 -endif - -ifeq "$(SYSTEM)" "Darwin" - MAC = 1 -endif - -include configure.mk SRC_FILES = \ @@ -38,7 +23,8 @@ gexiv2-metadata-xmp.cpp \ gexiv2-stream-io.cpp \ gexiv2-preview-properties.cpp \ - gexiv2-preview-image.cpp + gexiv2-preview-image.cpp \ + gexiv2-log.cpp HEADER_FILES = \ gexiv2.h \ @@ -49,14 +35,17 @@ gexiv2-preview-properties.h \ gexiv2-preview-properties-private.h \ gexiv2-preview-image.h \ - gexiv2-preview-image-private.h + gexiv2-preview-image-private.h \ + gexiv2-log.h \ + gexiv2-log-private.h INSTALLED_HEADER_FILES = \ gexiv2.h \ gexiv2-metadata.h \ gexiv2-managed-stream.h \ gexiv2-preview-properties.h \ - gexiv2-preview-image.h + gexiv2-preview-image.h \ + gexiv2-log.h EXT_PKGS = \ gobject-2.0 \ @@ -64,7 +53,7 @@ exiv2 EXT_PKG_VERSIONS = \ - exiv2 >= 0.19 + exiv2 >= 0.21 VAPI_INPUT = \ gexiv2.deps \ @@ -118,7 +107,8 @@ rm -f $(VAPI_GENERATED_FILES) rm -f $(PC_FILE) -dist: $(DIST_FILES) +.PHONY: dist +dist: mkdir -p $(LIBRARY)-$(VERSION) cp --parents $(DIST_FILES) $(LIBRARY)-$(VERSION) tar --bzip2 -cvf $(DIST_TAR_BZ2) $(LIBRARY)-$(VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/NEWS new/libgexiv2-0.3.1/NEWS --- old/libgexiv2-0.2.2/NEWS 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/NEWS 2011-03-23 00:33:47.000000000 +0100 @@ -1,3 +1,15 @@ +gexiv2 0.3.1 - 22 March 2011 +---------------------------- + + * All debug and log messages from Exiv2 are now routed through GLib's logging functions. + + +gexiv2 0.3.0 - 10 January 2011 +------------------------------ + + * Updated to work with Exiv2 0.21, which has an ABI change from 0.20. + + gexiv2 0.2.2 - 23 December 2010 ------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/README new/libgexiv2-0.3.1/README --- old/libgexiv2-0.2.2/README 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/README 2011-03-23 00:33:47.000000000 +0100 @@ -27,5 +27,5 @@ - Copyright 2010 Yorba Foundation + Copyright 2011 Yorba Foundation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/THANKS new/libgexiv2-0.3.1/THANKS --- old/libgexiv2-0.2.2/THANKS 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/THANKS 2011-03-23 00:33:47.000000000 +0100 @@ -2,5 +2,6 @@ Robert Ancell <[email protected]> Dan Callaghan <[email protected]> +Alexandre Rostovtsev <[email protected]> Ankur Sinha <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/configure new/libgexiv2-0.3.1/configure --- old/libgexiv2-0.2.2/configure 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/configure 2011-03-23 00:33:47.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/bash # -# Copyright 2010 Yorba Foundation +# Copyright 2011 Yorba Foundation # # This software is licensed under the GNU LGPL (version 2.1 or later). # See the COPYING file in this distribution. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2/gexiv2-log-private.h new/libgexiv2-0.3.1/gexiv2/gexiv2-log-private.h --- old/libgexiv2-0.2.2/gexiv2/gexiv2-log-private.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2/gexiv2-log-private.h 2011-03-23 00:33:47.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * gexiv2-log-private.h + * + * Author(s) + * Jim Nelson <[email protected]> + * + * This is free software. See COPYING for details. + */ + +#ifndef __GEXIV2_LOG_PRIVATE_H__ +#define __GEXIV2_LOG_PRIVATE_H__ + +#include <gexiv2/gexiv2-log.h> +#include <exiv2/error.hpp> + +G_BEGIN_DECLS + +gboolean gexiv2_log_is_handler_installed(void); + +G_END_DECLS + +#endif /* __GEXIV2_LOG_PRIVATE_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2/gexiv2-log.cpp new/libgexiv2-0.3.1/gexiv2/gexiv2-log.cpp --- old/libgexiv2-0.2.2/gexiv2/gexiv2-log.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2/gexiv2-log.cpp 2011-03-23 00:33:47.000000000 +0100 @@ -0,0 +1,124 @@ +/* + * gexiv2-log.cpp + * + * Author(s) + * Jim Nelson <[email protected]> + * + * This is free software. See COPYING for details. + */ + +#include "gexiv2-log-private.h" + +G_BEGIN_DECLS + +static GExiv2LogHandler installed_handler = NULL; + +static GExiv2LogLevel exiv2_level_to_gexiv2_level(Exiv2::LogMsg::Level level) { + switch (level) { + case Exiv2::LogMsg::debug: + return GEXIV2_LOG_LEVEL_DEBUG; + + case Exiv2::LogMsg::info: + return GEXIV2_LOG_LEVEL_INFO; + + case Exiv2::LogMsg::warn: + return GEXIV2_LOG_LEVEL_WARN; + + case Exiv2::LogMsg::error: + return GEXIV2_LOG_LEVEL_ERROR; + + case Exiv2::LogMsg::mute: + default: + return GEXIV2_LOG_LEVEL_MUTE; + } +} + +static Exiv2::LogMsg::Level gexiv2_level_to_exiv2_level(GExiv2LogLevel level) { + switch (level) { + case GEXIV2_LOG_LEVEL_DEBUG: + return Exiv2::LogMsg::debug; + + case GEXIV2_LOG_LEVEL_INFO: + return Exiv2::LogMsg::info; + + case GEXIV2_LOG_LEVEL_WARN: + return Exiv2::LogMsg::warn; + + case GEXIV2_LOG_LEVEL_ERROR: + return Exiv2::LogMsg::error; + + case GEXIV2_LOG_LEVEL_MUTE: + default: + return Exiv2::LogMsg::mute; + } +} + +static void log_handler_converter(int level, const char *msg) { + if (installed_handler != NULL) + installed_handler(exiv2_level_to_gexiv2_level((Exiv2::LogMsg::Level) level), msg); + else + Exiv2::LogMsg::defaultHandler(level, msg); +} + +static void default_log_handler(GExiv2LogLevel level, const gchar *msg) { + Exiv2::LogMsg::defaultHandler(gexiv2_level_to_exiv2_level(level), msg); +} + +static void glib_log_handler(GExiv2LogLevel level, const gchar *msg) { + switch (level) { + case GEXIV2_LOG_LEVEL_DEBUG: + g_debug("%s", msg); + break; + + case GEXIV2_LOG_LEVEL_INFO: + g_message("%s", msg); + break; + + case GEXIV2_LOG_LEVEL_WARN: + g_warning("%s", msg); + break; + + case GEXIV2_LOG_LEVEL_ERROR: + g_critical("%s", msg); + break; + + case GEXIV2_LOG_LEVEL_MUTE: + default: + // do nothing + break; + } +} + +GExiv2LogLevel gexiv2_log_get_level(void) { + return exiv2_level_to_gexiv2_level(Exiv2::LogMsg::level()); +} + +void gexiv2_log_set_level(GExiv2LogLevel level) { + Exiv2::LogMsg::setLevel(gexiv2_level_to_exiv2_level(level)); +} + +GExiv2LogHandler gexiv2_log_get_handler(void) { + return (installed_handler != NULL) ? installed_handler : default_log_handler; +} + +GExiv2LogHandler gexiv2_log_get_default_handler(void) { + return default_log_handler; +} + +void gexiv2_log_set_handler(GExiv2LogHandler handler) { + g_return_if_fail(handler != NULL); + + installed_handler = handler; + Exiv2::LogMsg::setHandler(log_handler_converter); +} + +void gexiv2_log_use_glib_logging(void) { + gexiv2_log_set_handler(glib_log_handler); +} + +gboolean gexiv2_log_is_handler_installed(void) { + return (installed_handler != NULL); +} + +G_END_DECLS + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2/gexiv2-log.h new/libgexiv2-0.3.1/gexiv2/gexiv2-log.h --- old/libgexiv2-0.2.2/gexiv2/gexiv2-log.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2/gexiv2-log.h 2011-03-23 00:33:47.000000000 +0100 @@ -0,0 +1,36 @@ +/* + * gexiv2-log.h + * + * Author(s) + * Jim Nelson <[email protected]> + * + * This is free software. See COPYING for details. + */ + +#ifndef __GEXIV2_LOG_H__ +#define __GEXIV2_LOG_H__ + +#include <glib.h> + +G_BEGIN_DECLS + +typedef enum { + GEXIV2_LOG_LEVEL_DEBUG = 0, + GEXIV2_LOG_LEVEL_INFO = 1, + GEXIV2_LOG_LEVEL_WARN = 2, + GEXIV2_LOG_LEVEL_ERROR = 3, + GEXIV2_LOG_LEVEL_MUTE = 4 +} GExiv2LogLevel; + +typedef void (*GExiv2LogHandler)(GExiv2LogLevel level, const gchar *msg); + +GExiv2LogLevel gexiv2_log_get_level(void); +void gexiv2_log_set_level(GExiv2LogLevel level); +GExiv2LogHandler gexiv2_log_get_handler(void); +GExiv2LogHandler gexiv2_log_get_default_handler(void); +void gexiv2_log_set_handler(GExiv2LogHandler handler); +void gexiv2_log_use_glib_logging(void); + +G_END_DECLS + +#endif /* __GEXIV2_LOG_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2/gexiv2-metadata-exif.cpp new/libgexiv2-0.3.1/gexiv2/gexiv2-metadata-exif.cpp --- old/libgexiv2-0.2.2/gexiv2/gexiv2-metadata-exif.cpp 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2/gexiv2-metadata-exif.cpp 2011-03-23 00:33:47.000000000 +0100 @@ -248,10 +248,9 @@ const gchar* gexiv2_metadata_get_exif_tag_label (const gchar* tag) { g_return_val_if_fail(tag != NULL, NULL); - Exiv2::ExifKey key(tag); - try { - return Exiv2::ExifTags::tagLabel (key.tag (), key.ifdId ()); + Exiv2::ExifKey key(tag); + return g_intern_string(key.tagLabel().c_str()); } catch (Exiv2::Error& e) { LOG_ERROR(e); } @@ -262,10 +261,9 @@ const gchar* gexiv2_metadata_get_exif_tag_description (const gchar* tag) { g_return_val_if_fail(tag != NULL, NULL); - Exiv2::ExifKey key(tag); - try { - return Exiv2::ExifTags::tagDesc (key.tag (), key.ifdId ()); + Exiv2::ExifKey key(tag); + return g_intern_string(key.tagDesc().c_str()); } catch (Exiv2::Error& e) { LOG_ERROR(e); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2/gexiv2-metadata.cpp new/libgexiv2-0.3.1/gexiv2/gexiv2-metadata.cpp --- old/libgexiv2-0.2.2/gexiv2/gexiv2-metadata.cpp 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2/gexiv2-metadata.cpp 2011-03-23 00:33:47.000000000 +0100 @@ -16,6 +16,8 @@ #include "gexiv2-preview-properties-private.h" #include "gexiv2-preview-image.h" #include "gexiv2-preview-image-private.h" +#include "gexiv2-log.h" +#include "gexiv2-log-private.h" #include <string> #include <glib-object.h> #include <gio/gio.h> @@ -49,6 +51,15 @@ self->priv->pixel_height = -1; /* the others are static members and need not to be initialized */ + + /* install GLib logging in place of Exiv2's default (where everything is dumped to stderr) + but only if the user hasn't beaten us to the punch + + if user wants old behavior they should code this: + gexiv2_log_set_handler(gexiv2_log_get_default_handler()); + */ + if (!gexiv2_log_is_handler_installed()) + gexiv2_log_use_glib_logging(); } static void gexiv2_metadata_class_init (GExiv2MetadataClass *klass) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2/gexiv2.h new/libgexiv2-0.3.1/gexiv2/gexiv2.h --- old/libgexiv2-0.2.2/gexiv2/gexiv2.h 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2/gexiv2.h 2011-03-23 00:33:47.000000000 +0100 @@ -14,5 +14,6 @@ #include <gexiv2/gexiv2-managed-stream.h> #include <gexiv2/gexiv2-preview-properties.h> #include <gexiv2/gexiv2-preview-image.h> +#include <gexiv2/gexiv2-log.h> #endif /* __GEXIV2_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/gexiv2.vapi new/libgexiv2-0.3.1/gexiv2.vapi --- old/libgexiv2-0.2.2/gexiv2.vapi 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/gexiv2.vapi 2011-03-23 00:33:47.000000000 +0100 @@ -173,6 +173,14 @@ public uint32 get_size (); public uint32 get_width (); } + [CCode (cprefix = "GEXIV2_LOG_LEVEL_", has_type_id = false, cheader_filename = "gexiv2/gexiv2.h")] + public enum LogLevel { + DEBUG, + INFO, + WARN, + ERROR, + MUTE + } [CCode (cprefix = "GEXIV2_ORIENTATION_", has_type_id = false, cheader_filename = "gexiv2/gexiv2.h")] public enum Orientation { MIN, @@ -194,6 +202,8 @@ End } [CCode (cheader_filename = "gexiv2/gexiv2.h", has_target = false)] + public delegate void LogHandler (GExiv2.LogLevel level, string msg); + [CCode (cheader_filename = "gexiv2/gexiv2.h", has_target = false)] public delegate bool Stream_CanRead (void* handle); [CCode (cheader_filename = "gexiv2/gexiv2.h", has_target = false)] public delegate bool Stream_CanSeek (void* handle); @@ -211,4 +221,16 @@ public delegate void Stream_Seek (void* handle, int64 offset, GExiv2.WrapperSeekOrigin origin); [CCode (cheader_filename = "gexiv2/gexiv2.h", has_target = false)] public delegate void Stream_Write (void* handle, void* buffer, int32 offset, int32 count); + [CCode (cheader_filename = "gexiv2/gexiv2.h")] + public static unowned GExiv2.LogHandler log_get_default_handler (); + [CCode (cheader_filename = "gexiv2/gexiv2.h")] + public static unowned GExiv2.LogHandler log_get_handler (); + [CCode (cheader_filename = "gexiv2/gexiv2.h")] + public static GExiv2.LogLevel log_get_level (); + [CCode (cheader_filename = "gexiv2/gexiv2.h")] + public static void log_set_handler (GExiv2.LogHandler handler); + [CCode (cheader_filename = "gexiv2/gexiv2.h")] + public static void log_set_level (GExiv2.LogLevel level); + [CCode (cheader_filename = "gexiv2/gexiv2.h")] + public static void log_use_glib_logging (); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libgexiv2-0.2.2/vapi/gexiv2.excludes new/libgexiv2-0.3.1/vapi/gexiv2.excludes --- old/libgexiv2-0.2.2/vapi/gexiv2.excludes 2010-12-23 22:20:13.000000000 +0100 +++ new/libgexiv2-0.3.1/vapi/gexiv2.excludes 2011-03-23 00:33:47.000000000 +0100 @@ -2,3 +2,4 @@ gexiv2-preview-properties-private.h gexiv2-preview-image-private.h gexiv2-stream-io.h +gexiv2-log-private.h ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
