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
-Dtests=false— No self tests, which drive real hardware or need umockdev, not a port. Theumockdevoption only matters when tests are built.-Ddocs=false— No API reference, which needs gi-docgen.-Dintrospection=true— TheGUsb-1.0typelib and GIR, through gobject-introspection; upstream’s default, stated.-Dvapi=true— The Vala API, through vala; upstream’s default, stated. It requires introspection.-Dusb_ids=/usr/share/hwdata/usb.ids— Upstream’s default, stated: the vendor and product name database from hwdata, whichg_usb_device_get_vid_as_str()and its siblings read at run time.
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.