Hello community,

here is the log from the commit of package krename for openSUSE:Factory checked 
in at 2019-01-03 18:08:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/krename (Old)
 and      /work/SRC/openSUSE:Factory/.krename.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "krename"

Thu Jan  3 18:08:25 2019 rev:35 rq:662427 version:5.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/krename/krename.changes  2018-02-16 
21:45:03.062268143 +0100
+++ /work/SRC/openSUSE:Factory/.krename.new.28833/krename.changes       
2019-01-03 18:08:29.784040776 +0100
@@ -1,0 +2,15 @@
+Wed Jan  2 09:58:56 UTC 2019 - wba...@tmo.at
+
+- Add upstream patches to add support for exiv2-0.27:
+  * 0001-Use-cmakedefine01-instead-of-macro_bool_to_01.patch
+  * 0002-Fix-building-against-exiv2-0.27.patch
+  * 0003-Fix-the-previous-commits-and-the-build-with-exiv2-0..patch
+- Add lower-minimum-cmake-version.patch for Leap 42.3 to make it
+  build with the older cmake version (3.5.2)
+- Update servicemenus-files.patch and remove-gplv2-code.diff to
+  conform to -p1 and use "%autopatch -p1" to apply all patches
+- Add missing Qt5Test build requirement
+- Change URL to userbase.kde.org, krename.net is a bit outdated
+- Run spec-cleaner
+
+-------------------------------------------------------------------

New:
----
  0001-Use-cmakedefine01-instead-of-macro_bool_to_01.patch
  0002-Fix-building-against-exiv2-0.27.patch
  0003-Fix-the-previous-commits-and-the-build-with-exiv2-0..patch
  lower-minimum-cmake-version.patch

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

Other differences:
------------------
++++++ krename.spec ++++++
--- /var/tmp/diff_new_pack.z5MY8D/_old  2019-01-03 18:08:30.396040232 +0100
+++ /var/tmp/diff_new_pack.z5MY8D/_new  2019-01-03 18:08:30.396040232 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package krename
 #
-# Copyright (c) 2018 SUSE LINUX Products 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/
 #
 
 
@@ -20,14 +20,20 @@
 Version:        5.0.0
 Release:        0
 Summary:        A Powerful Batch Renamer by KDE
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          Productivity/File utilities
-Url:            http://www.krename.net/
+URL:            https://userbase.kde.org/KRename
 Source0:        
https://download.kde.org/stable/%{name}/%{version}/src/%{name}-%{version}.tar.xz
 # PATCH-FIX-UPSTREAM servicemenus-files.patch asterios.dra...@gmail.com -- 
Make the desktop files KDE and XDG compatible
 Patch0:         servicemenus-files.patch
 # PATCH-FIX-UPSTREAM remove-gplv2-code.diff dmuel...@suse.de -- Remove GPLv2 
only code (only used for self-testing)
 Patch1:         remove-gplv2-code.diff
+# PATCH-FIX-UPSTREAM -- add support for exiv2 >= 0.27
+Patch2:         0001-Use-cmakedefine01-instead-of-macro_bool_to_01.patch
+Patch3:         0002-Fix-building-against-exiv2-0.27.patch
+Patch4:         0003-Fix-the-previous-commits-and-the-build-with-exiv2-0..patch
+# PATCH-FIX-OPENSUSE
+Patch5:         lower-minimum-cmake-version.patch
 BuildRequires:  extra-cmake-modules
 BuildRequires:  freetype2-devel
 BuildRequires:  kcompletion-devel
@@ -45,16 +51,16 @@
 BuildRequires:  kxmlgui-devel
 BuildRequires:  libexiv2-devel
 BuildRequires:  libpodofo-devel
-%if 0%{?suse_version} >= 1500
-# podofo 0.9.5 needs openssl-devel by mistake, should be fixed in 0.9.6
-BuildRequires:  openssl-devel
-%endif
 BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
 BuildRequires:  pkgconfig(Qt5Core)
