1 minute read

To build KDE on Arch Linux with the nice kdesrc-build script, you need the packages listed on this page: KDE TechBase plus this package: perl-libwww. I didn’t have to rebuild Qt as the version provided in Arch Linux repository seems to be OK.

Then you can use the kdesrc-build-setup script and select what pleases you. But before starting the build, you have to fix some issues. The first one is related to clucene (https://bugs.archlinux.org/task/27556 and why you don’t need it) and can be solved by adding this line in your ~/.kdesrc-buildrc:

cmake-options -DENABLE_CLUCENE=OFF -DENABLE_CLUCENE_NG=OFF

just before this one:

use-modules strigi/libstreams strigi/libstreamanalyzer strigi/strigiutils \

The second one is related to python (again, the “which one of python2 or python3 is the default python” battle), and can be fixed with this line:

cmake-options -DWITH_Xmms=OFF -DWITH_Googlegadgets=OFF -DWITH_libgps=OFF -DWITH_OpenGLES=ON -DKWIN_BUILD_WITH_OPENGLES=ON -DPYTHON_EXECUTABLE=/usr/bin/python2

which is to be inserted before this one:

use-modules kde-workspace kdeplasma-addons

Here is the script I found on the KDE-devel mailling list to easily launch “KDE-master” applications within a regular desktop. It might need tweaking to make it work since I haven’t used it much yet:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

runmaster() {
    #    if [ -z "${KDE_ENV_SET}" ]; then
    # (this script is from bcooksley)

    export TRUNKINSTALLPATH="${HOME}/kde4"
    # Change this to your kdedir setting in ~/.kdesrc-buildrc
    export KDE_EXTRAS="${TRUNKINSTALLPATH}"
    export KDEDIR="${TRUNKINSTALLPATH}"
    export KDEDIRS="${KDEDIR}:${KDE_EXTRAS}:/usr/"

    # Change this to your qtdir setting in ~/.kdesvn-buildrc
    #export QTDIR="${TRUNKINSTALLPATH}/qt"
    #export QT_PLUGIN_PATH="${KDE_EXTRAS}/lib64/kde4/plugins:${KDEDIR}/lib64/kde4/plugins:${KDEDIR}/lib/qt4/plugins"

    export PATH="${HOME}/bin:${KDE_EXTRAS}/bin:${KDEDIR}/bin:${QTDIR}/bin:${PATH}"
    export LD_LIBRARY_PATH="${KDE_EXTRAS}/lib64:${KDEDIR}/lib64:${QTDIR}/lib"
    export CMAKE_PREFIX_PATH="${KDE_EXTRAS}:${KDEDIR}:${QTDIR}"
    export CMAKE_MODULE_PATH="${CMAKE_PREFIX_PATH}"
    export PKG_CONFIG_PATH="${KDE_EXTRAS}/share/pkgconfig:${KDE_EXTRAS}/lib64/pkgconfig:${KDEDIR}/lib64/pkgconfig:${KDEDIR}/share/pkgconfig:${QTDIR}/lib/pkgconfig"

    export KDEHOME="${HOME}/.kde-master/"
    unset XDG_DATA_DIRS

    # Should be for kbuildsycoca
    export KDEVARTMP="/var/tmp/kdecache-master-${USER}"

    # Set the XDG data path, helps finding plugins, etc
    export XDG_DATA_DIRS="${KDE_EXTRAS}/share:${KDEDIR}/share:${XDG_DATA_DIRS}"
    export XDG_CONFIG_DIRS="${KDEDIR}/etc/xdg:${KDE_EXTRAS}/etc/xdg"

    # Live Oxygen Gtk!
    export GTK_PATH=$KDEDIR/lib/gtk-2.0/2.10.0
    export GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0::$KDEHOME/share/config/gtkrc-2.0

    # Don't accidentally get sourced again.
    #        export KDE_ENV_SET=1
    #    fi
}

echo "Setting up environment"
runmaster

echo "Starting "$1" from KDE-master"
$1

Happy building!

Updated:

Comments


Comments are disabled on this blog but feel free to start a discussion with me on Mastodon.
You can also contact me directly if you have feedback.