HOWTO: Build GIMP 2.8 in Dagda (5.0)

2 Antworten [Letzter Beitrag]
TralfamadorianOrator
Offline
Beigetreten: 11/12/2011

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.

  1. 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
    

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

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

  3. 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"
    

  4. Set up the build-environment variables.

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

  5. 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 ..
    

  6. 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 ..
    

  7. 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 ..
    

  8. 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 ..
    

  9. 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 ..
    

  10. 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 ..
    

  11. 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 ..
    

  12. 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 ..
    

  13. 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 ..
    

  14. 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
    

  15. 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@
    

  16. Build and install GIMP.

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

  17. 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;
    

TralfamadorianOrator
Offline
Beigetreten: 11/12/2011

I wish I could make some edits.

In step 15, where it says "With this edit", it should say "Without this edit". And there shouldn't be a "+" in front of Libs.

lembas
Offline
Beigetreten: 05/13/2010

Make a Wiki page next time.