project, packaging: libevdev comes with Crafter.Graphics

Crafter.Graphics vendors libevdev since dfb70bc and links it statically:
its gamepad backend compiles against its own copy, which comes first on
the include path, and the executable needs no libevdev.so. The prefix
build-libevdev.sh made, the include and library paths project.cpp added
for libevdev and the executable's rpath into ~/.cache are left with
nothing to do, so they go.
This commit is contained in:
Jorijn van der Graaf 2026-10-20 23:18:53 +02:00
commit b27200a3c5
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
3 changed files with 1 additions and 49 deletions

View file

@ -1,30 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
# build-libevdev.sh — libevdev into a prefix, for Crafter.Graphics's gamepad
# backend. The crafter-build Flatpak's SDK ships no libevdev (headers or
# library) and neither does the Freedesktop Platform, so the library is
# built from source into a prefix.
#
# packaging/build-libevdev.sh [prefix] # default: ~/.cache/imsd-messages/libevdev-<arch>
#
# Runs inside the crafter-build sandbox (meson, ninja, python3 and a C
# compiler are the SDK's). Network: the release tarball from freedesktop.org.
set -eu
VERSION=1.13.4
# pinned at the first download (2026-10-17); a mismatch stops the build
SHA256=f00ab8d42ad8b905296fab67e13b871f1a424839331516642100f82ad88127cd
ARCH=$(uname -m)
PREFIX="${1:-$HOME/.cache/imsd-messages/libevdev-$ARCH}"
work=$(mktemp -d)
trap 'rm -rf "$work"' EXIT
echo ">> libevdev $VERSION into $PREFIX"
curl -fsSL -o "$work/libevdev.tar.xz" "https://www.freedesktop.org/software/libevdev/libevdev-$VERSION.tar.xz"
got=$(sha256sum "$work/libevdev.tar.xz" | cut -d' ' -f1)
[ "$got" = "$SHA256" ] || { echo "libevdev-$VERSION.tar.xz: sha256 $got, expected $SHA256" >&2; exit 1; }
tar -xJf "$work/libevdev.tar.xz" -C "$work"
cd "$work/libevdev-$VERSION"
meson setup build --prefix="$PREFIX" --libdir=lib -Dtests=disabled -Ddocumentation=disabled -Dcoverity=false >/dev/null
ninja -C build install >/dev/null
echo ">> done: $(ls "$PREFIX"/lib/libevdev.so*) ; headers in $PREFIX/include/libevdev-1.0"