Hi

This post is for people who
- Are excited about all the features on the new GIMP 2.8 and want to upgrade to it
- But want to stick to the Ubunutu Lucid 10.04.4 LTS as it's rock solid, unsoiled by Unity and supported for another year
- Don't want to go the whole hog and install/ upgrade GIMP and all the other dependencies, risking breaking their system
- Have limited experience with compiling apps, but know about installing stuff from the standard repositories and tinkering with the terminal

So a pretty small subset I guess! But anyway...

Firstly, most of the credit for this info goes to facebook.com/andrea.roscioli for his install script, which I found here. I've just tweaked it a bit and tried to make it easier for noobs like me.

So let's begin.

Prerequisites:

You need to install a few things, but these are all from the standard Lucid repositories so there is very little chance this will break anything. From the terminal do:

Code:
sudo apt-get build-dep gimp
sudo apt-get install git-core
sudo apt-get install libtool
There are a few optional bits that you could install from Synaptic Package Manager. You can leave these out if you wish but they provide a few necessary capabilities to GIMP:
  • libbz2-dev: Compression
  • libjasper-dev: JPEG 2000 format support
  • libgs-dev: Ghostscript, for PDF support
  • libcurl4-gnutls-dev, libgudev-1.0-dev: Damned if I know what they are for


Also, check if your system already has these as well from the standard Lucid reporsitories: pkg-config, intltool, fontconfig, libfreetype6

In addition I already have a bunch of things already installed which may not be installed on your system (can think of exiftool and the latest RawTherapee build for example) so you may have to come back and install a few more dependencies depending on what GIMP compilation reports (towards the end).


Preparation:

From now onwards you can perform the rest of the update without ever using sudo/ admin privileges, ensuring that the rest of the steps will not break any other existing applications.

- Create a folder structure to hold the GIMP 2.8 code and build in a folder on which you have free read, write, execute privileges. I've created the following under my home folder:

Code:
/home/user/Gimp
--> Gimp2.8
----> src
----> build
- I'll reference these in the rest of the notes, just change to suit your folder structure wherever appropriate.

- Download the following source files from the locations given. If you have an alternate trusted source please feel free to use that.



- Optionally, you can also download these, if you want support for SVG format files (I needed it so I did)



- Copy/ move all these files to the Gimp2.8 src directory (/home/user/Gimp/Gimp2.8/src for me)

- Open the src folder, select all the downloaded files, right click and select 'Extract Here' from the context menu. This will unzip all the files in the src folder creating new sub-folders for each package with the appropriate package name, for example "/home/user/Gimp/Gimp2.8/src/gimp-2.8.0/"


Compile and Install:

- Next we need to compile all the source files downloaded and extracted in the src subdirectory. All of these will be installed in the build subdirectory, leaving the rest of the system untouched

- Open a new terminal window and issue the following commands (replace the folder names with your folder structure created as above)

Code:
export PKG_CONFIG_PATH=/home/user/Gimp/Gimp2.8/build/lib/pkgconfig
export LD_LIBRARY_PATH=/home/user/Gimp/Gimp2.8/build/lib
- Note that these environment variables only hold for the given terminal session you've started, if you take a break, close it and start a new session you will need to issue these commands again.

- Navigate to you src directory, for me that's done using

Code:
cd /home/user/Gimp/Gimp2.8/src
- First we will compile the BABL package, located in the babl-0.1.10 subfolder under src. For this execute the following commands from the same terminal window, change the folder after "--prefix" as necessary.

Code:
cd babl-0.1.10
./autogen.sh --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3
- A few notes on the above
  • The second command (autogen.sh) may generate errors indicating that one or the other dependency/ package is missing. I think we've covered all the dependencies but if that happens, ask Google with the error message.
  • If the autogen.sh command completes without any errors, the remaining 2 should go thru fine as well. In the unlikely event that you face an error with make or make install, you will need to explore the interwebs a bit more.
  • The make and make install commands are followed by "-j3". The number 3 is the number of cores on your system (as reported by System Monitor) you want to use for compiling + 1. I have a Core2 Duo and don't want to browse/ play a video during this so have set it to 2+1=3. If you're unsure, leave the "-j3" bit out from the command.


- Assuming you completed the BABL install fine, you need to compile (from src folder) and install (in build folder) all the other downloaded packages, in the following order (from the same terminal window). Note that the second command for all of these (configure) is different from the one for BABL (autogen.sh) but it plays the same role so you can apply the notes above for the BABL install to all of these.

Code:
cd ../glib-2.31.18/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../gegl-0.2.0/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../atk-2.3.95/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../pango-1.29.5/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../gdk-pixbuf-2.24.1/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../pixman-0.24.4/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../cairo-1.10.2/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../gtk+-2.24.10/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3
- Optionally, for SVG support, you also need to do the following. Note that the configure command for librsvg is slightly different.

Code:
cd ../libcroco-0.6.5/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../gobject-introspection-1.31.22/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
make -j3
make install -j3

cd ../librsvg-2.36.1/
./configure --prefix=/home/user/Gimp/Gimp2.8/build --disable-introspection
make -j3
make install -j3
- Assuming all of this goes thru and you succesfully navigate any errors that come up, you are ready to compile and install GIMP 2.8! Issue the following commands (from the same terminal window) and be a little patient...

Code:
cd ../gimp-2.8.0/
./configure --prefix=/home/user/Gimp/Gimp2.8/build
- Once the configure command finishes (assuming all mandatory dependencies are met, if not search) it will produce a summary of all the Optional features/ plug-ins/ modules that are available (or not). Have a look see if anything you must have is missing, if so a search is in order!

- The main thing you should see missing is WebKit. GIMP 2.8 needs WebKit 1.6.1 or above, but Lucid 10.04.4 has 1.2.7. Installing the latest Webkit can break stuff and compiling it is another whole post by itself so I'll leave it as-is. I didn't bother as you only lose the online help integration from within GIMP 2.8. You can always access the online help from your browser anyway so it's not a big loss.

- Assuming you got all your must-have features/ modules/ plug-ins supported, you can then do the following and go grab a drink.

Code:
make -j3
make install -j3
- Assuming you see no errors, you're done!!!


Running GIMP 2.8

- Without closing the terminal used all this while, go to the bin folder under the build subdirectory. For me that's done by

Code:
cd /home/user/Gimp/Gimp2.8/build/bin
- And then run it by crossing your fingers and running the command

Code:
./gimp-2.8
- Run through a few basic open image, edit and save commands. Note the output in the terminal, it will help you solve any problems you come across. I didn't get any so far . And exit

- To make this a bit easier to run, I've created a small text file in my home directory "/home/user/" called gimp28.sh, which contains the following shell script. (Remember to run chmod +x gimp28.sh after creating it, so that it has execute capability)

Code:
#!/bin/sh
export LD_LIBRARY_PATH=/home/user/Gimp/Gimp2.8/build/lib:$LD_LIBRARY_PATH 
/home/user/Gimp/Gimp2.8/build/bin/gimp-2.8
exit 0
- Next I dragged the existing GIMP shortcut from the top left menu tree onto the desktop, right clicked on it and selected "Properties", where I changed the following and clicked 'OK'
  • The Name to "GIMP 2.8"
  • The Command to "/home/user/gimp28.sh"


- Now I just double click this shortcut to use GIMP 2.8!!