gnu: imagemagick: Disable tests.
[jackhill/guix/guix.git] / gnu / packages / imagemagick.scm
CommitLineData
7fa37abc 1;;; GNU Guix --- Functional package management for GNU
3a4de6b2 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
b56a918f 3;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
ac838d0f 4;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
4d93a761 5;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
7fa37abc
LC
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages imagemagick)
23 #:use-module (guix packages)
24 #:use-module (guix build-system gnu)
b56a918f 25 #:use-module (guix build-system perl)
7fa37abc 26 #:use-module (guix download)
ac838d0f 27 #:use-module (guix utils)
bf50f7b5 28 #:use-module ((guix licenses) #:prefix license:)
2ed74cea 29 #:use-module (gnu packages)
9b937137 30 #:use-module (gnu packages algebra)
7fa37abc 31 #:use-module (gnu packages compression)
9b937137
AE
32 #:use-module (gnu packages fontutils)
33 #:use-module (gnu packages ghostscript)
7fa37abc 34 #:use-module (gnu packages graphviz)
7fa37abc 35 #:use-module (gnu packages gtk)
e55354b8 36 #:use-module (gnu packages image)
9b937137
AE
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages xml)
39 #:use-module (gnu packages xorg))
7fa37abc
LC
40
41(define-public imagemagick
42 (package
43 (name "imagemagick")
59929e98 44 (version "6.9.6-2")
7fa37abc
LC
45 (source (origin
46 (method url-fetch)
47 (uri (string-append "mirror://imagemagick/ImageMagick-"
48 version ".tar.xz"))
49 (sha256
50 (base32
59929e98 51 "139h9lycxw3lszn052m34xm0rqyanin4nb529vxjcrkkzqilh91r"))))
7fa37abc
LC
52 (build-system gnu-build-system)
53 (arguments
00831624 54 `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
e98e9f4e
MW
55 ;; FIXME: The test suite succeeded before version 6.9.6-2.
56 ;; Try enabling it again with newer releases.
57 #:tests? #f
3cbf1204 58 #:phases (modify-phases %standard-phases
790c3717
LC
59 (add-before
60 'build 'pre-build
61 (lambda* (#:key outputs #:allow-other-keys)
62 (substitute* "Makefile"
63 ;; Clear the `LIBRARY_PATH' setting, which otherwise
64 ;; interferes with our own use.
65 (("^LIBRARY_PATH[[:blank:]]*=.*$")
66 "")
7fa37abc 67
790c3717
LC
68 ;; Since the Makefile overrides $docdir, modify it to
69 ;; refer to what we want.
70 (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
71 (let ((doc (assoc-ref outputs "doc")))
72 (string-append "DOCUMENTATION_PATH = "
73 doc "/share/doc/"
74 ,name "-" ,version "\n"))))))
75 (add-before
76 'configure 'strip-configure-xml
77 (lambda _
78 (substitute* "config/configure.xml.in"
79 ;; Do not record 'configure' arguments in the
80 ;; configure.xml file that gets installed: That would
81 ;; include --docdir, and thus retain a reference to the
82 ;; 'doc' output.
83 (("@CONFIGURE_ARGS@")
84 "not recorded")))))))
9b937137
AE
85 ;; TODO: Add Jasper etc.
86 (inputs `(("fftw" ,fftw)
87 ("graphviz" ,graphviz)
7fa37abc 88 ("ghostscript" ,ghostscript)
9b937137 89 ("lcms" ,lcms)
7fa37abc
LC
90 ("libx11" ,libx11)
91 ("zlib" ,zlib)
92 ("libxml2" ,libxml2)
93 ("libtiff" ,libtiff)
94 ("libpng" ,libpng)
2ed74cea 95 ("libjpeg" ,libjpeg)
7fa37abc
LC
96 ("pango" ,pango)
97 ("freetype" ,freetype)
98 ("bzip2" ,bzip2)
c4c4cc05
JD
99 ("xz" ,xz)))
100 (native-inputs `(("pkg-config" ,pkg-config)))
7fa37abc
LC
101 (outputs '("out"
102 "doc")) ; 26 MiB of HTML documentation
103 (home-page "http://www.imagemagick.org/")
104 (synopsis "Create, edit, compose, or convert bitmap images")
105 (description
c598e35c 106 "ImageMagick is a software suite to create, edit, compose, or convert
35b9e423 107bitmap images. It can read and write images in a variety of formats (over 100)
7fa37abc 108including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG,
35b9e423 109and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and
7fa37abc
LC
110transform images, adjust image colors, apply various special effects, or draw
111text, lines, polygons, ellipses and Bézier curves.")
bf50f7b5 112 (license (license:fsf-free "http://www.imagemagick.org/script/license.php"))))
b56a918f
EB
113
114(define-public perl-image-magick
115 (package
116 (name "perl-image-magick")
117 (version "6.89")
118 (source
119 (origin
120 (method url-fetch)
121 (uri (string-append "mirror://cpan/authors/id/J/JC/JCRISTY/"
122 "PerlMagick-" version "-1.tar.gz"))
123 (sha256
124 (base32
125 "0n9afy1z5bhf9phrbahnkwhgcmijn8jggpbzwrivw1zhliliiy68"))))
126 (build-system perl-build-system)
127 (native-inputs `(("pkg-config" ,pkg-config)))
128 (inputs `(("imagemagick" ,imagemagick)))
129 (arguments
49735d8d
JN
130 `(#:tests? #f ;;Failed 2/23 test programs. 2/353 subtests failed.
131 #:phases
b56a918f
EB
132 (modify-phases %standard-phases
133 (add-before
3a4de6b2 134 'configure 'image-magick-flags
b56a918f
EB
135 (lambda* (#:key inputs #:allow-other-keys)
136 (let ((im (assoc-ref inputs "imagemagick")))
137 (substitute* "Makefile.PL"
138 (("my \\$INC_magick = .*")
139 "my $INC_magick = `pkg-config --cflags ImageMagick`;\n")
140 (("my \\$LIBS_magick = .*")
141 "my $LIBS_magick = `pkg-config --libs ImageMagick`;\n")))))
142 (add-before
3a4de6b2 143 'check 'skip-mpeg-tests
b56a918f
EB
144 (lambda _
145 ;; TODO: MPEG tests fail even though our imagemagick supports
146 ;; MPEG. Has been reported elsewhere,
147 ;; http://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=25036,
148 ;; so skip for now.
149 (delete-file "t/mpeg/read.t"))))))
150 (home-page "http://search.cpan.org/dist/PerlMagick")
151 (synopsis "Perl interface to ImageMagick")
152 (description "This Perl extension allows the reading, manipulation and
153writing of a large number of image file formats using the ImageMagick library.
154Use it to create, edit, compose, or convert bitmap images from within a Perl
155script.")
156 ;; See Magick.pm
157 (license (package-license imagemagick))))
ac838d0f
RW
158
159(define-public graphicsmagick
160 (package
161 (name "graphicsmagick")
c0bc4b8c 162 (version "1.3.25")
ac838d0f
RW
163 (source (origin
164 (method url-fetch)
165 (uri (string-append "ftp://ftp.graphicsmagick.org/pub/"
166 "GraphicsMagick/" (version-major+minor version)
167 "/GraphicsMagick-" version ".tar.xz"))
168 (sha256
169 (base32
c0bc4b8c 170 "17xcc7pfcmiwpfr1g8ys5a7bdnvqzka53vg3kkzhwwz0s99gljyn"))))
ac838d0f
RW
171 (build-system gnu-build-system)
172 (arguments
173 `(#:configure-flags
174 (list "--with-frozenpaths"
175 "--enable-shared=yes"
176 "--with-x=yes"
177 (string-append "--with-gs-font-dir="
178 (assoc-ref %build-inputs "gs-fonts")
179 "/share/fonts/type1/ghostscript"))))
180 (inputs
181 `(("graphviz" ,graphviz)
182 ("ghostscript" ,ghostscript)
183 ("gs-fonts" ,gs-fonts)
184 ("lcms" ,lcms)
185 ("libx11" ,libx11)
186 ("libxml2" ,libxml2)
187 ("libtiff" ,libtiff)
188 ("libpng" ,libpng)
189 ("libjpeg" ,libjpeg)
190 ("freetype" ,freetype)
191 ("bzip2" ,bzip2)
192 ("xz" ,xz)
193 ("zlib" ,zlib)))
194 (native-inputs
195 `(("pkg-config" ,pkg-config)))
196 (outputs '("out" ; 13 MiB
197 "doc")) ; ~7 MiB
198 (home-page "http://www.graphicsmagick.org")
199 (synopsis "Create, edit, compose, or convert bitmap images")
200 (description
201 "GraphicsMagick provides a comprehensive collection of utilities,
202programming interfaces, and GUIs, to support file format conversion, image
203processing, and 2D vector rendering.")
204 (license license:expat)))