summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/digikam/0001-optionally-enable-OpenGL.patch34
-rw-r--r--libre/digikam/PKGBUILD83
-rw-r--r--libre/digikam/digikam-kcalcore-17.12.patch77
-rw-r--r--libre/digikam/digikam-opencv-3.4.patch156
4 files changed, 271 insertions, 79 deletions
diff --git a/libre/digikam/0001-optionally-enable-OpenGL.patch b/libre/digikam/0001-optionally-enable-OpenGL.patch
deleted file mode 100644
index f87e8e4a8..000000000
--- a/libre/digikam/0001-optionally-enable-OpenGL.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 9b37ca152cbae4b86ce2b93f7b1af58f092d1ccf Mon Sep 17 00:00:00 2001
-From: Kevin Mihelich <kevin@archlinuxarm.org>
-Date: Tue, 5 Jul 2016 18:47:56 -0600
-Subject: [PATCH] optionally enable OpenGL
-
-Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
----
- CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 89e0682..b60d0b4 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -105,6 +105,7 @@ option(ENABLE_KFILEMETADATASUPPORT "Build digiKam with KDE files indexer suppor
- option(ENABLE_AKONADICONTACTSUPPORT "Build digiKam with KDE Mail Contacts support (default=OFF)" OFF)
- option(ENABLE_MEDIAPLAYER "Build digiKam with Media Player support (default=OFF)" OFF)
- option(ENABLE_DBUS "Build digiKam with DBUS support (default=ON)" ON)
-+option(ENABLE_OPENGL "Build digiKam with OpenGL support (default=ON)" ON)
- option(ENABLE_APPSTYLES "Build digiKam with support for changing the widget application style (default=OFF)" OFF)
-
- # Mysql support options (experimental):
-@@ -293,7 +294,7 @@ else()
- endif()
-
- # decide if Presentation tool can be built with OpenGL
--if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND Qt5OpenGL_FOUND)
-+if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND Qt5OpenGL_FOUND AND ENABLE_OPENGL)
- set(HAVE_OPENGL TRUE)
- elseif()
- set(HAVE_OPENGL FALSE)
---
-2.10.2
-
diff --git a/libre/digikam/PKGBUILD b/libre/digikam/PKGBUILD
index 3f5f1dfa8..dc77393e1 100644
--- a/libre/digikam/PKGBUILD
+++ b/libre/digikam/PKGBUILD
@@ -1,63 +1,57 @@
-# Maintainer: Andreas Grapentin <andreas@grapentin.org>
+# $Id$
# Maintainer (Arch): Ronald van Haren <ronald@archlinux.org>
+# Maintainer (Arch): Antonio Rojas <arojas@archlinux.org>
+# Contributor (Arch): Andrea Scarpino <andrea@archlinux.org>
+# Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: jc_gargma <jc_gargma@iserlohn-fortress.net>
-# Contributor (Arch): Andrea Scarpino <andrea@archlinux.org>
-# Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org>
-
-_pkgbase=digikam
-pkgname=kipi-plugins
+pkgbase=digikam
+pkgname=(kipi-plugins)
_pkgver=5.7.0
pkgver=${_pkgver//-/_} # for beta versions
-arch=(i686 x86_64 armv7h)
-pkgrel=1.parabola1
-
-pkgdesc="Digital photo management application for KDE"
+pkgrel=5.parabola1
+pkgdesc="An advanced digital photo management application"
+arch=('x86_64' 'i686' 'armv7h')
+license=('GPL')
url="http://www.digikam.org/"
-license=(GPL)
-
-makedepends=(extra-cmake-modules libkipi libksane liblqr opencv boost
- doxygen lensfun eigen kdoctools marble-common kdesignerplugin
- kfilemetadata akonadi-contacts qtav threadweaver kcalcore
- knotifyconfig libmediawiki libkvkontakte)
-source=("https://download.kde.org/stable/$_pkgbase/$_pkgbase-$_pkgver.tar.xz"
- "libre.patch"
- '0001-optionally-enable-OpenGL.patch')
+makedepends=(extra-cmake-modules libkipi libksane liblqr opencv doxygen lensfun eigen boost kdoctools marble-common
+ kfilemetadata akonadi-contacts qtav threadweaver kcalcore knotifyconfig libmediawiki libkvkontakte)
+source=("http://download.kde.org/stable/${pkgbase}/${pkgbase}-${_pkgver}.tar.xz"
+ digikam-kcalcore-17.12.patch
+ digikam-qt-5.9.3.patch::"https://cgit.kde.org/digikam.git/patch/?id=855ba5b7"
+ digikam-opencv-3.4.patch
+ libre.patch)
sha256sums=('3605ffb5b6e8fbd6b725e5075f74f505d7edee7531789c2882d11df2d20150f5'
- '80fbe434d326551f3dc029c5db3ad1b50e87870b03185467aa25a5c03764cc89'
- 'f6f234f430f02e058e12e48577f9d8441959e84b42f4e50d733706be8b214bf5')
-replaces=("$pkgname-libre")
-conflicts=("$pkgname-libre")
+ '61648bdeb88dcb94d2896b9d9211c6a6b50a39a143701e04465aa040a60053c0'
+ '03822e596321028d0971ec82351337dad76abeda93c9cef3b1d2a31807e02661'
+ 'b822cf879216a479134e48e3cfb597ef5b741698454e0993846ab660896caba7'
+ '80fbe434d326551f3dc029c5db3ad1b50e87870b03185467aa25a5c03764cc89')
prepare() {
mkdir -p build
- cd $_pkgbase-$_pkgver
-
- # sv docs fail to build
- sed -e '/sv/d' -i doc-translated/CMakeLists.txt
-
- # fix conflicts with libkvkontakte
- rm po/*/libkvkontakte.po
- patch -p1 -i ../libre.patch
-
- # OpenGL switch
- if [[ "$CARCH" = arm* ]]; then
- cd core
- patch -p1 -i $srcdir/0001-optionally-enable-OpenGL.patch
- fi
+# sv docs fail to build
+ sed -e '/sv/d' -i $pkgbase-$pkgver/doc-translated/CMakeLists.txt
+# fix conflicts with libkvkontakte
+ rm $pkgbase-$pkgver/po/*/libkvkontakte.po
+# fix freedom issues
+ cd $pkgbase-$_pkgver
+ patch -p1 -i "$srcdir"/libre.patch
+# fix build with kcalcore 17.12
+ cd core
+ patch -p1 -i "$srcdir"/digikam-kcalcore-17.12.patch
+# fix thumbnails with Qt 5.9.3
+ patch -p1 -i "$srcdir"/digikam-qt-5.9.3.patch
+# fix build with opencv 3.4
+ patch -p1 -i "$srcdir"/digikam-opencv-3.4.patch
}
build() {
cd build
- if [[ "$CARCH" = arm* ]]; then
- local cmake_extra="-DENABLE_OPENGL=OFF"
- fi
-
- cmake ../$_pkgbase-$_pkgver \
+ cmake ../${pkgbase}-${_pkgver} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
@@ -67,8 +61,7 @@ build() {
-DENABLE_AKONADICONTACTSUPPORT=ON \
-DENABLE_MYSQLSUPPORT=ON \
-DENABLE_OPENCV3=ON \
- -DENABLE_APPSTYLES=ON \
- $cmake_extra
+ -DENABLE_APPSTYLES=ON
make
}
@@ -83,6 +76,6 @@ package_kipi-plugins() {
cd $srcdir/build/po
make DESTDIR="$pkgdir" install
- # Provided by digikam
+# Provided by digikam
rm "$pkgdir"/usr/share/locale/*/LC_MESSAGES/digikam.mo
}
diff --git a/libre/digikam/digikam-kcalcore-17.12.patch b/libre/digikam/digikam-kcalcore-17.12.patch
new file mode 100644
index 000000000..914c5949e
--- /dev/null
+++ b/libre/digikam/digikam-kcalcore-17.12.patch
@@ -0,0 +1,77 @@
+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
+---
+ 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
+@@ -290,7 +290,13 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color)
+ return;
+ }
+
+- KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QString::fromLatin1("UTC")));
++#if 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();
+@@ -308,9 +309,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
+
diff --git a/libre/digikam/digikam-opencv-3.4.patch b/libre/digikam/digikam-opencv-3.4.patch
new file mode 100644
index 000000000..7ef260414
--- /dev/null
+++ b/libre/digikam/digikam-opencv-3.4.patch
@@ -0,0 +1,156 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f2d9c6212f..6341db8d32 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -245,7 +245,7 @@ endif()
+ if(ENABLE_OPENCV3)
+
+ set(OPENCV_MIN_VERSION "3.1.0")
+- DETECT_OPENCV(${OPENCV_MIN_VERSION} core objdetect imgproc imgcodecs)
++ DETECT_OPENCV(${OPENCV_MIN_VERSION} core objdetect imgproc imgcodecs face)
+
+ if(${OpenCV_FOUND})
+ if(${OpenCV_VERSION} VERSION_LESS 3.1.0)
+diff --git a/libs/facesengine/opencv3-face/face.hpp b/libs/facesengine/opencv3-face/face.hpp
+index a99e7b349b..200b5b8b00 100644
+--- a/libs/facesengine/opencv3-face/face.hpp
++++ b/libs/facesengine/opencv3-face/face.hpp
+@@ -47,6 +47,7 @@ the use of this software, even if advised of the possibility of such damage.
+
+ */
+
++#include "libopencv.h"
+ #include "opencv2/core.hpp"
+ #include "predict_collector.hpp"
+ #include <map>
+@@ -318,8 +319,12 @@ public:
+ The suffix const means that prediction does not affect the internal model state, so the method can
+ be safely called from within different threads.
+ */
++#if OPENCV_TEST_VERSION(3,4,0)
+ CV_WRAP virtual void save(const String& filename) const;
+-
++#else
++ CV_WRAP virtual void write(const String& filename) const;
++#endif
++
+ /** @brief Loads a FaceRecognizer and its model state.
+
+ Loads a persisted model and state from a given XML or YAML file . Every FaceRecognizer has to
+@@ -327,17 +332,29 @@ public:
+ FaceRecognizer::load(FileStorage& fs) in turn gets called by
+ FaceRecognizer::load(const String& filename), to ease saving a model.
+ */
++#if OPENCV_TEST_VERSION(3,4,0)
+ CV_WRAP virtual void load(const String& filename);
+-
++#else
++ CV_WRAP virtual void read(const String& filename);
++#endif
++
+ /** @overload
+ Saves this model to a given FileStorage.
+ @param fs The FileStorage to store this FaceRecognizer to.
+ */
++#if OPENCV_TEST_VERSION(3,4,0)
+ virtual void save(FileStorage& fs) const = 0;
+-
++#else
++ virtual void write(FileStorage& fs) const = 0;
++#endif
++
+ /** @overload */
++#if OPENCV_TEST_VERSION(3,4,0)
+ virtual void load(const FileStorage& fs) = 0;
+-
++#else
++ virtual void read(const FileStorage& fs) = 0;
++#endif
++
+ /** @brief Sets string info for the specified model's label.
+
+ The string info is replaced by the provided value if it was set before for the specified label.
+diff --git a/libs/facesengine/opencv3-face/facerec.cpp b/libs/facesengine/opencv3-face/facerec.cpp
+index a58124be1f..21ad5e57e7 100644
+--- a/libs/facesengine/opencv3-face/facerec.cpp
++++ b/libs/facesengine/opencv3-face/facerec.cpp
+@@ -66,21 +66,37 @@ void FaceRecognizer::update(InputArrayOfArrays src, InputArray labels)
+ CV_Error(Error::StsNotImplemented, error_msg);
+ }
+
++#if OPENCV_TEST_VERSION(3,4,0)
+ void FaceRecognizer::load(const String &filename)
++#else
++void FaceRecognizer::read(const String &filename)
++#endif
+ {
+ FileStorage fs(filename, FileStorage::READ);
+ if (!fs.isOpened())
+ CV_Error(Error::StsError, "File can't be opened for writing!");
++#if OPENCV_TEST_VERSION(3,4,0)
+ this->load(fs);
++#else
++ this->read(fs);
++#endif
+ fs.release();
+ }
+
++#if OPENCV_TEST_VERSION(3,4,0)
+ void FaceRecognizer::save(const String &filename) const
++#else
++void FaceRecognizer::write(const String &filename) const
++#endif
+ {
+ FileStorage fs(filename, FileStorage::WRITE);
+ if (!fs.isOpened())
+ CV_Error(Error::StsError, "File can't be opened for writing!");
++#if OPENCV_TEST_VERSION(3,4,0)
+ this->save(fs);
++#else
++ this->write(fs);
++#endif
+ fs.release();
+ }
+
+diff --git a/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.h b/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.h
+index 0ff718fc2f..4561db8af5 100644
+--- a/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.h
++++ b/libs/facesengine/recognition-opencv-lbph/facerec_borrowed.h
+@@ -104,9 +104,12 @@ public:
+ #if OPENCV_TEST_VERSION(3,0,0)
+ using cv::FaceRecognizer::save;
+ using cv::FaceRecognizer::load;
+-#else
++#elif OPENCV_TEST_VERSION(3,4,0)
+ using cv::face::FaceRecognizer::save;
+ using cv::face::FaceRecognizer::load;
++#else
++ using cv::face::FaceRecognizer::write;
++ using cv::face::FaceRecognizer::read;
+ #endif
+
+ static cv::Ptr<LBPHFaceRecognizer> create(int radius=1,
+@@ -160,8 +163,10 @@ public:
+ */
+ #if OPENCV_TEST_VERSION(3,1,0)
+ void load(const cv::FileStorage&) {}
+-#else
++#elif OPENCV_TEST_VERSION(3,4,0)
+ void load(const cv::FileStorage&) override {}
++#else
++ void read(const cv::FileStorage&) override {}
+ #endif
+
+ /**
+@@ -169,8 +174,10 @@ public:
+ */
+ #if OPENCV_TEST_VERSION(3,1,0)
+ void save(cv::FileStorage&) const {}
+-#else
++#elif OPENCV_TEST_VERSION(3,4,0)
+ void save(cv::FileStorage&) const override {}
++#else
++ void write(cv::FileStorage&) const override {}
+ #endif
+
+ /**