summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b8a7817193ff678bd417a36878ea208f0f3973d5 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Avery Warddhana <them+arch _ nullablevo id au>
# Contributor: Antonin Décimo <antonin dot decimo at gmail dot com>
# Contributor: q234 rty <q23456yuiop at gmail dot com>
# Contributor: lilydjwg <lilydjwg@gmail.com>
# Contributor: AndyRTR <andyrtr@archlinux.org>

pkgname=xorg-xwayland-hidpi-xprop-git
pkgver=22.1.9.r400.g8252b110f
pkgrel=1
arch=('x86_64')
license=('custom')
url="https://xorg.freedesktop.org"
pkgdesc="run X clients under wayland, with !733 HiDPI patch"
depends=('nettle' 'libepoxy' 'systemd-libs' 'libxfont2' 
         'pixman' 'xorg-server-common' 'libxcvt')
makedepends=('git' 'meson' 'xorgproto-git' 'xtrans' 'libxkbfile' 'dbus'
             'xorg-font-util'
             'wayland' 'wayland-protocols'
             'libdrm' 'mesa-libgl'
             'systemd'
             'egl-wayland'
)
# Original patch from: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/733.patch
source=(git+https://anongit.freedesktop.org/git/xorg/xserver
        0000_Multi_DPI_support_via_global_factor_rescaling.patch
        0001_Remove_scale_atom_access_control.patch
        0002_Add_unscaled_output_mode.patch)
sha512sums=('SKIP'
            'c5011b89ea9419fe756fca403f2b7c23cf9a680fdf751dff97b5a076efd5997b0b63b777a1b542ab5c6300f4f553f7e5c264d998e7d53d568e93fc88fa8ff854'
            'f16cb5455a1caf26c586cca2d1ec6f4708804721b7d6a8d8bd1e4a7b47b97e8b822d3455fce0da3c74bb14baf6a3980574d85019cf242d6a033a578587f74b14'
            '4c601d3ab5eb97d49a5bd400a6984b93b9f1f684078825a23aacbc857509cc8a11caf700bd4ba0f8320b84e9257a18db1f3d24f17907a4108d555aee02bcb71a')
provides=('xorg-server-xwayland' 'xorg-xwayland')
conflicts=('xorg-server-xwayland' 'xorg-xwayland')
replaces=('xorg-server-xwayland')
options=('debug' 'strip')

pkgver() {
  cd xserver
  local branch=origin/xwayland-22.1
  local head=$(git rev-parse --short HEAD)
  local tag=$(git describe --abbrev=0 "$branch")
  local revisions=$(git rev-list "${tag}..HEAD" --count)
  printf "%s.r%d.g%s" "$(echo "$tag" | sed 's/^xwayland.//')" "$revisions" "$head"
}

prepare() {
  cd xserver
  patch -Np1 -i "${srcdir}/0000_Multi_DPI_support_via_global_factor_rescaling.patch"
  patch -Np1 -i "${srcdir}/0001_Remove_scale_atom_access_control.patch"
  patch -Np1 -i "${srcdir}/0002_Add_unscaled_output_mode.patch"
}

build() {
  arch-meson xserver build \
    -D ipv6=true \
    -D xvfb=false \
    -D xdmcp=false \
    -D xcsecurity=true \
    -D dri3=true \
    -D xwayland_eglstream=true \
    -D glamor=true \
    -D xkb_dir=/usr/share/X11/xkb \
    -D xkb_output_dir=/var/lib/xkb

  # Print config
  meson configure build
  ninja -C build
}

package() {
  # bin + manpage + .pc file
  install -m755 -Dt "${pkgdir}"/usr/bin build/hw/xwayland/Xwayland
  install -m644 -Dt "${pkgdir}"/usr/share/man/man1 build/hw/xwayland/Xwayland.1
  install -m644 -Dt "${pkgdir}"/usr/lib/pkgconfig build/meson-private/xwayland.pc

  # license
  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" xserver/COPYING
}

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