viewport-chromium
maintainer codebam
· 0 votes
· scanned 2026-08-18 03:38:23.746777
LOW
View on AUR ↗
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
LOW
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Sean Behan <codebam@riseup.net>
2
#
3
# The shell drawn by Chromium, started as a child process and driven over the
4
# DevTools protocol. This links no engine at all: the browser is a runtime
5
# dependency, and which Chromium it runs can change without a rebuild.
6
#
7
# One of nine recipes under packaging/aur: three engines — see
8
# docs/shell-backends.md — each as this, a `-git` form following `main`, and a
9
# `-bin` form unpacking the release. Every one of them installs a binary called
10
# `viewport` and provides that name, so they conflict with each other: a machine
11
# takes one engine in one form.
12
13
pkgname=viewport-chromium
14
pkgver=0.1.8
15
pkgrel=1
16
pkgdesc='Wayland compositor whose shell is a web page — Chromium, driven as a child process'
17
arch=('x86_64' 'aarch64')
18
url='https://github.com/codebam/viewport'
19
license=('GPL-3.0-or-later')
20
21
# The tag this package was cut from, and the whole of what makes it
22
# reproducible: a branch would move under it, and a PKGBUILD that follows a
23
# moving branch does not describe any particular package.
24
#
25
# A tag while there is one, a commit while there is not. Between releases this
26
# carries `_commit` and a `pkgver` of the git-describe form — the last release,
27
# how many commits past it, and which one — because naming a stale tag would be
28
# a lie about what was built. At a release the two say the same thing and the
29
# tag is the one anybody can check.
30
_tag=v0.1.8
31
32
depends=(
33
'wayland'
34
'libxkbcommon'
35
'pixman'
36
'libdrm'
37
'libinput'
38
'seatd'
39
'systemd-libs'
40
'mesa'
41
'libglvnd'
42
'vulkan-icd-loader'
43
'pipewire'
44
'libxcb'
45
'xcb-util-wm'
46
'chromium'
47
)
48
49
optdepends=(
50
'xorg-xwayland: X11 clients'
51
'xdg-desktop-portal-gtk: the portal interfaces the compositor does not answer itself'
52
# Vulkan is the renderer wherever a Vulkan device owns the display; without
53
# one the compositor draws with OpenGL instead, so these are what decide
54
# which of the two a machine gets rather than whether it starts at all.
55
'vulkan-radeon: AMD hardware'
56
'vulkan-intel: Intel hardware'
57
'nvidia-utils: NVIDIA hardware, and hardware video decode with it'
58
# In a virtual machine: Venus passes Vulkan through to the host's GPU, and
59
# needs the host to offer it — QEMU wants
60
# `-device virtio-gpu-gl-pci,venus=on,blob=on,hostmem=2G`. Without it the
61
# only device that loads is lavapipe, which owns no DRM node, cannot drive
62
# a display, and turns every shell-frame copy into a copy on the CPU.
63
'vulkan-virtio: a virtual machine with 3D acceleration'
64
'vulkan-swrast: software Vulkan, for tests rather than a session'
65
'libva-mesa-driver: hardware video decode, for zero-copy video'
66
# The bar's icons are Material Design glyphs from a Nerd Font patch, and the
67
# family names in data/shell/shell.css are the ones fontconfig reports:
68
# "FiraCode Nerd Font" first, "Symbols Nerd Font" as the fallback that
69
# carries the glyphs without the monospace face. With neither installed the
70
# bar still lays out and every icon in it is a replacement box.
71
'ttf-firacode-nerd: the icons in the bar, and the font the shell names first'
72
'ttf-nerd-fonts-symbols: the icons in the bar, without the patched monospace family'
73
)
74
75
makedepends=(
76
# cargo comes with it: Arch has no separate cargo package, and naming
77
# one fails dependency resolution before a line is compiled.
78
'rust'
79
'git'
80
'pkgconf'
81
'clang'
82
'vulkan-headers'
83
'wayland-protocols'
84
85
)
86
87
provides=("viewport=$pkgver")
88
conflicts=('viewport'
89
'viewport-wpe'
90
'viewport-webkitgtk')
91
options=('!lto')
92
93
source=("git+https://github.com/codebam/viewport.git#tag=$_tag")
94
sha256sums=('SKIP')
95
96
prepare() {
97
cd "$srcdir/viewport"
98
# A git dependency (the smithay fork, for the tearing-control patch) has to
99
# be fetched here rather than during build(), so build() is the only step
100
# that has to work offline.
101
export RUSTUP_TOOLCHAIN=stable
102
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
103
}
104
105
build() {
106
cd "$srcdir/viewport"
107
export RUSTUP_TOOLCHAIN=stable
108
export CARGO_TARGET_DIR=target
109
cargo build --frozen --release -p viewport -p viewport-shell-chromium
110
}
111
112
package() {
113
cd "$srcdir/viewport"
114
115
# Which engine this package installed, said outright. The binary picks a
116
# default of its own and cannot know which shell program is beside it, so a
117
# wrapper names it. `${VIEWPORT_SHELL_BACKEND:-}` first, so `--shell-backend`
118
# and the config file still win.
119
install -Dm755 target/release/viewport "$pkgdir/usr/lib/viewport/viewport"
120
install -Dm755 /dev/stdin "$pkgdir/usr/bin/viewport" <<'EOF'
121
#!/bin/sh
122
export VIEWPORT_SHELL_BACKEND="${VIEWPORT_SHELL_BACKEND:-chromium}"
123
export VIEWPORT_CHROMIUM_BIN="${VIEWPORT_CHROMIUM_BIN:-/usr/bin/chromium}"
124
# And where the shell is. The compositor finds its own assets at
125
# `<prefix>/share/viewport`, taken from the directory two above the binary —
126
# which works for /usr/bin/viewport and does not for the wrapped layout here:
127
# /usr/lib/viewport/viewport gives /usr/lib/share/viewport, nothing is there,
128
# and it falls back to `$PWD/data/shell`. A login shell starts in $HOME, so
129
# that is a black screen with a working cursor and one line in the log:
130
#
131
# the shell page failed to load from file:///home/you/data/shell/index.html
132
#
133
# Set only when unset, so --url and the config file still win.
134
export VIEWPORT_SHELL_URL="${VIEWPORT_SHELL_URL:-file:///usr/share/viewport/shell/index.html}"
135
exec /usr/lib/viewport/viewport "$@"
136
EOF
137
install -Dm755 target/release/viewport-shell-chromium \
138
"$pkgdir/usr/lib/viewport/viewport-shell-chromium"
139
140
# The shell itself, and the page it falls back to. Without them an installed
141
# compositor has nothing to load: the default URL resolves beside the binary,
142
# and a session started from a login shell has no source tree under it.
143
install -dm755 "$pkgdir/usr/share/viewport"
144
cp -r data/shell "$pkgdir/usr/share/viewport/shell"
145
install -Dm644 data/fallback.html "$pkgdir/usr/share/viewport/fallback.html"
146
install -Dm644 data/config.example.json \
147
"$pkgdir/usr/share/viewport/config.example.json"
148
149
# How xdg-desktop-portal learns this backend exists. Without the file the
150
# frontend does not know the name "viewport" refers to anything, so a config
151
# naming it matches nothing and the request goes elsewhere.
152
install -Dm644 data/portal-share/xdg-desktop-portal/portals/viewport.portal \
153
"$pkgdir/usr/share/xdg-desktop-portal/portals/viewport.portal"
154
155
# The session target the compositor starts on launch. Without it
156
# graphical-session.target stays inactive, and xdg-desktop-portal — which
157
# holds Requisite=graphical-session.target — refuses to start at all, taking
158
# the Settings interface and every application's dark theme with it.
159
install -Dm644 data/systemd/user/viewport-session.target \
160
"$pkgdir/usr/lib/systemd/user/viewport-session.target"
161
162
install -Dm644 docs/viewport.1 "$pkgdir/usr/share/man/man1/viewport.1"
163
164
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 2>/dev/null || true
165
166
install -Dm644 /dev/stdin "$pkgdir/usr/share/wayland-sessions/viewport.desktop" <<'EOF'
167
[Desktop Entry]
168
Name=Viewport
169
Comment=Wayland compositor with a Chromium shell
170
Exec=viewport
171
Type=Application
172
EOF
173
}
174
Changes since previous scan
--- PKGBUILD @ 2026-08-16 00:03+++ PKGBUILD @ 2026-08-18 03:38@@ -11,7 +11,7 @@ # takes one engine in one form. pkgname=viewport-chromium-pkgver=0.1.7+pkgver=0.1.8 pkgrel=1 pkgdesc='Wayland compositor whose shell is a web page — Chromium, driven as a child process' arch=('x86_64' 'aarch64')@@ -27,7 +27,7 @@ # how many commits past it, and which one — because naming a stale tag would be # a lie about what was built. At a release the two say the same thing and the # tag is the one anybody can check.-_tag=v0.1.7+_tag=v0.1.8 depends=( 'wayland'Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-18 03:38:23 | LOW | 1 |
| 2026-08-16 00:03:42 | CLEAN | 2 |
| 2026-08-15 23:31:34 | LOW | 1 |
| 2026-08-15 00:26:13 | CLEAN | 2 |
| 2026-08-14 11:29:14 | LOW | 1 |