+BuildRequires:  pkgconfig(Qt5Test)
 BuildRequires:  pkgconfig(Qt5Widgets)
 BuildRequires:  pkgconfig(taglib)
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%if 0%{?suse_version} >= 1500
+# podofo 0.9.5 needs openssl-devel by mistake, should be fixed in 0.9.6
+BuildRequires:  openssl-devel
+%endif
 
 %description
 KRename is a powerful batch renamer by KDE. It allows you to easily rename
@@ -64,10 +70,9 @@
 
 %prep
 %setup -q
-%patch0 -p0
 # GPLv2 only code, not really needed, lets avoid the license discussion
 rm -rf src/modeltest.*
-%patch1 -p0
+%autopatch -p1
 
 %build
 %cmake_kf5 -d build 
@@ -80,8 +85,8 @@
 %find_lang %{name}
 
 %files -f %{name}.lang
-%defattr(-,root,root,-)
-%doc AUTHORS COPYING README.md TODO
+%license COPYING
+%doc AUTHORS README.md TODO
 %if 0%{?suse_version} == 1315 && 0%{?sle_version} == 120100
 %dir %{_kf5_appstreamdir}
 %endif

++++++ 0001-Use-cmakedefine01-instead-of-macro_bool_to_01.patch ++++++
>From ec90823494f5ec9bb2e8098f44209f383ef8c22a Mon Sep 17 00:00:00 2001
From: Heiko Becker <heire...@exherbo.org>
Date: Tue, 20 Nov 2018 18:24:29 +0100
Subject: [PATCH 1/3] Use #cmakedefine01 instead  of macro_bool_to_01

---
 CMakeLists.txt                    | 13 +++++--------
 cmake/modules/MacroBoolTo01.cmake | 20 --------------------
 config-krename.h.cmake            | 10 +++++-----
 3 files changed, 10 insertions(+), 33 deletions(-)
 delete mode 100644 cmake/modules/MacroBoolTo01.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc986fa..717d859 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,13 +80,10 @@ set_package_properties(Freetype PROPERTIES
 
 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
-
-# Update configuration
-include(MacroBoolTo01)
-macro_bool_to_01(TAGLIB_FOUND HAVE_TAGLIB)
-macro_bool_to_01(EXIV2_FOUND HAVE_EXIV2)
-macro_bool_to_01(PoDoFo_FOUND HAVE_PODOFO)
-macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE)
+set(HAVE_TAGLIB TAGLIB_FOUND)
+set(HAVE_EXIV2 EXIV2_FOUND)
+set(HAVE_PODOFO PoDoFo_FOUND)
+set(HAVE_FREETYPE FREETYPE_FOUND)
 configure_file(config-krename.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-krename.h)
 
 # Directories
diff --git a/cmake/modules/MacroBoolTo01.cmake 
b/cmake/modules/MacroBoolTo01.cmake
deleted file mode 100644
index 63b9852..0000000
--- a/cmake/modules/MacroBoolTo01.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN )
-# This macro evaluates its first argument
-# and sets all the given vaiables either to 0 or 1
-# depending on the value of the first one
-
-# Copyright (c) 2006, Alexander Neundorf, <neund...@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
-   FOREACH (_current_VAR ${ARGN})
-      IF(${FOUND_VAR})
-         SET(${_current_VAR} 1)
-      ELSE(${FOUND_VAR})
-         SET(${_current_VAR} 0)
-      ENDIF(${FOUND_VAR})
-   ENDFOREACH(_current_VAR)
-ENDMACRO(MACRO_BOOL_TO_01)
diff --git a/config-krename.h.cmake b/config-krename.h.cmake
index 959e5cb..862e40b 100644
--- a/config-krename.h.cmake
+++ b/config-krename.h.cmake
@@ -1,15 +1,15 @@
 /* config.h. Generated by cmake from config.h.cmake */
 
 /* have TagLib */
-#define HAVE_TAGLIB ${HAVE_TAGLIB}
+#cmakedefine01 HAVE_TAGLIB
 
 /* have Exiv2 */
-#define HAVE_EXIV2 ${HAVE_EXIV2}
+#cmakedefine01 HAVE_EXIV2
 
 /* have PoDoFo */
