Gentoo Archives: gentoo-commits

From: "Vlastimil Babka (caster)" <caster@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/gwenview/files: gwenview-1.4.2-exiv2.patch
Date: Sat, 10 Jan 2009 11:44:34
Message-Id: E1LLcGV-0000nm-T1@stork.gentoo.org
1 caster 09/01/10 11:44:31
2
3 Added: gwenview-1.4.2-exiv2.patch
4 Log:
5 Revbump to fix building with media-libs/exiv2-0.18, bug #254049. Thanks to Yar Odin <yarodin@×××××.com> and Lars <polynomial-C@×××.de> for the patch.
6 (Portage version: 2.2_rc20/cvs/Linux 2.6.28-gentoo-perfctr x86_64)
7
8 Revision Changes Path
9 1.1 media-gfx/gwenview/files/gwenview-1.4.2-exiv2.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/gwenview/files/gwenview-1.4.2-exiv2.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/gwenview/files/gwenview-1.4.2-exiv2.patch?rev=1.1&content-type=text/plain
13
14 Index: gwenview-1.4.2-exiv2.patch
15 ===================================================================
16 # patch from Yar Odin <yarodin@×××××.com> in bug #254049
17 --- src/imageutils/jpegcontent.cpp.orig 2009-01-09 22:54:12.000000000 +0500
18 +++ src/imageutils/jpegcontent.cpp 2009-01-09 22:56:48.000000000 +0500
19 @@ -47,6 +47,17 @@
20 #include "imageutils/jpegcontent.h"
21 #include "imageutils/jpegerrormanager.h"
22
23 +// Make sure an EXIV2_TEST_VERSION macro exists:
24 +
25 +#ifdef EXIV2_VERSION
26 +# ifndef EXIV2_TEST_VERSION
27 +# define EXIV2_TEST_VERSION(major,minor,patch) \
28 + ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
29 +# endif
30 +#else
31 +# define EXIV2_TEST_VERSION(major,minor,patch) (false)
32 +#endif
33 +
34 namespace ImageUtils {
35
36 const int INMEM_DST_DELTA=4096;
37 @@ -589,7 +600,12 @@
38 QImage JPEGContent::thumbnail() const {
39 QImage image;
40 if (!d->mExifData.empty()) {
41 +#if (EXIV2_TEST_VERSION(0,17,91))
42 + Exiv2::ExifThumbC thumb(d->mExifData);
43 + Exiv2::DataBuf const thumbnail = thumb.copy();
44 +#else
45 Exiv2::DataBuf thumbnail = d->mExifData.copyThumbnail();
46 +#endif
47 image.loadFromData(thumbnail.pData_, thumbnail.size_);
48 }
49 return image;
50 @@ -611,7 +627,12 @@
51 return;
52 }
53
54 +#if (EXIV2_TEST_VERSION(0,17,91))
55 + Exiv2::ExifThumb thumb(d->mExifData);
56 + thumb.setJpegThumbnail((unsigned char*)array.data(), array.size());
57 +#else
58 d->mExifData.setJpegThumbnail((unsigned char*)array.data(), array.size());
59 +#endif
60 }