gnu: byobu: Update to 5.127.
[jackhill/guix/guix.git] / gnu / packages / gimp.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
4 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
5 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages gimp)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix git-download)
27 #:use-module (guix utils)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system glib-or-gtk)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages algebra)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages image)
39 #:use-module (gnu packages ghostscript)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages xml)
42 #:use-module (gnu packages pdf)
43 #:use-module (gnu packages photo)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages web)
46 #:use-module (gnu packages xorg))
47
48 (define-public babl
49 (package
50 (name "babl")
51 (version "0.1.56")
52 (source (origin
53 (method url-fetch)
54 (uri (list (string-append "https://download.gimp.org/pub/babl/"
55 (version-major+minor version)
56 "/babl-" version ".tar.bz2")
57 (string-append "https://ftp.gtk.org/pub/babl/"
58 (version-major+minor version)
59 "/babl-" version ".tar.bz2")
60 (string-append "ftp://ftp.gtk.org/pub/babl/"
61 (version-major+minor version)
62 "/babl-" version ".tar.bz2")))
63 (sha256
64 (base32
65 "0a2dvihah1j7qi5dp1qzzlwklcqnndmxsm7lc7i78g7c2yknrlla"))))
66 (build-system gnu-build-system)
67 (home-page "http://gegl.org/babl/")
68 (synopsis "Image pixel format conversion library")
69 (description
70 "Babl is a dynamic, any-to-any pixel format translation library.
71 It allows converting between different methods of storing pixels, known as
72 @dfn{pixel formats}, that have different bit depths and other data
73 representations, color models, and component permutations.
74
75 A vocabulary to formulate new pixel formats from existing primitives is
76 provided, as well as a framework to add new color models and data types.")
77 (license license:lgpl3+)))
78
79 (define-public gegl
80 (package
81 (name "gegl")
82 (version "0.4.8")
83 (source (origin
84 (method url-fetch)
85 (uri (list (string-append "https://download.gimp.org/pub/gegl/"
86 (string-take version 3)
87 "/" name "-" version ".tar.bz2")))
88 (sha256
89 (base32
90 "0jdfhf8wikba4h68k505x0br3gisiwivc33aca8v3ibaqpp6i53i"))))
91 (build-system gnu-build-system)
92 (arguments
93 '(#:configure-flags '("LDFLAGS=-lm")))
94 ;; These are propagated to satisfy 'gegl-0.4.pc'.
95 (propagated-inputs
96 `(("babl" ,babl)
97 ("glib" ,glib)
98 ("json-glib" ,json-glib)))
99 (inputs
100 `(("cairo" ,cairo)
101 ("pango" ,pango)
102 ("libpng" ,libpng)
103 ("libjpeg" ,libjpeg)))
104 (native-inputs
105 `(("pkg-config" ,pkg-config)
106 ("glib" ,glib "bin") ; for gtester
107 ("intltool" ,intltool)))
108 (home-page "http://gegl.org")
109 (synopsis "Graph based image processing framework")
110 (description "GEGL (Generic Graphics Library) provides infrastructure to
111 do demand based cached non destructive image editing on larger than RAM
112 buffers.")
113 ;; The library itself is licensed under LGPL while the sample commandline
114 ;; application and GUI binary gegl is licensed under GPL.
115 (license (list license:lgpl3+ license:gpl3+))))
116
117 (define-public gimp
118 (package
119 (name "gimp")
120 (version "2.10.6")
121 (source (origin
122 (method url-fetch)
123 (uri (string-append "https://download.gimp.org/pub/gimp/v"
124 (version-major+minor version)
125 "/gimp-" version ".tar.bz2"))
126 (sha256
127 (base32
128 "07qh2ljbza2mph1gh8sicn27qihhj8hx3ivvry2874cfh8ghgj2f"))))
129 (build-system gnu-build-system)
130 (outputs '("out"
131 "doc")) ; 9 MiB of gtk-doc HTML
132 (arguments
133 '(#:configure-flags
134 (list (string-append "--with-html-dir="
135 (assoc-ref %outputs "doc")
136 "/share/gtk-doc/html")
137 ;; ./configure requests not to annoy upstream with packaging bugs.
138 "--with-bug-report-url=https://bugs.gnu.org/guix")
139 #:phases
140 (modify-phases %standard-phases
141 (add-after 'install 'install-sitecustomize.py
142 ;; Install 'sitecustomize.py' into gimp's python directory to
143 ;; add pygobject and pygtk to pygimp's search path.
144 (lambda* (#:key outputs #:allow-other-keys)
145 (let* ((pythonpath (getenv "PYTHONPATH"))
146 (out (assoc-ref outputs "out"))
147 (sitecustomize.py
148 (string-append
149 out "/lib/gimp/2.0/python/sitecustomize.py")))
150 (call-with-output-file sitecustomize.py
151 (lambda (port)
152 (format port "import site~%")
153 (format port "for dir in '~a'.split(':'):~%" pythonpath)
154 (format port " site.addsitedir(dir)~%")))))))))
155 (inputs
156 `(("babl" ,babl)
157 ("glib" ,glib)
158 ("glib-networking" ,glib-networking)
159 ("libtiff" ,libtiff)
160 ("libjpeg" ,libjpeg)
161 ("atk" ,atk)
162 ("gexiv2" ,gexiv2)
163 ("gtk+" ,gtk+-2)
164 ("libmypaint" ,libmypaint)
165 ("mypaint-brushes" ,mypaint-brushes)
166 ("exif" ,libexif) ; optional, EXIF + XMP support
167 ("lcms" ,lcms) ; optional, color management
168 ("librsvg" ,librsvg) ; optional, SVG support
169 ("poppler" ,poppler) ; optional, PDF support
170 ("poppler-data" ,poppler-data)
171 ("python" ,python-2) ; optional, Python support
172 ("python2-pygtk" ,python2-pygtk) ; optional, Python support
173 ("gegl" ,gegl)))
174 (native-inputs
175 `(("glib:bin" ,glib "bin") ; for glib-compile-resources and gdbus-codegen
176 ("pkg-config" ,pkg-config)
177 ("intltool" ,intltool)))
178 (home-page "https://www.gimp.org")
179 (synopsis "GNU Image Manipulation Program")
180 (description
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
186
187 (define-public gimp-fourier
188 (package
189 (name "gimp-fourier")
190 (version "0.4.3-2")
191 (source (origin
192 (method url-fetch)
193 (uri (string-append "http://registry.gimp.org/files/fourier-"
194 version ".tar.gz"))
195 (sha256
196 (base32
197 "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184"))))
198 (build-system gnu-build-system)
199 (arguments
200 `(#:tests? #f ;no tests
201 #:phases
202 (modify-phases %standard-phases
203 ;; FIXME: The gegl package only installs "gegl-0.4.pc", but
204 ;; "gimp-2.0.pc" requires "gegl-0.3.pc", so we just copy it.
205 (replace 'configure
206 (lambda* (#:key inputs #:allow-other-keys)
207 (mkdir-p "tmppkgconfig")
208 (copy-file (string-append (assoc-ref inputs "gegl")
209 "/lib/pkgconfig/gegl-0.4.pc")
210 "tmppkgconfig/gegl-0.3.pc")
211 (setenv "PKG_CONFIG_PATH"
212 (string-append "tmppkgconfig:"
213 (or (getenv "PKG_CONFIG_PATH") "")))
214 #t))
215 (add-after 'unpack 'set-prefix
216 (lambda* (#:key outputs #:allow-other-keys)
217 ;; gimptool-2.0 does not allow us to install to any target
218 ;; directory.
219 (let ((target (string-append (assoc-ref outputs "out")
220 "/lib/gimp/"
221 (car (string-split ,(package-version gimp) #\.))
222 ".0/plug-ins")))
223 (substitute* "Makefile"
224 (("\\$\\(PLUGIN_INSTALL\\) fourier")
225 (string-append "cp fourier " target)))
226 (mkdir-p target))
227 #t)))))
228 (inputs
229 `(("fftw" ,fftw)
230 ("gimp" ,gimp)
231 ;; needed by gimp-2.0.pc
232 ("gdk-pixbuf" ,gdk-pixbuf)
233 ("gegl" ,gegl)
234 ("cairo" ,cairo)
235 ("glib" ,glib)
236 ;; needed by gimpui-2.0.pc
237 ("gtk+" ,gtk+-2)))
238 (native-inputs
239 `(("pkg-config" ,pkg-config)))
240 (home-page "http://registry.gimp.org/node/19596")
241 (synopsis "GIMP plug-in to edit image in fourier space")
242 (description
243 "This package provides a simple plug-in to apply the fourier transform on
244 an image, allowing you to work with the transformed image inside GIMP. You
245 can draw or apply filters in fourier space and get the modified image with an
246 inverse fourier transform.")
247 (license license:gpl3+)))
248
249 (define-public libmypaint
250 (package
251 (name "libmypaint")
252 (version "1.3.0")
253 (source (origin
254 (method url-fetch)
255 (uri (string-append "https://github.com/mypaint/libmypaint/"
256 "releases/download/v" version "/libmypaint-"
257 version ".tar.xz"))
258 (sha256
259 (base32
260 "0wd6jk69vmhsq1mdw96v0fh7b28n3glkr5ca466zcq7agzaxj1va"))))
261 (build-system gnu-build-system)
262 (native-inputs
263 `(("intltool" ,intltool)
264 ("pkg-config" ,pkg-config)))
265 ;; As needed by 'libmypaint.pc'.
266 (propagated-inputs
267 `(("json-c" ,json-c)
268 ("gobject-introspection" ,gobject-introspection)))
269 (inputs
270 `(("glib" ,glib)))
271 (synopsis "Artistic brushes library")
272 (description "Libmypaint, also called \"brushlib\", is a library for making
273 brushstrokes which is used by MyPaint and GIMP.")
274 (home-page "http://mypaint.org")
275 (license license:isc)))
276
277 (define-public mypaint-brushes
278 (package
279 (name "mypaint-brushes")
280 (version "1.3.0")
281 (source (origin
282 (method git-fetch)
283 (uri (git-reference
284 (url "https://github.com/Jehan/mypaint-brushes.git")
285 (commit (string-append "v" version))))
286 (file-name (git-file-name name version))
287 (sha256
288 (base32
289 "1iz89z6v2mp8j1lrf942k561s8311i3s34ap36wh4rybb2lq15m0"))))
290 (build-system gnu-build-system)
291 (arguments
292 `(#:phases
293 (modify-phases %standard-phases
294 (add-after 'unpack 'relax-dependency-version
295 (lambda _
296 (substitute* "autogen.sh"
297 (("automake-1.13") "automake")
298 (("aclocal-1.13") "aclocal"))
299 #t)))))
300 (native-inputs
301 `(("autoconf" ,autoconf)
302 ("automake" ,automake)))
303 (synopsis "Default brushes for MyPaint")
304 (description "This package provides the default set of brushes for
305 MyPaint.")
306 (home-page "https://github.com/Jehan/mypaint-brushes")
307 (license license:cc0)))