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, 2019, 202 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
7 ;;; Copyright © 2018 Thorsten Wilms <t_w_@freenet.de>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages gimp)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix utils)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system glib-or-gtk)
32 #:use-module (guix build-system meson)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages algebra)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages ghostscript)
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages xml)
44 #:use-module (gnu packages pdf)
45 #:use-module (gnu packages photo)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages web)
48 #:use-module (gnu packages xorg))
56 (uri (list (string-append "https://download.gimp.org/pub/babl/"
57 (version-major+minor version)
58 "/babl-" version ".tar.xz")
59 (string-append "https://ftp.gtk.org/pub/babl/"
60 (version-major+minor version)
61 "/babl-" version ".tar.xz")
62 (string-append "ftp://ftp.gtk.org/pub/babl/"
63 (version-major+minor version)
64 "/babl-" version ".tar.xz")))
67 "03nfcvy3453xkfvsfcnsfcjf2vg2pin09qnr9jlssdysa1lhnwcs"))))
68 (build-system meson-build-system)
71 (list "-Denable-gir=false")))
73 `(("pkg-config" ,pkg-config)))
75 ;; Propagated to satisfy ‘babl.pc’.
77 (home-page "http://gegl.org/babl/")
78 (synopsis "Image pixel format conversion library")
80 "Babl is a dynamic, any-to-any pixel format translation library.
81 It allows converting between different methods of storing pixels, known as
82 @dfn{pixel formats}, that have different bit depths and other data
83 representations, color models, and component permutations.
85 A vocabulary to formulate new pixel formats from existing primitives is
86 provided, as well as a framework to add new color models and data types.")
87 (license license:lgpl3+)))
95 (uri (list (string-append "https://download.gimp.org/pub/gegl/"
96 (string-take version 3)
97 "/gegl-" version ".tar.xz")
98 (string-append "https://ftp.gtk.org/pub/gegl/"
99 (version-major+minor version)
100 "/gegl-" version ".tar.xz")
101 (string-append "ftp://ftp.gtk.org/pub/gegl/"
102 (version-major+minor version)
103 "/gegl-" version ".tar.xz")))
106 "1zrxnxlhn0jmshg4n2m2xlgi886w059ynkiiihm7rpi05fs8pg93"))))
107 (build-system meson-build-system)
110 (list "-Dintrospection=false")))
111 ;; These are propagated to satisfy 'gegl-0.4.pc'.
115 ("json-glib" ,json-glib)))
120 ("libjpeg" ,libjpeg)))
122 `(("pkg-config" ,pkg-config)
123 ("glib" ,glib "bin") ; for gtester
124 ("intltool" ,intltool)))
125 (home-page "http://gegl.org")
126 (synopsis "Graph based image processing framework")
127 (description "GEGL (Generic Graphics Library) provides infrastructure to
128 do demand based cached non destructive image editing on larger than RAM
130 ;; The library itself is licensed under LGPL while the sample commandline
131 ;; application and GUI binary gegl is licensed under GPL.
132 (license (list license:lgpl3+ license:gpl3+))))
140 (uri (string-append "https://download.gimp.org/pub/gimp/v"
141 (version-major+minor version)
142 "/gimp-" version ".tar.bz2"))
145 "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz"))))
146 (build-system gnu-build-system)
148 "doc")) ; 9 MiB of gtk-doc HTML
151 (list (string-append "--with-html-dir="
152 (assoc-ref %outputs "doc")
153 "/share/gtk-doc/html")
154 ;; ./configure requests not to annoy upstream with packaging bugs.
155 "--with-bug-report-url=https://bugs.gnu.org/guix")
157 (modify-phases %standard-phases
158 (add-after 'install 'install-sitecustomize.py
159 ;; Install 'sitecustomize.py' into gimp's python directory to
160 ;; add pygobject and pygtk to pygimp's search path.
161 (lambda* (#:key outputs #:allow-other-keys)
162 (let* ((pythonpath (getenv "PYTHONPATH"))
163 (out (assoc-ref outputs "out"))
166 out "/lib/gimp/2.0/python/sitecustomize.py")))
167 (call-with-output-file sitecustomize.py
169 (format port "import site~%")
170 (format port "for dir in '~a'.split(':'):~%" pythonpath)
171 (format port " site.addsitedir(dir)~%")))))))))
175 ("glib-networking" ,glib-networking)
182 ("libmypaint" ,libmypaint)
183 ("mypaint-brushes" ,mypaint-brushes)
184 ("exif" ,libexif) ; optional, EXIF + XMP support
185 ("lcms" ,lcms) ; optional, color management
186 ("librsvg" ,librsvg) ; optional, SVG support
187 ("poppler" ,poppler) ; optional, PDF support
188 ("poppler-data" ,poppler-data)
189 ("python" ,python-2) ; optional, Python support
190 ("python2-pygtk" ,python2-pygtk) ; optional, Python support
193 `(("glib:bin" ,glib "bin") ; for glib-compile-resources and gdbus-codegen
194 ("pkg-config" ,pkg-config)
195 ("intltool" ,intltool)))
196 (home-page "https://www.gimp.org")
197 (synopsis "GNU Image Manipulation Program")
199 "GIMP is an application for image manipulation tasks such as photo
200 retouching, composition and authoring. It supports all common image formats
201 as well as specialized ones. It features a highly customizable interface
202 that is extensible via a plugin system.")
203 (license license:gpl3+))) ; some files are lgplv3
205 (define-public gimp-fourier
207 (name "gimp-fourier")
211 (uri (string-append "http://registry.gimp.org/files/fourier-"
215 "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184"))))
216 (build-system gnu-build-system)
218 `(#:tests? #f ;no tests
220 (modify-phases %standard-phases
221 ;; FIXME: The gegl package only installs "gegl-0.4.pc", but
222 ;; "gimp-2.0.pc" requires "gegl-0.3.pc", so we just copy it.
224 (lambda* (#:key inputs #:allow-other-keys)
225 (mkdir-p "tmppkgconfig")
226 (copy-file (string-append (assoc-ref inputs "gegl")
227 "/lib/pkgconfig/gegl-0.4.pc")
228 "tmppkgconfig/gegl-0.3.pc")
229 (setenv "PKG_CONFIG_PATH"
230 (string-append "tmppkgconfig:"
231 (or (getenv "PKG_CONFIG_PATH") "")))
233 (add-after 'unpack 'set-prefix
234 (lambda* (#:key outputs #:allow-other-keys)
235 ;; gimptool-2.0 does not allow us to install to any target
237 (let ((target (string-append (assoc-ref outputs "out")
239 (car (string-split ,(package-version gimp) #\.))
241 (substitute* "Makefile"
242 (("\\$\\(PLUGIN_INSTALL\\) fourier")
243 (string-append "cp fourier " target)))
249 ;; needed by gimp-2.0.pc
250 ("gdk-pixbuf" ,gdk-pixbuf)
254 ;; needed by gimpui-2.0.pc
257 `(("pkg-config" ,pkg-config)))
258 (home-page "http://registry.gimp.org/node/19596")
259 (synopsis "GIMP plug-in to edit image in fourier space")
261 "This package provides a simple plug-in to apply the fourier transform on
262 an image, allowing you to work with the transformed image inside GIMP. You
263 can draw or apply filters in fourier space and get the modified image with an
264 inverse fourier transform.")
265 (license license:gpl3+)))
267 (define-public libmypaint
273 (uri (string-append "https://github.com/mypaint/libmypaint/"
274 "releases/download/v" version "/libmypaint-"
278 "0wd6jk69vmhsq1mdw96v0fh7b28n3glkr5ca466zcq7agzaxj1va"))))
279 (build-system gnu-build-system)
281 `(("intltool" ,intltool)
282 ("pkg-config" ,pkg-config)))
283 ;; As needed by 'libmypaint.pc'.
286 ("gobject-introspection" ,gobject-introspection)))
289 (synopsis "Artistic brushes library")
290 (description "Libmypaint, also called \"brushlib\", is a library for making
291 brushstrokes which is used by MyPaint and GIMP.")
292 (home-page "http://mypaint.org")
293 (license license:isc)))
295 (define-public mypaint-brushes
297 (name "mypaint-brushes")
302 (url "https://github.com/Jehan/mypaint-brushes.git")
303 (commit (string-append "v" version))))
304 (file-name (git-file-name name version))
307 "1iz89z6v2mp8j1lrf942k561s8311i3s34ap36wh4rybb2lq15m0"))))
308 (build-system gnu-build-system)
311 (modify-phases %standard-phases
312 (add-after 'unpack 'relax-dependency-version
314 (substitute* "autogen.sh"
315 (("automake-1.13") "automake")
316 (("aclocal-1.13") "aclocal"))
319 `(("autoconf" ,autoconf)
320 ("automake" ,automake)))
321 (synopsis "Default brushes for MyPaint")
322 (description "This package provides the default set of brushes for
324 (home-page "https://github.com/Jehan/mypaint-brushes")
325 (license license:cc0)))
327 (define-public gimp-resynthesizer
328 ;; GIMP does not respect any plugin search path environment variable, so after
329 ;; installation users have to edit their GIMP settings to include
330 ;; "$HOME/.guix-profile/lib/gimp/2.0/plug-ins/" in
331 ;; “Edit->Preferences->Folders->Plug Ins”.
333 (name "gimp-resynthesizer")
338 (uri (string-append "https://github.com/bootchk/resynthesizer/archive/v"
342 "0l3404w6rqny7h3djskxf149gzx6x4qhndgbh3403c9lbh4pi1kr"))
343 (file-name (string-append name "-" version ".tar.gz"))))
344 (build-system gnu-build-system)
346 `( ;; Turn off tests to avoid:
347 ;; make[1]: *** No rule to make target '../src/resynth-gui.c', needed by 'resynthesizer.pot'. Stop.
350 (modify-phases %standard-phases
351 (add-after 'unpack 'set-env
353 (setenv "CONFIG_SHELL" (which "sh"))
355 (add-after 'configure 'set-prefix
356 ;; Install plugin under $prefix, not under GIMP's libdir.
357 (lambda* (#:key outputs #:allow-other-keys)
358 (let ((target (string-append (assoc-ref outputs "out")
361 (package-version gimp))
363 (substitute* (list "src/resynthesizer/Makefile"
364 "src/resynthesizer-gui/Makefile")
365 (("GIMP_LIBDIR = .*")
366 (string-append "GIMP_LIBDIR = " target "\n")))
370 `(("autoconf" ,autoconf-wrapper)
371 ("automake" ,automake)
372 ("glib" ,glib "bin") ; glib-gettextize
373 ("intltool" ,intltool)
374 ("pkg-config" ,pkg-config)))
377 ("gdk-pixbuf" ,gdk-pixbuf) ; needed by gimp-2.0.pc
380 ("gtk+" ,gtk+-2) ; needed by gimpui-2.0.pc
382 (home-page "https://github.com/bootchk/resynthesizer")
383 (synopsis "GIMP plugins for texture synthesis")
385 "This package provides resynthesizer plugins for GIMP, which encompasses
386 tools for healing selections (content-aware fill), enlarging the canvas and
387 healing the border, increasing the resolution while adding detail, and
388 transferring the style of an image.")
389 (license license:gpl3+)))