Digikam/Compilation on Kubuntu
How to compile digikam svn in Kubuntu > 8.10 (Intrepid Ibex, Jaunty Jackalope)
The new Kubuntu version 8.10 uses kde4 only instead of the kde3/4 mix of earlier versions. Here is a list of instructions that should get you a working snapshot of the current digikam SVN using Kubuntu 8.10 or higher.
Essentially, these instructions repeat the kde4-related instructions of http://www.digikam.org/drupal/download?q=download/svn, plus a list of kubuntu packages to install and some environment variable settings for the compilation.
This tutorial has been tested on a fresh Kubuntu 9.04 Jaunty.
Installing dependencies
Assuming you have a fresh install of Kubuntu 8.10, you first need to install some additional packages:
sudo aptitude install subversion cmake kdelibs5-dev g++ sane libsane-dev gphoto2 libgphoto2-2-dev blitz++ libexiv2-dev libqimageblitz-dev xorg-dev libimlib2-dev libmarble-dev libqt4-sql-sqlite marble marble-data kdepimlibs5-dev libkdcraw7-dev libkexiv2-7-dev gettext
For some additional plugins like redeye-removal and automatic lens correction, you need to download, compile and install extra libraries. These are optional, if you skip the following step and go directly to "First svn checkout" below, digikam will also compile fine, but miss these extra features.
For the auto lens correction tool, download liblensfun from http://lensfun.berlios.de/, for example lensfun-0.2.3.tar.bz2. Then, in the folder you downloaded to,
tar -xjvf lensfun-0.2.3.tar.bz2
cd lensfun-0.2.3
./configure --prefix=/usr
make all
sudo make install
For red eye removal, get opencv: Download opencv-1.0.0.tar.gz at http://downloads.sourceforge.net/opencvlibrary/opencv-1.0.0.tar.gz?modtime=1162852454&big_mirror=1, then
tar -xzvf opencv-1.0.0.tar.gz
cd opencv-1.0.0
./configure
make
sudo make install
First svn checkout
To download the digikam source code, first create a directory where you want to download it to and go there, for example
mkdir -p ~/down/svn
cd ~/down/svn
Now you can do the svn checkout, as described on the digikam website:
svn co -N svn://anonsvn.kde.org/home/kde/trunk/KDE/kdegraphics
cd kdegraphics
svn up libs
svn up cmake
cd ..
svn co -N svn://anonsvn.kde.org/home/kde/trunk/extragear/graphics
cd graphics
svn up digikam
svn up kipi-plugins
svn up cmake
Set variables
Before compiling, you need to set some environment variables (Thanks to Geoff on the digikam list for telling me the correct settings):
DIGIKAMKDE4=/usr
export KDEDIR=$DIGIKAMKDE4:/usr/lib/kde4
export KDEDIRS=$DIGIKAMKDE4:/usr/lib/kde4
export KDEHOME=$HOME/.kde
export QTDIR=/usr/lib/qt4
export PATH=$DIGIKAMKDE4/bin:/usr/local/bin:$QTDIR/bin:$KDEDIR/bin:$QTDIR/bin:/usr/local/bin:$PATH
export KDETMP=/tmp/$USER-kde4
export KDEVARTMP=/var/tmp/$USER-kde4
export LD_BIND_NOW=42
export LD_LIBRARY_PATH=$KDEDIR/lib:$QTDIR/lib:$DIGIKAMKDE4/lib:/usr/lib/kde4:/usr/lib:/usr/lib/kde4/libexec:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$DIGIKAMKDE4/lib/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
Compile and install
Now you're all set for compiling, starting with the libs. Do
cd ../kdegraphics
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=$DIGIKAMKDE4 ../../kdegraphics
make
sudo make install
For the last step (installation), you will be prompted for your root password.
Now for digikam itself:
cd ../../graphics
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=$DIGIKAMKDE4 ../../graphics
make
sudo make install
Afterwards, you can start digikam from the kde start menu (under "graphics"), from krunner (alt+f2), or from the command line as "digikam".
Note that the above procedure will give you a really recent development snapshot, so some instabilities and bugs can be expected. However, most parts are quite reliable already. Most of the functionality of the 0.9 series has been reproduced, and many new features have been added ...
If at a later time, you want to update to the latest status of development, you can proceed as above, but replace step 2 "first svn checkout" by the following.
Subversion upgrade
Go to your svn directory (for example ~/down/svn, otherwise change the path below correspondingly) and upgrade:
cd ~/down/svn/kde4/kdegraphics
svn up libs
svn up cmake
cd ~/down/svn/kde4/graphics
svn up digikam
svn up kipi-plugins
svn up cmake
Today, libkexiv2-7 and libkexiv2-7-dev have to be installed in your system.
libkexiv2-6 and libkexiv2-dev are not supported
The remaining steps of setting variables, compiling and installing are unchanged.