* [gentoo-commits] repo/gentoo:master commit in: media-gfx/photoqt/files/, media-gfx/photoqt/
@ 2019-01-20 19:03 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2019-01-20 19:03 UTC (permalink / raw
To: gentoo-commits
commit: 6ce6689cb898b2a4c283f9e7c3cde5147e011ca6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 20 17:40:15 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 20 18:54:16 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ce6689c
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 <AT> gentoo.org>
.../photoqt/files/photoqt-1.7.1-exiv2-0.27.patch | 541 +++++++++++++++++++++
media-gfx/photoqt/photoqt-1.7.1-r1.ebuild | 66 +++
2 files changed, 607 insertions(+)
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 00000000000..d2b264e0175
--- /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 00000000000..cd6204862f0
--- /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
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/photoqt/files/, media-gfx/photoqt/
@ 2019-01-24 22:26 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2019-01-24 22:26 UTC (permalink / raw
To: gentoo-commits
commit: 465064e149846c57787480f2cd8d6bc30b8d4965
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 24 21:19:50 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jan 24 22:25:59 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=465064e1
media-gfx/photoqt: Less invasive patch
Closes: https://bugs.gentoo.org/676194
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../photoqt/files/photoqt-1.7.1-exiv2-0.27.patch | 447 +--------------------
media-gfx/photoqt/photoqt-1.7.1-r1.ebuild | 5 +-
2 files changed, 8 insertions(+), 444 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
index d2b264e0175..48734ce7059 100644
--- 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
@@ -1,448 +1,9 @@
-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 c6fd41478e818f3a651d40f96cab3d790e1c09a4 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
+Subject: [PATCH] Fix build with exiv2-0.27
+Fixes https://gitlab.com/luspi/photoqt/issues/64
---
cplusplus/scripts/getanddostuff/manipulation.h | 3 +--
cplusplus/scripts/getmetadata.cpp | 4 ++--
@@ -538,4 +99,4 @@ index 1908ba0a..59686cc1 100644
class ManagePeopleTags : public QObject {
--
-2.20.1
+2.18.1
diff --git a/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild b/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
index cd6204862f0..10122796833 100644
--- a/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
+++ b/media-gfx/photoqt/photoqt-1.7.1-r1.ebuild
@@ -41,7 +41,10 @@ DEPEND="${RDEPEND}
kde-frameworks/extra-cmake-modules:5
"
-PATCHES=( "${FILESDIR}/${P}-exiv2-0.27.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-cmake.patch"
+ "${FILESDIR}/${P}-exiv2-0.27.patch" # bugs 675714, 676194
+)
src_configure() {
local mycmakeargs=(
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/photoqt/files/, media-gfx/photoqt/
@ 2025-01-31 14:55 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2025-01-31 14:55 UTC (permalink / raw
To: gentoo-commits
commit: 8318f3fa3f8ea26e2fe59f43bf4646016b1200b3
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 14:52:49 2025 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Jan 31 14:53:25 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8318f3fa
media-gfx/photoqt: drop 3.2
Bug: https://bugs.gentoo.org/948000
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-gfx/photoqt/Manifest | 1 -
.../photoqt/files/photoqt-3.2-exiv2-0.28.patch | 116 ---------------------
media-gfx/photoqt/photoqt-3.2.ebuild | 75 -------------
3 files changed, 192 deletions(-)
diff --git a/media-gfx/photoqt/Manifest b/media-gfx/photoqt/Manifest
index 758f57eae4a9..1742c508bcd1 100644
--- a/media-gfx/photoqt/Manifest
+++ b/media-gfx/photoqt/Manifest
@@ -1,2 +1 @@
-DIST photoqt-3.2.tar.gz 965895 BLAKE2B ae1e159401b24a1bede344e4d398dbd6c2ae13fd467a4eac9ef15ea2d15933dc1756325a5a4f305a5f447bfd1a9e2d636e0b9367d0201ca356393c033c4f2f0f SHA512 ab7030d0ed6edf79373b1a99b1b8469cd567f04e5c233a87496084424603d8c241f7b473c22d323f4df8480d3f74918a987d2d590ec5026f1b7ca2c92b5c6bba
DIST photoqt-4.7.tar.gz 3612004 BLAKE2B f4bfd07103e614e3b128668ee7b1dc4767d5c8bd6af4164315e75d537e4054ee2e13fd2f2d8f044669c80bfa31d0651a5a71f07d0947c6b8f1a3088d55123407 SHA512 41274b52ece3a905de7c274183b658b40fdc72ee291b008afdfb2c7e8bb49308ac54c66760397359838bcd9470aa0140bd769137d5a72cd1c11bc4b1a7accb66
diff --git a/media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch b/media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch
deleted file mode 100644
index b1da118c1537..000000000000
--- a/media-gfx/photoqt/files/photoqt-3.2-exiv2-0.28.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 376fe8c3ef6b16d63995f76a194e2c1d788b28b1 Mon Sep 17 00:00:00 2001
-From: Lukas Spies <Lukas@photoqt.org>
-Date: Sun, 28 May 2023 20:23:32 -0500
-Subject: [PATCH 1/2] [exiv2] fix compilation with Exiv2 v0.28.0
-
----
- cplusplus/filefoldermodel/filefoldermodel.cpp | 4 ++++
- cplusplus/scripts/handlingfacetags.cpp | 4 ++++
- cplusplus/scripts/metadata.cpp | 4 ++++
- 3 files changed, 12 insertions(+)
-
-diff --git a/cplusplus/filefoldermodel/filefoldermodel.cpp b/cplusplus/filefoldermodel/filefoldermodel.cpp
-index b6258735..56b120b7 100644
---- a/cplusplus/filefoldermodel/filefoldermodel.cpp
-+++ b/cplusplus/filefoldermodel/filefoldermodel.cpp
-@@ -560,7 +560,11 @@ void PQFileFolderModel::advancedSortMainView() {
- } catch (Exiv2::Error& e) {
- // An error code of 11 means unknown file type
- // Since we always try to read any file's meta data, this happens a lot
-+#if EXIV2_TEST_VERSION(0, 28, 0)
-+ if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType)
-+#else
- if(e.code() != 11)
-+#endif
- LOG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL;
- else
- DBG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL;
-diff --git a/cplusplus/scripts/handlingfacetags.cpp b/cplusplus/scripts/handlingfacetags.cpp
-index d90ece73..562cf200 100644
---- a/cplusplus/scripts/handlingfacetags.cpp
-+++ b/cplusplus/scripts/handlingfacetags.cpp
-@@ -57,7 +57,11 @@ QVariantList PQHandlingFaceTags::getFaceTags(QString filename) {
- image->readMetadata();
- } catch (Exiv2::Error& e) {
- // An error code of 11 means image not supported. This is much more reliable than, e.g., checking a file ending
-+#if EXIV2_TEST_VERSION(0, 28, 0)
-+ if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType)
-+#else
- if(e.code() != 11)
-+#endif
- LOG << CURDATE << "PQHandlingFaceTags::getFaceTags() - ERROR reading metadata (caught exception): " << e << NL;
- else
- DBG << CURDATE << "PQHandlingFaceTags::getFaceTags() - ERROR reading metadata (caught exception): " << e << NL;
-diff --git a/cplusplus/scripts/metadata.cpp b/cplusplus/scripts/metadata.cpp
-index 87e23474..a7d3e076 100644
---- a/cplusplus/scripts/metadata.cpp
-+++ b/cplusplus/scripts/metadata.cpp
-@@ -120,7 +120,11 @@ void PQMetaData::updateMetadata(QString path) {
- } catch (Exiv2::Error& e) {
- // An error code of 11 means unknown file type
- // Since we always try to read any file's meta data, this happens a lot
-+#if EXIV2_TEST_VERSION(0, 28, 0)
-+ if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType)
-+#else
- if(e.code() != 11)
-+#endif
- LOG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL;
- else
- DBG << CURDATE << "PQMetaData::updateMetadaya(): ERROR reading exiv data (caught exception): " << e.what() << NL;
---
-2.40.1
-
-
-From 6190de9e47c358cf54748fa2a3593108831aa768 Mon Sep 17 00:00:00 2001
-From: Lukas Spies <Lukas@photoqt.org>
-Date: Sun, 28 May 2023 20:27:08 -0500
-Subject: [PATCH 2/2] [exiv2] switch to proper exvi2 errorcode
-
----
- cplusplus/filefoldermodel/filefoldermodel.cpp | 2 +-
- cplusplus/scripts/handlingfacetags.cpp | 2 +-
- cplusplus/scripts/metadata.cpp | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/cplusplus/filefoldermodel/filefoldermodel.cpp b/cplusplus/filefoldermodel/filefoldermodel.cpp
-index 56b120b7..c8cf199a 100644
---- a/cplusplus/filefoldermodel/filefoldermodel.cpp
-+++ b/cplusplus/filefoldermodel/filefoldermodel.cpp
-@@ -561,7 +561,7 @@ void PQFileFolderModel::advancedSortMainView() {
- // An error code of 11 means unknown file type
- // Since we always try to read any file's meta data, this happens a lot
- #if EXIV2_TEST_VERSION(0, 28, 0)
-- if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType)
-+ if(e.code() != Exiv2::ErrorCode::kerFileContainsUnknownImageType)
- #else
- if(e.code() != 11)
- #endif
-diff --git a/cplusplus/scripts/handlingfacetags.cpp b/cplusplus/scripts/handlingfacetags.cpp
-index 562cf200..94a7bca6 100644
---- a/cplusplus/scripts/handlingfacetags.cpp
-+++ b/cplusplus/scripts/handlingfacetags.cpp
-@@ -58,7 +58,7 @@ QVariantList PQHandlingFaceTags::getFaceTags(QString filename) {
- } catch (Exiv2::Error& e) {
- // An error code of 11 means image not supported. This is much more reliable than, e.g., checking a file ending
- #if EXIV2_TEST_VERSION(0, 28, 0)
-- if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType)
-+ if(e.code() != Exiv2::ErrorCode::kerFileContainsUnknownImageType)
- #else
- if(e.code() != 11)
- #endif
-diff --git a/cplusplus/scripts/metadata.cpp b/cplusplus/scripts/metadata.cpp
-index a7d3e076..fabc2d74 100644
---- a/cplusplus/scripts/metadata.cpp
-+++ b/cplusplus/scripts/metadata.cpp
-@@ -121,7 +121,7 @@ void PQMetaData::updateMetadata(QString path) {
- // An error code of 11 means unknown file type
- // Since we always try to read any file's meta data, this happens a lot
- #if EXIV2_TEST_VERSION(0, 28, 0)
-- if(e.code() != Exiv2::ErrorCode::kerUnsupportedImageType)
-+ if(e.code() != Exiv2::ErrorCode::kerFileContainsUnknownImageType)
- #else
- if(e.code() != 11)
- #endif
---
-2.40.1
-
diff --git a/media-gfx/photoqt/photoqt-3.2.ebuild b/media-gfx/photoqt/photoqt-3.2.ebuild
deleted file mode 100644
index 5cdfa03f5411..000000000000
--- a/media-gfx/photoqt/photoqt-3.2.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_KDEINSTALLDIRS=false
-inherit ecm optfeature
-
-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 imagemagick mpv pdf raw"
-
-COMMON_DEPEND="
- app-arch/libarchive:=
- app-arch/unrar
- dev-libs/pugixml
- dev-qt/qtdbus:5
- dev-qt/qtdeclarative:5
- dev-qt/qtgui:5[jpeg]
- dev-qt/qtimageformats:5
- dev-qt/qtmultimedia:5[qml]
- dev-qt/qtnetwork:5
- dev-qt/qtprintsupport:5
- dev-qt/qtsql:5
- dev-qt/qtsvg:5
- dev-qt/qtwidgets:5
- dev-qt/qtxml:5
- devil? ( media-libs/devil )
- exif? ( media-gfx/exiv2:=[bmff] )
- freeimage? ( media-libs/freeimage )
- imagemagick? (
- !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
- graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
- )
- mpv? ( media-video/mpv:=[libmpv] )
- pdf? ( app-text/poppler[qt5] )
- raw? ( media-libs/libraw:= )
-"
-DEPEND="${COMMON_DEPEND}
- dev-qt/qtconcurrent:5
-"
-RDEPEND="${COMMON_DEPEND}
- dev-qt/qtgraphicaleffects:5
- dev-qt/qtquickcontrols:5
- dev-qt/qtquickcontrols2:5
-"
-BDEPEND="dev-qt/linguist-tools:5"
-
-PATCHES=( "${FILESDIR}/${P}-exiv2-0.28.patch" ) # upstream git master, bug #906491
-
-src_configure() {
- local mycmakeargs=(
- -DCHROMECAST=OFF # TODO needs python
- -DDEVIL=$(usex devil)
- -DEXIV2=$(usex exif)
- -DEXIV2_ENABLE_BMFF=$(usex exif)
- -DFREEIMAGE=$(usex freeimage)
- -DGRAPHICSMAGICK=$(usex graphicsmagick $(usex imagemagick))
- -DIMAGEMAGICK=$(usex imagemagick $(usex !graphicsmagick))
- -DVIDEO_MPV=$(usex mpv)
- -DPOPPLER=$(usex pdf)
- -DRAW=$(usex raw)
- )
- ecm_src_configure
-}
-
-pkg_postinst() {
- optfeature "additional image formats like AVIF, EPS, HEIF/HEIC, PSD, etc." kde-frameworks/kimageformats
- ecm_pkg_postinst
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-31 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-20 19:03 [gentoo-commits] repo/gentoo:master commit in: media-gfx/photoqt/files/, media-gfx/photoqt/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2019-01-24 22:26 Andreas Sturmlechner
2025-01-31 14:55 Andreas Sturmlechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox