192.7. wev-1.1.0
Wayland event viewer — print every input event a window receives
| Version | 1.1.0, release 1 |
| Shelf | wl — Wayland libraries and protocols, and Wayland-only desktop utilities |
| Phase | 42_graphics (Graphics Stack), 177 of 189 in build order |
| Licence | MIT |
| Homepage | https://git.sr.ht/~sircmpwn/wev |
| Build time | 0.1 SBU |
| Installed size | 56.2 KiB in 3 files |
| Recipe | ports/core/wl/wev/kpkgbuild |
About
wev opens a window and prints every Wayland event it receives: pointer motion and buttons, keyboard keys with their keysyms and modifiers, touch, tablet and the surface’s configure events. It answers “what does the compositor actually send” while a key binding, an input device or a pointer problem is being worked out, in the way xev does on X11.
Sources
wev-1.1.0.tar.gz(10.9 KiB)
sha25689b8d9bc756631795ee91c99a0d5b0877c9f5c3acfe81f77a2b69ecfc15daf16
upstream: https://git.sr.ht/~sircmpwn/wev/archive/1.1.0.tar.gz
archive copy: sources-4/wl--wev-1.1.0.tar.gz
Dependencies
Depends on: pkgconf, wayland, wayland-protocols, libxkbcommon, scdoc.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
release-flags.patch— Changes the one compile-and-link rule in upstream’sMakefile: it adds$(LDFLAGS)to the command, so the link takes the tree’s exported linker flags, and drops the hard-coded-g, so no debugging information goes into the installed binary.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/42_graphics/phase.env && kpkg install wev'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/wl/wev.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/wl/wev
echo '89b8d9bc756631795ee91c99a0d5b0877c9f5c3acfe81f77a2b69ecfc15daf16 wev-1.1.0.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/wev
SRC=$SRC_ROOT/wev-1.1.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf wev-1.1.0.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/release-flags.patch"
make PREFIX=/usr
make PREFIX=/usr DESTDIR=$PKG install
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/wev, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf wev-1.1.0-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/wev, and runs the triggers its paths call for.
Contents
Installed programs: wev.
Installed directories: /usr/share/licenses/wev.
Short descriptions
wev |
show wayland events |