-#define HAVE_PODOFO ${HAVE_PODOFO}
+#cmakedefine01 HAVE_PODOFO
 
 /* have Freetype */
-#define HAVE_FREETYPE ${HAVE_FREETYPE}
+#cmakedefine01 HAVE_FREETYPE
 
 #define VERSION "${KRENAME_VERSION}"
-- 
2.16.4

++++++ 0002-Fix-building-against-exiv2-0.27.patch ++++++
>From b22de9135ba2a5abdbd2b275a60933a50f074010 Mon Sep 17 00:00:00 2001
From: Heiko Becker <heire...@exherbo.org>
Date: Tue, 20 Nov 2018 18:26:47 +0100
Subject: [PATCH 2/3] Fix building against exiv2-0.27

One neeeded part is to copy over the new FindLibExiv2 module from
ECM which has not appeared in a release yet (it will with 5.53.0).
I'll probably add that version as a requirement and remove the copy
again in the near future.
The other part includes raising the cmake version requirement to
3.7.0, which was released over 2 years ago. (The version comparison
could be easily solved differently and less elegantly, but let's see
if people with ancient cmakes complain).
---
 CMakeLists.txt                   |  15 ++---
 cmake/modules/FindExiv2.cmake    |  79 ---------------------------
 cmake/modules/FindLibExiv2.cmake | 115 +++++++++++++++++++++++++++++++++++++++
 config-krename.h.cmake           |   3 +
 src/CMakeLists.txt               |   8 +--
 src/exiv2plugin.cpp              |   8 ++-
 6 files changed, 137 insertions(+), 91 deletions(-)
 delete mode 100644 cmake/modules/FindExiv2.cmake
 create mode 100644 cmake/modules/FindLibExiv2.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 717d859..be33a09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 project(krename)
 
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.7)
 # search packages used by KDE
 find_package(ECM 0.0.11 REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
@@ -52,11 +52,12 @@ set_package_properties(Taglib PROPERTIES
     TYPE OPTIONAL)
 
 # Find exiv2
-find_package(Exiv2 0.13) # AccessMode was added in 0.13
-set_package_properties(Exiv2 PROPERTIES
-    DESCRIPTION "A library to access image metadata"
-    URL "http://www.exiv2.org";
-    TYPE OPTIONAL)
+find_package(LibExiv2 0.13) # AccessMode was added in 0.13
+set_package_properties(LibExiv2 PROPERTIES TYPE OPTIONAL)
+
+if (LibExiv2_VERSION VERSION_GREATER_EQUAL "0.27")
+    set(HAVE_LIBEXIV2_0_27 TRUE)
+endif()
 
 # Find podofo
 find_package(PoDoFo)
@@ -81,7 +82,7 @@ set_package_properties(Freetype PROPERTIES
 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
 set(HAVE_TAGLIB TAGLIB_FOUND)
-set(HAVE_EXIV2 EXIV2_FOUND)
+set(HAVE_EXIV2 LibExiv2_FOUND)
 set(HAVE_PODOFO PoDoFo_FOUND)
 set(HAVE_FREETYPE FREETYPE_FOUND)
 configure_file(config-krename.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-krename.h)
diff --git a/cmake/modules/FindExiv2.cmake b/cmake/modules/FindExiv2.cmake
deleted file mode 100644
index dd9af86..0000000
--- a/cmake/modules/FindExiv2.cmake
+++ /dev/null
@@ -1,79 +0,0 @@
-# - Try to find the Exiv2 library
-#
-#  EXIV2_MIN_VERSION - You can set this variable to the minimum version you 
need
-#                      before doing FIND_PACKAGE(Exiv2). The default is 0.12.
-#
-# Once done this will define
-#
-#  EXIV2_FOUND - system has libexiv2
-#  EXIV2_INCLUDE_DIR - the libexiv2 include directory
-#  EXIV2_LIBRARIES - Link these to use libexiv2
-#  EXIV2_DEFINITIONS - Compiler switches required for using libexiv2
-#
-# The minimum required version of Exiv2 can be specified using the
-# standard syntax, e.g. find_package(Exiv2 0.17)
-#
-# For compatibility, also the variable EXIV2_MIN_VERSION can be set to the 
minimum version
-# you need before doing FIND_PACKAGE(Exiv2). The default is 0.12.
-
-# Copyright (c) 2010, Alexander Neundorf, <neund...@kde.org>
-# Copyright (c) 2008, Gilles Caulier, <caulier.gil...@gmail.com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# Support EXIV2_MIN_VERSION for compatibility:
-if(NOT Exiv2_FIND_VERSION)
-  set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}")
-endif(NOT Exiv2_FIND_VERSION)
-
-# the minimum version of exiv2 we require
-if(NOT Exiv2_FIND_VERSION)
-  set(Exiv2_FIND_VERSION "0.12")
-endif(NOT Exiv2_FIND_VERSION)
-
-
-if (NOT WIN32)
-   # use pkg-config to get the directories and then use these values
-   # in the FIND_PATH() and FIND_LIBRARY() calls
-   find_package(PkgConfig)
-   pkg_check_modules(PC_EXIV2 QUIET exiv2)
-   set(EXIV2_DEFINITIONS ${PC_EXIV2_CFLAGS_OTHER})
-endif (NOT WIN32)
-
-
-find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp
-          HINTS
-          ${PC_EXIV2_INCLUDEDIR}
-          ${PC_EXIV2_INCLUDE_DIRS}
-        )
-
-find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2
-             HINTS
-             ${PC_EXIV2_LIBDIR}
-             ${PC_EXIV2_LIBRARY_DIRS}
-            )
-
-
-# Get the version number from exiv2/version.hpp and store it in the cache:
-if(EXIV2_INCLUDE_DIR  AND NOT  EXIV2_VERSION)
-  file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT)
-  string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)"  _dummy 
"${EXIV2_VERSION_CONTENT}")
-  set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}")
-
-  string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)"  _dummy 
"${EXIV2_VERSION_CONTENT}")
-  set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}")
-
-  string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)"  _dummy 
"${EXIV2_VERSION_CONTENT}")
-  set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}")
-
-  set(EXIV2_VERSION 
"${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" CACHE 
STRING "Version number of Exiv2" FORCE)
-endif(EXIV2_INCLUDE_DIR  AND NOT  EXIV2_VERSION)
-
-set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}")
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Exiv2  REQUIRED_VARS  EXIV2_LIBRARY 
EXIV2_INCLUDE_DIR
-                                         VERSION_VAR  EXIV2_VERSION)
-
-mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY)
diff --git a/cmake/modules/FindLibExiv2.cmake b/cmake/modules/FindLibExiv2.cmake
new file mode 100644
index 0000000..935cee2
--- /dev/null
+++ b/cmake/modules/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, <christo...@krop.fr>
+# Copyright (c) 2010, Alexander Neundorf, <neund...@kde.org>
+# Copyright (c) 2008, Gilles Caulier, <caulier.gil...@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/config-krename.h.cmake b/config-krename.h.cmake
index 862e40b..de25e6f 100644
--- a/config-krename.h.cmake
+++ b/config-krename.h.cmake
@@ -6,6 +6,9 @@
 /* have Exiv2 */
 #cmakedefine01 HAVE_EXIV2
 
