Archive for July, 2008

Building UFRaw on Ubuntu

July 19, 2008

UFRaw is a free converter for RAW images. Like so many others it is based on DCRaw. The latest official release is from late 2007. This is more or less what is provided by Ubuntu.

The current CVS holds a few interesting additions, most noticeable the use of lensfun for doing lens corrections. There is a demo.

The following steps made the CVS compile for me. The result will be placed within the confines of /opt/ufraw-cvs/ and dpkg.

First we need to get the lensfun packages. I found some at this location. Add the following lines to /etc/apt/sources.list (use su to become a privileged user):

# lensfun
deb http://mirror.pcode.nl/ubuntu/ hardy lensfun

Next, install needed deb packages:

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install lensfun-data lensfun-manual liblensfun0 liblensfun0-dev
sudo apt-get install libgtkimageview-dev libgtkimageview0

In case you don’t have a /opt directory:

sudo mkdir /opt

Then build the programs:

cd /tmp
cvs -d:pserver:anonymous@ufraw.cvs.sourceforge.net:/cvsroot/ufraw login
cvs -z3 -d:pserver:anonymous@ufraw.cvs.sourceforge.net:/cvsroot/ufraw co ufraw
cd ufraw
./autogen.sh
./configure --prefix=/opt/ufraw-cvs
make
sudo make install

And you should then be able to run UFRaw:

/opt/ufraw-cvs/bin/ufraw

Advertisements

Installing Gimp 2.5.2 on Ubuntu

July 18, 2008

In an earlier post I mentioned a guide to build Gimp 2.5.0 on Ubuntu Hardy Heron. Back then the guide failed on my machine.

With the recent release on Gimp 2.5.2 I decided to give it another try and this time it worked. Below I have listed the specific commands. A few dependencies might be missing.

I case you don’t have the build tools installed (or have no idea if you do):

sudo apt-get install build-essential
sudo apt-get build-dep gimp

Also, to make the commands below work you need to have wget installed:

sudo apt-get install wget

In case you don’t have a /opt directory:

sudo mkdir /opt

In case you have a previous installation, remove this (or move it out of the way):

sudo mv /opt/gimp-2.5 /opt/gimp-2.5.backup

Run the following commands:

export PATH=/opt/gimp-2.5/bin:$PATH
export LD_LIBRARY_PATH=/opt/gimp-2.5/lib
export PKG_CONFIG_PATH=/opt/gimp-2.5/lib/pkgconfig

cd /tmp

svn co http://svn.gnome.org/svn/babl/trunk/ babl
cd babl
./autogen.sh –prefix=/opt/gimp-2.5
make
sudo make install
cd ..

svn co http://svn.gnome.org/svn/gegl/trunk/ gegl
cd gegl
./autogen.sh –prefix=/opt/gimp-2.5
make
sudo make install
cd ..

wget ftp://ftp.gimp.org/pub/gimp/v2.5/gimp-2.5.2.tar.bz2
tar jxvf gimp-2.5.2.tar.bz2
cd gimp-2.5.2
./configure –prefix=/opt/gimp-2.5
make
sudo make install

If everything went well you should be able to start it by running:

/opt/gimp-2.5/bin/gimp-2.5

Converting encoding of a file

July 18, 2008

Conversion of file encoding can be done easily and in a scriptable fashion using iconv (man page):

iconv -f latin1 -t utf-8 rapport.tex.old >> rapport.tex

The example above converts the file rapport.tex.old from latin1 (ISO-8859-1) to UTF-8. The result is stored in rapport.tex leaving the old file untouched.