Previous Part: KDE 4.2 on Gentoo – Part 1: The Preparation

The previous post talked about preparing for KDE 4.2.1 install. KDE 4.2.1 via sets requires portage version 2.2 to use sets.

This post talks about KDE specific pre-requisites. KDE uses Qt which is a GUI rendering SDK. This means that any changes to Qt on your system require rebuilding KDE. So first you must ensure that your system has all the Qt components installed correctly.

From the Gentoo KDE install guide, you can download a package.keywords file showing all packages that need to be ~ unmasked. Append that file to your existing /etc/portage/package.keywords file.

Step 1: Update Qt packages

Now upgrade all the Qt components. Make sure you unmask all the following, if these are not in the downloaded package.keywords file.

x11-libs/qt ~x86
x11-libs/qt-sql ~x86
x11-libs/qt-core ~x86
x11-libs/qt-assistant ~x86
x11-libs/qt-gui ~x86
x11-libs/qt-dbus ~x86
x11-libs/qt-script ~x86
x11-libs/qt-test ~x86
x11-libs/qt-qt3support ~x86
x11-libs/qt-svg ~x86
x11-libs/qt-xmlpatterns ~x86
x11-libs/qt-opengl ~x86
x11-libs/qt-webkit ~x86
x11-libs/qt-phonon ~x86

You can either install KDE and let the ebuild update Qt components or you can manually update Qt components. The KDE ebuilds aren’t correctly tracking dependencies. So I recommend ensuring Qt before starting KDE install.

To update all the Qt packages, you can run the following command.

emerge -uav qt qt-sql qt-core qt-assistant qt-gui qt-dbus qt-script qt-test qt-qt3support qt-svg qt-xmlpatterns qt-opengl qt-webkit

You can remove the u parameter from emerge parameters so that all packages are rebuilt. But if you want to save time, you can let emerge build only the ones needing an update. I recommend using without u and rebuilding all packages.

Important note: Do not install qt-phonon. KDE provides media-sound/phonon & kde-base/phonon-kde to replace that. If you find you have qt-phonon installed, uninstall it. To verify if it is installed you can run the following command.

eix -c qt-phonon

The output should look something like the following output.

[N] x11-libs/qt-phonon ((~)4.5.0(4)): The Phonon module for the Qt toolkit

The [N] means it’s a new install.  If you see a [I], then it’s installed. To uninstall it run the following command:

emerge -C qt-phonon

Step 2: Update other components

After the Qt update, you will need to update PyQt4. It is a good idea to simply rebuild. Make sure you build this with the webkit USE flag, else you will run into problems.

In the file /etc/portage/package.use, add the following line.

dev-python/PyQt4 webkit svg

Now rebuild PyQt4. Use the following command.

emerge -av PyQt4

Step 3: Update some more components

You will need to update the following components. Use the following commands.

emerge -av dev-util/kdevplatform

emerge -av kde-base/okular

 

Part 3: KDE 4.2 on Gentoo – Part 3: The KDE Install