summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38665e38ee612ee026d3e7f406d9858204b92023 (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
# Maintainer: guangxifolk

pkgbase=wayland-asan-git
pkgname=('wayland-asan-git')
pkgver=1.22.0.r54.g47de872
pkgrel=1
pkgdesc='A computer display server protocol (git version, with address sanitizer)'
arch=('x86_64')
url='https://wayland.freedesktop.org/'
license=('MIT')
depends=('glibc' 'libffi' 'expat' 'libxml2')
makedepends=('git' 'meson' 'ninja' 'libxslt' 'doxygen' 'xmlto' 'graphviz' 'docbook-xsl')
source=('git+https://gitlab.freedesktop.org/wayland/wayland.git')
sha256sums=('SKIP')

pkgver() {
    git -C wayland describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//'
}

build() {
    meson build wayland --buildtype='debug' --prefix='/usr' -Db_sanitize='address'
}

check() {
    ASAN_OPTIONS='detect_odr_violation=0' ninja -C build test
}

package_wayland-asan-git() {
    provides=(
        "wayland=${pkgver}"
        "libwayland-client.so=0-64"
        "libwayland-cursor.so=0-64"
        "libwayland-egl.so=1-64"
        "libwayland-server.so=0-64"
    )
    conflicts=('wayland')
    
    DESTDIR="$pkgdir" ninja -C build install
    mkdir -p docs/share
    mv "${pkgdir}/usr/share/"{doc,man} docs/share
    install -D -m644 wayland/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}