Tuesday, August 4, 2009

Compiling the GIMP from GIT

As the GIMP, as well as all gnome packages, have switched from SVN to GIT I've updated my compiling script to use the GIT sources.

You can download the script form here

Below is the listing of the script


#!/bin/bash

co_compile_install()
{
DIR=$1
PARAMS=$2
COMMAND=$3
echo "Installing $DIR"

# bash check if directory exists
if [ -d $DIR ]; then
echo "Directory exists - UPDATING"
cd $DIR
#svn update
git pull
else
echo "Directory does not exists - CHECKING OUT"
#svn checkout "http://svn.gnome.org/svn/$DIR/trunk" "$DIR"
git clone git://git.gnome.org/$DIR
cd $DIR
fi

if [ -n $COMMAND ]
then
eval $COMMAND
fi

./autogen.sh
pwd
./configure --prefix=/opt/gimp-svn $PARAMS && make && make install
cd ..
}

# GLIB
co_compile_install "glib"

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

# GTK
co_compile_install "gtk+" "--with-xinput=yes --disable-gtk-doc" "sed -r 's#(automake|aclocal)-1.7#\1#g' -i autogen.sh"
#co_compile_install "gtk+" "--with-xinput=yes --disable-gtk-doc"
# BABL
co_compile_install "babl"
# GEGL
co_compile_install "gegl" "" "sed -r 's:#include :#include :g' -i operations/external/ff-load.c"

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

# GIMP
co_compile_install "gimp" "--enable-gimp-remote --prefix=/opt/gimp-svn/ --with-gimpdir=.gimp-svn"

1 comment:

theartweneed said...
This comment has been removed by the author.