aboutsummaryrefslogtreecommitdiffstats
path: root/main/wayland/APKBUILD
blob: 41a762a455b8a22b6a6da9bfce9bfa594bd60c18 (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
54
55
56
57
58
59
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=wayland
pkgver=1.21.0
pkgrel=1
pkgdesc="A computer display server protocol"
url="https://wayland.freedesktop.org"
arch="all"
license="MIT"
depends="$pkgname-libs-client $pkgname-libs-cursor $pkgname-libs-egl $pkgname-libs-server"
depends_dev="libffi-dev expat-dev"
makedepends="$depends_dev libxml2-dev meson"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-libs-client:_libs $pkgname-libs-egl:_libs
	$pkgname-libs-cursor:_libs $pkgname-libs-server:_libs"
source="https://gitlab.freedesktop.org/wayland/wayland/-/releases/$pkgver/downloads/wayland-$pkgver.tar.xz
	tests-ignore-debugger.patch
	"

build() {
	abuild-meson \
		-Db_lto=true \
		-Ddocumentation=false \
		. output

	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	XDG_RUNTIME_DIR="$(mktemp -d)" \
	meson test --no-rebuild --print-errorlogs -C output
}

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

dev() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$pkgdir"/usr/share \
		"$subpkgdir"/usr
	default_dev
}

_libs() {
	depends=
	local name=${subpkgname#"$pkgname"-libs-}
	pkgdesc="$pkgdesc ($name library)"
	case "$name" in
		egl) replaces="mesa-libwayland-egl";;
	esac
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*-$name.so.* "$subpkgdir"/usr/lib
}

sha512sums="
5575216d30fdf5c63caa6bcad071e15f2a4f3acb12df776806073f65db37a50b5b5b3cc7957c5497636f4ac01893e2eaab26e453ded44b287acde01762f5fdc3  wayland-1.21.0.tar.xz
0f65a55265e9134ab08cabf67f9d1919c85c4cb6b69129e78bc6c50057cafcaf143007716a0fa73b2eb43d6b605944c320a12a36dbb5f15fcd2f5e770248c480  tests-ignore-debugger.patch
"