viewport-webkitgtk
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 WebKitGTK, in a process of its own as an ordinary Wayland
4
# client of this compositor. Nothing here builds an engine: `webkitgtk-6.0` is
5
# a package.
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-webkitgtk
14
pkgver=0.1.8
15
pkgrel=1
16
pkgdesc='Wayland compositor whose shell is a web page — WebKitGTK, out of 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
'webkitgtk-6.0'
47
'gtk4'
48
# WebKit guesses the type of a file:// page from the shared MIME database.
49
# Without it the bundled shell loads "successfully" and draws nothing.
50
'shared-mime-info'
51
)
52
53
optdepends=(
54
'xorg-xwayland: X11 clients'
55
'xdg-desktop-portal-gtk: the portal interfaces the compositor does not answer itself'
56
# Vulkan is the renderer wherever a Vulkan device owns the display; without
57
# one the compositor draws with OpenGL instead, so these are what decide
58
# which of the two a machine gets rather than whether it starts at all.
59
'vulkan-radeon: AMD hardware'
60
'vulkan-intel: Intel hardware'
61
'nvidia-utils: NVIDIA hardware, and hardware video decode with it'
62
# In a virtual machine: Venus passes Vulkan through to the host's GPU, and
63
# needs the host to offer it — QEMU wants
64
# `-device virtio-gpu-gl-pci,venus=on,blob=on,hostmem=2G`. Without it the
65
# only device that loads is lavapipe, which owns no DRM node, cannot drive
66
# a display, and turns every shell-frame copy into a copy on the CPU.
67
'vulkan-virtio: a virtual machine with 3D acceleration'
68
'vulkan-swrast: software Vulkan, for tests rather than a session'
69
'libva-mesa-driver: hardware video decode, for zero-copy video'
70
# The bar's icons are Material Design glyphs from a Nerd Font patch, and the
71
# family names in data/shell/shell.css are the ones fontconfig reports:
72
# "FiraCode Nerd Font" first, "Symbols Nerd Font" as the fallback that
73
# carries the glyphs without the monospace face. With neither installed the
74
# bar still lays out and every icon in it is a replacement box.
75
'ttf-firacode-nerd: the icons in the bar, and the font the shell names first'
76
'ttf-nerd-fonts-symbols: the icons in the bar, without the patched monospace family'
77
)
78
79
makedepends=(
80
# cargo comes with it: Arch has no separate cargo package, and naming
81
# one fails dependency resolution before a line is compiled.
82
'rust'
83
'git'
84
'pkgconf'
85
'clang'
86
'vulkan-headers'
87
'wayland-protocols'
88
89
)
90
91
provides=("viewport=$pkgver")
92
conflicts=('viewport'
93
'viewport-wpe'
94
'viewport-chromium')
95
options=('!lto')
96
97
source=("git+https://github.com/codebam/viewport.git#tag=$_tag")
98
sha256sums=('SKIP')
99
100
prepare() {
101
cd "$srcdir/viewport"
102
# A git dependency (the smithay fork, for the tearing-control patch) has to
103
# be fetched here rather than during build(), so build() is the only step
104
# that has to work offline.
105
export RUSTUP_TOOLCHAIN=stable
106
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
107
}
108
109
build() {
110
cd "$srcdir/viewport"
111
export RUSTUP_TOOLCHAIN=stable
112
export CARGO_TARGET_DIR=target
113
cargo build --frozen --release -p viewport -p viewport-shell-gtk
114
}
115
116
package() {
117
cd "$srcdir/viewport"
118
119
# Which engine this package installed, said outright. The binary picks a
120
# default of its own and cannot know which shell program is beside it, so a
121
# wrapper names it. `${VIEWPORT_SHELL_BACKEND:-}` first, so `--shell-backend`
122
# and the config file still win.
123
install -Dm755 target/release/viewport "$pkgdir/usr/lib/viewport/viewport"
124
install -Dm755 /dev/stdin "$pkgdir/usr/bin/viewport" <<'EOF'
125
#!/bin/sh
126
export VIEWPORT_SHELL_BACKEND="${VIEWPORT_SHELL_BACKEND:-webkitgtk}"
127
# And where the shell is. The compositor finds its own assets at
128
# `<prefix>/share/viewport`, taken from the directory two above the binary —
129
# which works for /usr/bin/viewport and does not for the wrapped layout here:
130
# /usr/lib/viewport/viewport gives /usr/lib/share/viewport, nothing is there,
131
# and it falls back to `$PWD/data/shell`. A login shell starts in $HOME, so
132
# that is a black screen with a working cursor and one line in the log:
133
#
134
# the shell page failed to load from file:///home/you/data/shell/index.html
135
#
136
# Set only when unset, so --url and the config file still win.
137
export VIEWPORT_SHELL_URL="${VIEWPORT_SHELL_URL:-file:///usr/share/viewport/shell/index.html}"
138
exec /usr/lib/viewport/viewport "$@"
139
EOF
140
install -Dm755 target/release/viewport-shell-gtk \
141
"$pkgdir/usr/lib/viewport/viewport-shell-gtk"
142
143
# The shell itself, and the page it falls back to. Without them an installed
144
# compositor has nothing to load: the default URL resolves beside the binary,
145
# and a session started from a login shell has no source tree under it.
146
install -dm755 "$pkgdir/usr/share/viewport"
147
cp -r data/shell "$pkgdir/usr/share/viewport/shell"
148
install -Dm644 data/fallback.html "$pkgdir/usr/share/viewport/fallback.html"
149
install -Dm644 data/config.example.json \
150
"$pkgdir/usr/share/viewport/config.example.json"
151
152
# How xdg-desktop-portal learns this backend exists. Without the file the
153
# frontend does not know the name "viewport" refers to anything, so a config
154
# naming it matches nothing and the request goes elsewhere.
155
install -Dm644 data/portal-share/xdg-desktop-portal/portals/viewport.portal \
156
"$pkgdir/usr/share/xdg-desktop-portal/portals/viewport.portal"
157
158
# The session target the compositor starts on launch. Without it
159
# graphical-session.target stays inactive, and xdg-desktop-portal — which
160
# holds Requisite=graphical-session.target — refuses to start at all, taking
161
# the Settings interface and every application's dark theme with it.
162
install -Dm644 data/systemd/user/viewport-session.target \
163
"$pkgdir/usr/lib/systemd/user/viewport-session.target"
164
165
install -Dm644 docs/viewport.1 "$pkgdir/usr/share/man/man1/viewport.1"
166
167
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 2>/dev/null || true
168
169
install -Dm644 /dev/stdin "$pkgdir/usr/share/wayland-sessions/viewport.desktop" <<'EOF'
170
[Desktop Entry]
171
Name=Viewport
172
Comment=Wayland compositor with a WebKitGTK shell
173
Exec=viewport
174
Type=Application
175
EOF
176
}
177
Changes since previous scan
--- PKGBUILD @ 2026-08-17 00:18+++ PKGBUILD @ 2026-08-18 03:38@@ -11,7 +11,7 @@ # takes one engine in one form. pkgname=viewport-webkitgtk-pkgver=0.1.7+pkgver=0.1.8 pkgrel=1 pkgdesc='Wayland compositor whose shell is a web page — WebKitGTK, out of 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-17 00:18:29 | CLEAN | 2 |
| 2026-08-16 01:31:50 | LOW | 1 |