summaryrefslogtreecommitdiff
path: root/community/gmic/PKGBUILD
blob: e0339fde11a3650d30ba5d247828240473de37da (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
# $Id: PKGBUILD 105557 2014-02-10 11:18:20Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
# Contributor: farid <farid at archlinuc-br.org>
# Contributor: Archie <Mymaud@gmail.com>

pkgbase=gmic
pkgname=("gmic" "gimp-plugin-gmic" "zart")
pkgver=1.5.8.3
pkgrel=1
arch=("i686" "x86_64" "mips64el")
url="http://gmic.sourceforge.net"
license=("custom:CeCILL")
makedepends=('gimp' 'qt4' 'fftw' 'openexr' 'opencv' 'mesa' 'gtk2')
#options=('!emptydirs')
source=("http://downloads.sourceforge.net/sourceforge/gmic/gmic_${pkgver}.tar.gz"
        "opencv-buildfix.patch")
md5sums=('ee80a2dc1a2441a6c0adf92e9bea623b'
         '120319b0d6c81c5af186abe2281b79ca')

prepare() {
  cd "${srcdir}/gmic-${pkgver}"
  patch -p1 -i "${srcdir}/opencv-buildfix.patch"
  sed -i 's|qmake zart.pro|qmake-qt4 zart.pro|g' src/Makefile
  sed -i 's|/usr/bin/qmake|/usr/bin/qmake-qt4|g' zart/Makefile
}

build() {
  cd "${srcdir}/gmic-${pkgver}"
  make -C src all
  make -C zart all
}

package_gmic() {
  pkgdesc="GREYC's Magic Image Converter: image processing framework"
  depends=("fftw" "libtiff" "libjpeg" "libpng" "openexr" "libx11")
  replaces=("greycstoration")

  cd "${srcdir}/gmic-${pkgver}"
  make -C src install DESTDIR="$pkgdir" USR="/usr"
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  rm -rf "${pkgdir}/usr/"{bin/zart,lib/gimp,share/zart}
}

package_zart() {
  pkgdesc="A GUI for G'MIC real-time manipulations on the output of a webcam"
  depends=("opencv" "fftw" "qt4")

  cd "${srcdir}/gmic-${pkgver}"
  install -Dm755 zart/zart "${pkgdir}/usr/bin/zart"
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_gimp-plugin-gmic() {
  pkgdesc="Gimp plugin for the G'MIC image processing framework"
  depends=("gimp" "fftw")
  replaces=("gimp-plugin-greycstoration" "gimp-plugin-gmic4gimp")

  cd "${srcdir}/gmic-${pkgver}"
  install -Dm755 src/gmic_gimp "${pkgdir}/usr/lib/gimp/2.0/plug-ins/gmic_gimp"
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}