summaryrefslogtreecommitdiff
path: root/nonprism/digikam/PKGBUILD
blob: c7e06a1c37fa10b3df312197e77a530abb87f639 (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
82
83
84
# $Id: PKGBUILD 290817 2017-03-14 08:05:30Z arojas $
# Maintainer (Arch): Ronald van Haren <ronald@archlinux.org>
# Contributor (Arch): Andrea Scarpino <andrea@archlinux.org>
# Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>

pkgbase=digikam
pkgname=kipi-plugins
_pkgver=5.5.0
pkgver=${_pkgver//-/_} # for beta versions
pkgrel=1.parabola1.nonprism1
pkgdesc="Digital photo management application for KDE"
arch=('i686' 'x86_64' 'armv7h')
license=('GPL')
url="http://www.digikam.org/"
replaces=("${pkgname}-libre" "${pkgname}-libre-nonprism")
conflicts=("${pkgname}-libre" "${pkgname}-libre-nonprism")
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=("http://download.kde.org/stable/${pkgbase}/${pkgbase}-${_pkgver}.tar.xz"
        "libre.patch"
        "nonprism.patch"
        '0001-optionally-enable-OpenGL.patch')
sha256sums=('df9cbf1b8dbfb9235cebc97e77c02fcb1498c5a905c7fd3b9fb42fd7accc6252'
            '80fbe434d326551f3dc029c5db3ad1b50e87870b03185467aa25a5c03764cc89'
            '738eb494eefda0ddbc7c4fa2029f7c53db07bad370652dfefd0f126d09d0217f'
            'f6f234f430f02e058e12e48577f9d8441959e84b42f4e50d733706be8b214bf5')

prepare() {
  mkdir -p build

  # sv docs fail to build
  sed -e '/sv/d' -i $pkgbase-$pkgver/doc-translated/CMakeLists.txt

  cd ${pkgbase}-${_pkgver}
  patch -p1 -i ../libre.patch
  patch -p1 -i ../nonprism.patch

  # OpenGL switch
  if [[ "$CARCH" = arm* ]]; then
    cd core
    patch -p1 -i ${srcdir}/0001-optionally-enable-OpenGL.patch
  fi
}

build() {
  cd build

  if [[ "$CARCH" = arm* ]]; then
    local cmake_extra="-DENABLE_OPENGL=OFF"
  fi

  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 \
    -DDIGIKAMSC_COMPILE_LIBKVKONTAKTE=OFF \
    $cmake_extra
  make
}

package_kipi-plugins() {
  pkgdesc="A collection of plugins extending the KDE graphics and image applications as digiKam, without nonfree suggestions and support for unsafe and dangerous for privacy protocols"
  depends=('kio' 'libkipi')
  optdepends=('libmediawiki: MediaWiki Export 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
}