+/* Defined if we have libexiv2 >= 0.27 */
+#cmakedefine01 HAVE_LIBEXIV2_0_27
+
 /* have PoDoFo */
 #cmakedefine01 HAVE_PODOFO
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1811fb0..3f262b3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,7 +23,7 @@ if(FREETYPE_FOUND)
     include_directories(${FREETYPE_INCLUDE_DIRS})
 endif()
 
-add_definitions(${TAGLIB_CFLAGS} ${EXIV2_CFLAGS})
+add_definitions(${TAGLIB_CFLAGS})
 # Exiv2 needs exceptions
 kde_enable_exceptions()
 
@@ -67,7 +67,7 @@ set(krename_SRCS
     snumplugin.cpp
 )
 
-if(EXIV2_FOUND)
+if(LibExiv2_FOUND)
     set(krename_SRCS ${krename_SRCS}
         exiv2plugin.cpp
     )
@@ -137,9 +137,9 @@ if(TAGLIB_FOUND)
         ${TAGLIB_LIBRARIES}
     )
 endif()
-if(EXIV2_FOUND)
+if(LibExiv2_FOUND)
     target_link_libraries(krename
-        ${EXIV2_LIBRARIES}
+        LibExiv2::LibExiv2
     )
 endif()
 if(PoDoFo_FOUND)
