# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-s3virge
pkgver=1.11.1
pkgrel=3
pkgdesc="S3 ViRGE video driver"
url="https://xorg.freedesktop.org/"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
makedepends="xorg-server-dev libxi-dev util-macros xorgproto"
source="https://www.x.org/releases/individual/driver/xf86-video-s3virge-$pkgver.tar.xz"

build() {
	export CFLAGS="${CFLAGS/-fno-plt}"
	export CXXFLAGS="${CXXFLAGS/-fno-plt}"
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
4cce81bd8b65cb0b0be405b4e78db8c9578f320b5ce9365f4271d52a92f3a2386b22e78790b68e875b79faa581c340ea325f6e35b9ff348095face3fadc427dd  xf86-video-s3virge-1.11.1.tar.xz
"
