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
kdevelop-26.08.2.tar.xz(8.6 MiB)
sha256f17a064dd6cb8cbbd5345b3c0eccdff102c57f7ae4484affcdb172c9cace5dea
upstream: https://download.kde.org/stable/release-service/26.08.2/src/kdevelop-26.08.2.tar.xz
archive copy: sources-2/editors--kdevelop-26.08.2.tar.xz
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:
-D CMAKE_C_STANDARD=23— Together with-D CMAKE_C_EXTENSIONS=ON, compile C as GNU C23. KDE’s compiler settings make C strict C99 unless a standard is given, and the CMake plugin’s lexer,plugins/cmake/parser/cmListFileLexer.c, includesQtGlobalthroughcmStandardLexer.hand callsfilenoandstrdup. Qt’s headers usestatic_assert, a keyword only from C23, and a strict ISO mode hidesfilenoandstrdup; GNU C23 has all three.-D BUILD_BENCHMARKS=OFF— No benchmark programs. Upstream builds them whenever optimisation is on.-D BUILD_DOC=ON— Build the handbook with kdoctools. It is upstream’s default.-D KF_SKIP_PO_PROCESSING=ON— Builds none of the interface translations inpo/; the image is English only (see Size and language policy). The package prune also removes the translated handbookskdoctoolsproduces.-D BUILD_executeplasmoid=OFF— Leave out the launcher that runs a Plasma widget under development through Plasma’splasmoidviewer. Like every plugin added withecm_optional_add_subdirectory, it is built unless itsBUILD_<name>switch is off.-D BUILD_ghprovider=OFF— Leave out the GitHub project provider, a front end to an online service.-D CMAKE_REQUIRE_FIND_PACKAGE_Clang=ON— With-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=ONand-D CMAKE_REQUIRE_FIND_PACKAGE_KDevelopPGQt=ON: make each of thosefind_packagecalls fail configure when its package is missing. Five are optional upstream, and a miss builds on without the part that uses it: patch review (libkomparediff2) and patch sharing (purpose), the Qt Help documentation, the debuggers’ “attach to process” list (libksysguard), and the QMake builder and manager, whose parser is generated by kdevelop-pg-qt. Clang, Boost andQt6WebEngineWidgetsare marked required only throughset_package_properties, so a miss of one of them stops configure at the closing feature summary; the switch stops it at thefind_packagecall.-D CMAKE_DISABLE_FIND_PACKAGE_SubversionLibrary=ON— With-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=ONand-D CMAKE_DISABLE_FIND_PACKAGE_ClazyStandalone=ON: keep configure from looking for Subversion’s libraries, Okteta’s libraries and theheaptrack,heaptrack_guiandclazy-standaloneprograms, none of which is a port. Without Subversion’s libraries the Subversion plugin is not built. Upstream’s own CMake files already disable the three Okteta packages, so the Okteta plugin and the debugger’s memory viewer are never built. The heaptrack and Clazy plugins are built either way: thosefind_packagecalls only look for the program, which the plugin runs when the user starts an analysis.
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.