summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 020aa55ffa8ab3325bea537ced3b608ddbe3a596 (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
60
61
62
63
# Contributor: Lex Black <autumn-wind@web.de>
# Contributor: Eric Toombs
# Contributor: Joel Teichroeb <joel@teichroeb.net>
# Contributor: Sébastien Luttringer
# Contributor: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

_basename=weston
pkgname="$_basename-git"
pkgver=14.0.0.r8.gfe64eee
pkgrel=1
pkgdesc='Reference implementation of a Wayland compositor'
arch=('x86_64')
url='https://wayland.freedesktop.org/'
license=('MIT')
depends=('fontconfig' 'glibc' 'wayland' 'libxkbcommon' 'libinput' 'libunwind' 'pixman'
         'libdrm' 'pam' 'systemd-libs' 'cairo' 'libpng' 'libjpeg-turbo' 'libwebp'
         'mesa' 'libegl' 'libevdev' 'libgles' 'glib2' 'pango' 'lcms2' 'mtdev' 'libx11'
         'libxcb' 'dbus' 'libva' 'libxcursor' 'colord' 'seatd'
         'gstreamer' 'gst-plugins-base-libs')
makedepends=('wayland-protocols-git' 'meson' 'ninja' 'freerdp2' 'neatvnc' 'libpipewire'
             'xorg-xwayland' 'xcb-util-cursor' 'libdisplay-info' 'git')
optdepends=('xorg-xwayland: support x11 backend'
            'libpipewire: support pipewire backend'
            'freerdp2: support rdp backend'
            'neatvnc: support vnc backend'
            'libdisplay-info: support drm backend')
conflicts=("$_basename")
provides=("$_basename")
options=(!lto)
source=("git+https://gitlab.freedesktop.org/wayland/${_basename}.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_basename"
  git describe --tags --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd $_basename
  # apply patch from the source array (should be a pacman feature)
  local src
  for src in "${source[@]}"; do
    src="${src%%::*}"
    src="${src##*/}"
    [[ $src = *.patch ]] || continue
    echo "Applying patch $src..."
    patch -Np1 < "../$src"
  done
}

build() {
  arch-meson $_basename build \
    --libexec=lib/weston -D b_lto=false
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  # license
  install -Dm644 $_basename/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

# vim:set ts=2 sw=2 et: