This guide explains how to build Krita from standard Qt 5 and KDE Frameworks 5 development packages provided with your favorite linux distribution. This should be straightforward, but for more detail you can look into the old instructions for building Calligra.
You'll need to install a whole host of fairly small packages. The easiest thing you can do is to run the cmake config, and read the output. CMake will tell you what dependancies are still missing, and also what each dependancy does. That way, if you for example do not care for audio playback, you don't have to install those packages.
Once you have installed the dependencies, you are ready to clone the Krita repository.
cd ~/kf5/src (Or, wherever you want to download the source code) git clone git://anongit.kde.org/krita
Krita's build system has diverged from the Calligra build system. For example, Krita does not use productsets any longer.
Optimization level RelWithDebInfo is nearly always good enough for everyday debugging, and it can be used to paint with. Basically we have two build modes: for painters and for developers.
cd ~/kf5/build/krita cmake ~/kf5/src/krita \ ## your source directory -DCMAKE_INSTALL_PREFIX=~/kf5/inst \ ## your installation directory -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_TESTING=FALSE \ -DHIDE_SAFE_ASSERTS=TRUE make -j8 install
cd ~/kf5/build/krita cmake ~/kf5/src/krita \ ## your source directory -DCMAKE_INSTALL_PREFIX=~/kf5/inst \ ## your installation directory -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DBUILD_TESTING=TRUE \ -DHIDE_SAFE_ASSERTS=FALSE make -j8 install
Remember that you can change build settings with cmake . -DNEW_SETTING or by using cmake-gui found in the package cmake-qt-gui
XDG_DATA_DIRS. You should need only one environment variable to run Krita 3:
KRITA_PLUGIN_PATH. Krita's plugin loading can be a bit fragile, especially when debugging. You can force Krita to look in a specific folder for plugins using the environment variable KRITA_PLUGIN_PATH. For example, on a Kubuntu system with an install for Krita in ~/, the plugins are located in ~/kf5/inst/lib/x86_64-linux-gnu, so for proper debugging:
QT_MESSAGE_FORMAT and QT_LOGGING_RULES See main.cc and http://woboq.com/blog/nice-debug-output-with-qt.html