# Maintainer: _pkgname="xorg-xwayland" pkgname="$_pkgname-git" pkgver=23.2.6.r490.g43f47e8 pkgrel=0.1 url="https://xorg.freedesktop.org" pkgdesc="Run X clients under Wayland with explicit sync patch" license=('LicenseRef-Adobe-Display-PostScript' 'BSD-3-Clause' 'LicenseRef-DEC-3-Clause' 'HPND' 'LicenseRef-HPND-sell-MIT-disclaimer-xserver' 'HPND-sell-variant' 'ICU' 'ISC' 'MIT' 'MIT-open-group' 'NTP' 'SGI-B-2.0' 'SMLNJ' 'X11' 'X11-distribute-modifications-variant') arch=('x86_64') depends=( 'libegl' 'libepoxy' 'libxcvt' 'libxfont2' 'nettle' 'pixman' 'systemd-libs' 'xorg-server-common' ) makedepends=( 'dbus' 'git' 'libdrm' 'libxkbfile' 'meson' 'systemd' 'wayland' 'wayland-protocols' 'xorg-font-util' 'xorgproto' 'xtrans' ) provides=('xorg-xwayland' 'xorg-server-xwayland') conflicts=('xorg-xwayland' 'xorg-server-xwayland') _pkgsrc="$_pkgname" source=("$_pkgsrc"::"git+https://gitlab.freedesktop.org/xorg/xserver.git") sha256sums=('SKIP') pkgver() { cd "$_pkgsrc" local branch=origin/xwayland-23.2 local tag=$(git describe --abbrev=0 "$branch") local revisions=$(git rev-list --count --cherry-pick "${tag}...HEAD") local head=$(git rev-parse --short=7 HEAD) printf "%s.r%d.g%s" "$(echo "$tag" | sed 's/^xwayland.//')" "$revisions" "$head" } build() { local _meson_options=( -D ipv6=true -D xvfb=false -D xnest=false -D xcsecurity=true -D xorg=false -D xephyr=false -D xwayland=true -D xwin=false -D xquartz=false -D glamor=true -D udev=true -D systemd_logind=true -D suid_wrapper=true -D xkb_dir=/usr/share/X11/xkb -D xkb_output_dir=/var/lib/xkb ) arch-meson "$_pkgsrc" build "${_meson_options[@]}" meson compile -C build } package() { replaces=('xorg-xwayland-explicit-sync-git') # bin + manpage + .pc file install -Dm755 "build/hw/xwayland/Xwayland" -t "$pkgdir/usr/bin/" install -Dm644 "build/hw/xwayland/Xwayland.1" -t "$pkgdir/usr/share/man/man1/" install -Dm644 "build/meson-private/xwayland.pc" -t "$pkgdir/usr/lib/pkgconfig/" # license install -Dm644 "$_pkgsrc/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname/" }