diff --git a/src/exiv2plugin.cpp b/src/exiv2plugin.cpp
index 39ac9e7..8c5c1cf 100644
--- a/src/exiv2plugin.cpp
+++ b/src/exiv2plugin.cpp
@@ -17,13 +17,19 @@
 
 #include "exiv2plugin.h"
 
+#include "../config-krename.h"
+
 #include <KLocalizedString>
 
 #include <exiv2/error.hpp>
 #include <exiv2/exif.hpp>
 #include <exiv2/image.hpp>
 #include <exiv2/iptc.hpp>
-#include <exiv2/xmp.hpp>
+#ifdef HAVE_LIBEXIV2_0_27
+    #include <exiv2/xmp_exiv2.hpp>
+#else
+    #include <exiv2/xmp.hpp>
+#endif
 #include <exiv2/tags.hpp>
 
 #include "batchrenamer.h"
-- 
2.16.4

++++++ 0003-Fix-the-previous-commits-and-the-build-with-exiv2-0..patch ++++++
>From e54a32c89a8e2b9e01d4d02b699bac6062db0500 Mon Sep 17 00:00:00 2001
From: Heiko Becker <heire...@exherbo.org>
Date: Tue, 20 Nov 2018 19:01:04 +0100
Subject: [PATCH 3/3] Fix the previous commits and the build with exiv2<0.27

