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>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages gimp)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix utils)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system glib-or-gtk)
27 #:use-module (gnu packages algebra)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages glib)
30 #:use-module (gnu packages gtk)
31 #:use-module (gnu packages gnome)
32 #:use-module (gnu packages image)
33 #:use-module (gnu packages ghostscript)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages xml)
36 #:use-module (gnu packages photo)
37 #:use-module (gnu packages python)
38 #:use-module (gnu packages xorg)
39 #:use-module (gnu packages imagemagick))
47 (uri (list (string-append "http://ftp.gtk.org/pub/babl/0.1/babl-"
49 (string-append "ftp://ftp.gtk.org/pub/babl/0.1/babl-"
53 "1x2mb7zfbvk9d0a7h5cpdff9hhjsadxvqml2jay2bpf7x9nc6gwl"))))
54 (build-system gnu-build-system)
55 (home-page "http://gegl.org/babl/")
56 (synopsis "Image pixel format conversion library")
58 "Babl is a dynamic, any to any, pixel format translation library.
59 It allows converting between different methods of storing pixels known as
60 pixel formats that have with different bitdepths and other data
61 representations, color models and component permutations.
63 A vocabulary to formulate new pixel formats from existing primitives is
64 provided as well as the framework to add new color models and data types.")
65 (license license:lgpl3+)))
73 (uri (list (string-append "http://download.gimp.org/pub/gegl/"
74 (string-take version 3)
75 "/" name "-" version ".tar.bz2")))
78 "09nlv06li9nrn74ifpm7223mxpg0s7cii702z72cpbwrjh6nlbnz"))))
79 (build-system gnu-build-system)
81 `(;; More than just the one test disabled below now fails; disable them
82 ;; all according to the rationale given below.
88 ;; This test program seems to crash on exit. Specifically, whilst
89 ;; g_object_unreffing bufferA and bufferB - This seems to be a bug
90 ;; in the destructor. This is just a test program so will not have
91 ;; any wider effect, although might be hiding another problem.
92 ;; According to advice received on irc.gimp.org#gegl although 0.2.0
93 ;; is the latest released version, any bug reports against it will
94 ;; be ignored. So we are on our own.
95 (substitute* "tools/img_cmp.c"
96 (("g_object_unref \\(buffer.\\);") ""))
98 (substitute* "tests/compositions/Makefile"
99 (("/bin/sh") (which "bash"))))
107 ("libjpeg" ,libjpeg-8)))
109 `(("pkg-config" ,pkg-config)
110 ("glib" ,glib "bin") ; for gtester
111 ("intltool" ,intltool)))
112 (home-page "http://gegl.org")
113 (synopsis "Graph based image processing framework")
114 (description "GEGL (Generic Graphics Library) provides infrastructure to
115 do demand based cached non destructive image editing on larger than RAM
117 ;; The library itself is licensed under LGPL while the sample commandline
118 ;; application and GUI binary gegl is licensed under GPL.
119 (license (list license:lgpl3+ license:gpl3+))))
127 (uri (string-append "http://download.gimp.org/pub/gimp/v2.8/gimp-"
131 "0bdj0l7a94jqhjnj40m9rqaf622wj905iximivb55iy98639aanq"))))
132 (build-system gnu-build-system)
134 "doc")) ;8 MiB of gtk-doc HTML
136 '(#:configure-flags (list (string-append "--with-html-dir="
137 (assoc-ref %outputs "doc")
138 "/share/gtk-doc/html"))))
143 ("libjpeg" ,libjpeg-8)
146 ("exif" ,libexif) ;optional, EXIF + XMP support
147 ("lcms" ,lcms) ;optional, color management
148 ("librsvg" ,librsvg) ;optional, SVG support
149 ("python" ,python-2) ;optional, Python support
150 ("python2-pygtk" ,python2-pygtk) ;optional, Python support
153 `(("pkg-config" ,pkg-config)
154 ("intltool" ,intltool)))
155 (home-page "http://gimp.org")
156 (synopsis "GNU Image Manipulation Program")
158 "GIMP is an application for image manipulation tasks such as photo
159 retouching, composition and authoring. It supports all common image formats
160 as well as specialized ones. It features a highly customizable interface
161 that is extensible via a plugin system.")
162 (license license:gpl3+))) ; some files are lgplv3
164 (define-public gimp-fourier
166 (name "gimp-fourier")
170 (uri (string-append "http://registry.gimp.org/files/fourier-"
174 "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184"))))
175 (build-system gnu-build-system)
177 `(#:tests? #f ;no tests
179 (modify-phases %standard-phases
181 (add-after 'unpack 'set-prefix
182 (lambda* (#:key outputs #:allow-other-keys)
183 ;; gimptool-2.0 does not allow us to install to any target
185 (let ((target (string-append (assoc-ref outputs "out")
187 (car (string-split ,(package-version gimp) #\.))
189 (substitute* "Makefile"
190 (("\\$\\(PLUGIN_INSTALL\\) fourier")
191 (string-append "cp fourier " target)))
197 ;; needed by gimp-2.0.pc
198 ("gdk-pixbuf" ,gdk-pixbuf)
201 ;; needed by gimpui-2.0.pc
204 `(("pkg-config" ,pkg-config)))
205 (home-page "http://registry.gimp.org/node/19596")
206 (synopsis "GIMP plug-in to edit image in fourier space")
208 "This package provides a simple plug-in to apply the fourier transform on
209 an image, allowing you to work with the transformed image inside GIMP. You
210 can draw or apply filters in fourier space and get the modified image with an
211 inverse fourier transform.")
212 (license license:gpl3+)))