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

230.1. kdevelop-26.08.2

The KDE IDE for C, C++ and more, with libclang code analysis

Version 26.08.2, release 1
Shelf editors — Text editors, IDEs, notebooks and REPLs
Phase 43_toolkits (Toolkits), 119 of 344 in build order
Licence GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.0-only AND (GPL-2.0-only OR GPL-3.0-only)
Homepage https://kdevelop.org/
Build time 12.9 SBU
Installed size 36.0 MiB in 762 files
Recipe ports/core/editors/kdevelop/kpkgbuild

About

KDevelop is KDE’s IDE, strongest on C and C++: its code model is libclang, from the clang port, and it understands CMake, meson, qmake and plain make projects. The port builds it with the plugins that drive clang-tidy, cppcheck, the gdb and lldb debuggers, git, patch review, and the Qt Help and manual page documentation, which it shows in a QtWebEngine view. No port installs a Qt Help (.qch) file, so its Qt documentation lists nothing; manual pages ship.

Sources

Dependencies

Depends on: cmake, ninja, extra-cmake-modules, boost, llvm, clang, shared-mime-info, gdb, lldb, qt6-qtbase, qt6-qt5compat, qt6-qtdeclarative, qt6-qttools, qt6-qtwebengine, kconfig, krunner, kiconthemes, ki18n, kitemmodels, kitemviews, kjobwidgets, kcmutils, kio, knewstuff, knotifyconfig, kparts, kservice, ktexteditor, threadweaver, kxmlgui, kwindowsystem, kcrash, kguiaddons, karchive, knotifications, sonnet, ktexttemplate, ktextwidgets, kdoctools, purpose, libkomparediff2, kdevelop-pg-qt, libksysguard, cppcheck.

Required by (3): kde-gear-devtools, kdev-php, kdev-python.

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 kdevelop'

What kpkg does

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

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/editors/kdevelop
echo 'f17a064dd6cb8cbbd5345b3c0eccdff102c57f7ae4484affcdb172c9cace5dea  kdevelop-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/kdevelop
SRC=$SRC_ROOT/kdevelop-26.08.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf kdevelop-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:

cmake -S . -B build -G Ninja \
	-D CMAKE_C_STANDARD=23 \
	-D CMAKE_C_EXTENSIONS=ON \
	-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 BUILD_BENCHMARKS=OFF \
	-D BUILD_DOC=ON \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D BUILD_executeplasmoid=OFF \
	-D BUILD_ghprovider=OFF \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Clang=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KompareDiff2=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Qt6Help=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Qt6WebEngineWidgets=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KF6Purpose=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Boost=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KSysGuard=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KDevelopPGQt=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_SubversionLibrary=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_OktetaKastenControllers=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_KastenControllers=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_OktetaGui=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_heaptrack=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_heaptrack_gui=ON \
	-D CMAKE_DISABLE_FIND_PACKAGE_ClazyStandalone=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
test -x "$PKG/usr/bin/kdevelop"
ls "$PKG"/usr/lib/qt6/plugins/kdevplatform/*/kdevclangsupport.so >/dev/null

cat > "$PKG/usr/share/applications/org.kde.kdevelop.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=KDevelop
GenericName=Integrated Development Environment
Comment=C and C++ development with code analysis, CMake and a debugger
TryExec=kdevelop
Exec=kdevelop
Icon=kdevelop
Terminal=false
StartupWMClass=org.kde.kdevelop
X-DocPath=kdevelop/index.html
Categories=Qt;KDE;Development;IDE;
Keywords=ide;c++;cmake;debugger;clang;programming;code;kdevelop;
Actions=OpenSession;

[Desktop Action OpenSession]
Name=Open a Session
Exec=kdevelop --ps
DESKTOP
cat > "$PKG/usr/share/applications/org.kde.kdevelop_ps.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=KDevelop (Pick Session)
GenericName=Integrated Development Environment
Comment=Choose a KDevelop session to start with
TryExec=kdevelop
Exec=kdevelop --ps
Icon=kdevelop
Terminal=false
NoDisplay=true
StartupWMClass=org.kde.kdevelop
Categories=Qt;KDE;Development;IDE;
Keywords=ide;session;kdevelop;
DESKTOP
chmod 644 "$PKG"/usr/share/applications/org.kde.kdevelop.desktop \
	"$PKG"/usr/share/applications/org.kde.kdevelop_ps.desktop
test -e "$PKG"/usr/share/icons/hicolor/48x48/apps/kdevelop.png

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

Contents

Installed programs: kdev_dbus_socket_transformer, kdev_format_source, kdev_includepathsconverter, kdevelop, kdevelop!, kdevplatform_shell_environment.sh.

Installed libraries: libKDevCMakeCommon.so, libKDevClangPrivate.so, libKDevCompileAnalyzerCommon.so, libKDevPlatformDebugger.so, libKDevPlatformDocumentation.so, libKDevPlatformInterfaces.so, libKDevPlatformLanguage.so, libKDevPlatformOutputView.so, libKDevPlatformProject.so, libKDevPlatformSerialization.so, libKDevPlatformShell.so, libKDevPlatformSublime.so, libKDevPlatformUtil.so, libKDevPlatformVcs.so, libKDevelopSessionsWatch.so.

Installed directories: /usr/include/kdevelop, /usr/include/kdevplatform, /usr/lib/cmake/KDevPlatform, /usr/lib/cmake/KDevelop, /usr/lib/qt6/qml/org/kde/plasma/private/kdevelopsessions, /usr/share/doc/HTML/en/kdevelop, /usr/share/kdevclangsupport, /usr/share/kdevcodegen, /usr/share/kdevcodeutils, /usr/share/kdevelop, /usr/share/kdevfiletemplates, /usr/share/kdevgdb, /usr/share/kdevlldb, /usr/share/kdevmanpage, /usr/share/kdevplatform, /usr/share/licenses/kdevelop, /usr/share/plasma/plasmoids/org.kde.kdevelopsessions.

Notes

The two visible menu entries are replaced. KAboutData sets the desktop file name, and so the Wayland app_id, to org.kde.kdevelop, which both entries give as StartupWMClass. The KDevelop (Pick Session) entry is hidden with NoDisplay=true; the main entry’s Open a Session action runs the same kdevelop --ps. org.kde.kdevelop_kdev4.desktop, the hidden handler for .kdev4 project files, is left as upstream installs it.