Building KDE Frameworks 6.9.0 (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.9.0, breeze-icons-6.9.0, docbook-xml-4.5, docbook-xsl-nons-1.79.2, libcanberra-0.30, libgcrypt-1.11.0, libical-3.0.19, libxslt-1.1.42, lmdb-0.9.31, qca-2.3.9, qrencode-4.1.1, plasma-wayland-protocols-1.15.0, PyYAML-6.0.2, shared-mime-info-2.4, URI-5.31, and Wget-1.25.0 (required to download the packages)

Recommended

Optional

BlueZ-5.79 (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.1.1, libjxl-0.11.1, libraw-0.21.3, libheif, OpenEXR

Optional dependencies for Solid

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

Optional dependency for KWallet

GPGME-1.24.1, 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.9/
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.9.0.md5 << "EOF"
1284908164349599c949e753de5a6d6d  attica-6.9.0.tar.xz
#00a4cc351b7afd3b3b07c0126169e2e1  extra-cmake-modules-6.9.0.tar.xz
b0ebbba9a9dadd0e650c9ce23e1c432f  kapidox-6.9.0.tar.xz
275bf8f81ca2f262be42f7961b268661  karchive-6.9.0.tar.xz
3585bec3e70c52cccef7933bd7049181  kcodecs-6.9.0.tar.xz
76532887baaa2e71f2664dcf1aa93a1f  kconfig-6.9.0.tar.xz
602d06cf7d08288508030b21f3ad4d16  kcoreaddons-6.9.0.tar.xz
f191c8a34877abd844a8339cabdfdd85  kdbusaddons-6.9.0.tar.xz
8e09d864edea99280fbcaecab3f677ac  kdnssd-6.9.0.tar.xz
61b916ad258f3300b7ac22b74722a465  kguiaddons-6.9.0.tar.xz
3f25a1194975d2a230897baf0c8bc1a9  ki18n-6.9.0.tar.xz
66b947e46d49cd20afdf06f915944b24  kidletime-6.9.0.tar.xz
25b6d8ae40363e34678ea462b00e81cf  kimageformats-6.9.0.tar.xz
c820dda0e6e5ed0e7c844dba49f8490e  kitemmodels-6.9.0.tar.xz
cc27422fa66aee13edaf24950d2512be  kitemviews-6.9.0.tar.xz
12f538cae926f90c2a48be1a084fc232  kplotting-6.9.0.tar.xz
36129d8a2593c107eeb5345b0a5c23df  kwidgetsaddons-6.9.0.tar.xz
a801e9e90e55f8f711b8ec60c5e11927  kwindowsystem-6.9.0.tar.xz
a711e22e0ec601665df090198c9070b9  networkmanager-qt-6.9.0.tar.xz
#34907a72aabb12938a8c8a800c76386f  solid-6.9.0.tar.xz
a7bb41720c68c99d5cbdbc897f92adcb  solid-6.9.1.tar.xz
7c4bfa13beb9d5da152d4e3873912c06  sonnet-6.9.0.tar.xz
36f9482fcb0a8fd9472f1477e86dd22e  threadweaver-6.9.0.tar.xz
947db8522af3194b79a0e0990f4c3fb2  kauth-6.9.0.tar.xz
1d9d4ab3913d01c0530a943d46ffd3ca  kcompletion-6.9.0.tar.xz
c553ffe92701e1ac633bc0f1a4ed72b6  kcrash-6.9.0.tar.xz
9355d1d08b080a8639578ddf1d4ecd50  kdoctools-6.9.0.tar.xz
3f4f5bb5d9c5c8dcd720db6de1374919  kpty-6.9.0.tar.xz
d6412fb879b9922977a1a1bea435025c  kunitconversion-6.9.0.tar.xz
a1f718b0fd5faf41cc5617402a906dfa  kcolorscheme-6.9.0.tar.xz
3a413d4e1cd22e3a80e0f653cba7def1  kconfigwidgets-6.9.0.tar.xz
2500cedd04d6e592f5d4e0cb57b8e49c  kservice-6.9.0.tar.xz
acf36c1fe26bc2e0b6b26d286ba140dd  kglobalaccel-6.9.0.tar.xz
4dad1e73f5252d22087e3de83da0e470  kpackage-6.9.0.tar.xz
8b0788cbd802e949c80033ddb5f8b364  kdesu-6.9.0.tar.xz
718e07ca8214a229de38eb27e4560a4e  kiconthemes-6.9.0.tar.xz
bfd86fa2b0bfc16b7429022ac2f8686a  knotifications-6.9.0.tar.xz
f11e2091224fbcd2d2ca95c62dabeda5  kjobwidgets-6.9.0.tar.xz
26d6e3d1f1e8a03b3aa4a8ca81d86138  ktextwidgets-6.9.0.tar.xz
9dc1eba92e27e79a32e755496bf0fdf5  kxmlgui-6.9.0.tar.xz
1827b538317bafda4ac7caf73ad00634  kbookmarks-6.9.0.tar.xz
0963b1826e513942ecd02a2093ba160b  kwallet-6.9.0.tar.xz
4fe3615ad2486f242a89a622aba38b1e  kded-6.9.0.tar.xz
491ca7098ab93c572ab83684cd60765b  kio-6.9.0.tar.xz
99771d46badb6e049402464d6123877e  kdeclarative-6.9.0.tar.xz
73a0058e48764b5480e8ec237433d5a3  kcmutils-6.9.0.tar.xz
bc47bffe9cc73e737cc8fe69413c5d1e  kirigami-6.9.0.tar.xz
dd820209e12b6175191ba8509c74332f  syndication-6.9.0.tar.xz
f7457a27689e058b3b622a49cdafea69  knewstuff-6.9.0.tar.xz
7ff3a5b883167f46fba596bea8d2ed16  frameworkintegration-6.9.0.tar.xz
83a2e4abbb432d910f0e646fd6dda70b  kparts-6.9.0.tar.xz
1c57f4041924bfb0a007ea50ed0389bd  syntax-highlighting-6.9.0.tar.xz
f74d680ebf93be5bc49acc26ddd2b15c  ktexteditor-6.9.0.tar.xz
61c04052ceb54d90581d0b4d99579034  modemmanager-qt-6.9.0.tar.xz
0991036bd6744b6ae2182c523dfe20b6  kcontacts-6.9.0.tar.xz
08bcba782e7881bba2e3edce4104e82d  kpeople-6.9.0.tar.xz
309074d9163a67888c6768d502283ca2  bluez-qt-6.9.0.tar.xz
4ed593f44f5d88511fcaf09cbd79002a  kfilemetadata-6.9.0.tar.xz
4dced99e9936d878a8b7d7e991148ed1  baloo-6.9.0.tar.xz
#bb8695140746485f0356724c20e567d6  breeze-icons-6.9.0.tar.xz
e0b22d5ad601c21da658182ed94d0252  krunner-6.9.0.tar.xz
96ebc74cc951d17dc765dc82324d9c53  prison-6.9.0.tar.xz
4e69194596a3b482b46b828f833e0b1a  qqc2-desktop-style-6.9.0.tar.xz
a79b2468003674484c32be9bbc17fe66  kholidays-6.9.0.tar.xz
e6e75c72051127278b515f1551dcb7f2  purpose-6.9.0.tar.xz
3cab6f7e09660ec088dfa3dca8f0126f  kcalendarcore-6.9.0.tar.xz
a278856e690e6dcde1e322e8bacc7fa0  kquickcharts-6.9.0.tar.xz
c49c2433b6dec144f659d201436adedc  knotifyconfig-6.9.0.tar.xz
db4d737f094f12533132100a426f89fb  kdav-6.9.0.tar.xz
a73a6ce52be97b76303eac82b8a03dd4  kstatusnotifieritem-6.9.0.tar.xz
56ccf59e0c517b007dfab58473f037e6  ksvg-6.9.0.tar.xz
e11d0d565c8f1ea35aaf87b0c0a93538  ktexttemplate-6.9.0.tar.xz
0c735c3a4b07b38d5aef8d79b8727b68  kuserfeedback-6.9.0.tar.xz
EOF

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

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.16p2 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_SKIP_INSTALL_RPATH=ON      \
            -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.9.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.9.0
ln -sfvn kf6-6.9.0 /opt/kf6

Command Explanations

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

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

-D BUILD_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.9.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