gnu: Move numerous "inputs" which should be "native-inputs".
[jackhill/guix/guix.git] / gnu / packages / imagemagick.scm
CommitLineData
7fa37abc
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages imagemagick)
20 #:use-module (guix packages)
21 #:use-module (guix build-system gnu)
22 #:use-module (guix download)
23 #:use-module ((guix licenses) #:select (fsf-free))
9b937137 24 #:use-module (gnu packages algebra)
7fa37abc 25 #:use-module (gnu packages compression)
9b937137
AE
26 #:use-module (gnu packages fontutils)
27 #:use-module (gnu packages ghostscript)
7fa37abc 28 #:use-module (gnu packages graphviz)
7fa37abc
LC
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages libpng)
31 #:use-module (gnu packages libtiff)
32 #:use-module (gnu packages libjpeg)
9b937137
AE
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages xml)
35 #:use-module (gnu packages xorg))
7fa37abc
LC
36
37(define-public imagemagick
38 (package
39 (name "imagemagick")
d694a44c 40 (version "6.8.7-9")
7fa37abc
LC
41 (source (origin
42 (method url-fetch)
43 (uri (string-append "mirror://imagemagick/ImageMagick-"
44 version ".tar.xz"))
45 (sha256
46 (base32
d694a44c 47 "0625hqddc93qjd5923yivy74jyagk3n2bi2kjgykn86g7kxh7fcd"))))
7fa37abc
LC
48 (build-system gnu-build-system)
49 (arguments
50 `(#:phases (alist-cons-before
51 'build 'pre-build
52 (lambda* (#:key outputs #:allow-other-keys)
53 (substitute* "Makefile"
54 ;; Clear the `LIBRARY_PATH' setting, which otherwise
55 ;; interferes with our own use.
56 (("^LIBRARY_PATH[[:blank:]]*=.*$")
57 "")
58
59 ;; Since the Makefile overrides $docdir, modify it to
60 ;; refer to what we want.
61 (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
62 (let ((doc (assoc-ref outputs "doc")))
63 (string-append "DOCUMENTATION_PATH = "
64 doc "/share/doc/"
65 ,name "-" ,version "\n")))))
66 %standard-phases)))
9b937137
AE
67 ;; TODO: Add Jasper etc.
68 (inputs `(("fftw" ,fftw)
69 ("graphviz" ,graphviz)
7fa37abc 70 ("ghostscript" ,ghostscript)
9b937137 71 ("lcms" ,lcms)
7fa37abc
LC
72 ("libx11" ,libx11)
73 ("zlib" ,zlib)
74 ("libxml2" ,libxml2)
75 ("libtiff" ,libtiff)
76 ("libpng" ,libpng)
77 ("libjpeg" ,libjpeg-8)
78 ("pango" ,pango)
79 ("freetype" ,freetype)
80 ("bzip2" ,bzip2)
c4c4cc05
JD
81 ("xz" ,xz)))
82 (native-inputs `(("pkg-config" ,pkg-config)))
7fa37abc
LC
83 (outputs '("out"
84 "doc")) ; 26 MiB of HTML documentation
85 (home-page "http://www.imagemagick.org/")
86 (synopsis "Create, edit, compose, or convert bitmap images")
87 (description
88 "ImageMagick® is a software suite to create, edit, compose, or convert
89bitmap images. It can read and write images in a variety of formats (over 100)
90including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG,
91and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and
92transform images, adjust image colors, apply various special effects, or draw
93text, lines, polygons, ellipses and Bézier curves.")
94 (license (fsf-free "http://www.imagemagick.org/script/license.php"))))