Skip to main content

Compiling Gimp from Git master on Debian

I recently helped someone compile Gimp (and dependencies Gegl and Babl) from Git master on Debian for development purposes. If getting Gimp compiled is all that keeps you from hacking on Gimp, this might be for you:

#! /usr/bin/env bash
# Copyright (C) 2013 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license

set -x  # Print commands on the go
set -e  # Stop at first non-zero return code

sudo apt-get build-dep gimp
sudo apt-get remove libbabl-dev libgegl-dev

MAKEOPTS="-j$((1 + $(grep '^processor' /proc/cpuinfo | wc -l)))"

mkdir gimp-dev
pushd gimp-dev  # Improved "cd", Bash built-in

    PREFIX="${PWD}"/install/usr

    # Make future calls to pkg-config by configure
    # find Babl and Gegl
    export PKG_CONFIG_PATH="${PREFIX}"/lib/pkgconfig

    git clone git://git.gnome.org/babl
    pushd babl
        ./autogen.sh || [ -x configure ]
        ./configure --prefix="${PREFIX}"
        make ${MAKEOPTS}
        make install
    popd

    git clone git://git.gnome.org/gegl
    pushd gegl
        ./autogen.sh || [ -x configure ]
        ./configure --prefix="${PREFIX}"
        make ${MAKEOPTS}
        make install
    popd

    git clone git://git.gnome.org/gimp
    pushd gimp
        ./autogen.sh || [ -x configure ]
        ./configure --prefix="${PREFIX}"
        make ${MAKEOPTS} V=1
        make install
    popd

    ./install/usr/bin/gimp-2.9