Krita/kf5build: Difference between revisions

From KDE Community Wiki
No edit summary
No edit summary
Line 2: Line 2:


To build Qt5 and Kf5 follow the instructions in [https://community.kde.org/Frameworks/Building Frameworks/Building] on Techbase. I assume that you are building in $HOME/kf5. The result will be completely independent from your kde4 build of Krita.
To build Qt5 and Kf5 follow the instructions in [https://community.kde.org/Frameworks/Building Frameworks/Building] on Techbase. I assume that you are building in $HOME/kf5. The result will be completely independent from your kde4 build of Krita.
The following script will setup all the paths. You should save the script as, say, ~/kf5/kf5.sh and source it when you want to do a spot of Krita3 building.
<syntaxhighlight lang="bash">
export KF5=$HOME/kf5/inst
export QTDIR=$HOME/kf5/qt5/qtbase
export CMAKE_PREFIX_PATH=$KF5:$QTDIR:$CMAKE_PREFIX_PATH
export XDG_DATA_DIRS=$KF5/share:$XDG_DATA_DIRS:/usr/share
export XDG_CONFIG_DIRS=$KF5/etc/xdg:$XDG_CONFIG_DIRS:/etc/xdg
export XDG_DATA_HOME=$KF5/../local5/share
export XDG_CONFIG_HOME=$KF5/../config5
export XDG_CACHE_HOME=$KF5/../cache5
export PATH=$KF5/bin:$QTDIR/bin:$PATH
export QT_PLUGIN_PATH=$KF5/lib/plugins:$KF5/lib64/plugins:$KF5/lib/x86_64-linux-gnu/plugins:$QTDIR/plugins:$QT_PLUGIN_PATH
export QML2_IMPORT_PATH=$KF5/lib/qml:$KF5/lib64/qml:$KF5/lib/x86_64-linux-gnu/qml:$QTDIR/qml
export QML_IMPORT_PATH=$QML2_IMPORT_PATH
export KDE_SESSION_VERSION=5
export KDE_FULL_SESSION=true
export KDE_SRC=$HOME/kf5/src
export KDE_BUILD=$HOME/kf5/build
c=`echo -e "\033"`
export QT_MESSAGE_PATTERN="%{appname}(%{pid})/(%{category}) ${c}[31m%{if-debug}${c}[34m%{endif}\
%{function}${c}[0m: %{message}"
unset c
</syntaxhighlight>
After building Qt and Kf5 as per instructions, you should end up with the following items in the top-level kf5 directory:
<pre  style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: normal;">
~/kf5/build/
~/kf5/cache/
~/kf5/config5/
~/kf5/inst/
~/kf5/kdesrc-build (symlink to ~/kf5/extragear/utils/kdesrc-build/kdesrc-build)
~/kf5/kdesrcbuildrc
~/kf5/kf5.sh
~/kf5/local5
~/kf5/qt5/
~/kf5/src/
</pre>
If everything has been built, you can checkout the calligra src in ~/kf5/src,  build it in ~/kf5/build and install to ~/kf5/inst. There are no weird cmake incantations needed.

Revision as of 12:28, 12 August 2015

This section provides information about 'building Qt5, Kf5 and Krita3.

To build Qt5 and Kf5 follow the instructions in Frameworks/Building on Techbase. I assume that you are building in $HOME/kf5. The result will be completely independent from your kde4 build of Krita.

The following script will setup all the paths. You should save the script as, say, ~/kf5/kf5.sh and source it when you want to do a spot of Krita3 building.

export KF5=$HOME/kf5/inst

export QTDIR=$HOME/kf5/qt5/qtbase
export CMAKE_PREFIX_PATH=$KF5:$QTDIR:$CMAKE_PREFIX_PATH

export XDG_DATA_DIRS=$KF5/share:$XDG_DATA_DIRS:/usr/share
export XDG_CONFIG_DIRS=$KF5/etc/xdg:$XDG_CONFIG_DIRS:/etc/xdg
export XDG_DATA_HOME=$KF5/../local5/share
export XDG_CONFIG_HOME=$KF5/../config5
export XDG_CACHE_HOME=$KF5/../cache5

export PATH=$KF5/bin:$QTDIR/bin:$PATH

export QT_PLUGIN_PATH=$KF5/lib/plugins:$KF5/lib64/plugins:$KF5/lib/x86_64-linux-gnu/plugins:$QTDIR/plugins:$QT_PLUGIN_PATH

export QML2_IMPORT_PATH=$KF5/lib/qml:$KF5/lib64/qml:$KF5/lib/x86_64-linux-gnu/qml:$QTDIR/qml
export QML_IMPORT_PATH=$QML2_IMPORT_PATH

export KDE_SESSION_VERSION=5
export KDE_FULL_SESSION=true
export KDE_SRC=$HOME/kf5/src
export KDE_BUILD=$HOME/kf5/build

c=`echo -e "\033"`
export QT_MESSAGE_PATTERN="%{appname}(%{pid})/(%{category}) ${c}[31m%{if-debug}${c}[34m%{endif}\
%{function}${c}[0m: %{message}"
unset c

After building Qt and Kf5 as per instructions, you should end up with the following items in the top-level kf5 directory:

~/kf5/build/
~/kf5/cache/
~/kf5/config5/
~/kf5/inst/
~/kf5/kdesrc-build (symlink to ~/kf5/extragear/utils/kdesrc-build/kdesrc-build)
~/kf5/kdesrcbuildrc
~/kf5/kf5.sh
~/kf5/local5
~/kf5/qt5/
~/kf5/src/

If everything has been built, you can checkout the calligra src in ~/kf5/src, build it in ~/kf5/build and install to ~/kf5/inst. There are no weird cmake incantations needed.