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

246.1. kgraphviewer-26.08.2

Graphviz viewer — DOT graphs laid out and drawn, with zoom, a bird's-eye view and printing

Version 26.08.2, release 1
Shelf graphics — Graphics applications: painting, vector, photo development and management, image viewers, screenshot and image optimisers
Phase 43_toolkits (Toolkits), 159 of 344 in build order
Licence GPL-2.0-or-later AND LGPL-2.0-or-later
Homepage https://apps.kde.org/kgraphviewer/
Build time 5.1 SBU
Installed size 2.1 MiB in 47 files
Recipe ports/core/graphics/kgraphviewer/kpkgbuild

About

KGraphViewer displays Graphviz DOT files: it lays a graph out with graphviz’s engines, draws it with zoom, a bird’s-eye view and a choice of layout command, reloads it when the file changes and prints it. The drawing is a KPart, installed with its CMake package (KGraphViewerPart), so another program can embed it; massif-visualizer builds against it, which places this port with the libraries in 43_toolkits.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtsvg, qt6-qt5compat, kcoreaddons, ki18n, kparts, kwidgetsaddons, kdoctools, boost, graphviz.

Required by (2): kde-gear-graphics, massif-visualizer.

Patches

build.sh applies these; kpkg applies nothing by itself.

app-id.patch changes StartupWMClass=kgraphviewer to StartupWMClass=org.kde.kgraphviewer in upstream’s desktop entry. KGraphViewer takes its Wayland app_id from KAboutData, which derives org.kde.kgraphviewer, the desktop file name; upstream’s shorter class matches no window it opens.

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/43_toolkits/phase.env && kpkg install kgraphviewer'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/graphics/kgraphviewer.

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/graphics/kgraphviewer
echo '2841af8c2228f933febd0c3ae89923690923b29b7b9a0e0fb2ebeec74d153177  kgraphviewer-26.08.2.tar.xz' | 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/kgraphviewer
SRC=$SRC_ROOT/kgraphviewer-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf kgraphviewer-26.08.2.tar.xz -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/app-id.patch"

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

The switches, and why each is set:

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/kgraphviewer, 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 kgraphviewer-26.08.2-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/kgraphviewer, and runs the triggers its paths call for.

Contents

Installed programs: kgraphviewer.

Installed libraries: libkgraphviewer.so.

Installed directories: /usr/include/kgraphviewer, /usr/lib/cmake/KGraphViewerPart, /usr/share/doc/HTML/en/kgraphviewer, /usr/share/licenses/kgraphviewer.

Notes

Graphviz is REQUIRED at 2.30 or later through upstream’s FindGraphviz, over pkg-config’s libgvc, libcgraph and libcdt; the dot program, which upstream reports as a TYPE RUNTIME package, comes from the same port. boost is used for its headers.

Upstream’s BUILD_GRAPHEDITOR stays at its default, off: the editor, kgrapheditor, is marked unfinished, so neither the program nor its desktop entry is installed.