Building KDE Frameworks 5 (KF5)

KDE Frameworks 5 is a collection of libraries based on top of Qt5 and QML derived from the monolithic KDE 4 libraries. They can be used independent of the KDE Display Environment (Plasma 5).

This package is known to build and work properly using an LFS-10.1 platform.

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

Package Information

KF5 Dependencies

Required

Boost-1.75.0, extra-cmake-modules-5.79.0, docbook-xml-4.5, docbook-xsl-1.79.2, giflib-5.2.1, libepoxy-1.5.5, libgcrypt-1.9.2, libical-3.0.9, libjpeg-turbo-2.0.6, libpng-1.6.37, libxslt-1.1.34, lmdb-0.9.28, qrencode-4.1.1, phonon-4.11.1, plasma-wayland-protocols-1.1.1, shared-mime-info-2.1, URI-5.07, and Wget-1.21.1 (required to download the packages)

Recommended

Optional

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

Runtime dependency for FrameworkIntegration

Oxygen fonts and Noto fonts

Runtime dependencies for kapidox

Doxygen-1.9.1, Jinja2-2.11.3, and PyYAML-5.3.1

Additional image formats support in KImageFormats

JasPer-2.0.25 and OpenEXR

Optional dependencies for KIO

MIT Kerberos V5-1.19.1

Optional dependencies for Solid

UDisks-2.9.2, UPower-0.99.11 and media-player-info (runtime)

Optional dependency for KWallet

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

Optional dictionary backends for Sonnet

