summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5a133f9a68e5da936f775eaa94213dce0099fb65 (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
46
# Maintainer: Ryo Munakata <afpacket@gmail.com>
pkgname=glmark2-git
pkgver=r835.f413c5b
pkgrel=1
pkgdesc="OpenGL (ES) 2.0 benchmark (X11, Wayland, DRM)"
arch=('i686' 'x86_64')
url="https://launchpad.net/glmark2"
license=('GPL3')
depends=('libjpeg-turbo' 'libpng12' 'libx11' 'libxcb' 'wayland' 'libgl' 'libgles')
makedepends=('git' 'python2')
conflicts=('glmark2')
provides=('glmark2')
source=(
    "$pkgname"::'git://github.com/glmark2/glmark2.git'
    "https://gist.githubusercontent.com/graysky2/83e474d5891cdcd75d8293a47a10b468/raw/892e731ffa98e5901240fbd4127d62c4153eff28/unfuck.patch"
    )
md5sums=(
    'SKIP'
    'cef375cb34614fbbb26307e06449515d'
    )

# GLMARK2 features
GM2_FLAVORS="x11-gl,x11-glesv2,wayland-gl,wayland-glesv2,drm-gl,drm-glesv2"

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

prepare() {
    cd "${srcdir}/${pkgname}"
    patch -i "$srcdir/unfuck.patch"
}

build() {
    cd "${srcdir}/${pkgname}"
    python2 ./waf configure \
        --prefix=/usr \
        --with-flavors=${GM2_FLAVORS}
    python2 ./waf -j4
}

package() {
    cd "${srcdir}/${pkgname}"
    DESTDIR="${pkgdir}" python2 ./waf install
}