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

257.45. syntax-highlighting-6.31.0

KDE Frameworks: syntax highlighting engine for structured text

6.31.0-1 · MIT AND LGPL-2.0-or-later AND GPL-3.0-or-later AND BSD-3-Clause AND LGPL-2.1-or-later · 5.0 SBU · 2.6 MiB, 44 files · 43_toolkits, 112 of 344 · ports/core/kf6/syntax-highlighting

Homepage: https://api.kde.org/frameworks/syntax-highlighting/html/

Why it is in KDOS. The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:

The libraries KDE applications are built on, without Plasma.

KSyntaxHighlighting is the syntax highlighting engine of kate and ktexteditor: more than 400 language definitions and the colour themes, all compiled into the library as resources, a highlighter for any QTextDocument, and the ksyntaxhighlighter6 command that writes highlighted HTML or ANSI-coloured text from the shell. kio-extras’s text thumbnails, kmail’s code blocks and labplot use it too.

Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtdeclarative, perl, python3.

Required by (13): cantor, grantlee-editor, kdepim-addons, kio-extras, kmail, kpimtextedit, ktextaddons, ktexteditor, labplot, libksieve, mailcommon, messagelib, neochat.

Sources: syntax-highlighting-6.31.0.tar.xz (3.8 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install syntax-highlighting'

build.sh:

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

Programs: ksyntaxhighlighter6.

Libraries: libKF6SyntaxHighlighting.so.

Directories: /usr/include/KF6/KSyntaxHighlighting, /usr/lib/cmake/KF6SyntaxHighlighting, /usr/lib/qt6/qml/org/kde/syntaxhighlighting, /usr/share/licenses/syntax-highlighting.

perl is a requirement of the configure: the PHP definitions are generated by a Perl script.