diff --git a/add-support-for-Exiv2-0.27.patch b/add-support-for-Exiv2-0.27.patch new file mode 100644 index 0000000..eb298f7 --- /dev/null +++ b/add-support-for-Exiv2-0.27.patch @@ -0,0 +1,133 @@ +From cb808f574248a0c96894338fdcf03b12fbbc080d Mon Sep 17 00:00:00 2001 +From: Gilles Caulier +Date: Sun, 7 Oct 2018 10:17:30 +0200 +Subject: add support of Exiv2 0.27 + +--- + core/cmake/modules/FindExiv2.cmake | 75 +++++++++++++++++++++++++++----------- + 1 file changed, 53 insertions(+), 22 deletions(-) + +diff --git a/core/cmake/modules/FindExiv2.cmake b/core/cmake/modules/FindExiv2.cmake +index 1e971a3..02d2943 100644 +--- a/core/cmake/modules/FindExiv2.cmake ++++ b/core/cmake/modules/FindExiv2.cmake +@@ -1,7 +1,7 @@ + # - 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.15. ++# before doing FIND_PACKAGE(Exiv2). The default is 0.26. + # + # Once done this will define + # +@@ -11,34 +11,41 @@ + # 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) ++# standard syntax, e.g. find_package(Exiv2 0.26) + # + # 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.15. ++# you need before doing FIND_PACKAGE(Exiv2). The default is 0.26. + # + # Copyright (c) 2010, Alexander Neundorf, +-# Copyright (c) 2008-2017, Gilles Caulier, ++# Copyright (c) 2008-2018, Gilles Caulier, + # + # 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 ++ set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}") ++ ++endif() ++ ++# The minimum version of exiv2 we require + if(NOT Exiv2_FIND_VERSION) +- set(Exiv2_FIND_VERSION "0.15") +-endif(NOT Exiv2_FIND_VERSION) + +-if (NOT WIN32) ++ set(Exiv2_FIND_VERSION "0.26") ++ ++endif() ++ ++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) ++ ++endif() + + find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp + HINTS +@@ -52,20 +59,44 @@ find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 + ${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}") ++if (EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) ++ ++ # For Exiv2 <= 0.26, get the version number from exiv2/version.hpp and store it in the cache: ++ ++ 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}") ++ ++ if(EXIV2_VERSION_MAJOR AND EXIV2_VERSION_MINOR AND EXIV2_VERSION_PATCH) ++ ++ set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" ++ CACHE STRING "Version number of Exiv2" FORCE) ++ else() ++ ++ # For Exiv2 >= 0.27, get the version number from exiv2/exv_conf.h and store it in the cache: ++ ++ file(READ ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h 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}") + +- string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") +- set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}") ++ set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" ++ CACHE STRING "Version number of Exiv2" FORCE) + +- string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") +- set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") ++ endif() + +- 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) ++endif() + + set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}") + +-- +cgit v1.1 + diff --git a/adjust-find-cmake-script-to-exiv2-0.27-RC1.patch b/adjust-find-cmake-script-to-exiv2-0.27-RC1.patch new file mode 100644 index 0000000..3de49f2 --- /dev/null +++ b/adjust-find-cmake-script-to-exiv2-0.27-RC1.patch @@ -0,0 +1,48 @@ +From 87e5ee6503f084b4bd9c8e1b1311a76655c2685e Mon Sep 17 00:00:00 2001 +From: Gilles Caulier +Date: Sat, 27 Oct 2018 09:58:38 +0200 +Subject: exiv2 0.27 RC1 generate now libexiv2lib.so at install stage. Adjust + the find cmake script accordingly. Print all values found while parsing host + system to detect the library + +--- + core/cmake/modules/FindExiv2.cmake | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/core/cmake/modules/FindExiv2.cmake b/core/cmake/modules/FindExiv2.cmake +index 2fcee5b..c677832 100644 +--- a/core/cmake/modules/FindExiv2.cmake ++++ b/core/cmake/modules/FindExiv2.cmake +@@ -5,7 +5,8 @@ + # + # Once done this will define + # +-# Exiv2_FOUND - system has libexiv2 ++# EXIV2_FOUND - system has libexiv2 ++# EXIV2_VERSION - the version of libexiv2 + # EXIV2_INCLUDE_DIR - the libexiv2 include directory + # EXIV2_LIBRARIES - Link these to use libexiv2 + # EXIV2_DEFINITIONS - Compiler switches required for using libexiv2 +@@ -53,7 +54,7 @@ find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp + ${PC_EXIV2_INCLUDE_DIRS} + ) + +-find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 ++find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 exiv2lib + HINTS + ${PC_EXIV2_LIBDIR} + ${PC_EXIV2_LIBRARY_DIRS} +@@ -106,4 +107,10 @@ include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Exiv2 REQUIRED_VARS EXIV2_LIBRARY EXIV2_INCLUDE_DIR + VERSION_VAR EXIV2_VERSION) + ++MESSAGE(STATUS "EXIV2_FOUND = ${EXIV2_FOUND}") ++MESSAGE(STATUS "EXIV2_VERSION = ${EXIV2_VERSION}") ++MESSAGE(STATUS "EXIV2_INCLUDE_DIR = ${EXIV2_INCLUDE_DIR}") ++MESSAGE(STATUS "EXIV2_LIBRARY = ${EXIV2_LIBRARY}") ++MESSAGE(STATUS "EXIV2_DEFINITIONS = ${EXIV2_DEFINITIONS}") ++ + mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY) +-- +cgit v1.1 + diff --git a/be-compatible-with-backward-0.26.patch b/be-compatible-with-backward-0.26.patch new file mode 100644 index 0000000..ffcb686 --- /dev/null +++ b/be-compatible-with-backward-0.26.patch @@ -0,0 +1,29 @@ +From 16e452c62a81f1b70844c97f18137a004ab08b65 Mon Sep 17 00:00:00 2001 +From: Gilles Caulier +Date: Sun, 7 Oct 2018 11:32:44 +0200 +Subject: be compatible with backward 0.26 + +--- + core/cmake/modules/FindExiv2.cmake | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +(limited to 'core/cmake/modules/FindExiv2.cmake') + +diff --git a/core/cmake/modules/FindExiv2.cmake b/core/cmake/modules/FindExiv2.cmake +index 02d2943..2fcee5b 100644 +--- a/core/cmake/modules/FindExiv2.cmake ++++ b/core/cmake/modules/FindExiv2.cmake +@@ -73,7 +73,9 @@ if (EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) + string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") + +- if(EXIV2_VERSION_MAJOR AND EXIV2_VERSION_MINOR AND EXIV2_VERSION_PATCH) ++ if(NOT "${EXIV2_VERSION_MAJOR}" STREQUAL "" AND ++ NOT "${EXIV2_VERSION_MINOR}" STREQUAL "" AND ++ NOT "${EXIV2_VERSION_PATCH}" STREQUAL "") + + set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" + CACHE STRING "Version number of Exiv2" FORCE) +-- +cgit v1.1 + diff --git a/digikam.changes b/digikam.changes index 7ad5aa2..6fbd418 100644 --- a/digikam.changes +++ b/digikam.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Jan 2 12:21:09 UTC 2019 - wbauer@tmo.at + +- Add upstream git commits to fix build with exiv2-0.27: + * add-support-for-Exiv2-0.27.patch + * be-compatible-with-backward-0.26.patch + * adjust-find-cmake-script-to-exiv2-0.27-RC1.patch + * first-patch-to-be-compatible-with-Exiv2-0.27.patch + * f27ab9c1051bd0a0.patch + * fix-compile.patch + ------------------------------------------------------------------- Sat Dec 1 22:42:22 UTC 2018 - wbauer@tmo.at diff --git a/digikam.spec b/digikam.spec index 76f60c7..094604b 100644 --- a/digikam.spec +++ b/digikam.spec @@ -36,6 +36,13 @@ Patch3: Lower-minimum-exiv2-version.patch Patch4: Add-QtWebEngine-support.patch # PATCH-FIX-UPSTREAM Patch5: fix-black-Welcome-page-by-clicking-on-a-link.patch +# PATCH-FIX-UPSTREAM -- fix build with exiv2-0.27 +Patch6: add-support-for-Exiv2-0.27.patch +Patch7: be-compatible-with-backward-0.26.patch +Patch8: adjust-find-cmake-script-to-exiv2-0.27-RC1.patch +Patch9: first-patch-to-be-compatible-with-Exiv2-0.27.patch +Patch10: f27ab9c1051bd0a0.patch +Patch11: fix-compile.patch #This pulls in QWebEngine, which is not available on ppc64 %ifarch %ix86 x86_64 %arm aarch64 mips mips64 BuildRequires: akonadi-contact-devel @@ -192,6 +199,12 @@ The main digikam libraries that are being shared between showfoto and digikam %endif %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 # Remove build time references so build-compare can do its work FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') diff --git a/f27ab9c1051bd0a0.patch b/f27ab9c1051bd0a0.patch new file mode 100644 index 0000000..7177d6a --- /dev/null +++ b/f27ab9c1051bd0a0.patch @@ -0,0 +1,63 @@ +From 516128e999abbd57913b076dec019f899c07da3d Mon Sep 17 00:00:00 2001 +From: Gilles Caulier +Date: Sun, 7 Oct 2018 18:39:10 +0200 +Subject: there is a mess in exiv2 headers 0.27.0, between version.hpp and + exv_con.h We cannot use the macro defined in version.hpp to include this + file... + +--- + core/libs/dmetadata/metaengine_exif.cpp | 4 ++++ + core/libs/dmetadata/metaengine_p.h | 18 ++++++------------ + 2 files changed, 10 insertions(+), 12 deletions(-) + +diff --git a/core/libs/dmetadata/metaengine_exif.cpp b/core/libs/dmetadata/metaengine_exif.cpp +index 079fa96..73af582 100644 +--- a/core/libs/dmetadata/metaengine_exif.cpp ++++ b/core/libs/dmetadata/metaengine_exif.cpp +@@ -995,7 +995,11 @@ bool MetaEngine::setTiffThumbnail(const QImage& thumbImage) const + + if (pos == d->exifMetadata().end() || pos->count() != 1 || pos->toLong() != 0) + { ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::Error(Exiv2::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image"); ++#else + throw Exiv2::Error(1, "Exif.Image.NewSubfileType missing or not set as main image"); ++#endif + } + + // Remove sub-IFD tags +diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h +index 9e234f2..157b63f 100644 +--- a/core/libs/dmetadata/metaengine_p.h ++++ b/core/libs/dmetadata/metaengine_p.h +@@ -72,21 +72,19 @@ + #include + #include + ++#if (((EXIV2_MAJOR_VERSION) << 16) | ((EXIV2_MINOR_VERSION) << 8) | (EXIV2_PATCH_VERSION)) >= (((0) << 16) | ((27) << 8) | (0)) ++# include ++#endif ++ + // Check if Exiv2 support XMP + + #ifdef EXV_HAVE_XMP_TOOLKIT + # define _XMP_SUPPORT_ 1 + #endif + +-// Make sure an EXIV2_TEST_VERSION macro exists: +- +-#ifdef EXIV2_VERSION +-# ifndef EXIV2_TEST_VERSION +-# define EXIV2_TEST_VERSION(major,minor,patch) \ ++#ifndef EXIV2_TEST_VERSION ++# define EXIV2_TEST_VERSION(major,minor,patch) \ + ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) ) +-# endif +-#else +-# define EXIV2_TEST_VERSION(major,minor,patch) (false) + #endif + + // With exiv2 > 0.20.0, all makernote header files have been removed to increase binary compatibility. +-- +cgit v1.1 + diff --git a/first-patch-to-be-compatible-with-Exiv2-0.27.patch b/first-patch-to-be-compatible-with-Exiv2-0.27.patch new file mode 100644 index 0000000..a9ff557 --- /dev/null +++ b/first-patch-to-be-compatible-with-Exiv2-0.27.patch @@ -0,0 +1,44 @@ +From 7c8c0e44adcaadb342e85c66df79d53bd561ebc7 Mon Sep 17 00:00:00 2001 +From: Gilles Caulier +Date: Sun, 7 Oct 2018 11:33:06 +0200 +Subject: first patch to be compatible with Exiv2 0.27 + +--- + core/libs/dmetadata/metaengine.cpp | 7 ++++--- + core/libs/dmetadata/metaengine_p.h | 1 + + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/core/libs/dmetadata/metaengine.cpp b/core/libs/dmetadata/metaengine.cpp +index eb1a1a0..833c807 100644 +--- a/core/libs/dmetadata/metaengine.cpp ++++ b/core/libs/dmetadata/metaengine.cpp +@@ -152,10 +152,11 @@ bool MetaEngine::supportMetadataWritting(const QString& typeMime) + + QString MetaEngine::Exiv2Version() + { +- // Since 0.14.0 release, we can extract run-time version of Exiv2. +- // else we return make version. +- ++#if EXIV2_TEST_VERSION(0,27,0) ++ return QLatin1String(Exiv2::versionString().c_str()); ++#else + return QString::fromLatin1(Exiv2::version()); ++#endif + } + + QString MetaEngine::sidecarFilePathForFile(const QString& path) +diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h +index 79f35e9..bf75e4a 100644 +--- a/core/libs/dmetadata/metaengine_p.h ++++ b/core/libs/dmetadata/metaengine_p.h +@@ -60,6 +60,7 @@ + #endif + + #include ++#include + #include + #include + #include +-- +cgit v1.1 + diff --git a/fix-compile.patch b/fix-compile.patch new file mode 100644 index 0000000..21fd09c --- /dev/null +++ b/fix-compile.patch @@ -0,0 +1,37 @@ +From 8a12ffc60e2f2a59a60355824ba51370b0a20acd Mon Sep 17 00:00:00 2001 +From: Maik Qualmann +Date: Sun, 7 Oct 2018 15:39:32 +0200 +Subject: fix compile + +--- + core/libs/dmetadata/metaengine_p.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +(limited to 'core/libs/dmetadata/metaengine_p.h') + +diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h +index bf75e4a..9e234f2 100644 +--- a/core/libs/dmetadata/metaengine_p.h ++++ b/core/libs/dmetadata/metaengine_p.h +@@ -61,7 +61,6 @@ + #endif + + #include +-#include + #include + #include + #include +@@ -98,6 +97,10 @@ + # pragma GCC visibility pop + #endif + ++#if EXIV2_TEST_VERSION(0,27,0) ++ #include ++#endif ++ + // End of Exiv2 headers ------------------------------------------------------ + + namespace Digikam +-- +cgit v1.1 +