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.0
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.74.0, extra-cmake-modules-5.73.0,
docbook-xml-4.5, docbook-xsl-1.79.2, giflib-5.2.1,
libepoxy-1.5.4, libgcrypt-1.8.6, libjpeg-turbo-2.0.5, libpng-1.6.37,
libxslt-1.1.34, lmdb-0.9.24, phonon-4.11.1,
plasma-wayland-protocols-1.1.1,
shared-mime-info-2.0, URI-1.76, and Wget-1.20.3 (required
to download the packages)
Recommended
Aspell-0.60.8 (Dictionary backend for Sonnet),
Avahi-0.8 (DNS-SD backend for KDNSSD), libdbusmenu-qt-0.9.3+16.04.20160218
(built with qt5), NetworkManager-1.26.0 (needed to build
NetworkManager-Qt), and polkit-qt-0.113.0 (Authentication backend for
KAuth)
Furthermore, the instructions below assume that the environment has
been set up as described in Introduction
to KF5.
Optional
BlueZ-5.54 (needed to build Bluez-Qt), ModemManager-1.14.0 (needed to build
ModemManager-Qt)
Runtime dependency for FrameworkIntegration
Oxygen fonts and Noto
fonts
Runtime dependencies for kapidox
Doxygen-1.8.19, Jinja2-2.11.2, and PyYAML-5.3.1
Additional image formats support in KImageFormats
JasPer-2.0.14 and OpenEXR
Optional dependencies for KIO
MIT Kerberos V5-1.18.2
Optional dependencies for Solid
UDisks-2.9.1, UPower-0.99.11
and media-player-info
(runtime)
Optional dependency for KWallet
gpgmepp
Optional dictionary backends for Sonnet
Hspell and
Hunspell
Required dependencies for Prison
Datamatrix and QRencode
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.73/
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.73.0.md5 << "EOF"
c33040192815708c5f075b1dbd01a2be attica-5.73.0.tar.xz
#3a3b7489583b9b412ff18316b7ab2912 extra-cmake-modules-5.73.0.tar.xz
342ec19fd7e65cafd3d58220f144ebc8 kapidox-5.73.0.tar.xz
33de1f53ec53e7112396ded8c3306d02 karchive-5.73.0.tar.xz
03107a85b830b212e268f51cf2cbe668 kcodecs-5.73.0.tar.xz
c1d584f109de507e91a357585bccd445 kconfig-5.73.0.tar.xz
f3e0b26a1b63fee56fb74b1bf972aac2 kcoreaddons-5.73.0.tar.xz
f6668c75a63f2b62997bde8c644244d0 kdbusaddons-5.73.0.tar.xz
756b06b64a324d9c930b560a6d082d06 kdnssd-5.73.0.tar.xz
7d68d806497104cd7febecdeb72b01f6 kguiaddons-5.73.0.tar.xz
b62f7fc855504f2372ee6c79a6bc40d7 ki18n-5.73.0.tar.xz
888748e6c1e7c706ab0620dd06881821 kidletime-5.73.0.tar.xz
fc9c81792d222bd82012ffea28508b09 kimageformats-5.73.0.tar.xz
c83f878fd79b5b2d03f89395d2e14986 kitemmodels-5.73.0.tar.xz
913b467848b103df05bbf95ea37ba9ec kitemviews-5.73.0.tar.xz
34fef335c2070bfa0ac7bf468add65f6 kplotting-5.73.0.tar.xz
26d211cae109afaa5bc0510e857fdf28 kwidgetsaddons-5.73.0.tar.xz
80674f9e664040a9f25e2a762473fc0f kwindowsystem-5.73.0.tar.xz
74bc1a1d23993391a481f3a4a1c016a1 networkmanager-qt-5.73.0.tar.xz
6121d847448048fe92b12264e82d8c9e solid-5.73.0.tar.xz
05a961ee1ed39e1f4d98aab99c02930e sonnet-5.73.0.tar.xz
927e8df5d6440cab69614a825e111c2d threadweaver-5.73.0.tar.xz
aa1e7532c695d9e8b6a213fa725bae1e kauth-5.73.0.tar.xz
7e5263945014cc97726ec1fd855bd331 kcompletion-5.73.0.tar.xz
40d87aa27174706e6df0b2807b114b56 kcrash-5.73.0.tar.xz
c7e7b638940c5f6abae59c1195ec37fe kdoctools-5.73.0.tar.xz
ba450e3e2edf7679b140b64f1938feb2 kpty-5.73.0.tar.xz
2df82e84a1f22dc72121490e3c325de0 kunitconversion-5.73.0.tar.xz
f4f7c5f17f829e7df2395ab1dbd7243d kconfigwidgets-5.73.0.tar.xz
22ad03ccdb3243e850ca30d16c6771f1 kservice-5.73.0.tar.xz
cf047279f13f72cd78784067fd1d6518 kglobalaccel-5.73.0.tar.xz
f39a62f40255dbe54295c72779bdbad3 kpackage-5.73.0.tar.xz
0042487aad83241f52c1116cc67fe470 kdesu-5.73.0.tar.xz
79781c58d3a8433ff8de5d5e1031cd7a kemoticons-5.73.0.tar.xz
23d7226b57acbf5be919b3848592c624 kiconthemes-5.73.0.tar.xz
3a2282e410983f1847463cb7a4d8985e kjobwidgets-5.73.0.tar.xz
b5b5b3b1482a880ca714ceac28624646 knotifications-5.73.0.tar.xz
508bdf33c3fb27bfb577d01599a69f39 ktextwidgets-5.73.0.tar.xz
1591c913577d800f03d079545c8d5411 kxmlgui-5.73.0.tar.xz
083059e5b6f2285d1e803de121d797da kbookmarks-5.73.0.tar.xz
905c9d5f68ab24af1378b6373ff2136b kwallet-5.73.0.tar.xz
3b51763b90c604f46b7be40e8e620d42 kded-5.73.0.tar.xz
9662956fa936f5784e72c56d3b92df84 kio-5.73.0.tar.xz
b7342c3e6d5d121a062a4fec0b12b440 kdeclarative-5.73.0.tar.xz
d5416a83f5fb657191943f78c3f53132 kcmutils-5.73.0.tar.xz
e48190fb43e340f4d8af0af761313ff5 kirigami2-5.73.0.tar.xz
3031ba0db06c655902c48149ebb0aa47 knewstuff-5.73.0.tar.xz
628f3ba2f966ea5853d7db7e89c1aa25 frameworkintegration-5.73.0.tar.xz
62352e83bcc895af5668ed350dfe6c9d kinit-5.73.0.tar.xz
78ed1d6c89cfc50837b339fef0d1aa42 knotifyconfig-5.73.0.tar.xz
baea3312a026f6e7d0754b1d3c87d52c kparts-5.73.0.tar.xz
83d12c191cb16343603710dd12549de9 kactivities-5.73.0.tar.xz
#7f77d7f55abc4ea9db3dd786b514ee58 kdewebkit-5.73.0.tar.xz
171ec7fbb842a65bc8c0ef8832bc1b0a syntax-highlighting-5.73.0.tar.xz
0daa36a7e0440715bb9d028e3a6a79dd ktexteditor-5.73.0.tar.xz
da21560291ac5ca797807017b690526c kdesignerplugin-5.73.0.tar.xz
cce15d3618ccf85d66dd3ce00ef119bf kwayland-5.73.0.tar.xz
3fb4c9624ccf587b9692b9f18bf8e78e plasma-framework-5.73.0.tar.xz
#f05b39b8de0e8f17acdc52d266b39f95 modemmanager-qt-5.73.0.tar.xz
87528365a0f41fa9f65a8314b2b30b64 kpeople-5.73.0.tar.xz
b279ad2c0c188540f88b5291cccd12f4 kxmlrpcclient-5.73.0.tar.xz
81e1638b9915ef293a5fcb651679b025 bluez-qt-5.73.0.tar.xz
bf2731aca806de7d9e1f57eb164dccce kfilemetadata-5.73.0.tar.xz
0ccd995814833ffeba852db8469d8ecd baloo-5.73.0.tar.xz
#335cc472ede625d4c986601fa46a0de7 breeze-icons-5.73.0.tar.xz
#1a1b69517c3e5054e8c3fc5a863424d2 oxygen-icons5-5.73.0.tar.xz
527bb4e18d0c934c4ceb6bb888e27be6 kactivities-stats-5.73.0.tar.xz
b2c41005086aa5923396b76a97654b4e krunner-5.73.0.tar.xz
#c5777bd5809f74a5595ab6b9d58c088c prison-5.73.0.tar.xz
83485bd9da3a945de012707b1ee11f03 qqc2-desktop-style-5.73.0.tar.xz
2f25ea46a7ae7ff942a3b12457710bc9 kjs-5.73.0.tar.xz
7daadf02818f6e58853e151f5a246524 kdelibs4support-5.73.0.tar.xz
c79f45f59e5ddc53359d008dc1266c63 khtml-5.73.0.tar.xz
e4bc354a2908888098e9ca17a5888bc9 kjsembed-5.73.0.tar.xz
7652778ab2e57bb49d930450650c86da kmediaplayer-5.73.0.tar.xz
9255465cc898c9e9e1afcc6876a725fd kross-5.73.0.tar.xz
ca82fa202e9b6d7ebcf6c4f5c4bdfbe5 kholidays-5.73.0.tar.xz
16746901b71655898064984c4d1bd0fd purpose-5.73.0.tar.xz
fdda5ee07fd893bca10b6e6c62ad4965 syndication-5.73.0.tar.xz
599b10ad4a5d110e996b6528b5165aeb kcalendarcore-5.73.0.tar.xz
8f4e3826b4202ad0b006a7df67b0732e kcontacts-5.73.0.tar.xz
714cedd448a555befc8da387ab5105b2 kquickcharts-5.73.0.tar.xz
766ddc42f378a4c69bf8bf9cedc18108 kdav-5.73.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.73.0 and oxygen-icons5-5.73.0. The
modemmanager-qt package may be built if its optional dependency has
been installed. The prison package (bar code reader) may be built
if the required external libraries are installed. The kdewebkit may
be built if the external package QtWebkit
has been built.
Installation of KDE Frameworks
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:
-
Run the entire script as the root user (not recommended).
-
Use the sudo
command from the Sudo-1.9.2
package.
-
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
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
case $name in
kitemviews*) sed -i '/<QList>/a #include <QPersistentModelIndex>' \
src/kwidgetitemdelegatepool_p.h ;;
kplotting*) sed -i '/<QHash>/a #include <QHelpEvent>' \
src/kplotwidget.cpp ;;
knotifica*) sed -i '/<QUrl>/a #include <QVariant>' \
src/knotification.h ;;
kcompleti*) sed -i '/<QClipboard>/a #include <QKeyEvent>' \
src/klineedit.cpp ;;
kwayland*) sed -i '/<wayland-xdg-output-server-proto/a #include <QHash>' \
src/server/xdgoutput_interface.cpp ;;
esac
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.73.0.md5
exit
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.73.0
ln -sfvn kf5-5.73.0 /opt/kf5
Command Explanations
case ...: Those
modifications are required to build with Qt-5.15.0.
-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:
There are 48 programs installed in
/opt/kf5/bin.
Installed Libraries:
There are too many kf5 libraries (191) to
list separately.
Installed Directories:
/opt/kf5 (symlink to
/opt/kf5-5.73.0)
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.
|
kactivitymanagerd
|
is the KDE Plasma Workspace Activity Manager.
|
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.
|
kgenapidox
|
is a tool to generate API documentation in the KDE style.
|
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.
|
kmailservice5
|
is a mail service.
|
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 2020-08-21 17:00:59 -0700