diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2017-12-18 19:37:38 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2017-12-18 19:48:18 +0100 |
commit | 68dc4f7818a96861e2962f3e5e3212aac7e9f074 (patch) | |
tree | 5e68edc670937daac7d6ac6c65363d68b348d9f1 /media-gfx/digikam | |
parent | media-gfx/printrun: remove oversized patch (diff) | |
download | gentoo-68dc4f7818a96861e2962f3e5e3212aac7e9f074.tar.gz gentoo-68dc4f7818a96861e2962f3e5e3212aac7e9f074.tar.bz2 gentoo-68dc4f7818a96861e2962f3e5e3212aac7e9f074.zip |
media-gfx/digikam: Fix build/runtime w/ >=kde-apps/kcalcore-17.12.0
Closes: https://bugs.gentoo.org/641594
Closes: https://bugs.gentoo.org/641378
Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'media-gfx/digikam')
-rw-r--r-- | media-gfx/digikam/digikam-5.7.0-r3.ebuild | 175 | ||||
-rw-r--r-- | media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch | 44 | ||||
-rw-r--r-- | media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch | 79 |
3 files changed, 298 insertions, 0 deletions
diff --git a/media-gfx/digikam/digikam-5.7.0-r3.ebuild b/media-gfx/digikam/digikam-5.7.0-r3.ebuild new file mode 100644 index 000000000000..bedb0c1673db --- /dev/null +++ b/media-gfx/digikam/digikam-5.7.0-r3.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${KDE_BUILD_TYPE} != live ]]; then + KDE_HANDBOOK="true" + KDE_TEST="true" +fi +CMAKE_MAKEFILE_GENERATOR="emake" +inherit kde5 toolchain-funcs + +DESCRIPTION="Digital photo management application" +HOMEPAGE="https://www.digikam.org/" + +LICENSE="GPL-2" +IUSE="addressbook calendar gphoto2 jpeg2k +kipi +lensfun marble mediaplayer semantic-desktop mysql opengl openmp +panorama scanner X" + +if [[ ${KDE_BUILD_TYPE} != live ]]; then + KEYWORDS="~amd64 ~x86" + MY_PV=${PV/_/-} + MY_P=${PN}-${MY_PV} + SRC_BRANCH=stable + [[ ${PV} =~ beta[0-9]$ ]] && SRC_BRANCH=unstable + SRC_URI="mirror://kde/${SRC_BRANCH}/digikam/${MY_P}.tar.xz" + S="${WORKDIR}/${MY_P}/core" +fi + +# TODO: Package QtAV http://www.qtav.org/ +# video? ( media-video/qtav ) +COMMON_DEPEND=" + $(add_frameworks_dep kconfig) + $(add_frameworks_dep kconfigwidgets) + $(add_frameworks_dep kcoreaddons) + $(add_frameworks_dep ki18n) + $(add_frameworks_dep kiconthemes) + $(add_frameworks_dep kio) + $(add_frameworks_dep knotifications) + $(add_frameworks_dep knotifyconfig) + $(add_frameworks_dep kservice) + $(add_frameworks_dep kwidgetsaddons) + $(add_frameworks_dep kwindowsystem) + $(add_frameworks_dep kxmlgui) + $(add_frameworks_dep solid) + $(add_qt_dep qtconcurrent) + $(add_qt_dep qtdbus) + $(add_qt_dep qtgui '-gles2') + $(add_qt_dep qtprintsupport) + $(add_qt_dep qtsql 'mysql?') + $(add_qt_dep qtwebkit) + $(add_qt_dep qtwidgets) + $(add_qt_dep qtxml) + dev-libs/expat + >=media-gfx/exiv2-0.26:= + media-libs/lcms:2 + media-libs/liblqr + media-libs/libpng:0= + media-libs/opencv:=[-qt4(-)] + || ( <media-libs/opencv-3.0.0 >=media-libs/opencv-3.1.0 ) + media-libs/tiff:0 + virtual/jpeg:0 + addressbook? ( + $(add_kdeapps_dep akonadi-contacts) + $(add_kdeapps_dep kcontacts) + ) + calendar? ( $(add_kdeapps_dep kcalcore) ) + gphoto2? ( media-libs/libgphoto2:= ) + jpeg2k? ( media-libs/jasper:= ) + kipi? ( $(add_kdeapps_dep libkipi '' '16.03.80') ) + lensfun? ( media-libs/lensfun ) + marble? ( + $(add_frameworks_dep kbookmarks) + $(add_kdeapps_dep marble) + $(add_qt_dep qtconcurrent) + $(add_qt_dep qtnetwork) + ) + mediaplayer? ( media-libs/qtav[opengl] ) + mysql? ( virtual/mysql[server] ) + opengl? ( + $(add_qt_dep qtopengl) + virtual/opengl + ) + panorama? ( $(add_frameworks_dep threadweaver) ) + scanner? ( $(add_kdeapps_dep libksane) ) + semantic-desktop? ( $(add_frameworks_dep kfilemetadata) ) + X? ( + $(add_qt_dep qtx11extras) + x11-libs/libX11 + ) +" +DEPEND="${COMMON_DEPEND} + dev-cpp/eigen:3 + dev-libs/boost[threads] + sys-devel/gettext + panorama? ( + sys-devel/bison + sys-devel/flex + ) +" +RDEPEND="${COMMON_DEPEND} + media-plugins/kipi-plugins:5 + panorama? ( media-gfx/hugin ) + !media-gfx/digikam:4 +" + +RESTRICT=test +# bug 366505 + +PATCHES=( + "${FILESDIR}"/${P}-qt-5.9.3.patch + "${FILESDIR}"/${P}-mariadb-10.2-{1,2}.patch + "${FILESDIR}"/${P}-kreadconfig5.patch + "${FILESDIR}"/${P}-kcalcore-{1,2}.patch +) + +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + kde5_pkg_pretend +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp + kde5_pkg_setup +} + +# FIXME: Unbundle libraw (libs/rawengine/libraw) +src_prepare() { + if [[ ${KDE_BUILD_TYPE} != live ]]; then + # prepare the translations + mv "${WORKDIR}/${MY_P}/po" po || die + find po -name "*.po" -and -not -name "digikam.po" -delete || die + echo "set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)" >> CMakeLists.txt || die + echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt || die + echo "add_subdirectory( po )" >> CMakeLists.txt || die + + if use handbook; then + # subdirs need to be preserved b/c relative paths... + # doc-translated is, in fact, broken, and ignored + mv "${WORKDIR}/${MY_P}/doc/${PN}" doc-default || die + echo "find_package(KF5DocTools REQUIRED)" >> CMakeLists.txt || die + echo "add_subdirectory( doc-default )" >> CMakeLists.txt || die + fi + fi + + if ! use marble; then + punt_bogus_dep Qt5 Network + fi + + kde5_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DENABLE_APPSTYLES=ON + -DENABLE_AKONADICONTACTSUPPORT=$(usex addressbook) + -DENABLE_MEDIAPLAYER=$(usex mediaplayer) + -DENABLE_MYSQLSUPPORT=$(usex mysql) + -DENABLE_OPENCV3=$(has_version ">=media-libs/opencv-3" && echo yes || echo no) + $(cmake-utils_use_find_package calendar KF5CalendarCore) + $(cmake-utils_use_find_package gphoto2 Gphoto2) + $(cmake-utils_use_find_package jpeg2k Jasper) + $(cmake-utils_use_find_package kipi KF5Kipi) + $(cmake-utils_use_find_package lensfun LensFun) + $(cmake-utils_use_find_package marble Marble) + $(cmake-utils_use_find_package mediaplayer QtAV) + $(cmake-utils_use_find_package opengl OpenGL) + $(cmake-utils_use_find_package openmp OpenMP) + $(cmake-utils_use_find_package panorama KF5ThreadWeaver) + $(cmake-utils_use_find_package scanner KF5Sane) + $(cmake-utils_use_find_package semantic-desktop KF5FileMetaData) + $(cmake-utils_use_find_package X X11) + ) + + kde5_src_configure +} 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 <freisim93@gmail.com> +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 <kcalcore/icalformat.h> + # include <kcalcore/filestorage.h> + # include <kcalcore/memorycalendar.h> ++ ++ // Qt includes ++ ++# include <QTimeZone> + #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?= <dvratil@kde.org> +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 + |