CVS GIMP

This document is all about getting CVS GIMP up and running alongside an older version of GIMP and GTK.

It's preferable to start at the beginning. If you're halfway through doing the process on your own and you're looking for help, you may want to drop what you did and start fresh. It goes fairly quickly if everything is coordinated right.

With that in mind, let's get going!

Before you begin, you should have the following packages already installed on your system:

If you have these all installed, let's get started.

Setting up directories

The first thing to do is to choose where your CVS version of GIMP will live. This is an important step; all of the commands that follow depend on it.

I found it best to make a directory structure away from all the standard libraries, binaries, and header files. I decided to name the directory /unstable. If you're not root, you can choose somewhere else that you have write access to.

For the sake of example, I'll refer to /unstable. If you use a different directory, substitute it in this first line here. From then on, you can essentially cut and paste each command in turn, and they should all work without difficulty.

$ export PREFIX=/unstable
$ mkdir $PREFIX

Setting up aclocal

This part of the documentation is dark voodoo. I don't know why exactly it's necessary. However, it seems to work well, so unless you have a strong grasp on automake, autoconf, and aclocal, following the commands to the letter is probably your best bet.

$ mkdir -p $PREFIX/share/aclocal
$ cp /usr/share/aclocal/* /usr/local/share/aclocal/* $PREFIX/share/aclocal
$ rm -f $PREFIX/share/aclocal/glib.m4 $PREFIX/share/aclocal/gtk.m4

Getting the source

The source is available through CVS. When downloading, I chose to stick it in the $PREFIX/src directory. Here's what I did:

$ mkdir $PREFIX/src && cd $PREFIX/src
$ export CVSROOT=':pserver:anonymous@anoncvs.gnome.org:/cvs/gnome'
$ cvs login
(Logging in to anonymous@anoncvs.gnome.org)
CVS password: hit Enter
$ cvs -z3 get glib
lots of output...
.
.
.
$ cvs -z3 get gtk+
lots of output...
.
.
.
$ cvs -z3 get gimp
lots of output...
.
.
.

This step should be pretty foolproof. If you have trouble getting the files from CVS, just try again. It's spread across several servers, so if one fails, the next might work fine.

glib

Everything depends on glib, so that's what we'll build and install first. It's fairly straightforward:

$ cd $PREFIX/src/glib
$ ./autogen.sh --prefix=$PREFIX
lots of autogen.sh and configure output...
.
.
.
$ make
lots of compiling output...
.
.
.
$ make install
lots of installation output...
.
.
.

gtk+

The next thing to build and install is gtk+. This is also pretty straightforward:

$ cd $PREFIX/src/gtk+
$ ACLOCAL_FLAGS="--acdir=$PREFIX/share/aclocal" \
  GLIB_CONFIG="$PREFIX/bin/glib-config" \
  LD_LIBRARY_PATH="$PREFIX/lib" \
  ./autogen.sh --prefix=$PREFIX
lots of autogen.sh and configure output...
.
.
.
$ make
lots of compiling output...
.
.
.
$ make install
lots of installation output...
.
.
.

gimp

Finally, when glib and gtk+ are installed, you can build and install GIMP.

$ cd $PREFIX/src/gimp
$ ACLOCAL_FLAGS="--acdir=$PREFIX/share/aclocal" \
  GLIB_CONFIG="$PREFIX/bin/glib-config" \
  GTK_CONFIG="$PREFIX/bin/gtk-config" \
  LD_LIBRARY_PATH="$PREFIX/lib" \
  ./autogen.sh --prefix=$PREFIX
$ LD_LIBRARY_PATH="$PREFIX/lib" make
...
$ make -k install
...

If this goes successfully, you should be able to run GIMP now. The binary will be installed in $PREFIX/bin/gimp, and before you run it, you have to make sure you set LD_LIBRARY_PATH to $PREFIX/lib.

I created a little shell script to do it, and put the shell script in my path:

   #!/bin/sh
   
   PREFIX=/unstable
   LD_LIBRARY_PATH=$PREFIX/lib
   exec $PREFIX/bin/gimp "$@"

I named the script gimp-1.1. You can name it whatever you like. When you run it, it will load up your brand spanking new copy of development GIMP.

Happy GIMPing!

Zach (xach@xach.com)


28 Feb 1999