I tried to build the latest kdepim (i needed it to look into ktimetracker), on Debian Jessie. I was trying to follow a few tutorials  , but after I started to see through the dependency relations between the lower level KDE stuff like Framworks and the current versions of kdepim, i decided that it would be easier to build the whole KDE world alltogether, especially as i wanted to get my builds based the current 4.14 KDE version, and the Frameworks based (aka "KDE 5" version) as well.
Fortunately the KDE project provides a cool tool called kdesrc-build , which made up from a couple of perl scripts, a few config files, and provides example configs for building KDE4 (using Qt4.x) and Frameworks based KDE (using Qt5.x) as well.
It took some time while i got all of the dependencies right, so here is what i had to install on a relatively clean Debian Jessie install (probably not full, but covers most of the stuff):
apt-get install libgrantlee-dev libsasl2-dev libprison-dev libical-dev libakonadi-dev libgpgme11-dev kdelibs5-dev libqtwebkit-dev libqt4-opengl-dev libiodbc2-dev libraptor2-dev librasqal3-dev librdf0-dev libbz2-dev libdbus-1-dev libfam-dev libclucene-dev libclucene-core1 libboost-all-dev libqjson-devlibecm-dev libjpeg-dev libgif-dev libdbusmenu-qt-dev libqt5x11extras5-dev libgcrypt20-dev libqt5xmlpatterns5-private-dev libvlc-dev libgstreamer1.0-dev libvlccore-dev libqtgstreamer-dev libgstreamer-plugins-base1.0-dev libxcb1-dev libxcb-xtest0-dev libxapian-dev libnm-util-dev libxcb-composite0-dev libxcb-damage0-dev fontforge libxcb-image0-dev libnm-gtk-dev libnetworkmanagerqt-dev libhunspell-dev libldap2-dev qdbus-qt5 git-core libjson-perl cmake bzr qtscript5-dev libxcb-keysyms1-dev qtbase5-dev libqt5x11extras5-dev qtscript5-dev qttools5-dev libqt5svg5-dev libudev-dev libqt5webkit5-dev libssl-dev libepoxy-dev qtbase5-private-dev libegl1-mesa-dev xsltproc liblcms2-dev qttools5-dev-tools xserver-xephyrlibasound2-dev libpolkit-qt-1-dev libbaloowidgets-dev libdlrestrictions-dev libkactivities-dev libkfilemetadata-dev libqimageblitz-dev libtidy-0.99-0 libtidy-dev libxkbfile-dev libsane-dev libexiv2-dev libraw-dev libcups2-dev libmusicbrainz3-dev
Set up the kde url prefix for git add to ~/.gitconfig:
[url "git://anongit.kde.org/"] insteadOf = kde: [url "email@example.com:"] pushInsteadOf = kde:
I wanted to install my KDE builds under /opt, so i created two directories and give them to my normal user:
chown myuser:myuser /opt/kde*
Cloned the kdesrc-build scripts:
git clone git://anongit.kde.org/kdesrc-build && cd kdesrc-build
Edit the kdesrc-buildrc-sample file to set your paths (also for Qt the /usr, so it won't build Qt as well), and build kde4:
./kdesrc-build --rc-file kdesrc-buildrc-sample
which takes some hours, if you see something didn't build, look into the logfiles, and install the needed dependecies. It also occured to me that the script failed to clone first some of the git repositories, so i had to restart the build process.
For the Frameworks based KDE, edit the kdesrc-buildrc-kf5-sample, and build:
./kdesrc-build --rc-file kdesrc-buildrc-kf5-sample
To run a nested session in Xephyr, i created the following quick&dirty script, you might need to adjust it to your needs:
Xephyr -ac :1 -screen 1024x768 &
dbus-launch $KDEDIR/bin/startkde --failsafe
Depending on the version/dependency changes in the future (and the current Moon phase) this probably will need some tweaking, but i hope it gives a some guidence.
Sources:Share on Twitter Share on Facebook