GIMP has a fair number of dependencies, which can seem intimidating the first time you try to build it. Although configure is usually clear about what's missing, that's not always helpful in figuring out what package you need to add on a particular distro. The git instructions might also be helpful to anyone who hasn't used git very much yet.
If you want to build the latest GIMP but also keep another version, like the one from your distro, it's very important to include the --prefix argument when running autogen.sh or configure. Otherwise GIMP will end up installed to /usr/local/bin and all of your GIMP versions may get confused about which set of libraries applies to which binary. You may also want a wrapper script (see below) to set up the library paths appropriately.
Install the GIMP build dependencies:
sudo apt-get build-dep gimp libtool ruby(note: ruby is needed for the gegl build).
Install GIT. You might think the package named "git" would be the right one, but don't bother with it -- on Ubuntu it just installs some documentation, not the actual git program. I installed "git-doc" and "git-email" too, though they're probably not needed.
sudo apt-get install git-core git-doc git-email
Configure git (this comes from GitDevelopers on Gnome Live):
git config --global user.name "Your Name" git config --global user.email you@host
You'll need babl and gegl as well as gimp -- the ones in Jaunty aren't new enough. The [user@] applies if you have a Gnome developer account, otherwise leave it out.
git clone ssh://[user@]git.gnome.org/git/gimp git clone ssh://[user@]git.gnome.org/git/babl git clone ssh://[user@]git.gnome.org/git/gegl
Set up your PKG_CONFIG_PATH, otherwise gegl won't be able to find babl and gimp won't find either one of them. There seems to be no way to do this in the autogen line -- you have to set an envirnoment variable. Most GIMP developers apparently write a script that they run before they build gimp to set this variable.
csh: setenv PKG_CONFIG_PATH /usr/local/gimp-git/lib/pkgconfig
or
sh/bash: export PKG_CONFIG_PATH=/usr/local/gimp-git/lib/pkgconfig
Now build everything:
cd babl ./autogen.sh --prefix=/usr/local/gimp-git make sudo make install cd ../gegl ./autogen.sh --prefix=/usr/local/gimp-git make sudo make install cd gimp ./autogen.sh --prefix=/usr/local/gimp-git --disable-gtk-doc(review all the "no" answers and decide if you need to install anything else and re-run autogen. Installing libwebkit-dev won't help you get gimp-help, though; it wants a much newer version than what Jaunty has.)
make sudo make install
Done! Your new gimp should be in /usr/local/gimp-git/bin/gimp.
One more thing: if you have a distro-installed GIMP too, you may
find it helps to have a wrapper script that ensures you're using
the right libraries. Otherwise, GIMP and any plug-ins it runs
can get confused and exhibit weird behavior.
Here's the script I use, which I install in ~/bin/gimp-git,
and then I make a link to it named gimptool-git.
I'm sure this could be improved, but it seems to work.
If you're building an old tarball on an older Linux distro,
I have an archive of older gimp
building instructions.
Wrapper script
#!/bin/sh
progname=$(basename $0)
if [ $progname = 'gimptool-git' ]; then
progname=gimptool-2.0
fi
GIMPLOC=/usr/local/gimp-git
export PATH=$GIMPLOC/bin:$PATH
export LD_LIBRARY_PATH=$GIMPLOC/lib
$GIMPLOC/bin/$progname $*
Older distros and GIMP versions
My book: Beginning GIMP, from Novice
to Professional
Linux Imaging
General Linux links
Shallow Sky home
...Akkana