# $Id: PKGBUILD 231374 2015-02-13 16:36:29Z pierre $

pkgname=gd
pkgver=2.1.1
pkgrel=1
pkgdesc="Library for the dynamic creation of images by programmers"
arch=('i686' 'x86_64')
url="http://www.libgd.org/"
license=('custom')
depends=('fontconfig' 'libvpx' 'libxpm' 'libtiff')
makedepends=('git')
optdepends=('perl: bdftogd script')
source=("${pkgname}::git+https://github.com/libgd/libgd.git#tag=${pkgname}-${pkgver}")
md5sums=('SKIP')

build() {
  cd ${pkgname}
  ./bootstrap.sh
  ./configure \
    --prefix=/usr \
    --disable-rpath \
    --with-vpx=/usr \
    --with-tiff=/usr
  make
}

check() {
  cd ${pkgname}
  make check
}

package() {
  cd ${pkgname}
  make DESTDIR="${pkgdir}" install
  install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
