Categories
Linux

gimpsvn.sh — Install or update to GIMP 2.5 from SVN on Ubuntu 8.04

I’ve been wanting to try out GIMP 2.5 for quite some time now, and plenty of other folks are certainly looking forward to the new interface, among other things. In my somewhat limited observations of the GIMP development team, I’ve found that the volunteers who manage the project are what some would call “anal retentive.” […]

I’ve been wanting to try out GIMP 2.5 for quite some time now, and plenty of other folks are certainly looking forward to the new interface, among other things. In my somewhat limited observations of the GIMP development team, I’ve found that the volunteers who manage the project are what some would call “anal retentive.”

Put the shoe on the other food, and I might be totally off the mark here, but this is the common thread I see:
There are not enough people working on the GIMP. It must not be very sexy to toil away at code forging for the GIMP project, meanwhile Compiz-Fusion, WINE, Ubuntu developers are in the limelight every day with new features and lots of community interaction.

GIMP on the other hand, with limited resources hears the crowd of folks basically asking for a free $600 Photoshop clone. That’s not what the GIMP wants or needs. If you want Photoshop, go buy the damn thing!

One guy even went so far as to fork GIMP by creating GIMPshop which added the main window workspace design that Photoshop uses. People liked it, I used it for awhile myself. Having such a huge carrot hanging in front of their heads is no easy task. And if one of these developers went postal one of these end users asked the same fsckin question the last guy did, I wouldn’t be very surprised.

That said, it looks like fantastic progress is being made on GIMP 2.5, and the interface is fantastic to be putting it mildly. OHHHH it’s so good. Adobe was right, this is the way to do things, much more intuitive as well. Too bad it’s taken over a decade of development to realize this fact.

So what I did was write a bash script to update or install GIMP from SVN, and compile it so that your original 2.4 installed will NOT be touched and can be launched normally using the command “gimp” or “gimp-2.4”

That said, I’ve tested this on two machines. My nearly new install of 8.04 with few extra programs installed. I started the project manually, but then found quite a bit more to just get it all working at once. Trust me folks… if you install 2.5 and you aren’t satisfied, I’ll give you double your money back. That’s a promise.

The only thing I’ve noticed so far is some “weirdness” occurring when trying to run both versions at the same time.

Updates, patches, suggestions to this script are more than welcome. I’ll say that my code not formally licensed, but don’t claim you wrote this or strip the authors section out of the header. I inevitably find you and DMCA you to hell and back if you do, just like those silly CoreAVC guys. PR Stunt for the win!

#!/bin/bash
# gimpsvn.sh — Installs or updates The GIMP from SVN
# Usage: gimpsvn.sh [install | update]
#
# Original instructions by http://www.myscienceisbetter.info/
# Updated instructions by Thai at http://dt.in.th/
# Script by Wayne Richardson at http://fsckin.com/
#
# Takes about 20 minutes on an Intel Core2Quad Q6600 on a fresh install.
# Be patient!
# This uses Wajig, which can easily install reccomended/suggested packages.
# http://en.wikipedia.org/wiki/Wajig
#
# Most recent version is at:
# http://www.fsckin.com/2008/05/07/gimpsvnsh-installs-or-updates-gimp-25-from-svn
#
# Variable(s):
#   makeops -- the number of cores your system has, generally -j(cores+1)
makeops='-j5'

