From cdd1bde399ae95cdc09655e8a47110f6feba988b Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Wed, 6 Jul 2016 00:59:39 +0000 Subject: [PATCH] added extra/digikam --- .../0001-optionally-enable-OpenGL.patch | 34 +++++++ extra/digikam/PKGBUILD | 98 +++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 extra/digikam/0001-optionally-enable-OpenGL.patch create mode 100644 extra/digikam/PKGBUILD diff --git a/extra/digikam/0001-optionally-enable-OpenGL.patch b/extra/digikam/0001-optionally-enable-OpenGL.patch new file mode 100644 index 000000000..8527b9cce --- /dev/null +++ b/extra/digikam/0001-optionally-enable-OpenGL.patch @@ -0,0 +1,34 @@ +From 72f50a2d29648248e03eb871f896f0c940e44c78 Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich +Date: Tue, 5 Jul 2016 18:47:56 -0600 +Subject: [PATCH] optionally enable OpenGL + +Signed-off-by: Kevin Mihelich +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 47f6b10..7615b7f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,6 +104,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 QtMultimedia 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) + + # Mysql support options (experimental): + option(ENABLE_MYSQLSUPPORT "Build digiKam with MySQL dabatase support (default=OFF)" OFF) +@@ -284,7 +285,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.8.3 + diff --git a/extra/digikam/PKGBUILD b/extra/digikam/PKGBUILD new file mode 100644 index 000000000..afd18c7cc --- /dev/null +++ b/extra/digikam/PKGBUILD @@ -0,0 +1,98 @@ +# $Id$ +# Maintainer: Ronald van Haren +# Contributor: Andrea Scarpino +# Contributor: Tobias Powalowski + +# ALARM: Kevin Mihelich +# - patch to enable/disable OpenGL via a switch +# - cmake with -DENABLE_OPENGL=OFF + +pkgbase=digikam +pkgname=('digikam' 'kipi-plugins') +_pkgver=5.0.0 +pkgver=${_pkgver//-/_} +pkgrel=1 +pkgdesc="Digital photo management application for KDE" +arch=('i686' 'x86_64') +license=('GPL') +url="http://www.digikam.org/" +makedepends=('extra-cmake-modules' 'libkipi' 'libksane' 'liblqr' 'opencv' 'boost' 'grantlee-qt5' + 'libgpod' 'hugin' 'opencv' 'doxygen' 'lensfun' 'imagemagick' 'eigen' 'libusb' 'kio' 'kdoctools' 'marble' + 'kfilemetadata' 'akonadi-contact' 'qt5-multimedia' 'kdesignerplugin' 'threadweaver' 'kcalcore' + 'knotifyconfig' 'kdelibs4support' 'qt5-xmlpatterns' 'libmediawiki' 'libkvkontakte' 'kqoauth') +source=("http://download.kde.org/stable/${pkgname}/${pkgname}-${_pkgver}.tar.xz" + '0001-optionally-enable-OpenGL.patch') +sha1sums=('e0dec2eba9ab3a51d632b69b3dd6daf8dca64a45' + '2711c73bdecbf355d4b8be1fa0c46be2e0e22df8') + +prepare() { + mkdir -p build + +# Build fails + sed -e '/add_subdirectory(showfoto)/d' -i $pkgname-${_pkgver}/doc-translated/digikam/CMakeLists.txt + + patch -p1 -d ${pkgname}-${_pkgver}/core -i ${srcdir}/0001-optionally-enable-OpenGL.patch +} + +build() { + cd build + + cmake ../${pkgname}-${_pkgver} \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DBUILD_TESTING=OFF \ + -DENABLE_KFILEMETADATASUPPORT=ON \ + -DENABLE_MEDIAPLAYER=ON \ + -DENABLE_AKONADICONTACTSUPPORT=ON \ + -DENABLE_MYSQLSUPPORT=ON \ + -DENABLE_OPENCV3=ON \ + -DENABLE_OPENGL=OFF + make +} + +package_digikam() { + pkgdesc="Digital photo management application for KDE" + depends=('liblqr' 'libkipi' 'lensfun' 'opencv' 'akonadi-contact' + 'knotifyconfig' 'libksane' 'kfilemetadata' 'qt5-multimedia' 'marble' 'threadweaver' 'kcalcore') + optdepends=('kipi-plugins: more tools and plugins') + + cd build/core + make DESTDIR="$pkgdir" install + cd $srcdir/build/doc/digikam + make DESTDIR="$pkgdir" install + cd $srcdir/build/doc-translated/digikam + make DESTDIR="$pkgdir" install + cd $srcdir/build/po + make DESTDIR="$pkgdir" install + +# Provided by kipi-plugins + rm "$pkgdir"/usr/share/locale/*/LC_MESSAGES/{kipiplugin*,libkvkontakte}.mo +} + +package_kipi-plugins() { + pkgdesc="A collection of plugins extending the KDE graphics and image applications as digiKam" + depends=('kio' 'libkipi') + optdepends=('libmediawiki: MediaWiki Export plugin' + 'libkvkontakte: VKontakte.ru Exporter plugin' + 'libgpod: iPodExport plugin' + 'opencv: Remove Red Eyes plugin' + 'imagemagick: Video SlideShow plugin' + 'qt5-gstreamer: Video SlideShow plugin' + 'threadweaver: panorama plugin' + 'hugin: panorama plugin' + 'kqoauth: OAuth authentication for imgur') + + cd build/extra + make DESTDIR="$pkgdir" install + cd $srcdir/build/doc/kipi-plugins + make DESTDIR="$pkgdir" install + cd $srcdir/build/doc-translated/kipi-plugins + make DESTDIR="pkgdir" install + cd $srcdir/build/po + make DESTDIR="$pkgdir" install + +# Provided by digikam + rm "$pkgdir"/usr/share/locale/*/LC_MESSAGES/digikam.mo +}