---
 CMakeLists.txt         | 10 +++++-----
 config-krename.h.cmake |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index be33a09..4cbbb09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,10 +81,10 @@ set_package_properties(Freetype PROPERTIES
 
 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
-set(HAVE_TAGLIB TAGLIB_FOUND)
-set(HAVE_EXIV2 LibExiv2_FOUND)
-set(HAVE_PODOFO PoDoFo_FOUND)
-set(HAVE_FREETYPE FREETYPE_FOUND)
+set(HAVE_TAGLIB ${TAGLIB_FOUND})
+set(HAVE_EXIV2 ${LibExiv2_FOUND})
+set(HAVE_PODOFO ${PoDoFo_FOUND})
+set(HAVE_FREETYPE ${FREETYPE_FOUND})
 configure_file(config-krename.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-krename.h)
 
 # Directories
diff --git a/config-krename.h.cmake b/config-krename.h.cmake
index de25e6f..76c3d30 100644
--- a/config-krename.h.cmake
+++ b/config-krename.h.cmake
@@ -7,7 +7,7 @@
 #cmakedefine01 HAVE_EXIV2
 
 /* Defined if we have libexiv2 >= 0.27 */
-#cmakedefine01 HAVE_LIBEXIV2_0_27
+#cmakedefine HAVE_LIBEXIV2_0_27
 
 /* have PoDoFo */
 #cmakedefine01 HAVE_PODOFO
-- 
2.16.4

++++++ lower-minimum-cmake-version.patch ++++++
>From 7a586c57c308107c3e63ae3cd199079de2bee8e6 Mon Sep 17 00:00:00 2001
From: Wolfgang Bauer <wba...@tmo.at>
Date: Wed, 2 Jan 2019 10:54:42 +0100
Subject: [PATCH] Lower minimum cmake version

VERSION_GREATER_EQUAL is new in cmake 3.7.
So use NOT VERSION_LESS instead, which also works with older versions.
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4cbbb09..a6301c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
 project(krename)
 
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.0)
 # search packages used by KDE
 find_package(ECM 0.0.11 REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
@@ -61,7 +61,7 @@ set_package_properties(Taglib PROPERTIES
 find_package(LibExiv2 0.13) # AccessMode was added in 0.13
 set_package_properties(LibExiv2 PROPERTIES TYPE OPTIONAL)
 
-if (LibExiv2_VERSION VERSION_GREATER_EQUAL "0.27")
+if (NOT LibExiv2_VERSION VERSION_LESS "0.27")
     set(HAVE_LIBEXIV2_0_27 TRUE)
 endif()
 
-- 
2.16.4
++++++ remove-gplv2-code.diff ++++++
--- /var/tmp/diff_new_pack.z5MY8D/_old  2019-01-03 18:08:30.444040190 +0100
+++ /var/tmp/diff_new_pack.z5MY8D/_new  2019-01-03 18:08:30.448040186 +0100
@@ -1,5 +1,5 @@
---- src/CMakeLists.txt
-+++ src/CMakeLists.txt
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
 @@ -47,7 +47,6 @@
      krenametest.cpp
      krenametokensorter.cpp
@@ -8,8 +8,8 @@
      numberdialog.cpp
      insertpartfilenamedlg.cpp
      threadedlister.cpp
---- src/krenameimpl.cpp
-+++ src/krenameimpl.cpp
+--- a/src/krenameimpl.cpp
++++ b/src/krenameimpl.cpp
 @@ -31,8 +31,6 @@
  #include "threadedlister.h"
  #include "tokenhelpdialog.h"
@@ -51,8 +51,8 @@
  void KRenameImpl::slotUpdateCount()
  {
      m_window->setCount(m_vector.size());
---- src/krenameimpl.h
-+++ src/krenameimpl.h
+--- a/src/krenameimpl.h
++++ b/src/krenameimpl.h
 @@ -100,11 +100,6 @@
       */
      void saveConfig();

++++++ servicemenus-files.patch ++++++
--- /var/tmp/diff_new_pack.z5MY8D/_old  2019-01-03 18:08:30.456040179 +0100
+++ /var/tmp/diff_new_pack.z5MY8D/_new  2019-01-03 18:08:30.456040179 +0100
@@ -1,6 +1,6 @@
-diff -uNr src/servicemenus/krename_all_nonrec.desktop 
src/servicemenus_new/krename_all_nonrec.desktop
---- src/servicemenus/krename_all_nonrec.desktop        2009-09-05 
19:13:29.000000000 +0300
-+++ src/servicemenus_new/krename_all_nonrec.desktop    2011-01-30 
22:08:29.037391236 +0200
+diff -uNr a/src/servicemenus/krename_all_nonrec.desktop 
b/src/servicemenus_new/krename_all_nonrec.desktop
+--- a/src/servicemenus/krename_all_nonrec.desktop      2009-09-05 
19:13:29.000000000 +0300
++++ b/src/servicemenus_new/krename_all_nonrec.desktop  2011-01-30 
22:08:29.037391236 +0200
 @@ -1,10 +1,10 @@
  # Sending all kinds of file to Krename
  [Desktop Entry]
@@ -16,9 +16,9 @@
  [Desktop Action rename]
  Exec=krename %U
  Icon=krename
-diff -uNr src/servicemenus/krename_dir_rec.desktop 
src/servicemenus_new/krename_dir_rec.desktop
---- src/servicemenus/krename_dir_rec.desktop   2009-09-05 19:13:29.000000000 
+0300
-+++ src/servicemenus_new/krename_dir_rec.desktop       2011-01-30 
22:08:41.257147523 +0200
+diff -uNr a/src/servicemenus/krename_dir_rec.desktop 
b/src/servicemenus_new/krename_dir_rec.desktop
+--- a/src/servicemenus/krename_dir_rec.desktop 2009-09-05 19:13:29.000000000 
+0300
++++ b/src/servicemenus_new/krename_dir_rec.desktop     2011-01-30 
22:08:41.257147523 +0200
 @@ -1,10 +1,10 @@
  # Sending all kinds of files recursively from a directory to Krename
  [Desktop Entry]


Reply via email to