After Thorsten Bronger processed a calibration upload of mine (thanks a lot!), I needed to update lensfun on my Ubuntu 16.04 from 0.2.8 to 0.3.2. It looks like there is no PPA providing this version, so I installed it by myself. But there is a nasty trick I had to do which I would like to share. Maybe someone knows a clean way 😉
Please see Update below, manual steps not necessary.
All commands are run as root (so execute „sudo bash“ before in terminal).
- install build dependencies
apt–get build–dep liblensfun0
- remove installed lensfun version (keep all dependent packages)
dpkg -r –force-all liblensfun0 liblensfun-data
- Download lensfun and extract
- in terminal, create a sub-directory inside the extrated lensfun folder and change into it
- prepare cmake
cmake -DCPACK_BINARY_DEB:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr ../
- compile and make package
- install created deb package
dpkg -i <generated package name>.deb
- retrieve lens updates by running
Now, the package is installed and has the new lens data. But darktable did not actually recognize it – the lens correction module was simply missing. I spent a couple of hours, different other installation ways (e.g. using checkinstall to create the deb package) but it simply didn’t work out. I ended in using a „hack“. Liblensfun.so.0.3.2 is installed in /usr/lib/x86_64-linux-gnu. It looks like darktable expects to have the lensfun lib simply in /usr/lib. So I created a symlink:
ln -s x86_64-linux-gnu/liblensfun.so.0.3.2 liblensfun.so.0
(if you have the original lensfun package still installed, just move the existing symlink to something like liblensfun.so.0.orig)
This way, darktable uses the new lensfun lib and has my lens listed. If anyone knows what to change or what I have done wrong, I would highly appreciate any comments 🙂
Update: I created a PPA where I backported liblensfun 0.3.2 and darktable (currently 2.0.7) to Ubuntu 16.04 (Xenial). Feel free to try, but please keep in mind this is only a backport-ppa for testing purposes.