summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-01-20 18:40:15 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-01-20 19:54:16 +0100
commit6ce6689cb898b2a4c283f9e7c3cde5147e011ca6 (patch)
treee298393f7a6c7ab766d3e8d69141b26d9c0def91 /media-gfx
parentkde-frameworks/kconfig: Drop 5.54.0 (r0) (diff)
downloadgentoo-6ce6689cb898b2a4c283f9e7c3cde5147e011ca6.tar.gz
gentoo-6ce6689cb898b2a4c283f9e7c3cde5147e011ca6.tar.bz2
gentoo-6ce6689cb898b2a4c283f9e7c3cde5147e011ca6.zip
media-gfx/photoqt: Fix detection and build with exiv2-0.27
Pending upstream review: https://gitlab.com/luspi/photoqt/merge_requests/8 Closes: https://bugs.gentoo.org/675714 Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/photoqt/files/photoqt-1.7.1-exiv2-0.27.patch541
-rw-r--r--media-gfx/photoqt/photoqt-1.7.1-r1.ebuild66
2 files changed, 607 insertions, 0 deletions
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
new file mode 100644
index 000000000000..d2b264e01750
--- /dev/null
+++ b/media-gfx/photoqt/files/photoqt-1.7.1-exiv2-0.27.patch
@@ -0,0 +1,541 @@
+From 66b2c16c0dec865db9c3d1720385625d22fbf021 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sat, 19 Jan 2019 23:17:32 +0100
+Subject: [PATCH 1/4] Simplify CMakeLists.txt using FeatureSummary
+
+---
+ CMakeLists.txt | 192 +++++++++++++++++++------------------------------
+ 1 file changed, 75 insertions(+), 117 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9af47a75..1ffe7ff3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -52,6 +52,8 @@ include(CMake/ListFilesResources.cmake)
+ #### OPTIONS THAT CAN BE SET BY THE USER ####
+ #############################################
+
++include(FeatureSummary)
++
+ option(RAW "Use libraw library" ON)
+ option(EXIV2 "Use exiv2 library" ON)
+ option(GM "Use graphicsmagick library" ON)
+@@ -65,35 +67,37 @@ option(TESTING "Enable some tests" OFF)
+ #### FIND REQUIRED PACKAGES ####
+ ################################
+
++find_package(Qt5 COMPONENTS Core Quick Svg Sql Xml LinguistTools REQUIRED)
++
+ if(WIN32)
+- find_package(Qt5 COMPONENTS Core Quick Svg Sql Xml LinguistTools WinExtras REQUIRED)
+-elseif(NOT WIN32)
+- find_package(Qt5 COMPONENTS Core Quick Svg Sql Xml LinguistTools REQUIRED)
+-endif(WIN32)
++ find_package(Qt5WinExtras REQUIRED)
++endif()
+
+ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
++
++find_package(LibArchive REQUIRED)
++
+ if(GM)
+- find_package(Magick)
+-endif(GM)
++ find_package(Magick REQUIRED)
++endif()
+ if(EXIV2)
+- find_package(Exiv2)
+-endif(EXIV2)
++ find_package(Exiv2 REQUIRED)
++endif()
+ if(RAW)
+- find_package(LibRaw)
+-endif(RAW)
++ find_package(LibRaw REQUIRED)
++endif()
+ if(FREEIMAGE)
+- find_package(FreeImage)
+-endif(FREEIMAGE)
+-find_package(LibArchive)
++ find_package(FreeImage REQUIRED)
++endif()
+
+ find_package(ECM REQUIRED NO_MODULE)
+ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_MODULE_PATH}")
+ if(POPPLER)
+- find_package(Poppler COMPONENTS Qt5)
+-endif(POPPLER)
++ find_package(Poppler COMPONENTS Qt5 REQUIRED)
++endif()
+ if(DEVIL)
+- find_package(DevIL)
+-endif(DEVIL)
++ find_package(DevIL REQUIRED)
++endif()
+
+ ####################################
+ #### TRANSLATIONS AND RESOURCES ####
+@@ -137,14 +141,14 @@ add_definitions(-DSIMPLECRYPTKEY="${CRYPTKEY}")
+ #### Add the executeable ####
+ #############################
+
++add_executable(${PROJECT_NAME} ${photoqt_SOURCES} ${photoqt_QML} ${RESOURCES})
++target_link_libraries(${PROJECT_NAME} Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Core Qt5::Xml)
++
+ # on windows we add application icons
+ if(WIN32)
+- add_executable(${PROJECT_NAME} WIN32 ${photoqt_SOURCES} ${photoqt_QML} ${RESOURCES} windowsicons.rc)
+- target_link_libraries(${PROJECT_NAME} Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Core Qt5::Xml Qt5::WinExtras)
+-elseif(NOT WIN32)
+- add_executable(${PROJECT_NAME} ${photoqt_SOURCES} ${photoqt_QML} ${RESOURCES})
+- target_link_libraries(${PROJECT_NAME} Qt5::Quick Qt5::Sql Qt5::Svg Qt5::Core Qt5::Xml)
+-endif(WIN32)
++ add_executable(${PROJECT_NAME} WIN32 windowsicons.rc)
++ target_link_libraries(${PROJECT_NAME} Qt5::WinExtras)
++endif()
+
+
+ ########################
+@@ -171,7 +175,7 @@ if(TESTING)
+ # And inform the user
+ message("** TESTING ENABLED")
+
+-endif(TESTING)
++endif()
+
+
+ ##############################################
+@@ -186,112 +190,65 @@ composeDesktopFile()
+ #### CUSTOM OPTIONS ####
+ ########################
+
+-if(NOT ${LibArchive_FOUND})
+- message(FATAL_ERROR "** Unable to locate LibArchive... is it installed?")
+-elseif(${LibArchive_FOUND})
+- include_directories(${LibArchive_INCLUDE_DIRS})
+- target_link_libraries(${PROJECT_NAME} ${LibArchive_LIBRARIES})
+- message("** Found LibArchive " ${LibArchive_VERSION})
+-endif(NOT ${LibArchive_FOUND})
++include_directories(${LibArchive_INCLUDE_DIRS})
++target_link_libraries(${PROJECT_NAME} ${LibArchive_LIBRARIES})
+
+ if(POPPLER)
+- if(NOT ${Poppler_FOUND})
+- message(FATAL_ERROR "** Unable to locate Poppler... is it installed?")
+- elseif(${Poppler_FOUND})
+- include_directories(${Poppler_INCLUDE_DIRS})
+- target_link_libraries(${PROJECT_NAME} ${Poppler_LIBRARIES})
+- message("** Poppler enabled")
+- add_definitions(-DPOPPLER)
+- endif(NOT ${Poppler_FOUND})
+-elseif(NOT POPPLER)
+- message("** Poppler DISABLED")
+-endif(POPPLER)
++ include_directories(${Poppler_INCLUDE_DIRS})
++ target_link_libraries(${PROJECT_NAME} ${Poppler_LIBRARIES})
++ add_definitions(-DPOPPLER)
++endif()
+
+ if(DEVIL)
+- if(NOT ${IL_FOUND})
+- message(FATAL_ERROR "** Unable to locate DevIL... is it installed?")
+- elseif(${IL_FOUND})
+- include_directories(${IL_INCLUDE_DIR})
+- target_link_libraries(${PROJECT_NAME} ${IL_LIBRARIES})
+- message("** DevIL enabled")
+- add_definitions(-DDEVIL)
+- endif(NOT ${IL_FOUND})
+-elseif(NOT DEVIL)
+- message("** DevIL DISABLED")
+-endif(DEVIL)
++ include_directories(${IL_INCLUDE_DIR})
++ target_link_libraries(${PROJECT_NAME} ${IL_LIBRARIES})
++ add_definitions(-DDEVIL)
++endif()
+
+ if(FREEIMAGE)
+- if(NOT ${FREEIMAGE_FOUND})
+- message(FATAL_ERROR "** Unable to locate FreeImage... is it installed?")
+- elseif(${FREEIMAGE_FOUND})
+- include_directories(${FREEIMAGE_INCLUDE_DIRS})
+- target_link_libraries(${PROJECT_NAME} ${FREEIMAGE_LIBRARIES})
+- message("** FreeImage enabled")
+- add_definitions(-DFREEIMAGE)
+- endif(NOT ${FREEIMAGE_FOUND})
+-elseif(NOT FREEIMAGE)
+- message("** FreeImage DISABLED")
+-endif(FREEIMAGE)
++ include_directories(${FREEIMAGE_INCLUDE_DIRS})
++ target_link_libraries(${PROJECT_NAME} ${FREEIMAGE_LIBRARIES})
++ add_definitions(-DFREEIMAGE)
++endif()
+
+ if(RAW)
+- if(NOT ${LIBRAW_FOUND})
+- message(FATAL_ERROR "** Unable to locate LibRaw... is it installed?")
+- elseif(${LIBRAW_FOUND})
+- include_directories(${LIBRAW_INCLUDE_DIR})
+- target_link_libraries(${PROJECT_NAME} "raw")
+- message("** LibRaw enabled")
+- add_definitions(-DRAW)
+- endif(NOT ${LIBRAW_FOUND})
+-elseif(NOT RAW)
+- message("** LibRaw DISABLED")
+-endif(RAW)
++ include_directories(${LIBRAW_INCLUDE_DIR})
++ target_link_libraries(${PROJECT_NAME} "raw")
++ add_definitions(-DRAW)
++endif()
+
+ if(EXIV2)
+- if(NOT ${EXIV2_FOUND})
+- message(FATAL_ERROR "** Unable to locate Exiv2... is it installed?")
+- elseif(${EXIV2_FOUND})
+- include_directories(${EXIV2_INCLUDE_DIR})
+- target_link_libraries(${PROJECT_NAME} "exiv2")
++ include_directories(${EXIV2_INCLUDE_DIR})
++ target_link_libraries(${PROJECT_NAME} "exiv2")
++ if(TESTING)
++ target_link_libraries(${PROJECT_TEST_NAME} "exiv2")
++ endif()
++ if(WIN32)
++ target_link_libraries(${PROJECT_NAME} "expat")
++ target_link_libraries(${PROJECT_NAME} "ws2_32")
++ target_link_libraries(${PROJECT_NAME} "wsock32")
++ target_link_libraries(${PROJECT_NAME} "z")
++ target_link_libraries(${PROJECT_NAME} "intl")
++ target_link_libraries(${PROJECT_NAME} "iconv")
++ target_link_libraries(${PROJECT_NAME} "psapi")
+ if(TESTING)
+- target_link_libraries(${PROJECT_TEST_NAME} "exiv2")
+- endif(TESTING)
+- if(WIN32)
+- target_link_libraries(${PROJECT_NAME} "expat")
+- target_link_libraries(${PROJECT_NAME} "ws2_32")
+- target_link_libraries(${PROJECT_NAME} "wsock32")
+- target_link_libraries(${PROJECT_NAME} "z")
+- target_link_libraries(${PROJECT_NAME} "intl")
+- target_link_libraries(${PROJECT_NAME} "iconv")
+- target_link_libraries(${PROJECT_NAME} "psapi")
+- if(TESTING)
+- target_link_libraries(${PROJECT_TEST_NAME} "expat")
+- target_link_libraries(${PROJECT_TEST_NAME} "ws2_32")
+- target_link_libraries(${PROJECT_TEST_NAME} "wsock32")
+- target_link_libraries(${PROJECT_TEST_NAME} "z")
+- target_link_libraries(${PROJECT_TEST_NAME} "intl")
+- target_link_libraries(${PROJECT_TEST_NAME} "iconv")
+- target_link_libraries(${PROJECT_TEST_NAME} "psapi")
+- endif(TESTING)
+- endif(WIN32)
+- add_definitions(-DEXIV2)
+- message("** Exiv2 enabled")
+- endif(NOT ${EXIV2_FOUND})
+-elseif(NOT EXIV2)
+- message("** Exiv2 DISABLED")
+-endif(EXIV2)
++ target_link_libraries(${PROJECT_TEST_NAME} "expat")
++ target_link_libraries(${PROJECT_TEST_NAME} "ws2_32")
++ target_link_libraries(${PROJECT_TEST_NAME} "wsock32")
++ target_link_libraries(${PROJECT_TEST_NAME} "z")
++ target_link_libraries(${PROJECT_TEST_NAME} "intl")
++ target_link_libraries(${PROJECT_TEST_NAME} "iconv")
++ target_link_libraries(${PROJECT_TEST_NAME} "psapi")
++ endif()
++ endif()
++ add_definitions(-DEXIV2)
++endif()
+
+ if(GM)
+- if(NOT ${MAGICK++_FOUND})
+- message(FATAL_ERROR "** Unable to locate GraphicsMagick... is it installed?")
+- elseif(${MAGICK++_FOUND})
+- include_directories(${MAGICK++_INCLUDE_DIR})
+- target_link_libraries(${PROJECT_NAME} "GraphicsMagick++")
+- add_definitions(-DGM)
+- message("** Graphicsmagick enabled")
+- endif(NOT ${MAGICK++_FOUND})
+-elseif(NOT GM)
+- message("** Graphicsmagick DISABLED")
+-endif(GM)
++ include_directories(${MAGICK++_INCLUDE_DIR})
++ target_link_libraries(${PROJECT_NAME} "GraphicsMagick++")
++ add_definitions(-DGM)
++endif()
+
+
+ #######################
+@@ -339,6 +296,7 @@ if(UNIX)
+ )
+ endif(UNIX)
+
++feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
+
+
+ ##########################
+--
+2.20.1
+
+
+From b58268b06eb62de70da3ac751870114b07cd79e3 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 20 Jan 2019 17:49:09 +0100
+Subject: [PATCH 2/4] Switch to FindLibExiv2 from ECM 5.54.0
+
+Fixes detection of exiv2.
+---
+ CMake/FindLibExiv2.cmake | 115 +++++++++++++++++++++++++++++++++++++++
+ CMakeLists.txt | 7 +--
+ create mode 100644 CMake/FindLibExiv2.cmake
+
+diff --git a/CMake/FindLibExiv2.cmake b/CMake/FindLibExiv2.cmake
+new file mode 100644
+index 00000000..935cee2c
+--- /dev/null
++++ b/CMake/FindLibExiv2.cmake
+@@ -0,0 +1,115 @@
++#.rst:
++# FindLibExiv2
++# ------------
++#
++# Try to find the Exiv2 library.
++#
++# This will define the following variables:
++#
++# ``LibExiv2_FOUND``
++# System has LibExiv2.
++#
++# ``LibExiv2_VERSION``
++# The version of LibExiv2.
++#
++# ``LibExiv2_INCLUDE_DIRS``
++# This should be passed to target_include_directories() if
++# the target is not used for linking.
++#
++# ``LibExiv2_LIBRARIES``
++# The LibExiv2 library.
++# This can be passed to target_link_libraries() instead of
++# the ``LibExiv2::LibExiv2`` target
++#
++# If ``LibExiv2_FOUND`` is TRUE, the following imported target
++# will be available:
++#
++# ``LibExiv2::LibExiv2``
++# The Exiv2 library
++#
++# Since 5.53.0.
++#
++#=============================================================================
++# Copyright (c) 2018, Christophe Giboudeaux, <christophe@krop.fr>
++# Copyright (c) 2010, Alexander Neundorf, <neundorf@kde.org>
++# Copyright (c) 2008, Gilles Caulier, <caulier.gilles@gmail.com>
++#
++#
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions
++# are met:
++#
++# 1. Redistributions of source code must retain the copyright
++# notice, this list of conditions and the following disclaimer.
++# 2. Redistributions in binary form must reproduce the copyright
++# notice, this list of conditions and the following disclaimer in the
++# documentation and/or other materials provided with the distribution.
++# 3. The name of the author may not be used to endorse or promote products
++# derived from this software without specific prior written permission.
++#
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++#=============================================================================
++
++find_package(PkgConfig QUIET)
++pkg_check_modules(PC_EXIV2 QUIET exiv2)
++
++find_path(LibExiv2_INCLUDE_DIRS NAMES exiv2/exif.hpp
++ HINTS ${PC_EXIV2_INCLUDEDIR}
++)
++
++find_library(LibExiv2_LIBRARIES NAMES exiv2 libexiv2
++ HINTS ${PC_EXIV2_LIBRARY_DIRS}
++)
++
++set(LibExiv2_VERSION ${PC_EXIV2_VERSION})
++
++if(NOT LibExiv2_VERSION AND DEFINED LibExiv2_INCLUDE_DIRS)
++ # With exiv >= 0.27, the version #defines are in exv_conf.h instead of version.hpp
++ foreach(_exiv2_version_file "version.hpp" "exv_conf.h")
++ if(EXISTS "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}")
++ file(READ "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}" _exiv_version_file_content)
++ string(REGEX MATCH "#define EXIV2_MAJOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MAJOR_VERSION_MATCH ${_exiv_version_file_content})
++ string(REGEX MATCH "#define EXIV2_MINOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MINOR_VERSION_MATCH ${_exiv_version_file_content})
++ string(REGEX MATCH "#define EXIV2_PATCH_VERSION[ ]+\\([0-9]+\\)" EXIV2_PATCH_VERSION_MATCH ${_exiv_version_file_content})
++ if(EXIV2_MAJOR_VERSION_MATCH)
++ string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MAJOR_VERSION ${EXIV2_MAJOR_VERSION_MATCH})
++ string(REGEX REPLACE ".*_MINOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MINOR_VERSION ${EXIV2_MINOR_VERSION_MATCH})
++ string(REGEX REPLACE ".*_PATCH_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_PATCH_VERSION ${EXIV2_PATCH_VERSION_MATCH})
++ endif()
++ endif()
++ endforeach()
++
++ set(LibExiv2_VERSION "${EXIV2_MAJOR_VERSION}.${EXIV2_MINOR_VERSION}.${EXIV2_PATCH_VERSION}")
++endif()
++
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(LibExiv2
++ FOUND_VAR LibExiv2_FOUND
++ REQUIRED_VARS LibExiv2_LIBRARIES LibExiv2_INCLUDE_DIRS
++ VERSION_VAR LibExiv2_VERSION
++)
++
++mark_as_advanced(LibExiv2_INCLUDE_DIRS LibExiv2_LIBRARIES)
++
++if(LibExiv2_FOUND AND NOT TARGET LibExiv2::LibExiv2)
++ add_library(LibExiv2::LibExiv2 UNKNOWN IMPORTED)
++ set_target_properties(LibExiv2::LibExiv2 PROPERTIES
++ IMPORTED_LOCATION "${LibExiv2_LIBRARIES}"
++ INTERFACE_INCLUDE_DIRECTORIES "${LibExiv2_INCLUDE_DIRS}"
++ )
++endif()
++
++include(FeatureSummary)
++set_package_properties(LibExiv2 PROPERTIES
++ URL "http://www.exiv2.org"
++ DESCRIPTION "Image metadata support"
++)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1ffe7ff3..b96b21db 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -81,7 +81,7 @@ if(GM)
+ find_package(Magick REQUIRED)
+ endif()
+ if(EXIV2)
+- find_package(Exiv2 REQUIRED)
++ find_package(LibExiv2 REQUIRED)
+ endif()
+ if(RAW)
+ find_package(LibRaw REQUIRED)
+@@ -218,10 +218,9 @@ if(RAW)
+ endif()
+
+ if(EXIV2)
+- include_directories(${EXIV2_INCLUDE_DIR})
+- target_link_libraries(${PROJECT_NAME} "exiv2")
++ target_link_libraries(${PROJECT_NAME} LibExiv2::LibExiv2)
+ if(TESTING)
+- target_link_libraries(${PROJECT_TEST_NAME} "exiv2")
++ target_link_libraries(${PROJECT_TEST_NAME} LibExiv2::LibExiv2)
+ endif()
+ if(WIN32)
+ target_link_libraries(${PROJECT_NAME} "expat")
+--
+2.20.1
+
+
+From f2a675ea5496febae1daee229ad132086dec24bc Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sun, 20 Jan 2019 18:25:45 +0100
+Subject: [PATCH 3/4] Fix build with exiv2-0.27
+
+---
+ cplusplus/scripts/getanddostuff/manipulation.h | 3 +--
+ cplusplus/scripts/getmetadata.cpp | 4 ++--
+ cplusplus/scripts/getmetadata.h | 3 +--
+ cplusplus/scripts/managepeopletags.cpp | 4 ++--
+ cplusplus/scripts/managepeopletags.h | 3 +--
+ 5 files changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/cplusplus/scripts/getanddostuff/manipulation.h b/cplusplus/scripts/getanddostuff/manipulation.h
+index b3fa9b42..465d9372 100644
+--- a/cplusplus/scripts/getanddostuff/manipulation.h
++++ b/cplusplus/scripts/getanddostuff/manipulation.h
+@@ -38,8 +38,7 @@
+ #include "../../logger.h"
+
+ #ifdef EXIV2
+-#include <exiv2/image.hpp>
+-#include <exiv2/exif.hpp>
++#include <exiv2/exiv2.hpp>
+ #endif
+
+ class GetAndDoStuffManipulation : public QObject {
+diff --git a/cplusplus/scripts/getmetadata.cpp b/cplusplus/scripts/getmetadata.cpp
+index deb89a25..df92de6b 100644
+--- a/cplusplus/scripts/getmetadata.cpp
++++ b/cplusplus/scripts/getmetadata.cpp
+@@ -203,7 +203,7 @@ QVariantMap GetMetaData::getExiv2(QString path) {
+ }
+
+ } catch(Exiv2::Error &e) {
+- LOG << CURDATE << "GetMetaData::getExiv2() Unable to read Exif metadata: " << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
++ LOG << CURDATE << "GetMetaData::getExiv2() Unable to read Exif metadata: " << e.what() << NL;
+ }
+
+ // If GPS is set, compose into one string
+@@ -246,7 +246,7 @@ QVariantMap GetMetaData::getExiv2(QString path) {
+ }
+
+ } catch(Exiv2::Error &e) {
+- LOG << CURDATE << "GetMetaData::getExiv2() ERROR reading IPTC metadata: " << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
++ LOG << CURDATE << "GetMetaData::getExiv2() ERROR reading IPTC metadata: " << e.what() << NL;
+ }
+
+ QString city = returnMap["Iptc.Application2.City"].toString();
+diff --git a/cplusplus/scripts/getmetadata.h b/cplusplus/scripts/getmetadata.h
+index e427cbc1..c5b99140 100644
+--- a/cplusplus/scripts/getmetadata.h
++++ b/cplusplus/scripts/getmetadata.h
+@@ -34,8 +34,7 @@
+ #include "../logger.h"
+
+ #ifdef EXIV2
+-#include <exiv2/image.hpp>
+-#include <exiv2/exif.hpp>
++#include <exiv2/exiv2.hpp>
+ #endif
+
+ class GetMetaData : public QObject {
+diff --git a/cplusplus/scripts/managepeopletags.cpp b/cplusplus/scripts/managepeopletags.cpp
+index 9b8c7503..96baeb9e 100644
+--- a/cplusplus/scripts/managepeopletags.cpp
++++ b/cplusplus/scripts/managepeopletags.cpp
+@@ -98,7 +98,7 @@ QVariantList ManagePeopleTags::getFaceTags(QString path) {
+
+ } catch(Exiv2::Error& e) {
+ LOG << CURDATE << "GetPeopleTag::getPeopleLocations() 2 - ERROR reading exiv data (caught exception): "
+- << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
++ << e.what() << NL;
+ return ret;
+ }
+
+@@ -201,7 +201,7 @@ void ManagePeopleTags::setFaceTags(QString filename, QVariantList tags) {
+
+ } catch(Exiv2::Error& e) {
+ LOG << CURDATE << "GetPeopleTag::setFaceTags() - ERROR reading exiv data (caught exception): "
+- << e << " (" << Exiv2::errMsg(e.code()) << ")" << NL;
++ << e.what() << NL;
+ return;
+ }
+
+diff --git a/cplusplus/scripts/managepeopletags.h b/cplusplus/scripts/managepeopletags.h
+index 1908ba0a..59686cc1 100644
+--- a/cplusplus/scripts/managepeopletags.h
++++ b/cplusplus/scripts/managepeopletags.h
+@@ -29,8 +29,7 @@
+ #include "../logger.h"
+
+ #ifdef EXIV2
+-#include <exiv2/image.hpp>
+-#include <exiv2/exif.hpp>
++#include <exiv2/exiv2.hpp>
+ #endif
+
+ class ManagePeopleTags : public QObject {
+--
+2.20.1
diff --git a/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild b/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
new file mode 100644
index 000000000000..cd6204862f01
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils gnome2-utils xdg-utils
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="https://photoqt.org/"
+SRC_URI="https://photoqt.org/pkgs/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="devil exif freeimage graphicsmagick pdf raw"
+
+RDEPEND="
+ dev-qt/qtcore:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgraphicaleffects:5
+ dev-qt/qtgui:5
+ dev-qt/qtimageformats:5
+ dev-qt/qtmultimedia:5[qml]
+ dev-qt/qtnetwork:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsql:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtxml:5
+ app-arch/libarchive:=
+ app-arch/unrar
+ devil? ( media-libs/devil )
+ exif? ( media-gfx/exiv2:= )
+ freeimage? ( media-libs/freeimage )
+ graphicsmagick? ( >=media-gfx/graphicsmagick-1.3.20:= )
+ pdf? ( app-text/poppler[qt5] )
+ raw? ( media-libs/libraw:= )
+"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5
+ kde-frameworks/extra-cmake-modules:5
+"
+
+PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ -DDEVIL=$(usex devil)
+ -DEXIV2=$(usex exif)
+ -DFREEIMAGE=$(usex freeimage)
+ -DGM=$(usex graphicsmagick)
+ -DPOPPLER=$(usex pdf)
+ -DRAW=$(usex raw)
+ )
+ cmake-utils_src_configure
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}