KDE TechBase:Arthur
Building KDevelop5 on a Debian testing distribution
Introduction
The main advantage of this approach is to have KDevelop5 run on my existing Debian KF5 Frameworks system. If something goes wrong, it is only that one program that is in trouble, not the rest of my workflow/pleasure.
This has been tested on two Debian testing distributions running KF5 Frameworks. It really should work if you are using another Desktop such as Gnome or Mate or whatever, but I have not tested that. It may well work on Ubuntu with any Desktop, but again not tested. Likewise for any of the Debian related systems.
My approach stores the KDevelop files and programs within your home folder. Installing it into the system folders is left as an exercise to the reader. I prefer this approach as I don't have to use root access, which I feel is less error prone.
To build KDevelop5, I downloaded a bunch of dependencies, added some lines to my ~/.bashrc file, and created several shell scripts to automate compiling a current KDevelop5 snapshot, along with the ability to update it easily to the most recent version.
KDevelop5 package dependencies
I doubt this is all of them, I just added to the list when KDevelop didn't compile. some needed ones may already have been in my systems. I would like to know about any that are needed, and will update this page.
apt-get install extra-cmake-modules qtdeclarative5-dev libqt5webkit5-dev qtscript5-dev apt-get install libbz2-dev libxslt-dev libxml2-dev shared-mime-info oxygen-icon-theme libgif-dev libvlc-dev libvlccore-dev doxygen gperf bzr libxapian-dev fontforge libgcrypt20-dev libattr1-dev network-manager-dev libgtk-3-dev xsltproc xserver-xorg-dev xserver-xorg-input-synaptics-dev libpwquality-dev modemmanager-dev libxcb-keysyms1-dev libepoxy-dev libpolkit-agent-1-dev libnm-util-dev libnm-glib-dev libegl1-mesa-dev libxcb-xkb-dev libqt5x11extras5-dev libwww-perl libxml-parser-perl libjson-perl libboost1.55-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libarchive-dev liblmdb-dev apt-get install qtbase5-dev qtbase5-private-dev libqt5x11extras5-dev qtscript5-dev qttools5-dev libqt5svg5-dev libqt5xmlpatterns5-dev qttools5-dev-tools qtdeclarative5-dev libkf5archive-dev plasma-framework-dev plasma-workspace-dev libkf5guiaddons-dev libkf5widgetsaddons-dev libkf5threadweaver-dev libkf5xmlgui-dev libkf5itemmodels-dev libkf5jobwidgets-dev libkf5kcmutils-dev kio-dev libkf5newstuff-dev libkf5notifications-dev libkf5notifyconfig-dev libkf5parts-dev libkf5texteditor-dev libkf5declarative-dev kdoctools-dev libgrantlee5-dev libkomparediff2-dev libkf5runner-dev libkf5sysguard-dev libgrantlee5-dev libgrantlee-templates5 libgrantlee-textdocument5 # need these for the optional okteta plugin, sadly the version in debian is not new enough as of 24 Jan 16 apt-get install libkasten3okteta1controllers1 libkasten3controllers3 okteta okteta-dev
Additions to ~/.bashrc
Various defines that my shell scripts require.
# kdevelop 5 stuff export KDEVELOP5_DIR=/home/artg/alocal/projects/kdevelop-5.git # location of the local git repositories, change this to suit # the rest of these lines probably don't have to be changed export KDEVELOP5_INSTALL=$KDEVELOP5_DIR/kdevelop5 # where to install the program files export KDEDIRS=$KDEVELOP5_INSTALL:/usr # needed anymore ? export QTDIR=/usr/lib/x86_64-linux-gnu/qt5 export PATH=$KDEVELOP5_INSTALL/bin:$PATH export QT_PLUGIN_PATH=$KDEVELOP5_INSTALL/lib/x86_64-linux-gnu/plugins:$QTDIR/plugins:$QT_PLUGIN_PATH export QML2_IMPORT_PATH=$KDEVELOP5_INSTALL/lib/x86_64-linux-gnu/qml:$QTDIR/qml export XDG_DATA_DIRS=$KDEVELOP5_INSTALL/share/:$XDG_DATA_DIRS export XDG_CONFIG_DIRS=$KDEVELOP5_INSTALL/etc/xdg:/etc/xdg
I would reboot after altering the ~/.bashrc file. Seriously.
Shell files for automating compilation and updating to the latest version
Place these files anywhere convenient on your system
File kdevelop5_first_time.sh
This is run to setup the local git repositories
# get rid of any existing source director so can start afresh rm -R $KDEVELOP5_DIR #make the directories where you will be installing the code mkdir -p $KDEVELOP5_DIR/src/kdevelop-pg-qt mkdir -p $KDEVELOP5_DIR/src/kdevplatform mkdir -p $KDEVELOP5_DIR/src/kdevelop mkdir -p $KDEVELOP5_INSTALL # copy the git repositories across to your computer git clone git://anongit.kde.org/kdevelop-pg-qt.git $KDEVELOP5_DIR/src/kdevelop-pg-qt git clone git://anongit.kde.org/kdevplatform $KDEVELOP5_DIR/src/kdevplatform git clone git://anongit.kde.org/kdevelop $KDEVELOP5_DIR/src/kdevelop # not sure why I do this, but at some stage I needed to do it cd $KDEVELOP5_DIR/src/kdevelop-pg-qt; git checkout cd $KDEVELOP5_DIR/src/kdevplatform ; git checkout cd $KDEVELOP5_DIR/src/kdevelop ; git checkout
File kdevelop5_release.sh
This script compiles KDevelop
export QT_SELECT=5 # needed if you also have qt4 installed export USE_THREADS='-j12' # the number of threads you want to spend on the compilation, in my case 12 # compile kdevelop-pq-qt mkdir -p $KDEVELOP5_DIR/src/kdevelop-pg-qt/build cd $KDEVELOP5_DIR/src/kdevelop-pg-qt/build cmake -DCMAKE_INSTALL_PREFIX=$KDEVELOP5_INSTALL ../ make $USE_THREADS make install # then compile and install KDevPlatform: mkdir -p $KDEVELOP5_DIR/src/kdevplatform/build cd $KDEVELOP5_DIR/src/kdevplatform/build cmake -DCMAKE_INSTALL_PREFIX=$KDEVELOP5_INSTALL ../ make $USE_THREADS make install # then compile KDevelop, telling it to use the just installed KDevPlatform: mkdir -p $KDEVELOP5_DIR/src/kdevelop/build cd $KDEVELOP5_DIR/src/kdevelop/build cmake -DCMAKE_PREFIX_PATH=$KDEVELOP5_INSTALL -DCMAKE_INSTALL_PREFIX=$KDEVELOP5_INSTALL ../ make $USE_THREADS make install # this apparently does some magic to incorporate your new program into your desktop environment kbuildsycoca5
File kdevelop5_update_local _repository.sh
Used to update the local git repositories to the latest versions.
cd $KDEVELOP5_DIR/src/kdevelop-pg-qt && git pull cd $KDEVELOP5_DIR/src/kdevplatform && git pull cd $KDEVELOP5_DIR/src/kdevelop && git pull
Final steps to compile
Now, set the execute bit on the .sh files, then run the scripts
chown o+x <folder where you stored the script files>/*.sh # run the following two scripts kdevelop5_first_time.sh kdevelop5_release.sh
If it doesn't compile, add any dependencies requested, and run 'kdevelop5_release.sh' again (and again...)
Once it compiles, try to run it. Enjoy the wonderful tool that is KDevelop5 beta!
kdevelop
Updating KDevelop5 to the latest version
To update with the latest changes to KDevelop and its dependencies, run
kdevelop5_update_local _repository.sh kdevelop5_release.sh'