Hello community,
here is the log from the commit of package xzgv for openSUSE:Factory
checked in at Tue May 3 14:27:59 CEST 2011.
--------
--- xzgv/xzgv.changes 2010-02-18 14:09:13.000000000 +0100
+++ /mounts/work_src_done/STABLE/xzgv/xzgv.changes 2011-04-18 17:39:01.000000000 +0200
@@ -1,0 +2,5 @@
+Mon Apr 18 15:36:49 UTC 2011 - jreuter@novell.com
+
+- re-implementing --exif-orient by adding libexif support (bnc#150534)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
xzgv-0.9.1-exif-orient.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xzgv.spec ++++++
--- /var/tmp/diff_new_pack.hA8fNm/_old 2011-05-03 14:27:09.000000000 +0200
+++ /var/tmp/diff_new_pack.hA8fNm/_new 2011-05-03 14:27:09.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package xzgv (Version 0.9.1)
+# spec file for package xzgv
#
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,10 +19,10 @@
Name: xzgv
-BuildRequires: gtk2-devel update-desktop-files
+BuildRequires: gtk2-devel libexif-devel update-desktop-files
Url: http://sourceforge.net/projects/xzgv
Version: 0.9.1
-Release: 2
+Release: 10
Group: Productivity/Graphics/Viewers
License: GPLv2+
Summary: A Fast Picture Viewer for the X Window System
@@ -31,6 +31,7 @@
PreReq: %install_info_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch: xzgv-0.9.1-as-needed.patch
+Patch1: xzgv-0.9.1-exif-orient.patch
%description
Xzgv is a picture viewer for the X Window System with a thumbnail-based
@@ -49,6 +50,7 @@
%prep
%setup -q
%patch
+%patch1 -p1
%build
sed -e "s/^CFLAGS=.*/CFLAGS=$RPM_OPT_FLAGS/;" < config.mk > config.mk.tmp
++++++ xzgv-0.9.1-exif-orient.patch ++++++
diff -Nurp xzgv-0.9.1.orig/src/backend.c xzgv-0.9.1/src/backend.c
--- xzgv-0.9.1.orig/src/backend.c 2007-09-09 02:37:14.000000000 +0200
+++ xzgv-0.9.1/src/backend.c 2011-04-18 17:16:07.816226544 +0200
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include "backend.h"
@@ -234,6 +235,29 @@ public_info_update(im);
return(im);
}
+int backend_get_orientation_from_file(char *filename)
+{
+GdkPixbufFormat *imform;
+gchar *format;
+ExifData *ed;
+ExifEntry *entry;
+ExifByteOrder bo;
+ExifShort orient;
+static const ExifShort xzgv_orient[]={0,0,1,3,2,7,4,6,5};
+
+if((imform=gdk_pixbuf_get_file_info(filename,NULL,NULL))==NULL) return 0;
+if((format=gdk_pixbuf_format_get_name(imform))==NULL) return 0;
+if(!strcmp(format, "jpeg") || !strcmp(format, "tiff"))
+ {
+ if((ed=exif_data_new_from_file(filename))==NULL) return 0;
+ if((entry=exif_data_get_entry(ed,EXIF_TAG_ORIENTATION))==NULL) return 0;
+ if((orient=exif_get_short(entry->data,exif_data_get_byte_order(ed)))>sizeof(xzgv_orient)-1) return 0;
+ orient=xzgv_orient[orient];
+ return (int)orient;
+ }
+return 0;
+}
+
/* render image at (x,y) in window (at actual size).
* This is a fairly high-level one, but most backends will probably
diff -Nurp xzgv-0.9.1.orig/src/backend.h xzgv-0.9.1/src/backend.h
--- xzgv-0.9.1.orig/src/backend.h 2007-09-09 02:49:12.000000000 +0200
+++ xzgv-0.9.1/src/backend.h 2011-04-18 16:01:23.258541646 +0200
@@ -30,6 +30,7 @@ extern xzgv_image *backend_create_image_
extern xzgv_image *backend_create_image_from_data_destructively(
unsigned char *rgb,int w,int h);
extern xzgv_image *backend_create_image_from_file(char *filename);
+extern int backend_get_orientation_from_file(char *filename);
extern void backend_render_image_into_window(xzgv_image *image,GdkWindow *win,
int x,int y);
extern int backend_render_pixmap_for_image(xzgv_image *image,int x,int y);
diff -Nurp xzgv-0.9.1.orig/src/main.c xzgv-0.9.1/src/main.c
--- xzgv-0.9.1.orig/src/main.c 2009-02-22 22:17:57.000000000 +0100
+++ xzgv-0.9.1/src/main.c 2011-04-18 16:00:16.450725940 +0200
@@ -359,6 +359,8 @@ int origw,origh;
jpeg_exif_orient=0;
ret=backend_create_image_from_file(file); /* use backend's loader */
+if((ret != NULL) && use_exif_orient) jpeg_exif_orient=backend_get_orientation_from_file(file);
+
origw=0; origh=0;
if(ret)
{
diff -Nurp xzgv-0.9.1.orig/src/Makefile xzgv-0.9.1/src/Makefile
--- xzgv-0.9.1.orig/src/Makefile 2011-04-18 17:19:38.087176466 +0200
+++ xzgv-0.9.1/src/Makefile 2011-04-18 17:19:25.066437938 +0200
@@ -9,8 +9,10 @@
# This gets definitions for CC, CFLAGS, BINDIR etc.
include ../config.mk
-CFLAGS+=`pkg-config --cflags gtk+-2.0` `pkg-config --cflags gdk-pixbuf-2.0`
-LDFLAGS+=`pkg-config --libs gtk+-2.0` `pkg-config --libs gdk-pixbuf-2.0`
+CFLAGS+=`pkg-config --cflags gtk+-2.0` `pkg-config --cflags gdk-pixbuf-2.0` `pkg-config --cflags libexif`
+
+LDFLAGS+=`pkg-config --libs gtk+-2.0` `pkg-config --libs gdk-pixbuf-2.0` `pkg-config --libs libexif`
+
all: xzgv
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org