# $Id: PKGBUILD 235219 2015-03-28 14:33:22Z fyan $
# Maintainer: Angel Velasquez <angvp@archlinux.org>  
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=python-cairo
pkgver=1.10.0
pkgrel=5
pkgdesc="Python bindings for the cairo graphics library"
arch=('i686' 'x86_64')
url="http://www.cairographics.org/pycairo"
license=('LGPL3')
depends=('python' 'cairo')
source=(http://cairographics.org/releases/pycairo-${pkgver}.tar.bz2
        pycairo-1.10.0-waf-python3.4.patch)
md5sums=('e6fd3f2f1e6a72e0db0868c4985669c5'
         '418e36055c75392f6501918d1c33d448')

build() {
  cd pycairo-${pkgver}
  
  # https://bugs.gentoo.org/show_bug.cgi?id=504342
  patch -i "$srcdir/pycairo-1.10.0-waf-python3.4.patch"

  # Ensure that ./waf has created the cached unpacked version
  # of the wafadmin source tree.
  # This will be created to a subdirectory like
  #    .waf3-1.5.18-a7b91e2a913ce55fa6ecdf310df95752
  python3 ./waf --version

  ./waf configure --prefix=/usr
  ./waf build
}

package() {
  cd pycairo-${pkgver}
  ./waf install --destdir="${pkgdir}"
}