if [ $# -ne 1 ]
then
echo “Specify an command line option: install or update.”
exit 1
fi

if [ "$1" = "install" ]
then
echo Installing Gimp from SVN in 5 seconds, CTRL+C to abort.
sleep 5
sudo mkdir /opt/gimpsvn
sudo mkdir /opt/gimpsvn/lib
sudo mkdir /opt/gimpsvn/lib/pkgconfig
#sudo apt-get update
sudo apt-get install wajig -y
sudo apt-get build-dep gimp -y
sudo wajig installrs gimp -y
sudo apt-get install libavcodec-dev libavcodec1d libavformat1d -y
sudo apt-get install libavformat-dev graphviz graphviz-cairo graphviz-dev -y
sudo apt-get install libfaad-dev libfaac-dev ruby-gnome2 gtk-doc-tools -y
sudo apt-get install subversion automake1.9 asciidoc flex checkinstall -y
export LD_LIBRARY_PATH=/opt/gimpsvn/lib
export PKG_CONFIG_PATH=/opt/gimpsvn/lib/pkgconfig
for i in babl gegl gimp; do svn co http://svn.gnome.org/svn/$i/trunk/ \
$i; cd $i; ./autogen.sh --prefix=/opt/gimpsvn && make $makeops && sudo \
checkinstall; cd ..; done
echo “”
echo “Completed install from SVN into the following location:”
echo “/opt/gimpsvn/bin/gimp-2.5″
exit 1
fi

if [ "$1" = "update" ]
then
echo Updating Gimp from SVN in 5 seconds, CTRL+C to abort.
sleep 5
export LD_LIBRARY_PATH=/opt/gimpsvn/lib
export PKG_CONFIG_PATH=/opt/gimpsvn/lib/pkgconfig
svn co http://svn.gnome.org/svn/gimp/trunk/ gimp
for i in babl gegl gimp; do svn co http://svn.gnome.org/svn/$i/trunk/ \
$i; cd $i; make $makeops && sudo checkinstall; cd ..; done
echo “”
echo “Completed update from SVN into the following location:”
echo “/opt/gimpsvn/bin/gimp-2.5″
exit 1
fi

echo “Specify an command line option: install or update.”
exit 1

16 replies on “gimpsvn.sh — Install or update to GIMP 2.5 from SVN on Ubuntu 8.04”

You can speed up the compilation (dramatically) by using the jobs argument on make. Ideally you want to be running n+1 jobs where n is the number of processors (or “cores”) you have available.

In your case, on a quad-core, make -j5 will compile significantly faster.

I’d also definitely recommend using `checkinstall` rather than `make install`. Just makes getting rid of things a damned sight easier.

Looks good though! I’ll be testing this later.

I’d recommend adding “flex” to the list of dependencies that are installed by your script. I had a build error because flex wasn’t in my PATH.
Also – during the “configure” stage, BABL wasn’t found and babl >= 0.0.20 is required.

Oli, Tim: Thanks for your suggestions, much appreciated!

Oli: added “makeops” variable as well as the checkinstall method, but it needs some work – manual adding of the version/name/etc is needed for it to function properly and create .deb files. Perhaps unrolling the compile loop into separate lines will be needed, so that options can be passed to checkinstall to run automatically.

Tim: I’m not quite sure why BABL and flex were not found. Worked fine for me without flex, perhaps you can add some additional information? Are you running 8.04?

Also, WordPress is being minorly annoying. I can’t figure out for the life of me how to get it to actually render two consecutive dashes (- -) instead of an mdash.

So for certain lines you’ll need to change it manually to two dashes instead of a double dash:
./autogen.sh –prefix=/opt/gimpsvn

I’ve had this problem before and still can’t get it working right. Arrg. 🙂

Yeah, I’m running Ubuntu 8.04 amd64. It’s a semi-new installation (not upgrade from Gutsy) but I pretty frequently mess around on this box (un)installing software to try it out so flex may have been deleted as a tracked dependency or some such.

i also had problems …

./gimpsvn.sh: line 45: babl: command not found
./gimpsvn.sh: line 45: cd: babl: No such file or directory
./gimpsvn.sh: line 45: ./autogen.sh: No such file or directory

make: *** No rule to make target `install’. Stop.

Checked out revision 2280.
./gimpsvn.sh: line 45: gegl: command not found
./gimpsvn.sh: line 45: cd: gegl: No such file or directory
./gimpsvn.sh: line 45: ./autogen.sh: No such file or directory

then it loads up gimp2.4

mine was fresh install of hardy beta … fully up to date

Not working for me either, same issues as bruce (with the new script) the version that was on here originally seems to be working right (8.04 64bit with -proposed updates turned on)

I was just told yesterday that it should be n+2 jobs. Does anyone have numbers anywhere on which is better? 🙁

Hi,

Thanks for the script, but stumbled accross a problem, which it seems bruce and aaron are having.

The lines starting with
for i in babl
$i; cd $i;
checkinstall;

Should all be on the same line, seems wordpress has wrapped them so that they appear on one line, joining them and it works great.

I get the following error:

http://pastebin.com/m1dd02f8e

then the script continues on with the following:

http://pastebin.com/d6d263b0b

At which point I kill it (there is no sense as the gimp ./configure obviously failed).

What should I do now? I’ve modified the script to be the following (accounting for dependencies that cropped up while running it a few times and going for aptitude where possible):

http://pastebin.com/d653f3a30

Any ideas?

I am not sure the place you are getting your info, however good topic. I needs to spend a while finding out much more or understanding more. Thank you for excellent info I was searching for this info for my mission.

Leave a Reply

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