With help from some GIMP devs (Martin Nordholds and Mikael Magnusson), after several weeks of trial and error, I've finally gotten the hang of building GIMP 2.8 in Trisquel 5.0.


 Install the build dependencies.

sudo apt-get install fontconfig gtk-doc-tools intltool libcairo2 libdbus-glib-1-2 libexif-dev libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libgtk-3-0 libjasper-dev libjpeg62-dev liblcms1-dev liblcms-dev libmng-dev libopenexr-dev libpango1.0-0 libpng-dev libpoppler-dev librsvg2-common librsvg2-dev libtiff4-dev libtiff-tools libtool libwebkit-dev libwmf-dev pkg-config python-dev python-gtk2-dev ruby libgirepository1.0-dev gobject-introspection libpoppler-glib-dev libgfs-1-dev libcroco3-dev git


Set up the directory for GIMP to be installed in (in this example, I use /opt/gimp).

sudo mkdir -p /opt/gimp/share/aclocal


Create the file /opt/gimp/share/config.site with the following contents (for setting up build-environment variables).

export PATH="$PREFIX/bin:$PATH"
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal $ACLOCAL_FLAGS"
export XDG_DATA_DIRS="$PREFIX/share:$XDG_DATA_DIRS"


 Set up the build-environment variables.

export PREFIX=/opt/gimp
source /opt/gimp/share/config.site


Clone glib from git, checkout the glib-2-32 branch, build it, and install it.

git clone git://git.gnome.org/glib
cd glib
git checkout glib-2-32
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


Clone atk from git, leave it on the master branch (at the time that I write this, the master branch is version 2.5.4), build it, and install it.

git clone git://git.gnome.org/atk
cd atk
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


Clone pixbuf from git, checkout the gtk-pixbuf-2-24 branch, build it, and install it.

git clone git://git.gnome.org/gdk-pixbuf
cd gdk-pixbuf
git checkout gtk-pixbuf-2-24
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


 Clone pixman from git, checkout the 0.24 branch, build it, and install it.

git clone git://anongit.freedesktop.org/pixman
cd pixman
git checkout 0.24
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


 Clone cairo from git, checkout the 1.10 branch, build it, and install it.

git clone git://anongit.freedesktop.org/cairo
cd cairo
git checkout 1.10
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


 Clone pango from git, checkout the 1-29-4 branch, build it, and install it.

git clone git://git.gnome.org/pango
cd pango
git checkout pango-1-29-4
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


Clone babl from git, leave it on the master branch (0.1.11 at the time of this writing), build it, and install it.

git clone git://git.gnome.org/babl
cd babl
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


Clone gegl from git, leave it on the master branch (0.2.1 at the time of this writing), build it, and install it.

git clone git://git.gnome.org/gegl
cd gegl
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


 Clone gtk+ from git, checkout the gtk-2-24 branch, build it, and install it.

git clone git://git.gnome.org/gtk+
cd gtk+
git checkout gtk-2-24
./autogen.sh --prefix=$PREFIX
make
make install
cd ..


Clone gimp from git, leave it on the master branch (2.8.3 at the time of this writing).

git clone git://git.gnome.org/gimp
cd gimp


Edit the file gimp-2.0.pc. With this edit, many plug-ins (like Resynthesizer) did not work.

Change the line

Libs: -L${libdir} -lgimp-@GIMP_API_VERSION@ -lgimpmath-@GIMP_API_VERSION@ -lgimpconfig-@GIMP_API_VERSION@ -lgimpcolor-@GIMP_API_VERSION@ -lgimpbase-@GIMP_API_VERSION@ @RT_LIBS@

to

+Libs: -Wl,-rpath,${libdir} -L${libdir} -lgimp-@GIMP_API_VERSION@ -lgimpmath-@GIMP_API_VERSION@ -lgimpconfig-@GIMP_API_VERSION@ -lgimpcolor-@GIMP_API_VERSION@ -lgimpbase-@GIMP_API_VERSION@ @RT_LIBS@



 Build and install GIMP.

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



Optionally, for the GNOME menu, create a desktop file /usr/share/applications/gimp-2.8.desktop (or ~/.local/share/applications/gimp-2.8.desktop) with the following contents.

[Desktop Entry]
Version=1.0
Type=Application
Name=GNU Image Manipulation Program 2.8
GenericName=Image Editor
Comment=Create images and edit photographs
Exec=/opt/gimp/bin/gimp-2.8 %U
TryExec=/opt/gimp/bin/gimp-2.8
Icon=gimp
Terminal=false
Categories=Graphics;2DGraphics;RasterGraphics;GTK;
StartupNotify=true
MimeType=application/postscript;application/pdf;image/bmp;image/g3fax;image/gif;image/x-fits;image/pcx;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-sgi;image/x-tga;image/x-xbitmap;image/x-xwindowdump;image/x-xcf;image/x-compressed-xcf;image/tiff;image/jpeg;image/x-psp;image/png;image/x-icon;image/x-xpixmap;image/svg+xml;image/x-wmf;



Reply via email to