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

131.1. extra-cmake-modules-6.31.0

Extra modules and scripts for CMake (KDE)

Version 6.31.0, release 1
Shelf kf6 — KDE Frameworks 6: every port whose homepage is under invent.kde.org/frameworks, whatever it does
Phase 41_system (System), 720 of 1047 in build order
Licence BSD-3-Clause AND BSD-2-Clause AND GPL-2.0-or-later
Homepage https://api.kde.org/frameworks/extra-cmake-modules/html/
Build time 0.1 SBU
Installed size 1014.5 KiB in 148 files
Recipe ports/core/kf6/extra-cmake-modules/kpkgbuild

About

Extra CMake Modules (ECM) is KDE’s collection of CMake find modules, helper modules and toolchain settings: KDEInstallDirs, KDECompilerSettings, ECMGenerateHeaders, ECMQtDeclareLoggingCategory and the rest. It installs no program and no library, only CMake files under /usr/share/ECM and their manual pages, and every KDE Frameworks library and KDE application, and a good number of other Qt programs (fcitx5, flameshot, obs-studio among them), require it at configure time.

Sources

Dependencies

Depends on: cmake, ninja, python3-sphinx.

Required by (433): accessibility-inspector, akonadi, akonadi-calendar, akonadi-calendar-tools, akonadi-contacts, akonadi-import-wizard, akonadi-mime, akonadi-search, akonadiconsole, akregator, alligator, analitza, angelfish, arianna, ark, artikulate, attica, audex, audiocd-kio, audiotube, aurorae, baloo, baloo-widgets, blinken, bluedevil, bluez-qt, bomber, bovo, breeze, breeze-gtk, breeze-icons, calendarsupport, calindori, calligra, cantor, cxx-rust-cssparser, digikam, discover, dolphin, dolphin-plugins, dragon, elisa, eventviews, falkon, fcitx5, fcitx5-anthy, fcitx5-chinese-addons, fcitx5-configtool, fcitx5-gtk, fcitx5-hangul, fcitx5-qt, ffmpegthumbs, filelight, flameshot, frameworkintegration, francis, futuresql, gcompris, ghostwriter, glaxnimate, granatier, grantlee-editor, grantleetheme, gwenview, haruna, incidenceeditor, isoimagewriter, itinerary, juk, k3b, kaccounts-integration, kaccounts-providers, kactivitymanagerd, kaddressbook, kajongg, kalarm, kalgebra, kalk, kalm, kalzium, kamera, kamoso, kanagram, kapman, kapptemplate, karchive, kasts, kate, katomic, kauth, kbackup, kblackbox, kblocks, kbookmarks, kbounce, kbreakout, kbruch, kcachegrind, kcalc, kcalendarcore, kcalutils, kcharselect, kclock, kcm-kdos-boxes, kcm-kdos-firewall, kcm-kdos-health, kcm-kdos-look, kcm-kdos-system, kcmutils, kcodecs, kcolorchooser, kcolorscheme, kcompletion, kconfig, kconfigwidgets, kcontacts, kcoreaddons, kcrash, kcron, kdav, kdbusaddons, kde-cli-tools, kde-dev-scripts, kde-dev-utils, kde-gtk-config, kde-inotify-survey, kdebugsettings, kdeclarative, kdeconnect, kdecoration, kded, kded-kdos, kdeedu-data, kdegraphics-mobipocket, kdegraphics-thumbnailers, kdenetwork-filesharing, kdenlive, kdepim-addons, kdepim-runtime, kdeplasma-addons, kdesdk-kio, kdesdk-thumbnailers, kdesu, kdev-php, kdev-python, kdevelop, kdevelop-pg-qt, kdf, kdiagram, kdialog, kdiamond, kdiff3, kdnssd, kdoctools, kdominate, kdos-discover, kdos-installer-gui, kdos-kwin-motion, kdos-transcribe, kdsoap-ws-discovery-client, keditbookmarks, keepsecret, keysmith, kfilemetadata, kfind, kfourinline, kgeography, kget, kglobalaccel, kglobalacceld, kgoldrunner, kgpg, kgraphviewer, kguiaddons, khangman, khealthcertificate, khelpcenter, kholidays, ki18n, kiconthemes, kidentitymanagement, kidletime, kig, kigo, killbots, kimageformats, kimagemapeditor, kimap, kinfocenter, kio, kio-admin, kio-extras, kio-fuse, kio-gdrive, kio-library, kio-zeroconf, kirigami, kirigami-addons, kirigami-app-components, kirigami-gallery, kiriki, kitemmodels, kitemviews, kiten, kitinerary, kjobwidgets, kjumpingcube, kldap, kleopatra, klettres, klickety, klines, kmahjongg, kmail, kmail-account-wizard, kmailtransport, kmbox, kmenuedit, kmime, kmines, kmix, kmouth, kmplot, knavalbattle, knetwalk, knewstuff, knights, knighttime, knotifications, knotifyconfig, koko, kolf, kollision, kolourpaint, kompare, kongress, konqueror, konquest, konsole, kontact, kontactinterface, kontrast, konversation, kopeninghours, korganizer, kosmindoormap, kpackage, kparts, kpat, kpeople, kpimtextedit, kpipewire, kpkpass, kplotting, kpmcore, kpty, kpublictransport, kqtquickcharts, kquickcharts, kquickimageeditor, krdc, krdp, krecorder, kreversi, krfb, krita, kruler, krunner, ksanecore, kscreen, kscreenlocker, kseexpr, kservice, kshisen, ksirk, ksmtp, ksnakeduel, kspaceduel, ksquares, ksshaskpass, kstatusnotifieritem, ksudoku, ksvg, ksystemlog, ksystemstats, ksystemstats-kdos, kteatime, ktextaddons, ktexteditor, ktexttemplate, ktextwidgets, ktimer, ktnef, ktorrent, ktouch, ktrip, ktuberling, kturtle, kubrick, kunifiedpush, kunitconversion, kup, kwallet, kwallet-pam, kwalletmanager, kwave, kwayland, kweather, kweathercore, kwidgetsaddons, kwin, kwin-effect-kdos-keys, kwin-script-kdos-runraise, kwin-script-kdos-window-memory, kwindowsystem, kwordquiz, kwrited, kxmlgui, labplot, layer-shell-qt, libgravatar, libime, libkcddb, libkdcraw, libkdegames, libkdepim, libkeduvocdocument, libkexiv2, libkgapi, libkleo, libkmahjongg, libkomparediff2, libksane, libkscreen, libksieve, libksysguard, libktorrent, libplasma, libqaccessibilityclient, lokalize, lskat, mailcommon, mailimporter, marble, markdownpart, massif-visualizer, mbox-importer, merkuro, messagelib, milou, mimetreeparser, minuet, modemmanager-qt, mpvqt, neochat, networkmanager-qt, obs-studio, ocean-sound-theme, okular, oxygen, oxygen-sounds, palapeli, parley, partitionmanager, phonon, phonon-backend-vlc, picmi, pim-data-exporter, pim-sieve-editor, pimcommon, plasma-activities, plasma-activities-stats, plasma-browser-integration, plasma-camera, plasma-desktop, plasma-disks, plasma-integration, plasma-keyboard, plasma-nm, plasma-pa, plasma-phonebook, plasma-sdk, plasma-setup, plasma-systemmonitor, plasma-thunderbolt, plasma-vault, plasma-wayland-protocols, plasma-welcome, plasma-workspace, plasma-workspace-wallpapers, plasma5support, plasmatube, plasmoid-kdos-checklist, plasmoid-kdos-privacy, polkit-kde-agent-1, powerdevil, poxml, print-manager, prison, pulseaudio-qt, purpose, qmlkonsole, qqc2-breeze-style, qqc2-desktop-style, qrca, rkward, rocs, sddm-kcm, selenium-webdriver-at-spi, signon-kwallet-extension, skanlite, skanpage, skladnik, solid, sonnet, sonnet-qt5, spectacle, step, svgpart, sweeper, syncthingtray, syndication, syntax-highlighting, systemsettings, telly-skout, threadweaver, tokodon, umbrello, union, xdg-desktop-portal-kde, yakuake, zanshin, zeal.

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/41_system/phase.env && kpkg install extra-cmake-modules'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/kf6/extra-cmake-modules.

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/kf6/extra-cmake-modules
echo '8f74af329e4c918358bfe54316f8cf4d530c28444595a3e2fb15075f72877f17  extra-cmake-modules-6.31.0.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/extra-cmake-modules
SRC=$SRC_ROOT/extra-cmake-modules-6.31.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf extra-cmake-modules-6.31.0.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_INSTALL_PREFIX=/usr \
	-D CMAKE_BUILD_TYPE=Release \
	-D BUILD_TESTING=OFF \
	-D BUILD_MAN_DOCS=ON \
	-D BUILD_HTML_DOCS=OFF \
	-D BUILD_QTHELP_DOCS=OFF \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

[ -f "$PKG/usr/share/man/man7/ecm.7" ] || {
	echo 'extra-cmake-modules: ecm(7) was not built' >&2
	exit 1
}

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/extra-cmake-modules, 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 extra-cmake-modules-6.31.0-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/extra-cmake-modules, and runs the triggers its paths call for.

Contents

Installed directories: /usr/share/ECM, /usr/share/licenses/extra-cmake-modules.

Notes

All three documentation switches are CMake dependent options: when sphinx-build is not found they are forced off and the configure succeeds anyway, so BUILD_MAN_DOCS=ON alone does not guarantee the pages. build.sh checks for /usr/share/man/man7/ecm.7 after the install and stops the build if it is missing.

ECM’s KDEInstallDirs picks its library directory by itself (lib64 on x86-64), apart from CMake’s GNUInstallDirs, which is why KDE recipes pass -DKDE_INSTALL_LIBDIR=lib; see A graphical application.