Building KDE Frameworks 6 (KF6)

KDE Frameworks is a collection of libraries based on top of Qt6 and QML derived from the previous KDE libraries. They can be used independent of the KDE Display Environment (Plasma 6).

[Note]

Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

The instructions below build all of the KDE Frameworks packages in one step by using a bash script.

Package Information

KF6 Dependencies

Required

extra-cmake-modules-6.2.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.10.3, libical-3.0.18, libxslt-1.1.39, lmdb-0.9.31, qca-2.3.8, qrencode-4.1.1, plasma-wayland-protocols-1.13.0, PyYAML-6.0.1, shared-mime-info-2.4, URI-5.28, and Wget-1.24.5 (required to download the packages)

Recommended

Optional

BlueZ-5.76 (needed to build Bluez-Qt), Datamatrix (deemed recommended for Prison by upstream)

Runtime dependency for FrameworkIntegration

Noto fonts

Additional recommended dependencies for kapidox

Additional image formats support in KImageFormats

libavif-1.0.4, libjxl-0.10.2, libraw-0.21.2, libheif, OpenEXR

Optional dependencies for Solid

UDisks-2.10.1, UPower-1.90.4 and media-player-info (runtime)

Optional dependency for KWallet

GPGME-1.23.2, built with C++ bindings (which is the default).

Optional dictionary backends for Sonnet

Hspell and Hunspell

Downloading KDE Frameworks

The easiest way to get the KDE Frameworks packages is to use a single wget to fetch them all at once:

url=https://download.kde.org/stable/frameworks/6.2/
wget -r -nH -nd -A '*.xz' -np $url

The options used here are:
  -r            recurse through child directories
  -nH           disable generation of host-prefixed directories
  -nd           do not create a hierarchy of directories
  -A '*.xz'     just get the *.xz files
  -np           don't get parent directories

Setting Package Order

The order of building files is important due to internal dependencies. Create the list of files in the proper order as follows:

