Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/geeqie/files/, media-gfx/geeqie/
Date: Thu, 10 Jan 2019 21:54:40
Message-Id: 1547157249.b9c04877a81a1355e6ef3b75129374734f4ed842.asturm@gentoo
1 commit: b9c04877a81a1355e6ef3b75129374734f4ed842
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 9 21:22:04 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 10 21:54:09 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9c04877
7
8 media-gfx/geeqie: Fix build with exiv2-0.27
9
10 Patch is already upstream, see also:
11 https://github.com/BestImageViewer/geeqie/issues/654
12
13 Closes: https://bugs.gentoo.org/674044
14 Package-Manager: Portage-2.3.54, Repoman-2.3.12
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 media-gfx/geeqie/files/geeqie-1.4-exiv2-0.27.patch | 80 ++++++++++++++++++++++
18 media-gfx/geeqie/geeqie-1.4-r1.ebuild | 4 +-
19 2 files changed, 83 insertions(+), 1 deletion(-)
20
21 diff --git a/media-gfx/geeqie/files/geeqie-1.4-exiv2-0.27.patch b/media-gfx/geeqie/files/geeqie-1.4-exiv2-0.27.patch
22 new file mode 100644
23 index 00000000000..b9a3bde0db2
24 --- /dev/null
25 +++ b/media-gfx/geeqie/files/geeqie-1.4-exiv2-0.27.patch
26 @@ -0,0 +1,80 @@
27 +From 13859e2ec3a1afc74f109cfffdf0de39030cde86 Mon Sep 17 00:00:00 2001
28 +From: Rasmus Thomsen <rasmus.thomsen@××××××××××.com>
29 +Date: Wed, 2 Jan 2019 01:04:45 +0100
30 +Subject: [PATCH] fix build against exiv2-0.27.x
31 +
32 +fixes #654
33 +---
34 + src/exiv2.cc | 16 +++++++++++++---
35 + 1 file changed, 13 insertions(+), 3 deletions(-)
36 +
37 +diff --git a/src/exiv2.cc b/src/exiv2.cc
38 +index b3c80657..f40b725e 100644
39 +--- a/src/exiv2.cc
40 ++++ b/src/exiv2.cc
41 +@@ -22,17 +22,27 @@
42 +
43 + #ifdef HAVE_EXIV2
44 +
45 ++// Don't include the <exiv2/version.hpp> file directly
46 ++// Early Exiv2 versions didn't have version.hpp and the macros.
47 ++#include <exiv2/exiv2.hpp>
48 + #include <exiv2/image.hpp>
49 + #include <exiv2/exif.hpp>
50 + #include <iostream>
51 + #include <string>
52 +
53 + // EXIV2_TEST_VERSION is defined in Exiv2 0.15 and newer.
54 ++#ifdef EXIV2_VERSION
55 + #ifndef EXIV2_TEST_VERSION
56 +-# define EXIV2_TEST_VERSION(major,minor,patch) \
57 ++#define EXIV2_TEST_VERSION(major,minor,patch) \
58 + ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
59 + #endif
60 ++#else
61 ++#define EXIV2_TEST_VERSION(major,minor,patch) (false)
62 ++#endif
63 +
64 ++#if EXIV2_TEST_VERSION(0,27,0)
65 ++#define HAVE_EXIV2_ERROR_CODE
66 ++#endif
67 +
68 + #include <sys/types.h>
69 + #include <sys/stat.h>
70 +@@ -40,6 +50,10 @@
71 + #include <fcntl.h>
72 + #include <sys/mman.h>
73 +
74 ++#if EXIV2_TEST_VERSION(0,27,0)
75 ++#define EXV_PACKAGE "exiv2"
76 ++#endif
77 ++
78 + #if !EXIV2_TEST_VERSION(0,17,90)
79 + #include <exiv2/tiffparser.hpp>
80 + #include <exiv2/tiffcomposite.hpp>
81 +@@ -374,7 +388,11 @@
82 + #endif
83 + Exiv2::Image *image = imageData_->image();
84 +
85 +- if (!image) Exiv2::Error(21);
86 ++#ifdef HAVE_EXIV2_ERROR_CODE
87 ++ if (!image) throw Exiv2::Error(Exiv2::ErrorCode::kerInputDataReadFailed);
88 ++#else
89 ++ if (!image) throw Exiv2::Error(21);
90 ++#endif
91 + image->setExifData(exifData_);
92 + image->setIptcData(iptcData_);
93 + #if EXIV2_TEST_VERSION(0,16,0)
94 +@@ -394,8 +412,12 @@
95 + sidecar->setXmpData(xmpData_);
96 + sidecar->writeMetadata();
97 + #else
98 ++#ifdef HAVE_EXIV2_ERROR_CODE
99 ++ throw Exiv2::Error(Exiv2::ErrorCode::kerNotAnImage, "xmp");
100 ++#else
101 + throw Exiv2::Error(3, "xmp");
102 + #endif
103 ++#endif
104 + }
105 + }
106 +
107
108 diff --git a/media-gfx/geeqie/geeqie-1.4-r1.ebuild b/media-gfx/geeqie/geeqie-1.4-r1.ebuild
109 index 3080dded12b..a503145669b 100644
110 --- a/media-gfx/geeqie/geeqie-1.4-r1.ebuild
111 +++ b/media-gfx/geeqie/geeqie-1.4-r1.ebuild
112 @@ -1,4 +1,4 @@
113 -# Copyright 1999-2018 Gentoo Authors
114 +# Copyright 1999-2019 Gentoo Authors
115 # Distributed under the terms of the GNU General Public License v2
116
117 EAPI=6
118 @@ -35,6 +35,8 @@ DEPEND="${RDEPEND}
119 REQUIRED_USE="gpu-accel? ( gtk3 )
120 map? ( gpu-accel )"
121
122 +PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.patch" ) # bug 674044
123 +
124 src_prepare() {
125 default