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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Maintainer: Sean Behan <codebam@riseup.net>
#
# The same compositor as `viewport-chromium`, already built. The source
# package compiles the whole tree — Smithay, wgpu and the shell process that
# drives the browser — which is an hour on a laptop; this one unpacks the
# binaries the release was cut with instead.
#
# No engine is inside either of them: Chromium is a runtime dependency, started
# as a child process and driven over the DevTools protocol, so this artifact is
# as portable as the source build and which Chromium runs can change under it.
#
# The upstream artifact is itself an Arch package, built from the recipe in
# packaging/aur/viewport-chromium of the tagged tree, so what lands in $pkgdir here is
# byte for byte what the source package would have produced.
pkgname=viewport-chromium-bin
pkgver=0.3.0
pkgrel=1
pkgdesc='Wayland compositor whose shell is a web page — Chromium, driven as a child process (binary release)'
arch=('x86_64')
url='https://github.com/codebam/viewport'
license=('GPL-3.0-or-later')
# The pkgrel of the upstream artifact, which moves independently of this
# package's own: a fix to this recipe bumps pkgrel without a new release to
# download.
_pkgrel=1
depends=(
'wayland'
'libxkbcommon'
'libdrm'
'libinput'
'seatd'
'systemd-libs'
'mesa'
'libglvnd'
'vulkan-icd-loader'
'pipewire'
'libxcb'
'chromium'
)
optdepends=(
'xorg-xwayland: X11 clients'
'xdg-desktop-portal-gtk: the portal interfaces the compositor does not answer itself'
# Vulkan is the renderer wherever a Vulkan device owns the display; without
# one the compositor draws with OpenGL instead, so these are what decide
# which of the two a machine gets rather than whether it starts at all.
'vulkan-radeon: AMD hardware'
'vulkan-intel: Intel hardware'
'nvidia-utils: NVIDIA hardware, and hardware video decode with it'
# In a virtual machine: Venus passes Vulkan through to the host's GPU, and
# needs the host to offer it — QEMU wants
# `-device virtio-gpu-gl-pci,venus=on,blob=on,hostmem=2G`. Without it the
# only device that loads is lavapipe, which owns no DRM node, cannot drive
# a display, and turns every shell-frame copy into a copy on the CPU.
'vulkan-virtio: a virtual machine with 3D acceleration'
'vulkan-swrast: software Vulkan, for tests rather than a session'
'libva-mesa-driver: hardware video decode, for zero-copy video'
# The bar's icons are Material Design glyphs from a Nerd Font patch, and the
# family names in the shell's CSS are the ones fontconfig reports:
# "FiraCode Nerd Font" first, "Symbols Nerd Font" as the fallback that
# carries the glyphs without the monospace face. With neither installed the
# bar still lays out and every icon in it is a replacement box.
'ttf-firacode-nerd: the icons in the bar, and the font the shell names first'
'ttf-nerd-fonts-symbols: the icons in the bar, without the patched monospace family'
)
provides=("viewport=$pkgver" "viewport-chromium=$pkgver")
# Every engine's package installs a binary called `viewport` and provides that
# name, so a system takes one of them — this one, the source recipe it was
# built from, or another engine's.
conflicts=('viewport'
'viewport-chromium'
'viewport-webkitgtk'
'viewport-wpe')
# Nothing to strip and nothing to index: these binaries were stripped where
# they were built, and a -debug package cut from them would hold no symbols.
options=('!strip' '!debug')
# Downloaded under a name that is not *.pkg.tar.*, so the artifact sitting in
# the build directory is not mistaken for the package this recipe produced.
source_x86_64=("$pkgname-$pkgver.tar.zst::$url/releases/download/v$pkgver/viewport-chromium-$pkgver-$_pkgrel-$CARCH.pkg.tar.zst")
sha256sums_x86_64=('bf4c6a96eb6fe82c79f3b7cbab6878976a13421c6ca9d1b9d67cca1fbf937489')
package() {
# The source is an Arch package, so makepkg has already unpacked a $pkgdir
# tree into $srcdir; everything beside usr/ is package metadata that pacman
# generates again for this package.
cp -a "$srcdir/usr" "$pkgdir/usr"
# The man page comes with the artifact rather than being installed here:
# this recipe unpacks a built package, so `$srcdir` holds `usr/` and the
# metadata pacman regenerates, and there is no source tree to copy a page
# out of. The source recipe installs it, so the `cp -a` above carries it.
# The licence directory is named for the package that installed it, and that
# is a different name here.
mv "$pkgdir/usr/share/licenses/viewport-chromium" \
"$pkgdir/usr/share/licenses/$pkgname"
}
|