summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 17b9f7219a22d95f238288972d04bd95e248d299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Omar Pakker <archlinux@opakker.nl>

_pkgname="piglit"
pkgname="${_pkgname}-git"
pkgver=r11383.b73f20ffd
pkgrel=1
pkgdesc="OpenGL implementation testing suite. Provides a simple means to perform regression tests."
arch=('i686' 'x86_64')
url="http://piglit.freedesktop.org/"
license=('GPL2' 'GPL3' 'LGPL2.1')
depends=('waffle' 'python-mako' 'python-numpy' 'libxrender' 'glu' 'libcaca' 'libxkbcommon' 'ocl-icd')
optdepends=('python-lxml: Accelerated python XML library using libxml2'
            'python-simplejson: Fast implementation of the python JSON library'
            'python-jsonstreams: A JSON stream writer for python'
            'vkrunner: Vulkan shader script testing')
makedepends=('git' 'cmake' 'xorgproto' 'vulkan-headers' 'opencl-headers' 'glslang')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
options=('!emptydirs')
install="${_pkgname}.install"
source=("git+https://gitlab.freedesktop.org/mesa/piglit.git")
sha256sums=('SKIP')

pkgver() {
	cd "${_pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "${_pkgname}"
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DPIGLIT_BUILD_CL_TESTS=1 \
		.
	make
}

package() {
	cd "${_pkgname}"
	make DESTDIR="${pkgdir}" install

	cd "${pkgdir}/usr/lib/piglit/lib/"
	find . -name "*.so" -exec ln -s "{}" "../../{}" \;
}