Hspell and Hunspell

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/kf5

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=http://download.kde.org/stable/frameworks/5.79/
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-5.79.0.md5 << "EOF"
2d37fbeda8a1863f49b4020094d27328  attica-5.79.0.tar.xz
#020c6267046a065ee505c9b03d1bbe56  extra-cmake-modules-5.79.0.tar.xz
b291790cba30ba5ca1a007e809c190a2  kapidox-5.79.0.tar.xz
d9f0b3edb5610f709f849d0fcbeaa6a7  karchive-5.79.0.tar.xz
a275f28db8233c408e41e086f770f703  kcodecs-5.79.0.tar.xz
0fa5b0f1e2f995242e493c9681970e3b  kconfig-5.79.0.tar.xz
048d39a0aea41c1fb52143db4d4ec588  kcoreaddons-5.79.0.tar.xz
94f13ec26cc751662ed00a2184a3a3f7  kdbusaddons-5.79.0.tar.xz
16b9f5c62c5718ba89f19753337b0d53  kdnssd-5.79.1.tar.xz
66d2801bfe21a83d48da4617f7298de0  kguiaddons-5.79.0.tar.xz
086b5b66351ffd6b9c734896b6a740f9  ki18n-5.79.0.tar.xz
e6523c6192b0a1247deb4df16490eb3e  kidletime-5.79.0.tar.xz
0408433275e69e30d282bde4d62b383f  kimageformats-5.79.0.tar.xz
0731f3adb4f88b9dd4acab7c454c8133  kitemmodels-5.79.0.tar.xz
0bae5399c32c011ab3a211200454dafd  kitemviews-5.79.0.tar.xz
b314220f88558d50c557e4a64237f08a  kplotting-5.79.0.tar.xz
b67544527fcc3c8a38cc14813da45290  kwidgetsaddons-5.79.0.tar.xz
61e99965def3149523d985361daeeeb5  kwindowsystem-5.79.0.tar.xz
8925ca98dfe1ded943ccb7b67ab22d99  networkmanager-qt-5.79.0.tar.xz
dd47932e6d4cf3165f92656cf0331699  solid-5.79.0.tar.xz
e564b71d2bf7f017890beca4a123c89b  sonnet-5.79.0.tar.xz
8f056c25791b760cd5cbefd7f4833a4f  threadweaver-5.79.0.tar.xz
29569aea274980c7be0fa113fbdd72b5  kauth-5.79.0.tar.xz
7ce37448704e52f833bf8745e2da1735  kcompletion-5.79.0.tar.xz
724d4809ae5a9ffac862f7e1eb3961d9  kcrash-5.79.0.tar.xz
def0bffe069de1a332fd8ee3bc57da6f  kdoctools-5.79.0.tar.xz
49f5d2ff5cbb2259aa599eeacc42408b  kpty-5.79.0.tar.xz
a59d86a63028c25e5a6e6870d38137cc  kunitconversion-5.79.0.tar.xz
3e594da911338a9ea526f3b6ec1e1edd  kconfigwidgets-5.79.0.tar.xz
f2430143ec93ab42afa8f4c71398ee6d  kservice-5.79.0.tar.xz
6e5217c6621e97fe90e99385720f968d  kglobalaccel-5.79.0.tar.xz
724d79ae4f9019d793588c75dde5c69c  kpackage-5.79.0.tar.xz
6dd0f61fd2defdd1d7a0edc44bf7a06c  kdesu-5.79.0.tar.xz
bda61c05c220c53f4866a6c5a43b8612  kemoticons-5.79.0.tar.xz
2cc3443c13bf99e7660a8df09cd6fc95  kiconthemes-5.79.0.tar.xz
c5456e8581dada4a7d4bf8f08a89963f  kjobwidgets-5.79.0.tar.xz
3f4611dfc589da49a5ea7a844e58262c  knotifications-5.79.0.tar.xz
4f2f01042c5b6a28c3ceb0ecdeec5577  ktextwidgets-5.79.0.tar.xz
c57d052f56800b4adb88b3daddd320f6  kxmlgui-5.79.0.tar.xz
216a661a5dec0ad28ac04893e9ad805c  kbookmarks-5.79.0.tar.xz
66e705d82e006aac8071105f517f275b  kwallet-5.79.0.tar.xz
1a730e3d51c5a6f8d568f91f433afb00  kded-5.79.0.tar.xz
d796080d51e62c2b3cc3fbdb19ceaf66  kio-5.79.0.tar.xz
a19eb4911c2fece7c2d5849f046733f7  kdeclarative-5.79.0.tar.xz
15f2b2030e36ae4d2ab1fbe572c60b45  kcmutils-5.79.0.tar.xz
56a4ea8393daec54189832d767f8f080  kirigami2-5.79.0.tar.xz
a07e2d9babf366a29656d21e4ee66cf6  knewstuff-5.79.0.tar.xz
c7c3bde5eb426f717f530ac03a19ef15  frameworkintegration-5.79.0.tar.xz
047c3d951b94c667b33e19e11c61e2ae  kinit-5.79.0.tar.xz
317290d8ec99b95e73c680e65c29e4e4  knotifyconfig-5.79.0.tar.xz
03d1d45c3f029da0431f3145db65f25b  kparts-5.79.0.tar.xz
aa85d3aa9c57681b61d8330667062e77  kactivities-5.79.0.tar.xz
#dae7d15553315aa7cc352c54d19dae9b  kdewebkit-5.79.0.tar.xz
a4db3d3a35151aeaebc9eaa8b825cbc9  syntax-highlighting-5.79.1.tar.xz
42d01794017416e54cabf71376d160b8  ktexteditor-5.79.0.tar.xz
d23f9c74b3dc20f15c86e88723e2de00  kdesignerplugin-5.79.0.tar.xz
9d221f6fc2f4d704fa115b59275218fd  kwayland-5.79.0.tar.xz
4dc731b88b3e28748622284622e65fc6  plasma-framework-5.79.0.tar.xz
#7acca01fc2d463224b92c4095cfbcd69  modemmanager-qt-5.79.0.tar.xz
9261af304aff1defe6e5ef91f276a12a  kpeople-5.79.0.tar.xz
af9aed54f0ddcc9a481b58f585d48f90  kxmlrpcclient-5.79.0.tar.xz
18579f11a8763c02ab476aa886af91f5  bluez-qt-5.79.0.tar.xz
71bdc5e4dc4b4bda01190a9fea6209f4  kfilemetadata-5.79.0.tar.xz
4126fc0077942bcd09ecb5833010203f  baloo-5.79.0.tar.xz
#6977e21486ea56c642a5037647636925  breeze-icons-5.79.0.tar.xz
#7266f03969ef7c91257d5a023bb0ddac  oxygen-icons5-5.79.0.tar.xz
1a9684e30416fdead96fdd72dd5f1e59  kactivities-stats-5.79.0.tar.xz
c86ae5aef97956907f8686819042def8  krunner-5.79.0.tar.xz
ec189c854e1e671a030692d1eb17b2d4  prison-5.79.0.tar.xz
c10d6a8662b4215cab57379827ea4d80  qqc2-desktop-style-5.79.0.tar.xz
3df2c2ad1f05499252c249a5bb9381e3  kjs-5.79.0.tar.xz
9055eb30f76245929b22b453bea681b9  kdelibs4support-5.79.0.tar.xz
79a58b58e4a14717413ab4344e5d9f84  khtml-5.79.0.tar.xz
861bff4ffdfa60fea90776817f959d51  kjsembed-5.79.0.tar.xz
3c20d76012b40f047c2ebcb9fdfa23fe  kmediaplayer-5.79.0.tar.xz
0e8b13cdf366b09313c46b835184272f  kross-5.79.0.tar.xz
4ff475cef2ff786c7218af07dda1e123  kholidays-5.79.0.tar.xz
eccbb4b9427e07e9b0d88cbbe116beb9  purpose-5.79.0.tar.xz
2a92913826be0c89fa4980eff8dc1763  kcalendarcore-5.79.0.tar.xz
7830c9f2540d6726be23f36a399afb1c  kcontacts-5.79.0.tar.xz
4a67bab900bcb25d7a2da20a098f438e  kquickcharts-5.79.0.tar.xz
2534a448766bd73b8803c2e5c628d919  kdav-5.79.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 packages are covered separately at breeze-icons-5.79.0 and oxygen-icons5-5.79.0. The modemmanager-qt package may be built if its optional dependency has been installed. The kdewebkit may be built if the external package QtWebkit has been built.

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.5p2 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/kf5 either as a regular directory or a symbolic link, it should be reinitialized (as root):

