# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-vmware
pkgver=13.2.1
pkgrel=0
pkgdesc="X.org VMWare video driver"
url="http://xorg.freedesktop.org/"
arch="x86 x86_64"
license="MIT"
subpackages="$pkgname-doc"
depends=
makedepends="xorg-server-dev videoproto renderproto xproto libdrm-dev
	fontsproto xf86dgaproto xineramaproto randrproto xextproto libxi-dev
	eudev-dev"

source="http://www.x.org/releases/individual/driver/$pkgname-$pkgver.tar.bz2
	"

builddir="$srcdir"/xf86-video-vmware-$pkgver
prepare() {
	cd "$builddir"
	update_config_sub
	default_prepare
}

build() {
	cd "$builddir"
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
sha512sums="9c48eaf5be6ece5685e07a53842083d091edba482ac0ea8318ac5b0adb9fc468f932685e4bdaf7e565f7a1cf723dcea2731616613798ebde2bbc18418a369a9d  xf86-video-vmware-13.2.1.tar.bz2"