cat > frameworks-6.2.0.md5 << "EOF"
ad83f6b75eb4d6eb13fb41a9ad910e54  attica-6.2.0.tar.xz
#39bc6e992eec954e0929c9248ceb72a0  extra-cmake-modules-6.2.0.tar.xz
9584db157e8762c5a041cc3030aaaf92  kapidox-6.2.0.tar.xz
8877110a5b99432ea52fc292590bfb1c  karchive-6.2.0.tar.xz
5d6c21ce5f50a614930f5044da249a82  kcodecs-6.2.0.tar.xz
edecb863455d7b76a29a1374bad501bc  kconfig-6.2.0.tar.xz
8a9f8543756701e0a2da41b64b1e202d  kcoreaddons-6.2.0.tar.xz
c5ac1d9a1576bc78cd97f420ac03ea31  kdbusaddons-6.2.0.tar.xz
29df72d666fb33d0d7fd5033152ba7b3  kdnssd-6.2.0.tar.xz
795fb1a68d1fa485183744aefd79162d  kguiaddons-6.2.0.tar.xz
65c3e7da9f9b4902881c4f91e923e84d  ki18n-6.2.0.tar.xz
7819a3d50f63baa706284b1ed33ff4be  kidletime-6.2.0.tar.xz
b0990318e39a08840f6cdbdff73d8474  kimageformats-6.2.0.tar.xz
5cfd80b47b5fde16dc2570c3edcfb6ba  kitemmodels-6.2.0.tar.xz
94fd5082f312fdf82880c56ab5757f45  kitemviews-6.2.0.tar.xz
57073d78e7dfe396e98581364822b004  kplotting-6.2.0.tar.xz
#76a810d45a3a8e3a95645415385d7a69  kwidgetsaddons-6.2.0.tar.xz
#52118f414da52f2db5a42759fc19fc90  kwidgetsaddons-6.2.1.tar.xz
c0aa6b9d506b353df5e5f6f9330c04c8  kwidgetsaddons-6.2.2.tar.xz
4f4f1f2b777e773fb6d41bb026cee6d0  kwindowsystem-6.2.0.tar.xz
9c8afb20b4866f6c9d1423b11b51b644  networkmanager-qt-6.2.0.tar.xz
8cc81a8dd1e5fe7b7f1ff69b1a823d5c  solid-6.2.0.tar.xz
ab4fb7ee99c1f93adb4e0d3e752d4dfd  sonnet-6.2.0.tar.xz
920407adc0f60aa58d94dd74ed877590  threadweaver-6.2.0.tar.xz
6fbb26258e55042a6a94c21ddb07e9a5  kauth-6.2.0.tar.xz
1d9eb4cf7bc0ce7d60d3a7ac1dfe19f9  kcompletion-6.2.0.tar.xz
8dcb5f7560ded049cb8677983e301cf4  kcrash-6.2.0.tar.xz
1e9b8a01f76fbbdba7b7fd2601900412  kdoctools-6.2.0.tar.xz
2ac7426ecaf8e14e8ce417ddceb35ea6  kpty-6.2.0.tar.xz
07177767e88967d8eb186716857becff  kunitconversion-6.2.0.tar.xz
05619553d8febadc89d6a8ec5ccbef27  kcolorscheme-6.2.0.tar.xz
3813ce20505edad5d1d526b6d7f54219  kconfigwidgets-6.2.0.tar.xz
7ffe73561d6b523fd28d8a69eeff725a  kservice-6.2.0.tar.xz
8c2eeb005dd42586ce0c6859e0410d0d  kglobalaccel-6.2.0.tar.xz
8c44e987c9d27f5ae677d9b822d46b9a  kpackage-6.2.0.tar.xz
1ec3fc780c4818522f9d2eddea4c2c69  kdesu-6.2.0.tar.xz
2fe3029550fa4077dc590f478f3fad6d  kiconthemes-6.2.0.tar.xz
485a0f1e0e40ef27d9ce15a604e8de45  knotifications-6.2.0.tar.xz
1a9f0018330369db0d90a4ff319d3450  kjobwidgets-6.2.0.tar.xz
ed0f3dac6c2be6313defff72079a03cf  ktextwidgets-6.2.0.tar.xz
9950aa3c77bb3fdd1fb37ca57309e676  kxmlgui-6.2.0.tar.xz
348c46a5e1ce5e215a0be89296df242b  kbookmarks-6.2.0.tar.xz
@f1549018757fb3cbfd9d093de8b22467  kwallet-6.2.0.tar.xz
fdd83d22f41807f4bcc7cfd60aee6b62  kwallet-6.2.1.tar.xz
87cba7e4ba0993050df899600fef9473  kded-6.2.0.tar.xz
4de9b9afddef85d74a70ce374f965439  kio-6.2.0.tar.xz
865e55bb2d0c206252063ecc57399d62  kdeclarative-6.2.0.tar.xz
452f8e10b6642d7a6fb196347838395e  kcmutils-6.2.0.tar.xz
#1b439c230b9b1564ae8cdac97f72e2ae  kirigami-6.2.0.tar.xz
8eeb686270c78d6f5edd2dac12f43bab  kirigami-6.2.1.tar.xz
ac66f88b32da2a145395a2dea27586e2  syndication-6.2.0.tar.xz
6e58427136c3519fec44334098f25067  knewstuff-6.2.0.tar.xz
3def3e50fd045651793a9a1389acfa44  frameworkintegration-6.2.0.tar.xz
e8b20741e74b964cce9e0c9d1ce6e2df  kparts-6.2.0.tar.xz
cbac021771671d5ead0ce5b395fd27fe  syntax-highlighting-6.2.0.tar.xz
92630f343c4af85f2a48512974d672f1  ktexteditor-6.2.0.tar.xz
3498eb4a6de7fb30b5456e86dfa920a1  modemmanager-qt-6.2.0.tar.xz
e4f63afc9f12c13250135dce2f231804  kcontacts-6.2.0.tar.xz
be25124c3b6c67ab0845d31da3118900  kpeople-6.2.0.tar.xz
1384776daced80c5c3d0c100432ce3c9  bluez-qt-6.2.0.tar.xz
fc3d228b3406f26fe9456c2769c37363  kfilemetadata-6.2.0.tar.xz
235fe31f6fba7b46ae4a7870ce106da8  baloo-6.2.0.tar.xz
#e387144c042112f6bff82e645fc6efe9  breeze-icons-6.2.0.tar.xz
39556079ab8be1450790e185871b9f26  krunner-6.2.0.tar.xz
940e2f9fe23adeddfc055fa0766ddd4b  prison-6.2.0.tar.xz
93b1edfb01104e14ef61f1ddaf76e25d  qqc2-desktop-style-6.2.0.tar.xz
eb7dbc2b82460b2f1af38408ae7c39fd  kholidays-6.2.0.tar.xz
ac67f85ad7d6c8d3c57ec71329f4544c  purpose-6.2.0.tar.xz
e0960087e449f19a4920215991472abe  kcalendarcore-6.2.0.tar.xz
da38c071eb93a0cdb063430b398d5131  kquickcharts-6.2.0.tar.xz
0dd68e8fc8c39102ba4738102cd98eb7  knotifyconfig-6.2.0.tar.xz
d9febe36631406b878346da2fda9a7df  kdav-6.2.0.tar.xz
a0de086d4b5add07d57da1ca8776adb2  kstatusnotifieritem-6.2.0.tar.xz
1d96a5309e7aa660e55d536a31dcc382  ksvg-6.2.0.tar.xz
d1d6c2649e17d863f160593de8421d5e  ktexttemplate-6.2.0.tar.xz
9e037d6613abc6af4018cbfcd79da534  kuserfeedback-6.2.0.tar.xz
EOF

