summaryrefslogtreecommitdiff
path: root/extra/vigra/PKGBUILD
blob: 13462ab852a0b450a513f53e3e3130afa03bd9c0 (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
# $Id: PKGBUILD 148954 2012-02-05 11:57:34Z ibiru $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>

pkgbase=vigra
pkgname=('vigra' 'vigra-doc')
pkgver=1.8.0
pkgrel=3.1
arch=('i686' 'x86_64' 'mips64el')
url="http://hci.iwr.uni-heidelberg.de/vigra/"
license=('custom:MIT')
makedepends=(# runtime deps
             'libpng>=1.5.7' 'libtiff>=4.0.0' 'gcc-libs' 'sh' 'hdf5>=1.8.7' 'fftw'
	     # additional makedeps
             'cmake' 'python2-nose' 'doxygen' 'python-sphinx' 'boost' 'python2-numpy')
options=('!libtool')
source=(http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/${pkgname}-${pkgver}-src.tar.gz
	vigra-1.7.1.gcc460.patch)
md5sums=('15c5544448e529ee60020758ab6be264'
         '25ef8bc26bc38ee67e5b512d2acd0166')
sha1sums=('09f1d506c2748ebeb7d9f1c77ce387f9e7b837d2'
          '1de6381a74dd136ea25df5a27f249187b0dbd17e')

build() {
  cd "${srcdir}"/${pkgbase}-${pkgver}
  patch -Np1 -i ${srcdir}/vigra-1.7.1.gcc460.patch
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DPYTHON_EXECUTABLE=/usr/bin/python2 \
      -DWITH_VIGRANUMPY=1 \
      -DPYTHON_EXECUTABLE=/usr/bin/python2.7 \
      -DDOCINSTALL=share/doc 
  make
}

check() {
  cd "${srcdir}"/${pkgname}-${pkgver}
  make -k check || /bin/true # i686 fails
}

package_vigra() {
  pkgdesc="Computer vision library"
  depends=('libpng>=1.5.7' 'libtiff>=4.0.0' 'gcc-libs' 'sh' 'hdf5>=1.8.7' 'fftw')
  optdepends=('python2: for python bindings'
              'boost-libs: for python bindings')

  cd "${srcdir}"/${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" install
  # license
  install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
  
  # remove doc
  rm -rf "${pkgdir}"/usr/share/doc
  
  #fix shebang for python2
  sed -i 's|python$|python2|' "$pkgdir"/usr/bin/vigra-config
}

package_vigra-doc() {
  pkgdesc="Computer vision library - documentation and examples"
  #depends=('vigra')
  #arch=('any')

  cd "${srcdir}"/${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" install
  # cleanup
  rm -rf "${pkgdir}"/usr/{bin,include,lib}

  # license
  install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}