[neon/extras/krename/Neon/release] debian: update the patches
Pino Toscano
null at kde.org
Wed Sep 4 10:35:07 BST 2024
Git commit 807206d2c7b7c10b5ef0ab5369c90175e2fa135c by Pino Toscano.
Committed on 06/10/2020 at 04:51.
Pushed by jriddell into branch 'Neon/release'.
update the patches
- upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch: drop,
backported from upstream
- upstream_Fix-building-against-exiv2-0.27.patch: drop, backported from
upstream
M +5 -0 debian/changelog
D +0 -2 debian/patches/series
D +0 -328 debian/patches/upstream_Fix-building-against-exiv2-0.27.patch
D +0 -77 debian/patches/upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch
https://invent.kde.org/neon/extras/krename/-/commit/807206d2c7b7c10b5ef0ab5369c90175e2fa135c
diff --git a/debian/changelog b/debian/changelog
index b3c5197..3ede900 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,11 @@ krename (5.0.1-0r1) UNRELEASED; urgency=medium
[ Pino Toscano ]
* New upstream release.
* Add the upstream GPG signing key.
+ * Update the patches:
+ - upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch:
+ drop, backported from upstream
+ - upstream_Fix-building-against-exiv2-0.27.patch: drop, backported
+ from upstream
-- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org> Tue, 06 Oct 2020 06:49:18 +0200
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 0379511..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch
-upstream_Fix-building-against-exiv2-0.27.patch
diff --git a/debian/patches/upstream_Fix-building-against-exiv2-0.27.patch b/debian/patches/upstream_Fix-building-against-exiv2-0.27.patch
deleted file mode 100644
index 891291a..0000000
--- a/debian/patches/upstream_Fix-building-against-exiv2-0.27.patch
+++ /dev/null
@@ -1,328 +0,0 @@
-From b22de9135ba2a5abdbd2b275a60933a50f074010 Mon Sep 17 00:00:00 2001
-From: Heiko Becker <heirecka at exherbo.org>
-Date: Tue, 20 Nov 2018 18:26:47 +0100
-Subject: [PATCH] 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
-
---- 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)
-@@ -75,7 +76,7 @@ set_package_properties(Freetype PROPERTI
- 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)
---- 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, <neundorf at kde.org>
--# Copyright (c) 2008, Gilles Caulier, <caulier.gilles at 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)
---- /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, <christophe at krop.fr>
-+# Copyright (c) 2010, Alexander Neundorf, <neundorf at kde.org>
-+# Copyright (c) 2008, Gilles Caulier, <caulier.gilles at 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"
-+)
---- 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
-
---- 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
- )
-@@ -131,9 +131,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)
---- 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"
diff --git a/debian/patches/upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch b/debian/patches/upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch
deleted file mode 100644
index 9339862..0000000
--- a/debian/patches/upstream_Use-cmakedefine01-instead-of-macro_bool_to_01.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From ec90823494f5ec9bb2e8098f44209f383ef8c22a Mon Sep 17 00:00:00 2001
-From: Heiko Becker <heirecka at exherbo.org>
-Date: Tue, 20 Nov 2018 18:24:29 +0100
-Subject: [PATCH] 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
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -74,13 +74,10 @@ set_package_properties(Freetype PROPERTI
-
- 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
---- 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, <neundorf at 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)
---- 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}"
More information about the Neon-commits
mailing list