In the above list, notice that some files have been commented out with a hash (#) character.

  • The extra-cmake-modules entry has been commented out because it was built earlier in the Introduction to KDE.

  • The icon package is covered separately at breeze-icons-6.2.0.

  • There are three packages that were downloaded but superseded by later versions: kwidgetsaddons-6.2.0, kwidgetsaddons-6.2.1, and kirigami-6.2.0.

Installation of KDE Frameworks

[Note]

Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

  1. Run the entire script as the root user (not recommended).

  2. Use the sudo command from the Sudo-1.9.15p5 package.

  3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

as_root()
{
  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"
  fi
}

export -f as_root
[Caution]

Caution

If installing in /opt and there is an existing /opt/kf6 either as a regular directory or a symbolic link, it should be reinitialized (as root):

mv -v /opt/kf6 /opt/kf6.old                         &&
install -v -dm755           $KF6_PREFIX/{etc,share} &&
ln -sfv /etc/dbus-1         $KF6_PREFIX/etc         &&
ln -sfv /usr/share/dbus-1   $KF6_PREFIX/share       &&
ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share       &&
install -v -dm755           $KF6_PREFIX/lib         &&
ln -sfv /usr/lib/systemd    $KF6_PREFIX/lib

First, start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

while read -r line; do

    # Get the file name, ignoring comments and blank lines
    if $(echo $line | grep -E -q '^ *$|^#' ); then continue; fi
    file=$(echo $line | cut -d" " -f2)

    pkg=$(echo $file|sed 's|^.*/||')          # Remove directory
    packagedir=$(echo $pkg|sed 's|\.tar.*||') # Package directory

    name=$(echo $pkg|sed 's|-6.*$||') # Isolate package name

    tar -xf $file
    pushd $packagedir

      # kapidox is a python module
      case $name in
        kapidox)
          pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
          as_root pip3 install --no-index --find-links=dist --no-cache-dir --no-user kapidox
          popd
          rm -rf $packagedir
          continue
          ;;
      esac

      mkdir build
      cd    build

      cmake -D CMAKE_INSTALL_PREFIX=$KF6_PREFIX \
            -D CMAKE_INSTALL_LIBEXECDIR=libexec \
            -D CMAKE_PREFIX_PATH=$QT6DIR        \
            -D CMAKE_BUILD_TYPE=Release         \
            -D BUILD_TESTING=OFF                \
            -W no-dev ..
      make
      as_root make install
    popd

  as_root rm -rf $packagedir
  as_root /sbin/ldconfig

done < frameworks-6.2.0.md5

exit
[Note]

Note

Any modules that have been omitted can be installed later by using the same mkdir build; cd build; cmake; make; make install procedure as above.

Sometimes the installation paths are hardcoded into installed files. If the installed directory is not /usr, rename the directory and create a symlink:

mv -v /opt/kf6 /opt/kf6-6.2.0
ln -sfvn kf6-6.2.0 /opt/kf6

Command Explanations

-DCMAKE_PREFIX_PATH=$QT6DIR: This switch is used to allow cmake to find the proper Qt libraries.

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply higher level of the compiler optimizations.

-DBUILD_TESTING=OFF: This switch is used to prevent building test programs and libraries that are of no use to an end user.

Contents

