Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

95.6. libgusb-0.4.9

GLib wrapper around libusb, with a GObject device and context API

0.4.9-1 · LGPL-2.1-or-later · 0.2 SBU · 419.5 KiB, 26 files · 41_system, 178 of 1047 · ports/core/hardware/libgusb

Homepage: https://github.com/hughsie/libgusb

libgusb wraps libusb in GObject: a GUsbContext that enumerates devices and signals hot-plug, and GUsbDevice objects with synchronous and asynchronous transfers. Its consumer is libfprint, whose fingerprint reader drivers are written on it. The package carries the GObject Introspection typelib, the Vala API and the gusbcmd tool.

Depends on: meson, ninja, pkgconf, glib, libusb, json-glib, gobject-introspection, vala, python3, python3-setuptools, hwdata.

Required by (1): libfprint.

Sources: libgusb-0.4.9.tar.gz (61.5 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install libgusb'

build.sh:

meson setup build --prefix=/usr --sysconfdir=/etc --libdir=lib \
	--buildtype=release \
	-Dtests=false \
	-Ddocs=false \
	-Dintrospection=true \
	-Dvapi=true \
	-Dusb_ids=/usr/share/hwdata/usb.ids
meson compile -C build
DESTDIR=$PKG meson install --no-rebuild -C build

Programs: gusbcmd.

Libraries: libgusb.so.

Directories: /usr/include/gusb-1, /usr/share/licenses/libgusb.

With introspection on, the build runs contrib/generate-version-script.py over the GIR to check the exported symbols against the shipped libgusb.ver. The script imports pkg_resources, so python3-setuptools is a build dependency.