# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=tdlib
pkgver=0.5.0
pkgrel=3
pkgdesc="Algorithms for computing tree decompositions of graphs"
arch=(x86_64)
url="https://github.com/freetdi/tdlib/"
license=(GPL2)
depends=()
makedepends=(cython2 boost)
optdepends=('python2: for the python module')
source=("https://sources.archlinux.org/other/community/$pkgname/$pkgname-$pkgver.tar.gz")
sha256sums=('4cddaf2397f3ff291b0aa93b6c529edeae6af8d7337e5c9f28758042950b6264')

prepare() {
  cd $pkgname-$pkgver
  sed -e 's/cython\b/cython2/g' -i configure.ac
  autoreconf -vi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --with-python
}

package() {
  cd $pkgname-$pkgver
  make install DESTDIR="$pkgdir"
}
