Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/gwenview/, kde-apps/gwenview/files/
Date: Sun, 30 Dec 2018 13:22:12
Message-Id: 1546176111.4368fe063eb2065a56ccc943a8cabacb80735ba3.asturm@gentoo
1 commit: 4368fe063eb2065a56ccc943a8cabacb80735ba3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 30 13:19:43 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 30 13:21:51 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4368fe06
7
8 kde-apps/gwenview: Fix build with exiv2-0.27
9
10 Apply conditionally for now while patch is in review upstream.
11
12 Package-Manager: Portage-2.3.52, Repoman-2.3.12
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/gwenview-18.12.0-exiv2-0.27.patch | 216 +++++++++++++++++++++
16 kde-apps/gwenview/gwenview-18.12.0.ebuild | 1 +
17 2 files changed, 217 insertions(+)
18
19 diff --git a/kde-apps/gwenview/files/gwenview-18.12.0-exiv2-0.27.patch b/kde-apps/gwenview/files/gwenview-18.12.0-exiv2-0.27.patch
20 new file mode 100644
21 index 00000000000..fa0d62d84b7
22 --- /dev/null
23 +++ b/kde-apps/gwenview/files/gwenview-18.12.0-exiv2-0.27.patch
24 @@ -0,0 +1,216 @@
25 +From 7e4cd5e91d7434448b7227ee8cf3307435cc7d00 Mon Sep 17 00:00:00 2001
26 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
27 +Date: Sun, 30 Dec 2018 12:59:05 +0100
28 +Subject: [PATCH 1/2] Include exiv2.hpp instead of individual headers
29 +
30 +Headers are subject to refactoring upstream, using exiv2.hpp per recommendation.
31 +---
32 + lib/cms/cmsprofile.h | 2 +-
33 + lib/document/document.h | 2 +-
34 + lib/exiv2imageloader.cpp | 4 ----
35 + lib/exiv2imageloader.h | 2 +-
36 + lib/imagemetainfomodel.cpp | 4 +---
37 + lib/jpegcontent.cpp | 4 ----
38 + lib/timeutils.cpp | 4 ----
39 + tests/auto/documenttest.cpp | 2 --
40 + tests/auto/imagemetainfomodeltest.cpp | 2 --
41 + 9 files changed, 4 insertions(+), 22 deletions(-)
42 +
43 +diff --git a/lib/cms/cmsprofile.h b/lib/cms/cmsprofile.h
44 +index a2a38a87..bc378ff9 100644
45 +--- a/lib/cms/cmsprofile.h
46 ++++ b/lib/cms/cmsprofile.h
47 +@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
48 + #include <QSharedData>
49 +
50 + // Exiv2
51 +-#include <exiv2/image.hpp>
52 ++#include <exiv2/exiv2.hpp>
53 +
54 + class QByteArray;
55 + class QString;
56 +diff --git a/lib/document/document.h b/lib/document/document.h
57 +index c0bb454b..8e32c044 100644
58 +--- a/lib/document/document.h
59 ++++ b/lib/document/document.h
60 +@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
61 + #include <lib/gwenviewlib_export.h>
62 +
63 + #include <string.h>
64 +-#include <exiv2/image.hpp>
65 ++#include <exiv2/exiv2.hpp>
66 +
67 + // Qt
68 + #include <QObject>
69 +diff --git a/lib/exiv2imageloader.cpp b/lib/exiv2imageloader.cpp
70 +index f2830f81..f12b7383 100644
71 +--- a/lib/exiv2imageloader.cpp
72 ++++ b/lib/exiv2imageloader.cpp
73 +@@ -28,10 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
74 +
75 + // KDE
76 +
77 +-// Exiv2
78 +-#include <exiv2/error.hpp>
79 +-#include <exiv2/types.hpp>
80 +-
81 + // Local
82 +
83 + namespace Gwenview
84 +diff --git a/lib/exiv2imageloader.h b/lib/exiv2imageloader.h
85 +index 57ef24d2..866e7fac 100644
86 +--- a/lib/exiv2imageloader.h
87 ++++ b/lib/exiv2imageloader.h
88 +@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
89 +
90 + // Exiv2
91 + #include <string.h>
92 +-#include <exiv2/image.hpp>
93 ++#include <exiv2/exiv2.hpp>
94 +
95 + // Local
96 +
97 +diff --git a/lib/imagemetainfomodel.cpp b/lib/imagemetainfomodel.cpp
98 +index d7b89ab2..58f1c13d 100644
99 +--- a/lib/imagemetainfomodel.cpp
100 ++++ b/lib/imagemetainfomodel.cpp
101 +@@ -33,9 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
102 + #include <KFormat>
103 +
104 + // Exiv2
105 +-#include <exiv2/exif.hpp>
106 +-#include <exiv2/image.hpp>
107 +-#include <exiv2/iptc.hpp>
108 ++#include <exiv2/exiv2.hpp>
109 +
110 + // Local
111 + #ifdef HAVE_FITS
112 +diff --git a/lib/jpegcontent.cpp b/lib/jpegcontent.cpp
113 +index bb810dd4..a628e8a8 100644
114 +--- a/lib/jpegcontent.cpp
115 ++++ b/lib/jpegcontent.cpp
116 +@@ -41,10 +41,6 @@ extern "C" {
117 + // KDE
118 + #include <KLocalizedString>
119 +
120 +-// Exiv2
121 +-#include <exiv2/exif.hpp>
122 +-#include <exiv2/image.hpp>
123 +-
124 + // Local
125 + #include "jpegerrormanager.h"
126 + #include "iodevicejpegsourcemanager.h"
127 +diff --git a/lib/timeutils.cpp b/lib/timeutils.cpp
128 +index 9e8836a9..19befff5 100644
129 +--- a/lib/timeutils.cpp
130 ++++ b/lib/timeutils.cpp
131 +@@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
132 + // KDE
133 + #include <KFileItem>
134 +
135 +-// Exiv2
136 +-#include <exiv2/exif.hpp>
137 +-#include <exiv2/image.hpp>
138 +-
139 + // Local
140 + #include <lib/exiv2imageloader.h>
141 + #include <lib/urlutils.h>
142 +diff --git a/tests/auto/documenttest.cpp b/tests/auto/documenttest.cpp
143 +index 9373641f..496346f0 100644
144 +--- a/tests/auto/documenttest.cpp
145 ++++ b/tests/auto/documenttest.cpp
146 +@@ -39,8 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
147 + #include "../lib/transformimageoperation.h"
148 + #include "testutils.h"
149 +
150 +-#include <exiv2/exif.hpp>
151 +-
152 + #include "documenttest.h"
153 +
154 + QTEST_MAIN(DocumentTest)
155 +diff --git a/tests/auto/imagemetainfomodeltest.cpp b/tests/auto/imagemetainfomodeltest.cpp
156 +index e3ec8d30..c4467a73 100644
157 +--- a/tests/auto/imagemetainfomodeltest.cpp
158 ++++ b/tests/auto/imagemetainfomodeltest.cpp
159 +@@ -28,8 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
160 + #include "../lib/imagemetainfomodel.h"
161 + #include "testutils.h"
162 +
163 +-#include <exiv2/exif.hpp>
164 +-
165 + #include "imagemetainfomodeltest.h"
166 +
167 + QTEST_MAIN(ImageMetaInfoModelTest)
168 +--
169 +2.20.1
170 +
171 +
172 +From 7d6c5d95cf4e4d7c857f5d659a58f82bdc46259c Mon Sep 17 00:00:00 2001
173 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
174 +Date: Sun, 30 Dec 2018 11:31:20 +0100
175 +Subject: [PATCH 2/2] Fix build with exiv2-0.27
176 +MIME-Version: 1.0
177 +Content-Type: text/plain; charset=UTF-8
178 +Content-Transfer-Encoding: 8bit
179 +
180 +Summary:
181 +Include exiv2.hpp instead of individual headers
182 +
183 +Headers are subject to refactoring upstream, using exiv2.hpp per recommendation.
184 +
185 +Enable exceptions globally - otherwise, lots of the following error:
186 +
187 +In file included from /usr/include/exiv2/types.hpp:34,
188 + from /usr/include/exiv2/image.hpp:28,
189 + from gwenview-18.12.0/lib/cms/cmsprofile.h:33,
190 + from gwenview-18.12.0/lib/cms/cmsprofile.cpp:22:
191 +/usr/include/exiv2/slice.hpp: In constructor ‘Exiv2::Internal::SliceBase::SliceBase(size_t, size_t)’:
192 +/usr/include/exiv2/slice.hpp:99:77: error: exception handling disabled, use -fexceptions to enable
193 + throw std::out_of_range("Begin must be smaller than end");
194 + ^
195 +
196 +Test Plan: Built fine with exiv2-0.27
197 +
198 +Reviewers: #gwenview, cgiboudeaux
199 +
200 +Tags: #gwenview
201 +
202 +Differential Revision: https://phabricator.kde.org/D17869
203 +---
204 + CMakeLists.txt | 2 ++
205 + lib/CMakeLists.txt | 6 ------
206 + 2 files changed, 2 insertions(+), 6 deletions(-)
207 +
208 +diff --git a/CMakeLists.txt b/CMakeLists.txt
209 +index f44f9afc..b85ba4bc 100644
210 +--- a/CMakeLists.txt
211 ++++ b/CMakeLists.txt
212 +@@ -126,6 +126,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
213 +
214 + add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
215 +
216 ++kde_enable_exceptions()
217 ++
218 + ## dirs to build
219 + add_subdirectory(lib)
220 + add_subdirectory(app)
221 +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
222 +index 169df3c6..f7e9f71f 100644
223 +--- a/lib/CMakeLists.txt
224 ++++ b/lib/CMakeLists.txt
225 +@@ -220,12 +220,6 @@ if (GWENVIEW_SEMANTICINFO_BACKEND_BALOO)
226 + )
227 + endif()
228 +
229 +-kde_source_files_enable_exceptions(
230 +- exiv2imageloader.cpp
231 +- imagemetainfomodel.cpp
232 +- timeutils.cpp
233 +- )
234 +-
235 + ki18n_wrap_ui(gwenviewlib_SRCS
236 + crop/cropwidget.ui
237 + documentview/messageview.ui
238 +--
239 +2.20.1
240 +
241
242 diff --git a/kde-apps/gwenview/gwenview-18.12.0.ebuild b/kde-apps/gwenview/gwenview-18.12.0.ebuild
243 index a580d5a58cc..22f5b406075 100644
244 --- a/kde-apps/gwenview/gwenview-18.12.0.ebuild
245 +++ b/kde-apps/gwenview/gwenview-18.12.0.ebuild
246 @@ -73,6 +73,7 @@ RDEPEND="${COMMON_DEPEND}
247
248 src_prepare() {
249 kde5_src_prepare
250 + has_version ">=media-gfx/exiv2-0.27" && eapply "${FILESDIR}/${P}-exiv2-0.27.patch"
251 if ! use mpris; then
252 # FIXME: upstream a better solution
253 sed -e "/set(HAVE_QTDBUS/s/\${Qt5DBus_FOUND}/0/" -i CMakeLists.txt || die