1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
6 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
23 (define-module (gnu packages imagemagick)
24 #:use-module (guix packages)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system perl)
27 #:use-module (guix download)
28 #:use-module (guix hg-download)
29 #:use-module (guix utils)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages algebra)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages fontutils)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages graphviz)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages image)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages xml)
41 #:use-module (gnu packages xorg))
43 (define-public imagemagick
49 (uri (string-append "mirror://imagemagick/ImageMagick-"
53 "0min87mdhv6bni5hz99i3j1wkrjrqp88dx4ckjzmilg28p9ick63"))))
54 (build-system gnu-build-system)
56 `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch")
57 ;; FIXME: The test suite succeeded before version 6.9.6-2.
58 ;; Try enabling it again with newer releases.
60 #:phases (modify-phases %standard-phases
63 (lambda* (#:key outputs #:allow-other-keys)
64 (substitute* "Makefile"
65 ;; Clear the `LIBRARY_PATH' setting, which otherwise
66 ;; interferes with our own use.
67 (("^LIBRARY_PATH[[:blank:]]*=.*$")
70 ;; Since the Makefile overrides $docdir, modify it to
71 ;; refer to what we want.
72 (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
73 (let ((doc (assoc-ref outputs "doc")))
74 (string-append "DOCUMENTATION_PATH = "
76 ,name "-" ,version "\n"))))))
78 'configure 'strip-configure-xml
80 (substitute* "config/configure.xml.in"
81 ;; Do not record 'configure' arguments in the
82 ;; configure.xml file that gets installed: That would
83 ;; include --docdir, and thus retain a reference to the
87 ;; TODO: Add Jasper etc.
88 (inputs `(("fftw" ,fftw)
89 ("graphviz" ,graphviz)
90 ("ghostscript" ,ghostscript)
99 ("freetype" ,freetype)
102 (native-inputs `(("pkg-config" ,pkg-config)))
104 "doc")) ; 26 MiB of HTML documentation
105 (home-page "http://www.imagemagick.org/")
106 (synopsis "Create, edit, compose, or convert bitmap images")
108 "ImageMagick is a software suite to create, edit, compose, or convert
109 bitmap images. It can read and write images in a variety of formats (over 100)
110 including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG,
111 and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and
112 transform images, adjust image colors, apply various special effects, or draw
113 text, lines, polygons, ellipses and Bézier curves.")
114 (license (license:fsf-free "http://www.imagemagick.org/script/license.php"))))
116 (define-public perl-image-magick
118 (name "perl-image-magick")
123 (uri (string-append "mirror://cpan/authors/id/J/JC/JCRISTY/"
124 "PerlMagick-" version "-1.tar.gz"))
127 "0n9afy1z5bhf9phrbahnkwhgcmijn8jggpbzwrivw1zhliliiy68"))))
128 (build-system perl-build-system)
129 (native-inputs `(("pkg-config" ,pkg-config)))
130 (inputs `(("imagemagick" ,imagemagick)))
132 `(#:tests? #f ;;Failed 2/23 test programs. 2/353 subtests failed.
134 (modify-phases %standard-phases
136 'configure 'image-magick-flags
137 (lambda* (#:key inputs #:allow-other-keys)
138 (let ((im (assoc-ref inputs "imagemagick")))
139 (substitute* "Makefile.PL"
140 (("my \\$INC_magick = .*")
141 "my $INC_magick = `pkg-config --cflags ImageMagick`;\n")
142 (("my \\$LIBS_magick = .*")
143 "my $LIBS_magick = `pkg-config --libs ImageMagick`;\n")))))
145 'check 'skip-mpeg-tests
147 ;; TODO: MPEG tests fail even though our imagemagick supports
148 ;; MPEG. Has been reported elsewhere,
149 ;; http://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=25036,
151 (delete-file "t/mpeg/read.t"))))))
152 (home-page "http://search.cpan.org/dist/PerlMagick")
153 (synopsis "Perl interface to ImageMagick")
154 (description "This Perl extension allows the reading, manipulation and
155 writing of a large number of image file formats using the ImageMagick library.
156 Use it to create, edit, compose, or convert bitmap images from within a Perl
159 (license (package-license imagemagick))))
161 (define-public graphicsmagick
162 (let ((changeset "56c8cae") ; 3e01b
165 (name "graphicsmagick")
166 (version (string-append "1.3.25-" revision "." changeset))
170 (url "http://hg.code.sf.net/p/graphicsmagick/code")
171 (changeset changeset)))
172 (file-name (string-append name "-" version "-checkout"))
174 ;;(uri (string-append "ftp://ftp.graphicsmagick.org/pub/"
175 ;; "GraphicsMagick/" (version-major+minor version)
176 ;; "/GraphicsMagick-" version ".tar.xz"))
179 "1s9apvkn0kxr6i4i5wlkfw1prja02rgk689n3cf822zc0dkycxdh"))))
180 (build-system gnu-build-system)
183 (list "--with-frozenpaths"
184 "--enable-shared=yes"
186 (string-append "--with-gs-font-dir="
187 (assoc-ref %build-inputs "gs-fonts")
188 "/share/fonts/type1/ghostscript"))))
190 `(("graphviz" ,graphviz)
191 ("ghostscript" ,ghostscript)
192 ("gs-fonts" ,gs-fonts)
199 ("freetype" ,freetype)
204 `(("pkg-config" ,pkg-config)))
205 (outputs '("out" ; 13 MiB
207 (home-page "http://www.graphicsmagick.org")
208 (synopsis "Create, edit, compose, or convert bitmap images")
210 "GraphicsMagick provides a comprehensive collection of utilities,
211 programming interfaces, and GUIs, to support file format conversion, image
212 processing, and 2D vector rendering.")
213 (license license:expat))))