# Template file for 'mesa-demos'
pkgname=mesa-demos
version=8.4.0
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="libXext-devel MesaLib-devel glu-devel glew-devel freetype-devel libfreeglut-devel"
short_desc="Mesa 3D demos and tools"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://www.mesa3d.org"
distfiles="https://mesa.freedesktop.org/archive/demos/mesa-demos-${version}.tar.bz2"
checksum=01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d

# Liberation
# Some code has been taken from:
# https://git.parabola.nu/abslibre.git/tree/libre/mesa-demos/PKGBUILD
post_patch() {
	# remove nonfree demos (pointblast and spriteblast)
	rm -v src/demos/{pointblast,spriteblast}.c
}

glxinfo_package() {
	short_desc="Tool to diagnose problems with 3D acceleration setup"
	pkg_install() {
		vmove usr/bin/glxinfo
	}
}
