1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages gimp)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix utils)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix build-system glib-or-gtk)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages algebra)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages gnome)
34 #:use-module (gnu packages image)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages xml)
38 #:use-module (gnu packages pdf)
39 #:use-module (gnu packages photo)
40 #:use-module (gnu packages python)
41 #:use-module (gnu packages xorg))
49 (uri (list (string-append "https://download.gimp.org/pub/babl/"
50 "0.1/babl-" version ".tar.bz2")
51 (string-append "http://ftp.gtk.org/pub/babl/0.1/babl-"
53 (string-append "ftp://ftp.gtk.org/pub/babl/0.1/babl-"
57 "1ygvnq22pf0zvf3bj7h67vvbpz7b8hhjvrr79ribws7sr5dljfj8"))))
58 (build-system gnu-build-system)
59 (home-page "http://gegl.org/babl/")
60 (synopsis "Image pixel format conversion library")
62 "Babl is a dynamic, any to any, pixel format translation library.
63 It allows converting between different methods of storing pixels known as
64 pixel formats that have with different bitdepths and other data
65 representations, color models and component permutations.
67 A vocabulary to formulate new pixel formats from existing primitives is
68 provided as well as the framework to add new color models and data types.")
69 (license license:lgpl3+)))
77 (uri (list (string-append "http://download.gimp.org/pub/gegl/"
78 (string-take version 3)
79 "/" name "-" version ".tar.bz2")))
82 "09nlv06li9nrn74ifpm7223mxpg0s7cii702z72cpbwrjh6nlbnz"))
83 (patches (search-patches "gegl-CVE-2012-4433.patch"))))
84 (build-system gnu-build-system)
86 `(;; More than just the one test disabled below now fails; disable them
87 ;; all according to the rationale given below.
93 ;; This test program seems to crash on exit. Specifically, whilst
94 ;; g_object_unreffing bufferA and bufferB - This seems to be a bug
95 ;; in the destructor. This is just a test program so will not have
96 ;; any wider effect, although might be hiding another problem.
97 ;; According to advice received on irc.gimp.org#gegl although 0.2.0
98 ;; is the latest released version, any bug reports against it will
99 ;; be ignored. So we are on our own.
100 (substitute* "tools/img_cmp.c"
101 (("g_object_unref \\(buffer.\\);") ""))
103 (substitute* "tests/compositions/Makefile"
104 (("/bin/sh") (which "sh"))))
112 ("libjpeg" ,libjpeg-8)))
114 `(("pkg-config" ,pkg-config)
115 ("glib" ,glib "bin") ; for gtester
116 ("intltool" ,intltool)))
117 (home-page "http://gegl.org")
118 (synopsis "Graph based image processing framework")
119 (description "GEGL (Generic Graphics Library) provides infrastructure to
120 do demand based cached non destructive image editing on larger than RAM
122 ;; The library itself is licensed under LGPL while the sample commandline
123 ;; application and GUI binary gegl is licensed under GPL.
124 (license (list license:lgpl3+ license:gpl3+))))
132 (uri (string-append "http://download.gimp.org/pub/gimp/v"
133 (version-major+minor version)
134 "/gimp-" version ".tar.bz2"))
137 "0halh6sl3d2j9gahyabj6h6r3yyldcy7sfb4qrfazpkqqr3j5p9r"))))
138 (build-system gnu-build-system)
140 "doc")) ;8 MiB of gtk-doc HTML
142 '(#:configure-flags (list (string-append "--with-html-dir="
143 (assoc-ref %outputs "doc")
144 "/share/gtk-doc/html"))
146 (modify-phases %standard-phases
147 (add-after 'install 'install-sitecustomize.py
148 ;; Install 'sitecustomize.py' into gimp's python directory to
149 ;; add pygobject and pygtk to pygimp's search path.
150 (lambda* (#:key outputs #:allow-other-keys)
151 (let* ((pythonpath (getenv "PYTHONPATH"))
152 (out (assoc-ref outputs "out"))
155 out "/lib/gimp/2.0/python/sitecustomize.py")))
156 (call-with-output-file sitecustomize.py
158 (format port "import site~%")
159 (format port "for dir in '~a'.split(':'):~%" pythonpath)
160 (format port " site.addsitedir(dir)~%")))))))))
165 ("libjpeg" ,libjpeg-8)
168 ("exif" ,libexif) ;optional, EXIF + XMP support
169 ("lcms" ,lcms) ;optional, color management
170 ("librsvg" ,librsvg) ;optional, SVG support
171 ("poppler", poppler) ; optional, PDF support
172 ("python" ,python-2) ;optional, Python support
173 ("python2-pygtk" ,python2-pygtk) ;optional, Python support
176 `(("pkg-config" ,pkg-config)
177 ("intltool" ,intltool)))
178 (home-page "http://gimp.org")
179 (synopsis "GNU Image Manipulation Program")
181 "GIMP is an application for image manipulation tasks such as photo
182 retouching, composition and authoring. It supports all common image formats
183 as well as specialized ones. It features a highly customizable interface
184 that is extensible via a plugin system.")
185 (license license:gpl3+))) ; some files are lgplv3
187 (define-public gimp-fourier
189 (name "gimp-fourier")
193 (uri (string-append "http://registry.gimp.org/files/fourier-"
197 "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184"))))
198 (build-system gnu-build-system)
200 `(#:tests? #f ;no tests
202 (modify-phases %standard-phases
204 (add-after 'unpack 'set-prefix
205 (lambda* (#:key outputs #:allow-other-keys)
206 ;; gimptool-2.0 does not allow us to install to any target
208 (let ((target (string-append (assoc-ref outputs "out")
210 (car (string-split ,(package-version gimp) #\.))
212 (substitute* "Makefile"
213 (("\\$\\(PLUGIN_INSTALL\\) fourier")
214 (string-append "cp fourier " target)))
220 ;; needed by gimp-2.0.pc
221 ("gdk-pixbuf" ,gdk-pixbuf)
224 ;; needed by gimpui-2.0.pc
227 `(("pkg-config" ,pkg-config)))
228 (home-page "http://registry.gimp.org/node/19596")
229 (synopsis "GIMP plug-in to edit image in fourier space")
231 "This package provides a simple plug-in to apply the fourier transform on
232 an image, allowing you to work with the transformed image inside GIMP. You
233 can draw or apply filters in fourier space and get the modified image with an
234 inverse fourier transform.")
235 (license license:gpl3+)))