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
-D CMAKE_REQUIRE_FIND_PACKAGE_Python=ON— Make a Python interpreter a requirement. The build generates the Jinja definitions with a Python script, and upstream looks for the interpreter as optional and builds without those definitions when it is missing. python3 is independsfor it.-D CMAKE_DISABLE_FIND_PACKAGE_XercesC=ON— Never look for Xerces-C. When upstream finds it,katehighlightingindexer, the build-time tool that compiles the definitions into the library, also validates each definition file against the XML schema. The tool is not installed and the library is the same either way, while xerces-c, built in an earlier phase, would otherwise be found in every build root without being independs.-D KF_SKIP_PO_PROCESSING=ON— Build none of the Qt translation catalogues underpoqm/, whichecm_install_po_files_as_qm()would compile into.qmfiles. The strings in the source are English, and the package-wide English-only rule (see Size and language policy) would remove every catalogue in another language.
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.