summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b23d473435c71a2f2691fc2686f707ea685674c (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
47
# Maintainer: Reza Jahanbakhshi <reza.jahanbakhshi at gmail dot com

pkgname=virglrenderer-git
pkgver=0.10.4_290_gd74a494a
pkgrel=1
pkgdesc="A virtual 3D GPU library, that allows the guest operating system to use the host GPU to accelerate 3D rendering, git version"
arch=('x86_64')
url="https://virgil3d.github.io/"
license=('MIT')
depends=(libepoxy mesa)
makedepends=(python meson ninja)
checkdepends=(check)
provides=('virglrenderer')
conflicts=('virglrenderer')
source=('virglrenderer::git+https://gitlab.freedesktop.org/virgl/virglrenderer.git')
md5sums=('SKIP')
sha512sums=('SKIP')

pkgver() {
  cd virglrenderer
  _ver=$(git describe --tags)
  echo ${_ver//-/_}
}

prepare() {
  cd virglrenderer
  if [  -d build ]; then
    rm -rf build
  fi
}

build () {
  cd virglrenderer
  meson --prefix=/usr build -Dvenus=true # -Dtests=true
  ninja -C build
}

check() {
  cd virglrenderer
  #ninja -C build test  TODO: figure out why tests fail in chroot environment
}

package() {
  cd virglrenderer
  DESTDIR="$pkgdir" ninja -C build install
  install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}