Hello community,

here is the log from the commit of package photoqt for openSUSE:Factory checked 
in at 2019-04-09 20:18:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/photoqt (Old)
 and      /work/SRC/openSUSE:Factory/.photoqt.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "photoqt"

Tue Apr  9 20:18:40 2019 rev:6 rq:692474 version:1.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/photoqt/photoqt.changes  2018-06-08 
23:17:37.527383173 +0200
+++ /work/SRC/openSUSE:Factory/.photoqt.new.3908/photoqt.changes        
2019-04-09 20:18:41.565842995 +0200
@@ -1,0 +2,7 @@
+Mon Apr  8 20:16:37 UTC 2019 - Christophe Giboudeaux <[email protected]>
+
+- Add patches to fix build with Exiv2 0.27:
+  0001-Switch-to-FindLibExiv2-from-ECM-5.53.0.patch
+  0002-Fix-build-with-exiv2-0.27.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Switch-to-FindLibExiv2-from-ECM-5.53.0.patch
  0002-Fix-build-with-exiv2-0.27.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ photoqt.spec ++++++
--- /var/tmp/diff_new_pack.9bSCV0/_old  2019-04-09 20:18:42.245843922 +0200
+++ /var/tmp/diff_new_pack.9bSCV0/_new  2019-04-09 20:18:42.245843922 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package photoqt
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -25,6 +25,8 @@
 URL:            http://photoqt.org/
 Source0:        http://photoqt.org/pkgs/%{name}-%{version}.tar.gz
 Patch0:         photoqt-1.7-link.patch
+Patch1:         0001-Switch-to-FindLibExiv2-from-ECM-5.53.0.patch
+Patch2:         0002-Fix-build-with-exiv2-0.27.patch
 BuildRequires:  cmake
 BuildRequires:  extra-cmake-modules
 BuildRequires:  freeimage-devel
@@ -48,8 +50,7 @@
 PhotoQt is a configurable image viewer.
 
 %prep
-%setup -q
-%patch0 -p1
+%autosetup -p1
 
 %build
 %cmake -DCRYPTKEY:STRING=4242

++++++ 0001-Switch-to-FindLibExiv2-from-ECM-5.53.0.patch ++++++
>From 601150a18cd9c6e1e6b09bd4effa53710a4eef43 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <[email protected]>
Date: Sun, 20 Jan 2019 17:49:09 +0100
Subject: [PATCH 1/2] Switch to FindLibExiv2 from ECM 5.53.0

Fixes detection of exiv2.
---
 CMake/FindExiv2.cmake    |  26 ---------
 CMake/FindLibExiv2.cmake | 115 +++++++++++++++++++++++++++++++++++++++
 CMakeLists.txt           |   7 +--
 3 files changed, 118 insertions(+), 30 deletions(-)
 delete mode 100644 CMake/FindExiv2.cmake
 create mode 100644 CMake/FindLibExiv2.cmake

diff --git a/CMake/FindExiv2.cmake b/CMake/FindExiv2.cmake
deleted file mode 100644
index 80390309..00000000
--- a/CMake/FindExiv2.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-#-*-cmake-*-
-#
-# Test for Exiv2 sources
-#
-# Once loaded this will define
-#  EXIV2_FOUND        - system has Exiv2
-#  EXIV2_INCLUDE_DIR  - include directory for Exiv2
-#
-
-SET(EXIV2_FOUND "NO")
-
-FIND_PATH(EXIV2_INCLUDE_DIR exiv2/image.hpp
-    "${EXIV2_LOCATION}"
-    "${EXIV2_LOCATION}/include"
-    /usr/include
-    /usr/include/Exiv2
-    /opt/local/include/Exiv2
-)
-
-IF(EXIV2_INCLUDE_DIR)
-    SET(EXIV2_FOUND "YES")
-    MESSAGE(STATUS "Exiv2 found at: ${EXIV2_INCLUDE_DIR}/exiv2")
-ENDIF(EXIV2_INCLUDE_DIR)
-
-#####
-
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, <[email protected]>
+# Copyright (c) 2010, Alexander Neundorf, <[email protected]>
+# Copyright (c) 2008, Gilles Caulier, <[email protected]>
+#
+#
+# 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 9af47a75..ed086b3f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,7 +76,7 @@ if(GM)
     find_package(Magick)
 endif(GM)
 if(EXIV2)
-    find_package(Exiv2)
+    find_package(LibExiv2)
 endif(EXIV2)
 if(RAW)
     find_package(LibRaw)
@@ -250,10 +250,9 @@ 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")
+        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(TESTING)
         if(WIN32)
             target_link_libraries(${PROJECT_NAME} "expat")
-- 
2.21.0

++++++ 0002-Fix-build-with-exiv2-0.27.patch ++++++
>From c6fd41478e818f3a651d40f96cab3d790e1c09a4 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <[email protected]>
Date: Sun, 20 Jan 2019 18:25:45 +0100
Subject: [PATCH 2/2] 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 ++--
 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.21.0


Reply via email to