mv -v /opt/kf5 /opt/kf5.old                         &&
install -v -dm755           $KF5_PREFIX/{etc,share} &&
ln -sfv /etc/dbus-1         $KF5_PREFIX/etc         &&
ln -sfv /usr/share/dbus-1   $KF5_PREFIX/share

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|-5.*$||') # Isolate package name

    tar -xf $file
    pushd $packagedir

      mkdir build
      cd    build

      cmake -DCMAKE_INSTALL_PREFIX=$KF5_PREFIX \
            -DCMAKE_PREFIX_PATH=$QT5DIR        \
            -DCMAKE_BUILD_TYPE=Release         \
            -DBUILD_TESTING=OFF                \
            -Wno-dev ..
      make
      as_root make install
    popd

  as_root rm -rf $packagedir
  as_root /sbin/ldconfig

done < frameworks-5.79.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/kf5 /opt/kf5-5.79.0
ln -sfvn kf5-5.79.0 /opt/kf5

Command Explanations

-DCMAKE_PREFIX_PATH=$QT5DIR: 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, checkXML5, depdiagram-generate, depdiagram-generate-all, depdiagram-prepare, desktoptojson, gentrigrams, kactivities-cli, kapidox_generate, kate-syntax-highlighter, kbuildsycoca5, kcookiejar5, kdebugdialog5, kded5, kdeinit5, kdeinit5_shutdown, kdeinit5_wrapper, kf5-config, kf5kross, kgendesignerplugin, kglobalaccel5, kiconfinder5, kjs5, kjscmd5, kjsconsole, knewstuff-dialog, kpackagelauncherqml, kpackagetool5, kquitapp5, kreadconfig5, kshell5, ktelnetservice5, ktrash5, kwalletd5, kwallet-query, kwrapper5, kwriteconfig5, meinproc5, parsetrigrams, plasmapkg2, preparetips5, protocoltojson, and solid-hardware5
Installed Libraries: libkdeinit5_klauncher.so, libKF5Activities.so, libKF5ActivitiesStats.so, libKF5Archive.so, libKF5Attica.so, libKF5AuthCore.so, libKF5Auth.so, libKF5Baloo.so, libKF5BluezQt.so, libKF5Bookmarks.so, libKF5CalendarCore.so, libKF5CalendarEvents.so, libKF5Codecs.so, libKF5Completion.so, libKF5ConfigCore.so, libKF5ConfigGui.so, libKF5ConfigWidgets.so, libKF5Contacts.so, libKF5CoreAddons.so, libKF5Crash.so, libKF5DAV.so, libKF5DBusAddons.so, libKF5Declarative.so, libKF5DNSSD.so, libKF5DocTools.so, libKF5Emoticons.so, libKF5FileMetaData.so, libKF5GlobalAccel.so, libKF5GuiAddons.so, libKF5Holidays.so, libKF5I18n.so, libKF5IconThemes.so, libKF5IdleTime.so, libKF5ItemModels.so, libKF5ItemViews.so, libKF5JobWidgets.so, libKF5JSApi.so, libKF5JsEmbed.so, libKF5JS.so, libKF5KCMUtils.so, libKF5KDELibs4Support.so, libKF5KHtml.so, libKF5KIOCore.so, libKF5KIOFileWidgets.so, libKF5KIOGui.so, libKF5KIONTLM.so, libKF5KIOWidgets.so, libKF5Kirigami2.so, libKF5KrossCore.so, libKF5KrossUi.so, libKF5MediaPlayer.so, libKF5NetworkManagerQt.so, libKF5NewStuffCore.so, libKF5NewStuff.so, libKF5Notifications.so, libKF5NotifyConfig.so, libKF5Package.so, libKF5Parts.so, libKF5PeopleBackend.so, libKF5People.so, libKF5PeopleWidgets.so, libKF5PlasmaQuick.so, libKF5Plasma.so, libKF5Plotting.so, libKF5Prison.so, libKF5Pty.so, libKF5Purpose.so, libKF5PurposeWidgets.so, libKF5QuickAddons.so, libKF5Runner.so, libKF5Service.so, libKF5Solid.so, libKF5SonnetCore.so, libKF5SonnetUi.so, libKF5Style.so, libKF5Su.so, libKF5SyntaxHighlighting.so, libKF5TextEditor.so, libKF5TextWidgets.so, libKF5ThreadWeaver.so, libKF5UnitConversion.so, libKF5Wallet.so, libKF5WaylandClient.so, libKF5WaylandServer.so, libKF5WidgetsAddons.so, libKF5WindowSystem.so, libKF5XmlGui.so, libKF5XmlRpcClient.so, and libkwalletbackend5.so
Installed Directories: /opt/kf5 (symlink to /opt/kf5-5.79.0) if installing in /opt

Short Descriptions

checkXML5

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

kbuildsycoca5

rebuilds the KService desktop file system configuration cache

kcookiejar5

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

kded5

consolidates several small services in one process

kdeinit5

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

kf5-config

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

kf5kross

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

kgendesignerplugin

generates widget plugins for Qt(TM) Designer

kglobalaccel5

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

kjs5

is KDE ECMAScript/JavaScript engine

kjscmd5

is a tool for launching KJSEmbed scripts from the command line

kjsconsole

is a console for kjs5

kpackagelauncherqml

is a commandline tool for launching kpackage QML application

kpackagetool5

is a command line kpackage tool

kreadconfig5

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

kshell5

start applications via kdeinit

ktelnetservice5

is a telnet service

ktrash5

is a helper program to handle the KDE trash can

kwalletd5

is the wallet manager daemon

kwriteconfig5

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

meinproc5

converts DocBook files to HTML

plasmapkg2

is a tool to install, list, remove Plasma packages

preparetips5

is a script to extract the text from a tips file

solid-hardware5

is a command line tool to investigate available devices

Last updated on 2021-02-25 10:55:23 -0800