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/photoqt/files/, media-gfx/photoqt/
Date: Sun, 20 Jan 2019 19:03:41
Message-Id: 1548010456.6ce6689cb898b2a4c283f9e7c3cde5147e011ca6.asturm@gentoo
1 commit: 6ce6689cb898b2a4c283f9e7c3cde5147e011ca6
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 20 17:40:15 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 20 18:54:16 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ce6689c
7
8 media-gfx/photoqt: Fix detection and build with exiv2-0.27
9
10 Pending upstream review:
11 https://gitlab.com/luspi/photoqt/merge_requests/8
12
13 Closes: https://bugs.gentoo.org/675714
14 Package-Manager: Portage-2.3.56, Repoman-2.3.12
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 .../photoqt/files/photoqt-1.7.1-exiv2-0.27.patch | 541 +++++++++++++++++++++
18 media-gfx/photoqt/photoqt-1.7.1-r1.ebuild | 66 +++
19 2 files changed, 607 insertions(+)
20
21 diff --git a/media-gfx/photoqt/files/photoqt-1.7.1-exiv2-0.27.patch b/media-gfx/photoqt/files/photoqt-1.7.1-exiv2-0.27.patch
22 new file mode 100644
23 index 00000000000..d2b264e0175
24 --- /dev/null
25 +++ b/media-gfx/photoqt/files/photoqt-1.7.1-exiv2-0.27.patch
26 @@ -0,0 +1,541 @@
27 +From 66b2c16c0dec865db9c3d1720385625d22fbf021 Mon Sep 17 00:00:00 2001
28 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
29 +Date: Sat, 19 Jan 2019 23:17:32 +0100
30 +Subject: [PATCH 1/4] Simplify CMakeLists.txt using FeatureSummary
31 +
32 +---
33 + CMakeLists.txt | 192 +++++++++++++++++++------------------------------
34 + 1 file changed, 75 insertions(+), 117 deletions(-)
35 +
36 +diff --git a/CMakeLists.txt b/CMakeLists.txt
37 +index 9af47a75..1ffe7ff3 100644
38 +--- a/CMakeLists.txt
39 ++++ b/CMakeLists.txt
40 +@@ -52,6 +52,8 @@ include(CMake/ListFilesResources.cmake)
41 + #### OPTIONS THAT CAN BE SET BY THE USER ####
42 + #############################################
43 +
44 ++include(FeatureSummary)
45 ++
46 + option(RAW "Use libraw library" ON)
47 + option(EXIV2 "Use exiv2 library" ON)
48 + option(GM "Use graphicsmagick library" ON)
49 +@@ -65,35 +67,37 @@ option(TESTING "Enable some tests" OFF)
50 + #### FIND REQUIRED PACKAGES ####
51 + ################################
52 +
53 ++find_package(Qt5 COMPONENTS Core Quick Svg Sql Xml LinguistTools REQUIRED)
54 ++
55 + if(WIN32)
56 +- find_package(Qt5 COMPONENTS Core Quick Svg Sql Xml LinguistTools WinExtras REQUIRED)
57 +-elseif(NOT WIN32)
58 +- find_package(Qt5 COMPONENTS Core Quick Svg Sql Xml LinguistTools REQUIRED)
59 +-endif(WIN32)
60 ++ find_package(Qt5WinExtras REQUIRED)
61 ++endif()
62 +
63 + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
64 ++
65 ++find_package(LibArchive REQUIRED)
66 ++
67 + if(GM)
68 +- find_package(Magick)
69 +-endif(GM)
70 ++ find_package(Magick REQUIRED)
71 ++endif()
72 + if(EXIV2)
73 +- find_package(Exiv2)
74 +-endif(EXIV2)
75 ++ find_package(Exiv2 REQUIRED)
76 ++endif()
77 + if(RAW)
78 +- find_package(LibRaw)
79 +-endif(RAW)
80 ++ find_package(LibRaw REQUIRED)
81 ++endif()
82 + if(FREEIMAGE)
83 +- find_package(FreeImage)
84 +-endif(FREEIMAGE)
85 +-find_package(LibArchive)
86 ++ find_package(FreeImage REQUIRED)
87 ++endif()
88 +
89 + find_package(ECM REQUIRED NO_MODULE)
90 + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_MODULE_PATH}")
91 + if(POPPLER)
92 +- find_package(Poppler COMPONENTS Qt5)
93 +-endif(POPPLER)
94 ++ find_package(Poppler COMPONENTS Qt5 REQUIRED)
95 ++endif()
96 + if(DEVIL)
97 +- find_package(DevIL)
98 +-endif(DEVIL)
99 ++ find_package(DevIL REQUIRED)
100 ++endif()
101 +
102 + ####################################
103 + #### TRANSLATIONS AND RESOURCES ####
104 +@@ -137,14 +141,14 @@ add_definitions(-DSIMPLECRYPTKEY="${CRYPTKEY}")
105 + #### Add the executeable ####
106 + #############################
107 +
108 ++add_executable(${PROJECT_NAME} ${photoqt_SOURCES} ${photoqt_QML} ${RESOURCES})
109 ++target_link_libraries(${PROJECT_NAME} Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Core Qt5::Xml)
110 ++
111 + # on windows we add application icons
112 + if(WIN32)
113 +- add_executable(${PROJECT_NAME} WIN32 ${photoqt_SOURCES} ${photoqt_QML} ${RESOURCES} windowsicons.rc)
114 +- target_link_libraries(${PROJECT_NAME} Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Core Qt5::Xml Qt5::WinExtras)
115 +-elseif(NOT WIN32)
116 +- add_executable(${PROJECT_NAME} ${photoqt_SOURCES} ${photoqt_QML} ${RESOURCES})
117 +- target_link_libraries(${PROJECT_NAME} Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Core Qt5::Xml)
118 +-endif(WIN32)
119 ++ add_executable(${PROJECT_NAME} WIN32 windowsicons.rc)
120 ++ target_link_libraries(${PROJECT_NAME} Qt5::WinExtras)
121 ++endif()
122 +
123 +
124 + ########################
125 +@@ -171,7 +175,7 @@ if(TESTING)
126 + # And inform the user
127 + message("** TESTING ENABLED")
128 +
129 +-endif(TESTING)
130 ++endif()
131 +
132 +
133 + ##############################################
134 +@@ -186,112 +190,65 @@ composeDesktopFile()
135 + #### CUSTOM OPTIONS ####
136 + ########################
137 +
138 +-if(NOT ${LibArchive_FOUND})
139 +- message(FATAL_ERROR "** Unable to locate LibArchive... is it installed?")
140 +-elseif(${LibArchive_FOUND})
141 +- include_directories(${LibArchive_INCLUDE_DIRS})
142 +- target_link_libraries(${PROJECT_NAME} ${LibArchive_LIBRARIES})
143 +- message("** Found LibArchive " ${LibArchive_VERSION})
144 +-endif(NOT ${LibArchive_FOUND})
145 ++include_directories(${LibArchive_INCLUDE_DIRS})
146 ++target_link_libraries(${PROJECT_NAME} ${LibArchive_LIBRARIES})
147 +
148 + if(POPPLER)
149 +- if(NOT ${Poppler_FOUND})
150 +- message(FATAL_ERROR "** Unable to locate Poppler... is it installed?")
151 +- elseif(${Poppler_FOUND})
152 +- include_directories(${Poppler_INCLUDE_DIRS})
153 +- target_link_libraries(${PROJECT_NAME} ${Poppler_LIBRARIES})
154 +- message("** Poppler enabled")
155 +- add_definitions(-DPOPPLER)
156 +- endif(NOT ${Poppler_FOUND})
157 +-elseif(NOT POPPLER)
158 +- message("** Poppler DISABLED")
159 +-endif(POPPLER)
160 ++ include_directories(${Poppler_INCLUDE_DIRS})
161 ++ target_link_libraries(${PROJECT_NAME} ${Poppler_LIBRARIES})
162 ++ add_definitions(-DPOPPLER)
163 ++endif()
164 +
165 + if(DEVIL)
166 +- if(NOT ${IL_FOUND})
167 +- message(FATAL_ERROR "** Unable to locate DevIL... is it installed?")
168 +- elseif(${IL_FOUND})
169 +- include_directories(${IL_INCLUDE_DIR})
170 +- target_link_libraries(${PROJECT_NAME} ${IL_LIBRARIES})
171 +- message("** DevIL enabled")
172 +- add_definitions(-DDEVIL)
173 +- endif(NOT ${IL_FOUND})
174 +-elseif(NOT DEVIL)
175 +- message("** DevIL DISABLED")
176 +-endif(DEVIL)
177 ++ include_directories(${IL_INCLUDE_DIR})
178 ++ target_link_libraries(${PROJECT_NAME} ${IL_LIBRARIES})
179 ++ add_definitions(-DDEVIL)
180 ++endif()
181 +
182 + if(FREEIMAGE)
183 +- if(NOT ${FREEIMAGE_FOUND})
184 +- message(FATAL_ERROR "** Unable to locate FreeImage... is it installed?")
185 +- elseif(${FREEIMAGE_FOUND})
186 +- include_directories(${FREEIMAGE_INCLUDE_DIRS})
187 +- target_link_libraries(${PROJECT_NAME} ${FREEIMAGE_LIBRARIES})
188 +- message("** FreeImage enabled")
189 +- add_definitions(-DFREEIMAGE)
190 +- endif(NOT ${FREEIMAGE_FOUND})
191 +-elseif(NOT FREEIMAGE)
192 +- message("** FreeImage DISABLED")
193 +-endif(FREEIMAGE)
194 ++ include_directories(${FREEIMAGE_INCLUDE_DIRS})
195 ++ target_link_libraries(${PROJECT_NAME} ${FREEIMAGE_LIBRARIES})
196 ++ add_definitions(-DFREEIMAGE)
197 ++endif()
198 +
199 + if(RAW)
200 +- if(NOT ${LIBRAW_FOUND})
201 +- message(FATAL_ERROR "** Unable to locate LibRaw... is it installed?")
202 +- elseif(${LIBRAW_FOUND})
203 +- include_directories(${LIBRAW_INCLUDE_DIR})
204 +- target_link_libraries(${PROJECT_NAME} "raw")
205 +- message("** LibRaw enabled")
206 +- add_definitions(-DRAW)
207 +- endif(NOT ${LIBRAW_FOUND})
208 +-elseif(NOT RAW)
209 +- message("** LibRaw DISABLED")
210 +-endif(RAW)
211 ++ include_directories(${LIBRAW_INCLUDE_DIR})
212 ++ target_link_libraries(${PROJECT_NAME} "raw")
213 ++ add_definitions(-DRAW)
214 ++endif()
215 +
216 + if(EXIV2)
217 +- if(NOT ${EXIV2_FOUND})
218 +- message(FATAL_ERROR "** Unable to locate Exiv2... is it installed?")
219 +- elseif(${EXIV2_FOUND})
220 +- include_directories(${EXIV2_INCLUDE_DIR})
221 +- target_link_libraries(${PROJECT_NAME} "exiv2")
222 ++ include_directories(${EXIV2_INCLUDE_DIR})
223 ++ target_link_libraries(${PROJECT_NAME} "exiv2")
224 ++ if(TESTING)
225 ++ target_link_libraries(${PROJECT_TEST_NAME} "exiv2")
226 ++ endif()
227 ++ if(WIN32)
228 ++ target_link_libraries(${PROJECT_NAME} "expat")
229 ++ target_link_libraries(${PROJECT_NAME} "ws2_32")
230 ++ target_link_libraries(${PROJECT_NAME} "wsock32")
231 ++ target_link_libraries(${PROJECT_NAME} "z")
232 ++ target_link_libraries(${PROJECT_NAME} "intl")
233 ++ target_link_libraries(${PROJECT_NAME} "iconv")
234 ++ target_link_libraries(${PROJECT_NAME} "psapi")
235 + if(TESTING)
236 +- target_link_libraries(${PROJECT_TEST_NAME} "exiv2")
237 +- endif(TESTING)
238 +- if(WIN32)
239 +- target_link_libraries(${PROJECT_NAME} "expat")
240 +- target_link_libraries(${PROJECT_NAME} "ws2_32")
241 +- target_link_libraries(${PROJECT_NAME} "wsock32")
242 +- target_link_libraries(${PROJECT_NAME} "z")
243 +- target_link_libraries(${PROJECT_NAME} "intl")
244 +- target_link_libraries(${PROJECT_NAME} "iconv")
245 +- target_link_libraries(${PROJECT_NAME} "psapi")
246 +- if(TESTING)
247 +- target_link_libraries(${PROJECT_TEST_NAME} "expat")
248 +- target_link_libraries(${PROJECT_TEST_NAME} "ws2_32")
249 +- target_link_libraries(${PROJECT_TEST_NAME} "wsock32")
250 +- target_link_libraries(${PROJECT_TEST_NAME} "z")
251 +- target_link_libraries(${PROJECT_TEST_NAME} "intl")
252 +- target_link_libraries(${PROJECT_TEST_NAME} "iconv")
253 +- target_link_libraries(${PROJECT_TEST_NAME} "psapi")
254 +- endif(TESTING)
255 +- endif(WIN32)
256 +- add_definitions(-DEXIV2)
257 +- message("** Exiv2 enabled")
258 +- endif(NOT ${EXIV2_FOUND})
259 +-elseif(NOT EXIV2)
260 +- message("** Exiv2 DISABLED")
261 +-endif(EXIV2)
262 ++ target_link_libraries(${PROJECT_TEST_NAME} "expat")
263 ++ target_link_libraries(${PROJECT_TEST_NAME} "ws2_32")
264 ++ target_link_libraries(${PROJECT_TEST_NAME} "wsock32")
265 ++ target_link_libraries(${PROJECT_TEST_NAME} "z")
266 ++ target_link_libraries(${PROJECT_TEST_NAME} "intl")
267 ++ target_link_libraries(${PROJECT_TEST_NAME} "iconv")
268 ++ target_link_libraries(${PROJECT_TEST_NAME} "psapi")
269 ++ endif()
270 ++ endif()
271 ++ add_definitions(-DEXIV2)
272 ++endif()
273 +
274 + if(GM)
275 +- if(NOT ${MAGICK++_FOUND})
276 +- message(FATAL_ERROR "** Unable to locate GraphicsMagick... is it installed?")
277 +- elseif(${MAGICK++_FOUND})
278 +- include_directories(${MAGICK++_INCLUDE_DIR})
279 +- target_link_libraries(${PROJECT_NAME} "GraphicsMagick++")
280 +- add_definitions(-DGM)
281 +- message("** Graphicsmagick enabled")
282 +- endif(NOT ${MAGICK++_FOUND})
283 +-elseif(NOT GM)
284 +- message("** Graphicsmagick DISABLED")
285 +-endif(GM)
286 ++ include_directories(${MAGICK++_INCLUDE_DIR})
287 ++ target_link_libraries(${PROJECT_NAME} "GraphicsMagick++")
288 ++ add_definitions(-DGM)
289 ++endif()
290 +
291 +
292 + #######################
293 +@@ -339,6 +296,7 @@ if(UNIX)
294 + )
295 + endif(UNIX)
296 +
297 ++feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
298 +
299 +
300 + ##########################
301 +--
302 +2.20.1
303 +
304 +
305 +From b58268b06eb62de70da3ac751870114b07cd79e3 Mon Sep 17 00:00:00 2001
306 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
307 +Date: Sun, 20 Jan 2019 17:49:09 +0100
308 +Subject: [PATCH 2/4] Switch to FindLibExiv2 from ECM 5.54.0
309 +
310 +Fixes detection of exiv2.
311 +---
312 + CMake/FindLibExiv2.cmake | 115 +++++++++++++++++++++++++++++++++++++++
313 + CMakeLists.txt | 7 +--
314 + create mode 100644 CMake/FindLibExiv2.cmake
315 +
316 +diff --git a/CMake/FindLibExiv2.cmake b/CMake/FindLibExiv2.cmake
317 +new file mode 100644
318 +index 00000000..935cee2c
319 +--- /dev/null
320 ++++ b/CMake/FindLibExiv2.cmake
321 +@@ -0,0 +1,115 @@
322 ++#.rst:
323 ++# FindLibExiv2
324 ++# ------------
325 ++#
326 ++# Try to find the Exiv2 library.
327 ++#
328 ++# This will define the following variables:
329 ++#
330 ++# ``LibExiv2_FOUND``
331 ++# System has LibExiv2.
332 ++#
333 ++# ``LibExiv2_VERSION``
334 ++# The version of LibExiv2.
335 ++#
336 ++# ``LibExiv2_INCLUDE_DIRS``
337 ++# This should be passed to target_include_directories() if
338 ++# the target is not used for linking.
339 ++#
340 ++# ``LibExiv2_LIBRARIES``
341 ++# The LibExiv2 library.
342 ++# This can be passed to target_link_libraries() instead of
343 ++# the ``LibExiv2::LibExiv2`` target
344 ++#
345 ++# If ``LibExiv2_FOUND`` is TRUE, the following imported target
346 ++# will be available:
347 ++#
348 ++# ``LibExiv2::LibExiv2``
349 ++# The Exiv2 library
350 ++#
351 ++# Since 5.53.0.
352 ++#
353 ++#=============================================================================
354 ++# Copyright (c) 2018, Christophe Giboudeaux, <christophe@××××.fr>
355 ++# Copyright (c) 2010, Alexander Neundorf, <neundorf@×××.org>
356 ++# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@×××××.com>
357 ++#
358 ++#
359 ++# Redistribution and use in source and binary forms, with or without
360 ++# modification, are permitted provided that the following conditions
361 ++# are met:
362 ++#
363 ++# 1. Redistributions of source code must retain the copyright
364 ++# notice, this list of conditions and the following disclaimer.
365 ++# 2. Redistributions in binary form must reproduce the copyright
366 ++# notice, this list of conditions and the following disclaimer in the
367 ++# documentation and/or other materials provided with the distribution.
368 ++# 3. The name of the author may not be used to endorse or promote products
369 ++# derived from this software without specific prior written permission.
370 ++#
371 ++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
372 ++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
373 ++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
374 ++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
375 ++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
376 ++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
377 ++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
378 ++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
379 ++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
380 ++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
381 ++#=============================================================================
382 ++
383 ++find_package(PkgConfig QUIET)
384 ++pkg_check_modules(PC_EXIV2 QUIET exiv2)
385 ++
386 ++find_path(LibExiv2_INCLUDE_DIRS NAMES exiv2/exif.hpp
387 ++ HINTS ${PC_EXIV2_INCLUDEDIR}
388 ++)
389 ++
390 ++find_library(LibExiv2_LIBRARIES NAMES exiv2 libexiv2
391 ++ HINTS ${PC_EXIV2_LIBRARY_DIRS}
392 ++)
393 ++
394 ++set(LibExiv2_VERSION ${PC_EXIV2_VERSION})
395 ++
396 ++if(NOT LibExiv2_VERSION AND DEFINED LibExiv2_INCLUDE_DIRS)
397 ++ # With exiv >= 0.27, the version #defines are in exv_conf.h instead of version.hpp
398 ++ foreach(_exiv2_version_file "version.hpp" "exv_conf.h")
399 ++ if(EXISTS "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}")
400 ++ file(READ "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}" _exiv_version_file_content)
401 ++ string(REGEX MATCH "#define EXIV2_MAJOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MAJOR_VERSION_MATCH ${_exiv_version_file_content})
402 ++ string(REGEX MATCH "#define EXIV2_MINOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MINOR_VERSION_MATCH ${_exiv_version_file_content})
403 ++ string(REGEX MATCH "#define EXIV2_PATCH_VERSION[ ]+\\([0-9]+\\)" EXIV2_PATCH_VERSION_MATCH ${_exiv_version_file_content})
404 ++ if(EXIV2_MAJOR_VERSION_MATCH)
405 ++ string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MAJOR_VERSION ${EXIV2_MAJOR_VERSION_MATCH})
406 ++ string(REGEX REPLACE ".*_MINOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MINOR_VERSION ${EXIV2_MINOR_VERSION_MATCH})
407 ++ string(REGEX REPLACE ".*_PATCH_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_PATCH_VERSION ${EXIV2_PATCH_VERSION_MATCH})
408 ++ endif()
409 ++ endif()
410 ++ endforeach()
411 ++
412 ++ set(LibExiv2_VERSION "${EXIV2_MAJOR_VERSION}.${EXIV2_MINOR_VERSION}.${EXIV2_PATCH_VERSION}")
413 ++endif()
414 ++
415 ++include(FindPackageHandleStandardArgs)
416 ++find_package_handle_standard_args(LibExiv2
417 ++ FOUND_VAR LibExiv2_FOUND
418 ++ REQUIRED_VARS LibExiv2_LIBRARIES LibExiv2_INCLUDE_DIRS
419 ++ VERSION_VAR LibExiv2_VERSION
420 ++)
421 ++
422 ++mark_as_advanced(LibExiv2_INCLUDE_DIRS LibExiv2_LIBRARIES)
423 ++
424 ++if(LibExiv2_FOUND AND NOT TARGET LibExiv2::LibExiv2)
425 ++ add_library(LibExiv2::LibExiv2 UNKNOWN IMPORTED)
426 ++ set_target_properties(LibExiv2::LibExiv2 PROPERTIES
427 ++ IMPORTED_LOCATION "${LibExiv2_LIBRARIES}"
428 ++ INTERFACE_INCLUDE_DIRECTORIES "${LibExiv2_INCLUDE_DIRS}"
429 ++ )
430 ++endif()
431 ++
432 ++include(FeatureSummary)
433 ++set_package_properties(LibExiv2 PROPERTIES
434 ++ URL "http://www.exiv2.org"
435 ++ DESCRIPTION "Image metadata support"
436 ++)
437 +diff --git a/CMakeLists.txt b/CMakeLists.txt
438 +index 1ffe7ff3..b96b21db 100644
439 +--- a/CMakeLists.txt
440 ++++ b/CMakeLists.txt
441 +@@ -81,7 +81,7 @@ if(GM)
442 + find_package(Magick REQUIRED)
443 + endif()
444 + if(EXIV2)
445 +- find_package(Exiv2 REQUIRED)
446 ++ find_package(LibExiv2 REQUIRED)
447 + endif()
448 + if(RAW)
449 + find_package(LibRaw REQUIRED)
450 +@@ -218,10 +218,9 @@ if(RAW)
451 + endif()
452 +
453 + if(EXIV2)
454 +- include_directories(${EXIV2_INCLUDE_DIR})
455 +- target_link_libraries(${PROJECT_NAME} "exiv2")
456 ++ target_link_libraries(${PROJECT_NAME} LibExiv2::LibExiv2)
457 + if(TESTING)
458 +- target_link_libraries(${PROJECT_TEST_NAME} "exiv2")
459 ++ target_link_libraries(${PROJECT_TEST_NAME} LibExiv2::LibExiv2)
460 + endif()
461 + if(WIN32)
462 + target_link_libraries(${PROJECT_NAME} "expat")
463 +--
464 +2.20.1
465 +
466 +
467 +From f2a675ea5496febae1daee229ad132086dec24bc Mon Sep 17 00:00:00 2001
468 +From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
469 +Date: Sun, 20 Jan 2019 18:25:45 +0100
470 +Subject: [PATCH 3/4] Fix build with exiv2-0.27
471 +
472 +---
473 + cplusplus/scripts/getanddostuff/manipulation.h | 3 +--
474 + cplusplus/scripts/getmetadata.cpp | 4 ++--
475 + cplusplus/scripts/getmetadata.h | 3 +--
476 + cplusplus/scripts/managepeopletags.cpp | 4 ++--
477 + cplusplus/scripts/managepeopletags.h | 3 +--
478 + 5 files changed, 7 insertions(+), 10 deletions(-)
479 +
480 +diff --git a/cplusplus/scripts/getanddostuff/manipulation.h b/cplusplus/scripts/getanddostuff/manipulation.h
481 +index b3fa9b42..465d9372 100644
482 +--- a/cplusplus/scripts/getanddostuff/manipulation.h
483 ++++ b/cplusplus/scripts/getanddostuff/manipulation.h
484 +@@ -38,8 +38,7 @@
485 + #include "../../logger.h"
486 +
487 + #ifdef EXIV2
488 +-#include <exiv2/image.hpp>
489 +-#include <exiv2/exif.hpp>
490 ++#include <exiv2/exiv2.hpp>
491 + #endif
492 +
493 + class GetAndDoStuffManipulation : public QObject {
494 +diff --git a/cplusplus/scripts/getmetadata.cpp b/cplusplus/scripts/getmetadata.cpp
495 +index deb89a25..df92de6b 100644
496 +--- a/cplusplus/scripts/getmetadata.cpp
497 ++++ b/cplusplus/scripts/getmetadata.cpp
498 +@@ -203,7 +203,7 @@ QVariantMap GetMetaData::getExiv2(QString path) {
499 + }
500 +
501 + } catch(Exiv2::Error &e) {
502 +- LOG << CURDATE << "GetMetaData::getExiv2() Unable to read Exif metadata: " << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
503 ++ LOG << CURDATE << "GetMetaData::getExiv2() Unable to read Exif metadata: " << e.what() << NL;
504 + }
505 +
506 + // If GPS is set, compose into one string
507 +@@ -246,7 +246,7 @@ QVariantMap GetMetaData::getExiv2(QString path) {
508 + }
509 +
510 + } catch(Exiv2::Error &e) {
511 +- LOG << CURDATE << "GetMetaData::getExiv2() ERROR reading IPTC metadata: " << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
512 ++ LOG << CURDATE << "GetMetaData::getExiv2() ERROR reading IPTC metadata: " << e.what() << NL;
513 + }
514 +
515 + QString city = returnMap["Iptc.Application2.City"].toString();
516 +diff --git a/cplusplus/scripts/getmetadata.h b/cplusplus/scripts/getmetadata.h
517 +index e427cbc1..c5b99140 100644
518 +--- a/cplusplus/scripts/getmetadata.h
519 ++++ b/cplusplus/scripts/getmetadata.h
520 +@@ -34,8 +34,7 @@
521 + #include "../logger.h"
522 +
523 + #ifdef EXIV2
524 +-#include <exiv2/image.hpp>
525 +-#include <exiv2/exif.hpp>
526 ++#include <exiv2/exiv2.hpp>
527 + #endif
528 +
529 + class GetMetaData : public QObject {
530 +diff --git a/cplusplus/scripts/managepeopletags.cpp b/cplusplus/scripts/managepeopletags.cpp
531 +index 9b8c7503..96baeb9e 100644
532 +--- a/cplusplus/scripts/managepeopletags.cpp
533 ++++ b/cplusplus/scripts/managepeopletags.cpp
534 +@@ -98,7 +98,7 @@ QVariantList ManagePeopleTags::getFaceTags(QString path) {
535 +
536 + } catch(Exiv2::Error& e) {
537 + LOG << CURDATE << "GetPeopleTag::getPeopleLocations() 2 - ERROR reading exiv data (caught exception): "
538 +- << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
539 ++ << e.what() << NL;
540 + return ret;
541 + }
542 +
543 +@@ -201,7 +201,7 @@ void ManagePeopleTags::setFaceTags(QString filename, QVariantList tags) {
544 +
545 + } catch(Exiv2::Error& e) {
546 + LOG << CURDATE << "GetPeopleTag::setFaceTags() - ERROR reading exiv data (caught exception): "
547 +- << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
548 ++ << e.what() << NL;
549 + return;
550 + }
551 +
552 +diff --git a/cplusplus/scripts/managepeopletags.h b/cplusplus/scripts/managepeopletags.h
553 +index 1908ba0a..59686cc1 100644
554 +--- a/cplusplus/scripts/managepeopletags.h
555 ++++ b/cplusplus/scripts/managepeopletags.h
556 +@@ -29,8 +29,7 @@
557 + #include "../logger.h"
558 +
559 + #ifdef EXIV2
560 +-#include <exiv2/image.hpp>
561 +-#include <exiv2/exif.hpp>
562 ++#include <exiv2/exiv2.hpp>
563 + #endif
564 +
565 + class ManagePeopleTags : public QObject {
566 +--
567 +2.20.1
568
569 diff --git a/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild b/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
570 new file mode 100644
571 index 00000000000..cd6204862f0
572 --- /dev/null
573 +++ b/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
574 @@ -0,0 +1,66 @@
575 +# Copyright 1999-2019 Gentoo Authors
576 +# Distributed under the terms of the GNU General Public License v2
577 +
578 +EAPI=6
579 +
580 +inherit cmake-utils gnome2-utils xdg-utils
581 +
582 +DESCRIPTION="Simple but powerful Qt-based image viewer"
583 +HOMEPAGE="https://photoqt.org/"
584 +SRC_URI="https://photoqt.org/pkgs/${P}.tar.gz"
585 +
586 +LICENSE="GPL-2+"
587 +SLOT="0"
588 +KEYWORDS="~amd64 ~x86"
589 +IUSE="devil exif freeimage graphicsmagick pdf raw"
590 +
591 +RDEPEND="
592 + dev-qt/qtcore:5
593 + dev-qt/qtdeclarative:5
594 + dev-qt/qtgraphicaleffects:5
595 + dev-qt/qtgui:5
596 + dev-qt/qtimageformats:5
597 + dev-qt/qtmultimedia:5[qml]
598 + dev-qt/qtnetwork:5
599 + dev-qt/qtquickcontrols:5
600 + dev-qt/qtsql:5
601 + dev-qt/qtsvg:5
602 + dev-qt/qtwidgets:5
603 + dev-qt/qtxml:5
604 + app-arch/libarchive:=
605 + app-arch/unrar
606 + devil? ( media-libs/devil )
607 + exif? ( media-gfx/exiv2:= )
608 + freeimage? ( media-libs/freeimage )
609 + graphicsmagick? ( >=media-gfx/graphicsmagick-1.3.20:= )
610 + pdf? ( app-text/poppler[qt5] )
611 + raw? ( media-libs/libraw:= )
612 +"
613 +DEPEND="${RDEPEND}
614 + dev-qt/linguist-tools:5
615 + kde-frameworks/extra-cmake-modules:5
616 +"
617 +
618 +PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.patch" )
619 +
620 +src_configure() {
621 + local mycmakeargs=(
622 + -DDEVIL=$(usex devil)
623 + -DEXIV2=$(usex exif)
624 + -DFREEIMAGE=$(usex freeimage)
625 + -DGM=$(usex graphicsmagick)
626 + -DPOPPLER=$(usex pdf)
627 + -DRAW=$(usex raw)
628 + )
629 + cmake-utils_src_configure
630 +}
631 +
632 +pkg_postinst() {
633 + gnome2_icon_cache_update
634 + xdg_desktop_database_update
635 +}
636 +
637 +pkg_postrm() {
638 + gnome2_icon_cache_update
639 + xdg_desktop_database_update
640 +}