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

160.3. libsigrok-0.5.2

Hardware drivers for logic analysers, oscilloscopes and meters

0.5.2-1 · GPL-3.0-or-later · 1.7 SBU · 1.4 MiB, 12 files · 41_system, 432 of 1047 · ports/core/eda/libsigrok

Homepage: https://sigrok.org/

Why it is in KDOS. The comment above the 3 ports from libsigrok to sigrok-cli in script/phases/41_system/packages.d/eda.txt:

A hundred hardware drivers behind one interface, so a program reads samples without knowing which box produced them. The decoders are python modules — adding one for an undecoded chip is writing a file, not patching C.

Depends on: autoconf, automake, libtool, pkgconf, glib, libzip, libusb, libftdi, libserialport, hidapi, bluez, libtirpc, sigrok-firmware-fx2lafw.

Required by (1): sigrok-cli.

Sources: libsigrok-0.5.2.tar.gz (1.7 MiB). Every step kpkg takes applies to this port.

Optional, off in KDOS. These switches in build.sh turn off a feature whose library is a port here. The recipe may turn each off on purpose, or because the library was not yet a port when the recipe was written; this list cannot tell which.

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

build.sh:

export CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE $(pkg-config --cflags libtirpc)"
export LIBS="$LIBS $(pkg-config --libs libtirpc)"
./configure \
	--prefix=/usr \
	--libdir=/usr/lib \
	--disable-static \
	--with-libserialport \
	--with-libftdi \
	--with-libhidapi \
	--with-libbluez \
	--with-libusb \
	--with-libgio \
	--without-librevisa \
	--without-libgpib \
	--without-libieee1284 \
	--disable-cxx \
	--disable-python \
	--disable-ruby \
	--disable-java
grep -q 'define HAVE_RPC 1' config.h || {
	echo 'libsigrok: <rpc/rpc.h> not linkable, VXI-11 would be missing' >&2
	exit 1
}
make
make DESTDIR=$PKG install

install -Dm644 contrib/60-libsigrok.rules "$PKG/usr/lib/udev/rules.d/60-libsigrok.rules"

Libraries: libsigrok.so.

Directories: /usr/include/libsigrok, /usr/share/licenses/libsigrok.