Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/users/beng/gremblesbeans/content-single.php on line 8

GIMP 2.9.x On Debian Stretch/Sid

A new page is ready for compiling on Buster/Sid.

Update 6th September 2017 – IT WORKS AGAIN!! Couple of fixes and now works for Stretch and Buster/Sid too. This page will no longer be updated, I’ll carry on with a Buster/Sid Page soon.

Update 5th September 2017 – IT DOESN’T WORK!!  Help!  A few upstream changes and the method below doesn’t work now. I need to update it, but haven’t done so yet. 2.9.6 has now been released and I’d really like to compile it. Any help greatly appreciated.

Update 7th July 2016 – some libraries have changed name now and libmypaint doesn’t use SCONS to build.

I compiled GIMP for my Debian Stretch/Sid. When I originally did this – for Debian Jessie, I used an openly licensed document, therefore this document may be distributed by the same license as the original CC Attribution-Share Alike 3.0 Unported.

At time of writing 2.9.x is actually GIMP 2.9.5. Now with MyPaint brushes, as demonstrated by the inept scribblings below (first ever time using them, and I didn’t use my Wacom Tablet {excuses}).

gimp 2.9.3

What to do under DEBIAN

Open a terminal window and copy line for line int the window. Press RETURN and watch. The block with all the packages are one line, the “\” tells the system to ignore the line break, so you can copy and paste it in one chunk into your terminal.

Prepare the environment

cd
 export PREFIX=`echo ~/gimp`
 export PATH=$PREFIX/bin:$PATH
 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

Install needed packages

Become superuser, update your system, install, go back to normal user.

su -

 apt-get update
 apt-get upgrade
 apt-get install libtool automake autoconf git-core gettext \
 libglib2.0-0 libglib2.0-dev libgtk2.0-0 libgtk2.0-dev ruby \
 intltool libtiff5 libtiff5-dev python-dev python-gtk2-dev \
 libexif-dev libmng-dev liblcms2-dev libxpm-dev librsvg2-dev \
 libwmf-dev libasound2-dev valac xsltproc openexr libexif-dev \
 libexif12 libgexiv2-dev libbz2-dev gtk-doc-tools \
 libjson-glib-dev libjson-c-dev build-essential

 exit

There are also some optional packages to help with dependencies:

su -

 apt-get install libaa1-dev libwebkitgtk-dev \
 libjavascriptcoregtk-1.0-dev libopenexr-dev \
 libgs-dev libpoppler-glib-dev \
 python-cairo-dev 

 exit

Don’t worry about these for a basic compile though. This should be the last time you need to become root to complete the process. You may also install one more library if you wish libjasper-dev, but you’ll have to get it from Debian Sid. See  https://packages.debian.org/sid/libjasper-dev.

Get the source

It’s now necessary to fix libmypaint at version 1.3.0

mkdir gimp-build
 cd gimp-build
 git clone git://git.gnome.org/babl
 git clone git://git.gnome.org/gegl
 git clone https://github.com/mypaint/libmypaint
 cd libmypaint
 git checkout v1.3.0
 cd ../
 git clone git://git.gnome.org/gimp

Generate the make files, compile and install

In the autogen lines a lot of checks are done – watch for warnings and error messages!

cd babl
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gegl
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../libmypaint
 ./autogen.sh --prefix=$PREFIX
 ./configure --prefix=$PREFIX --enable-gegl
 make
 make install

cd ../gimp
 ./autogen.sh --prefix=$PREFIX --disable-gtk-doc
 make
 make install

This gets you gimp-2.9 in the directory ~/gimp/bin . If you have error try to add any missing package and try again. Post a comment on this post if you like.

Keeping GIMP up to date

Don’t delete the source directory. Backup your directory with the working GIMP 2.9. The update can break everything in there…..

You can update easily with:

cd
 export PREFIX=`echo ~/gimp`
 export PATH=$PREFIX/bin:$PATH
 export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig

cd gimp-build

cd babl
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../gegl
 git clean -f
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

cd ../libmypaint
 git clean -f
 git pull --rebase https://github.com/mypaint/libmypaint v1.3.0
 ./autogen.sh --prefix=$PREFIX
 ./configure --prefix=$PREFIX --enable-gegl
 make
 make install

cd ../gimp 
 git clean -f 
 git pull --rebase
 ./autogen.sh --prefix=$PREFIX
 make
 make install

This is fast, because only new and changed stuff is pulled from the servers and compiled.

So that’s it! Enjoy the full range of bit depths and MyPaint brushes, and all the other new work in progress features of the new GIMP.

 

4 thoughts on “GIMP 2.9.x On Debian Stretch/Sid

Leave a Reply

Your email address will not be published. Required fields are marked *