Installed Programs: balooctl, baloo_file, baloo_file_extractor, baloosearch, balooshow, checkXML6, depdiagram-generate, depdiagram-generate-all, depdiagram-prepare, desktoptojson, gentrigrams, kactivities-cli, kapidox_generate, kate-syntax-highlighter, kbuildsycoca6, kcookiejar6, kdebugdialog6, kded6, kdeinit6, kdeinit6_shutdown, kdeinit6_wrapper, kf6-config, kf6kross, kgendesignerplugin, kglobalaccel6, kiconfinder6, kjs6, kjscmd6, kjsconsole, knewstuff-dialog, kpackagelauncherqml, kpackagetool6, kquitapp6, kreadconfig6, kshell6, ktelnetservice6, ktrash6, kwalletd6, kwallet-query, kwrapper6, kwriteconfig6, meinproc6, parsetrigrams, plasmapkg2, preparetips6, protocoltojson, and solid-hardware6
Installed Libraries: libkdeinit6_klauncher.so, libKF6Activities.so, libKF6ActivitiesStats.so, libKF6Archive.so, libKF6Attica.so, libKF6AuthCore.so, libKF6Auth.so, libKF6Baloo.so, libKF6BluezQt.so, libKF6Bookmarks.so, libKF6CalendarCore.so, libKF6CalendarEvents.so, libKF6Codecs.so, libKF6Completion.so, libKF6ConfigCore.so, libKF6ConfigGui.so, libKF6ConfigWidgets.so, libKF6Contacts.so, libKF6CoreAddons.so, libKF6Crash.so, libKF6DAV.so, libKF6DBusAddons.so, libKF6Declarative.so, libKF6DNSSD.so, libKF6DocTools.so, libKF6Emoticons.so, libKF6FileMetaData.so, libKF6GlobalAccel.so, libKF6GuiAddons.so, libKF6Holidays.so, libKF6I18n.so, libKF6IconThemes.so, libKF6IdleTime.so, libKF6ItemModels.so, libKF6ItemViews.so, libKF6JobWidgets.so, libKF6JSApi.so, libKF6JsEmbed.so, libKF6JS.so, libKF6KCMUtils.so, libKF6KDELibs4Support.so, libKF6KHtml.so, libKF6KIOCore.so, libKF6KIOFileWidgets.so, libKF6KIOGui.so, libKF6KIONTLM.so, libKF6KIOWidgets.so, libKF6Kirigami2.so, libKF6KrossCore.so, libKF6KrossUi.so, libKF6MediaPlayer.so, libKF6NetworkManagerQt.so, libKF6NewStuffCore.so, libKF6NewStuff.so, libKF6Notifications.so, libKF6NotifyConfig.so, libKF6Package.so, libKF6Parts.so, libKF6PeopleBackend.so, libKF6People.so, libKF6PeopleWidgets.so, libKF6PlasmaQuick.so, libKF6Plasma.so, libKF6Plotting.so, libKF6Prison.so, libKF6Pty.so, libKF6Purpose.so, libKF6PurposeWidgets.so, libKF6QuickAddons.so, libKF6Runner.so, libKF6Service.so, libKF6Solid.so, libKF6SonnetCore.so, libKF6SonnetUi.so, libKF6Style.so, libKF6Su.so, libKF6SyntaxHighlighting.so, libKF6TextEditor.so, libKF6TextWidgets.so, libKF6ThreadWeaver.so, libKF6UnitConversion.so, libKF6Wallet.so, libKF6WaylandClient.so, libKF6WaylandServer.so, libKF6WidgetsAddons.so, libKF6WindowSystem.so, libKF6XmlGui.so, libKF6XmlRpcClient.so, and libkwalletbackend6.so
Installed Directories: /opt/kf6 (symlink to /opt/kf6-6.2.0) if installing in /opt

Short Descriptions

checkXML6

is a tool to check for syntax errors in KDE DocBook XML files

depdiagram-generate

is a tool to generate a dependency diagram

depdiagram-generate-all

is a tool to generate a dependency diagram for all frameworks at once

depdiagram-prepare

is a tool to prepare dot files

desktoptojson

is a tool to convert a .desktop file to a .json file

kbuildsycoca6

rebuilds the KService desktop file system configuration cache

kcookiejar6

is a command line interface to the HTTP cookie store used by KDE, a D-BUS service to store/retrieve/clean cookies

kded6

consolidates several small services in one process

kdeinit6

is a process launcher somewhat similar to the famous init used for booting UNIX

kf6-config

is a command line program used to retrieve information about KDE installation or user paths

kf6kross

executes kross scripts written in KDE Javascript, Python, Ruby, Java and Falcon

kgendesignerplugin

generates widget plugins for Qt(TM) Designer

kglobalaccel6

is a daemon use to register the key bindings and for getting notified when the action triggered

kjs6

is KDE ECMAScript/JavaScript engine

kjscmd6

is a tool for launching KJSEmbed scripts from the command line

kjsconsole

is a console for kjs6

kpackagelauncherqml

is a commandline tool for launching kpackage QML application

kpackagetool6

is a command line kpackage tool

kreadconfig6

is a command line tool to retrieve values from KDE configuration files

kshell6

start applications via kdeinit

ktelnetservice6

is a telnet service

ktrash6

is a helper program to handle the KDE trash can

kwalletd6

is the wallet manager daemon

kwriteconfig6

is a command line tool to write values in KDE configuration files

meinproc6

converts DocBook files to HTML

plasmapkg2

is a tool to install, list, remove Plasma packages

preparetips6

is a script to extract the text from a tips file

solid-hardware6

is a command line tool to investigate available devices