From 48bdeb0db9c7ffed22c6eb859ee40b55ba598b86 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Dec 2017 11:17:21 +0000 Subject: gentoo resync : 20.12.2017 --- .../digikam/files/digikam-5.7.0-kcalcore-1.patch | 44 ++++++++++++ .../digikam/files/digikam-5.7.0-kcalcore-2.patch | 79 ++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch create mode 100644 media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch (limited to 'media-gfx/digikam/files') diff --git a/media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch b/media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch new file mode 100644 index 000000000000..9a9574fc982b --- /dev/null +++ b/media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch @@ -0,0 +1,44 @@ +From 12ab7af4618f10d39d4a977e00a0e68a3aac9bd2 Mon Sep 17 00:00:00 2001 +From: Simon Frei +Date: Wed, 13 Sep 2017 15:43:49 +0200 +Subject: calendar: Adjust to new KCalCore API (fixes CI) + +--- + utilities/assistants/calendar/print/calsettings.cpp | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/utilities/assistants/calendar/print/calsettings.cpp b/utilities/assistants/calendar/print/calsettings.cpp +index b0bed5a..46e995d 100644 +--- a/utilities/assistants/calendar/print/calsettings.cpp ++++ b/utilities/assistants/calendar/print/calsettings.cpp +@@ -31,12 +31,17 @@ + #include "digikam_debug.h" + #include "calsystem.h" + +-// KCalCore includes + + #ifdef HAVE_KCALENDAR ++ // KCalCore includes ++ + # include + # include + # include ++ ++ // Qt includes ++ ++# include + #endif // HAVE_KCALENDAR + + namespace Digikam +@@ -290,7 +295,7 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color) + return; + } + +- KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QString::fromLatin1("UTC"))); ++ KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QTimeZone(0))); + KCalCore::FileStorage::Ptr fileStorage(new KCalCore::FileStorage(memCal, url.toLocalFile(), new KCalCore::ICalFormat)); + + qCDebug(DIGIKAM_GENERAL_LOG) << "Loading calendar from file " << url.toLocalFile(); +-- +cgit v0.11.2 + diff --git a/media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch b/media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch new file mode 100644 index 000000000000..7237b74a285f --- /dev/null +++ b/media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch @@ -0,0 +1,79 @@ +From dad750fadc926b62603cc9d64009ee5072a46d97 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= +Date: Wed, 13 Sep 2017 16:51:14 +0200 +Subject: Adapt to KCalCore API changes + +This change supports both old (pre-QDateTime) and new version. + +Differential Revision: https://phabricator.kde.org/D7802 + +* asturm: Incorporated fix from d204022e191d9377874689bfe4c89f7b83998188 +--- + CMakeLists.txt | 3 +++ + app/utils/digikam_config.h.cmake.in | 3 +++ + utilities/assistants/calendar/print/calsettings.cpp | 14 ++++++++++---- + 3 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3ad686d..e2f28a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -174,6 +174,9 @@ find_package(KF5 ${CALENDAR_MIN_VERSION} QUIET + OPTIONAL_COMPONENTS + CalendarCore # For Calendar tool. + ) ++if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.6.40) ++ set(HAVE_KCALENDAR_QDATETIME TRUE) ++endif() + + if(ENABLE_AKONADICONTACTSUPPORT AND NOT KF5AkonadiContact_FOUND) + set(ENABLE_KFILEMETADATASUPPORT OFF) +diff --git a/app/utils/digikam_config.h.cmake.in b/app/utils/digikam_config.h.cmake.in +index 8a2e8e5..ffd3a22 100644 +--- a/app/utils/digikam_config.h.cmake.in ++++ b/app/utils/digikam_config.h.cmake.in +@@ -75,6 +75,9 @@ + /* Define to 1 if you have KCalendar core shared libraries installed */ + #cmakedefine HAVE_KCALENDAR 1 + ++/* Define to 1 if you have KCalendar core shared libraries with QDateTime support installed */ ++#cmakedefine HAVE_KCALENDAR_QDATETIME 1 ++ + /* Define to 1 if Panorama tool is supported */ + #cmakedefine HAVE_PANORAMA 1 + +diff --git a/utilities/assistants/calendar/print/calsettings.cpp b/utilities/assistants/calendar/print/calsettings.cpp +index 46e995d..c6554ef 100644 +--- a/utilities/assistants/calendar/print/calsettings.cpp ++++ b/utilities/assistants/calendar/print/calsettings.cpp +@@ -295,7 +295,13 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color) + return; + } + +- KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QTimeZone(0))); ++#ifdef HAVE_KCALENDAR_QDATETIME ++ KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QTimeZone::utc())); ++ using DateTime = QDateTime; ++#else ++ KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QString::fromLatin1("UTC"))); ++ using DateTime = KDateTime; ++#endif + KCalCore::FileStorage::Ptr fileStorage(new KCalCore::FileStorage(memCal, url.toLocalFile(), new KCalCore::ICalFormat)); + + qCDebug(DIGIKAM_GENERAL_LOG) << "Loading calendar from file " << url.toLocalFile(); +@@ -313,9 +319,9 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color) + qLast = calSys.date(params.year + 1, 1, 1); + qLast = qLast.addDays(-1); + +- KDateTime dtFirst(qFirst); +- KDateTime dtLast(qLast); +- KDateTime dtCurrent; ++ DateTime dtFirst(qFirst, QTime(0, 0)); ++ DateTime dtLast(qLast, QTime(0, 0)); ++ DateTime dtCurrent; + + int counter = 0; + KCalCore::Event::List list = memCal->rawEvents(qFirst, qLast); +-- +cgit v0.11.2 + -- cgit v1.2.3