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 photo)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages xorg)
41 #:use-module (gnu packages imagemagick))
49 (uri (list (string-append "http://ftp.gtk.org/pub/babl/0.1/babl-"
51 (string-append "ftp://ftp.gtk.org/pub/babl/0.1/babl-"
55 "1x2mb7zfbvk9d0a7h5cpdff9hhjsadxvqml2jay2bpf7x9nc6gwl"))))
56 (build-system gnu-build-system)
57 (home-page "http://gegl.org/babl/")
58 (synopsis "Image pixel format conversion library")
60 "Babl is a dynamic, any to any, pixel format translation library.
61 It allows converting between different methods of storing pixels known as
62 pixel formats that have with different bitdepths and other data
63 representations, color models and component permutations.
65 A vocabulary to formulate new pixel formats from existing primitives is
66 provided as well as the framework to add new color models and data types.")
67 (license license:lgpl3+)))
75 (uri (list (string-append "http://download.gimp.org/pub/gegl/"
76 (string-take version 3)
77 "/" name "-" version ".tar.bz2")))
80 "09nlv06li9nrn74ifpm7223mxpg0s7cii702z72cpbwrjh6nlbnz"))
81 (patches (search-patches "gegl-CVE-2012-4433.patch"))))
82 (build-system gnu-build-system)
84 `(;; More than just the one test disabled below now fails; disable them
85 ;; all according to the rationale given below.
91 ;; This test program seems to crash on exit. Specifically, whilst
92 ;; g_object_unreffing bufferA and bufferB - This seems to be a bug
93 ;; in the destructor. This is just a test program so will not have
94 ;; any wider effect, although might be hiding another problem.
95 ;; According to advice received on irc.gimp.org#gegl although 0.2.0
96 ;; is the latest released version, any bug reports against it will
97 ;; be ignored. So we are on our own.
98 (substitute* "tools/img_cmp.c"
99 (("g_object_unref \\(buffer.\\);") ""))
101 (substitute* "tests/compositions/Makefile"
102 (("/bin/sh") (which "bash"))))
110 ("libjpeg" ,libjpeg-8)))
112 `(("pkg-config" ,pkg-config)
113 ("glib" ,glib "bin") ; for gtester
114 ("intltool" ,intltool)))
115 (home-page "http://gegl.org")
116 (synopsis "Graph based image processing framework")
117 (description "GEGL (Generic Graphics Library) provides infrastructure to
118 do demand based cached non destructive image editing on larger than RAM
120 ;; The library itself is licensed under LGPL while the sample commandline
121 ;; application and GUI binary gegl is licensed under GPL.
122 (license (list license:lgpl3+ license:gpl3+))))
130 (uri (string-append "http://download.gimp.org/pub/gimp/v"
131 (version-major+minor version)
132 "/gimp-" version ".tar.bz2"))
133 (patches (search-patches "gimp-CVE-2016-4994.patch"))
136 "1dsgazia9hmab8cw3iis7s69dvqyfj5wga7ds7w2q5mms1xqbqwm"))))
137 (build-system gnu-build-system)
139 "doc")) ;8 MiB of gtk-doc HTML
141 '(#:configure-flags (list (string-append "--with-html-dir="
142 (assoc-ref %outputs "doc")
143 "/share/gtk-doc/html"))))
148 ("libjpeg" ,libjpeg-8)
151 ("exif" ,libexif) ;optional, EXIF + XMP support
152 ("lcms" ,lcms) ;optional, color management
153 ("librsvg" ,librsvg) ;optional, SVG support
154 ("python" ,python-2) ;optional, Python support
155 ("python2-pygtk" ,python2-pygtk) ;optional, Python support
158 `(("pkg-config" ,pkg-config)
159 ("intltool" ,intltool)))
160 (home-page "http://gimp.org")
161 (synopsis "GNU Image Manipulation Program")
163 "GIMP is an application for image manipulation tasks such as photo
164 retouching, composition and authoring. It supports all common image formats
165 as well as specialized ones. It features a highly customizable interface
166 that is extensible via a plugin system.")
167 (license license:gpl3+))) ; some files are lgplv3
169 (define-public gimp-fourier
171 (name "gimp-fourier")
175 (uri (string-append "http://registry.gimp.org/files/fourier-"
179 "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184"))))
180 (build-system gnu-build-system)
182 `(#:tests? #f ;no tests
184 (modify-phases %standard-phases
186 (add-after 'unpack 'set-prefix
187 (lambda* (#:key outputs #:allow-other-keys)
188 ;; gimptool-2.0 does not allow us to install to any target
190 (let ((target (string-append (assoc-ref outputs "out")
192 (car (string-split ,(package-version gimp) #\.))
194 (substitute* "Makefile"
195 (("\\$\\(PLUGIN_INSTALL\\) fourier")
196 (string-append "cp fourier " target)))
202 ;; needed by gimp-2.0.pc
203 ("gdk-pixbuf" ,gdk-pixbuf)
206 ;; needed by gimpui-2.0.pc
209 `(("pkg-config" ,pkg-config)))
210 (home-page "http://registry.gimp.org/node/19596")
211 (synopsis "GIMP plug-in to edit image in fourier space")
213 "This package provides a simple plug-in to apply the fourier transform on
214 an image, allowing you to work with the transformed image inside GIMP. You
215 can draw or apply filters in fourier space and get the modified image with an
216 inverse fourier transform.")
217 (license license:gpl3+)))