# $Id$
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=xf86-video-intel
pkgver=2.99.910
pkgrel=1
arch=(i686 x86_64)
url="http://xorg.freedesktop.org/"
license=('custom')
install=$pkgname.install
pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers"
#depends=('intel-dri' 'libxvmc' 'pixman' 'xcb-util>=0.3.9' 'glamor-egl')
depends=('pixman' 'xcb-util>=0.3.9' )
makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=15' 'libx11' 'libxrender'
             # additional deps for intel-virtual-output
            'libxrandr' 'libxinerama' 'libxcursor' 'libxtst')
optdepends=('libxrandr: for intel-virtual-output'
            'libxinerama: for intel-virtual-output'
            'libxcursor: for intel-virtual-output'
            'libxtst: for intel-virtual-output')
replaces=('xf86-video-intel-uxa' 'xf86-video-intel-sna')
provides=('xf86-video-intel-uxa' 'xf86-video-intel-sna')
conflicts=('xorg-server<1.15.0' 'X-ABI-VIDEODRV_VERSION<15' 'X-ABI-VIDEODRV_VERSION>=16'
           'xf86-video-intel-sna' 'xf86-video-intel-uxa' 'xf86-video-i810' 'xf86-video-intel-legacy')
groups=('xorg-drivers' 'xorg')
source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2)
sha256sums=('203d46064449da0e23a111418dfb189422ba96ea08707167c8dee463e2d745b1')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --with-default-accel=uxa \
    --enable-sna
#    --enable-glamor
  make
}

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

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install

  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
