1 # Maintainer: Lukas Jirkovsky <l.jirkovsky AT gmail.com>
5 pkgdesc="Free and open source photo processor"
7 url="http://photivo.org/"
9 depends=('exiv2' 'qt' 'lcms2' 'fftw' 'graphicsmagick-qd16' 'lensfun' 'liblqr' 'shared-mime-info')
10 optdepends=('gimp: Gimp plugins' 'python2: Gimp to Photivo plugin')
11 makedepends=('mercurial' 'gimp')
14 install=photivo.install
15 source=(gimp_image_add_layer_define.diff)
16 md5sums=('ad14c7e6c46d593b359cccd82a4c2327')
18 _hgroot="https://photivo.googlecode.com/hg/"
23 msg "Connecting to Mercurial server...."
25 if [ -d $_hgrepo ] ; then
27 hg pull -u || return 1
28 msg "The local files are updated."
30 hg clone $_hgroot $_hgrepo || return 1
33 msg "Mercurial checkout done or server timeout"
34 msg "Starting make..."
36 if [ -e "$srcdir/$_hgrepo-build" ]; then
37 rm -rf "$srcdir/$_hgrepo-build"
39 cp -a "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
40 cd "$srcdir/$_hgrepo-build"
42 # remove the need for ccache
43 find . -type f -name "*.pro" -exec sed -i 's|ccache||' '{}' ';'
45 patch -Np1 < "$srcdir"/gimp_image_add_layer_define.diff || true
50 # fix the "Gimp to Photivo" plugin
51 sed -i -e 's|\x0D$||' -e 's|#!.*|#!/usr/bin/python2|' "mm extern photivo.py"
55 cd "$srcdir/$_hgrepo-build"
57 make INSTALL_ROOT="$pkgdir" install
61 install -D -m755 ptGimp "$pkgdir/usr/lib/gimp/2.0/plug-ins/ptGimp"
62 install -D -m755 "mm extern photivo.py" "$pkgdir/usr/lib/gimp/2.0/plug-ins/mm-extern-photivo.py"