summaryrefslogtreecommitdiff
path: root/user/libdrm/APKBUILD
blob: e4b35ef51b928c7df620c6097a82ad5e23832b8f (plain) (blame)
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: A. Wilcox <awilfox@adelielinux.org>
pkgname=libdrm
pkgver=2.4.114
pkgrel=0
pkgdesc="Userspace interface to kernel DRM services"
url="https://dri.freedesktop.org/"
arch="all"
# Requires a computer with gfx, no X running, build user in 'video' group..
options="!check"
license="MIT"
depends=""
depends_dev="linux-headers"
checkdepends="bash cunit-dev"
makedepends="$depends_dev bash cairo-dev eudev-dev libpciaccess-dev libpthread-stubs
	libatomic_ops-dev meson ninja py3-docutils xmlto"
subpackages="$pkgname-dev $pkgname-doc"
source="https://dri.freedesktop.org/$pkgname/$pkgname-$pkgver.tar.xz"

build() {
	case $CARCH in
	arm*|aarch64*) _arch_conf="
		-Domap=enabled
		-Dexynos=enabled
		-Detnaviv=enabled
		-Dtegra=enabled
		" ;;
	esac

	meson \
		-Dprefix=/usr \
		-Dman-pages=enabled \
		-Dudev=true \
		-Dvalgrind=disabled \
		$_arch_conf \
		build
	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="8dcd4be5674e3ea2ab4394fa8f461914e5aa7f4f57a2f448c5216d84ee6682e16b45eafabf97b7d9f5c062183d9a6bf3f0c97499d4cb01c19807a51209a0f644  libdrm-2.4.114.tar.xz"