aboutsummaryrefslogtreecommitdiffstats
path: root/community/libva-glx/APKBUILD
blob: 366b99e540c52439eacdb373a7f3d2d5b3cc5f4d (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
48
49
50
51
52
53
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>

# this package is to resolve the circular dependency libva -> mesa -> libva

pkgname=libva-glx
pkgver=2.12.0
pkgrel=0
pkgdesc="Video Acceleration (VA) API for Linux with MESA support"
url="https://01.org/linuxmedia"
arch="all"
options="!check"  # No test suite.
license="MIT"
depends_dev="libva-dev mesa-dev libxfixes-dev"
makedepends="$depends_dev meson wayland-dev"
subpackages="$pkgname-dev"
source="libva-$pkgver.tar.gz::https://github.com/intel/libva/archive/$pkgver.tar.gz"
builddir="$srcdir"/libva-$pkgver

prepare() {
	( if [ -f "$startdir"/../libva/APKBUILD ]; then
		_v=$pkgver
		. "$startdir"/../libva/APKBUILD
		if [ "$_v" != "$pkgver" ]; then
			die "libva and libva-glx needs to be same version"
		fi
	fi )
	default_prepare
}

build() {
	abuild-meson \
		-Dwith_glx=yes \
		-Dwith_wayland=yes \
		builddir
	meson compile ${JOBS:+-j ${JOBS}} -C builddir
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C builddir

	mkdir -p $builddir/temp/usr/lib/pkgconfig $builddir/temp/usr/include/va

	mv $pkgdir/usr/lib/libva-glx* $builddir/temp/usr/lib
	mv $pkgdir/usr/include/va/va_glx.h $builddir/temp/usr/include/va
	mv $pkgdir/usr/include/va/va_backend_glx.h $builddir/temp/usr/include/va
	mv $pkgdir/usr/lib/pkgconfig/libva-glx.pc $builddir/temp/usr/lib/pkgconfig
	rm -rf $pkgdir/*
	mv $builddir/temp/* $pkgdir
}

sha512sums="
53b22dd5166b92bceb508e7ecd73ae023d95928a76db0e61f4326652f23f6603c507b2ee604779293c7d7a02ef0f7b082e3b181bbb55f0a63416196088af1b51  libva-2.12.0.tar.gz
"