Adapt to Exiv2::BasicIo API change

This commit is contained in:
Debarshi Ray 2017-05-10 17:39:07 +02:00
parent f83925d0f2
commit cd3f615133
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From d0d8ccd051edf0691a6a309143979507fe29c466 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Wed, 10 May 2017 17:22:33 +0200
Subject: [PATCH] Adapt to Exiv2::BasicIo API change
Exiv2::BasicIo::size now returns a size_t instead of long:
http://dev.exiv2.org/issues/1175
Bump minimum Exiv2 version to 0.26.
https://bugzilla.gnome.org/show_bug.cgi?id=782449
---
gexiv2/gexiv2-stream-io.cpp | 2 +-
gexiv2/gexiv2-stream-io.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gexiv2/gexiv2-stream-io.cpp b/gexiv2/gexiv2-stream-io.cpp
index 0ae33241f31a..39445013c13b 100644
--- a/gexiv2/gexiv2-stream-io.cpp
+++ b/gexiv2/gexiv2-stream-io.cpp
@@ -142,7 +142,7 @@ long StreamIo::tell () const {
return cb->Position (cb->handle);
}
-long StreamIo::size () const {
+size_t StreamIo::size () const {
return cb->Length (cb->handle);
}
diff --git a/gexiv2/gexiv2-stream-io.h b/gexiv2/gexiv2-stream-io.h
index 76621a9e520b..430ac01c9e3d 100644
--- a/gexiv2/gexiv2-stream-io.h
+++ b/gexiv2/gexiv2-stream-io.h
@@ -39,7 +39,7 @@ public:
virtual Exiv2::byte* mmap (bool isWriteable = false);
virtual int munmap ();
virtual long tell () const;
- virtual long size () const;
+ virtual size_t size () const;
virtual bool isopen () const;
virtual int error () const;
virtual bool eof () const;
--
2.9.3

View File

@ -7,6 +7,9 @@ License: GPLv2+
URL: https://wiki.gnome.org/Projects/gexiv2
Source0: https://download.gnome.org/sources/gexiv2/0.10/gexiv2-%{version}.tar.xz
# https://bugzilla.redhat.com/show_bug.cgi?id=1448428
Patch0: libgexiv2-Adapt-to-Exiv2-BasicIo-API-change.patch
BuildRequires: exiv2-devel
BuildRequires: gobject-introspection-devel
BuildRequires: libtool
@ -56,6 +59,7 @@ This package contains the python3 bindings for %{name}
%prep
%setup -q -n gexiv2-%{version}
%patch0 -p1
%build
%configure --enable-introspection --enable-static=no --enable-shared=yes
@ -100,7 +104,7 @@ make check
%changelog
* Tue May 02 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.10.5-3
- rebuild (exiv2)
- Rebuild against new exiv2 soname
* Thu Apr 27 2017 Debarshi Ray <rishi@fedoraproject.org> - 0.10.5-2
- Add Provides to retain compatibility