summaryrefslogtreecommitdiff
path: root/libre/digikam/PKGBUILD
blob: dc77393e1542fd3d12ff068de9240786fc5889f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# $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>

pkgbase=digikam
pkgname=(kipi-plugins)
_pkgver=5.7.0
pkgver=${_pkgver//-/_} # for beta versions
pkgrel=5.parabola1
pkgdesc="An advanced digital photo management application"
arch=('x86_64' 'i686' 'armv7h')
license=('GPL')
url="http://www.digikam.org/"
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'
            '61648bdeb88dcb94d2896b9d9211c6a6b50a39a143701e04465aa040a60053c0'
            '03822e596321028d0971ec82351337dad76abeda93c9cef3b1d2a31807e02661'
            'b822cf879216a479134e48e3cfb597ef5b741698454e0993846ab660896caba7'
            '80fbe434d326551f3dc029c5db3ad1b50e87870b03185467aa25a5c03764cc89')

prepare() {
  mkdir -p build

# 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

  cmake ../${pkgbase}-${_pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTING=OFF \
    -DENABLE_KFILEMETADATASUPPORT=ON \
    -DENABLE_MEDIAPLAYER=ON \
    -DENABLE_AKONADICONTACTSUPPORT=ON \
    -DENABLE_MYSQLSUPPORT=ON \
    -DENABLE_OPENCV3=ON \
    -DENABLE_APPSTYLES=ON
  make
}

package_kipi-plugins() {
  pkgdesc="A collection of plugins extending the KDE graphics and image applications as digiKam, without nonfree suggestions"
  depends=(kio libkipi)
  optdepends=('libmediawiki: MediaWiki Export plugin'
              'libkvkontakte: VKontakte.ru Exporter plugin')

  cd build/extra
  make DESTDIR="$pkgdir" install
  cd $srcdir/build/po
  make DESTDIR="$pkgdir" install

# Provided by digikam
  rm "$pkgdir"/usr/share/locale/*/LC_MESSAGES/digikam.mo
}