| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 |
|
| 28 | (define-module (gnu packages imagemagick)
|
| 29 | #:use-module (guix packages)
|
| 30 | #:use-module (guix gexp)
|
| 31 | #:use-module (guix build-system gnu)
|
| 32 | #:use-module (guix build-system perl)
|
| 33 | #:use-module (guix download)
|
| 34 | #:use-module (guix utils)
|
| 35 | #:use-module ((guix licenses) #:prefix license:)
|
| 36 | #:use-module (gnu packages)
|
| 37 | #:use-module (gnu packages algebra)
|
| 38 | #:use-module (gnu packages compression)
|
| 39 | #:use-module (gnu packages fontutils)
|
| 40 | #:use-module (gnu packages ghostscript)
|
| 41 | #:use-module (gnu packages graphviz)
|
| 42 | #:use-module (gnu packages gtk)
|
| 43 | #:use-module (gnu packages image)
|
| 44 | #:use-module (gnu packages pkg-config)
|
| 45 | #:use-module (gnu packages xml)
|
| 46 | #:use-module (gnu packages xorg)
|
| 47 | #:use-module (srfi srfi-1))
|
| 48 |
|
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | (define-public imagemagick/stable
|
| 62 | (hidden-package
|
| 63 | (package
|
| 64 | (name "imagemagick")
|
| 65 | |
| 66 | |
| 67 | |
| 68 | (version "6.9.13-5")
|
| 69 | (source (origin
|
| 70 | (method url-fetch)
|
| 71 | (uri (string-append "mirror://imagemagick/ImageMagick-"
|
| 72 | version ".tar.xz"))
|
| 73 | (sha256
|
| 74 | (base32
|
| 75 | "1j1chkw33vjc37509vdwss28qywfvckvs73pvscldj8d0wnwypa8"))))
|
| 76 | (build-system gnu-build-system)
|
| 77 | (arguments
|
| 78 | (list
|
| 79 | #:configure-flags
|
| 80 | #~(list "--with-frozenpaths"
|
| 81 | "--without-gcc-arch"
|
| 82 | (string-append "--with-gs-font-dir="
|
| 83 | (search-input-directory %build-inputs
|
| 84 | "share/fonts/type1"))
|
| 85 | |
| 86 | "--disable-docs"
|
| 87 | |
| 88 | "--enable-reproducible-build")
|
| 89 | #:phases
|
| 90 | #~(modify-phases %standard-phases
|
| 91 | (add-before 'build 'pre-build
|
| 92 | (lambda _
|
| 93 | (substitute* "Makefile"
|
| 94 | |
| 95 | |
| 96 | (("^LIBRARY_PATH[[:blank:]]*=.*$") ""))))
|
| 97 | (add-before 'configure 'strip-configure-xml
|
| 98 | (lambda _
|
| 99 | (substitute* "config/configure.xml.in"
|
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | (("@CONFIGURE_ARGS@")
|
| 105 | "not recorded")))))))
|
| 106 | |
| 107 | (inputs
|
| 108 | (list bzip2
|
| 109 | fftw
|
| 110 | freetype
|
| 111 | ghostscript
|
| 112 | graphviz
|
| 113 | lcms
|
| 114 | libjpeg-turbo
|
| 115 | libpng
|
| 116 | libtiff
|
| 117 | libwebp
|
| 118 | libx11
|
| 119 | libxml2
|
| 120 | pango
|
| 121 | xz
|
| 122 | zlib
|
| 123 | zstd))
|
| 124 | (native-inputs
|
| 125 | (list font-ghostscript
|
| 126 | pkg-config))
|
| 127 | (home-page "https://www.imagemagick.org/")
|
| 128 | (synopsis "Create, edit, compose, or convert bitmap images")
|
| 129 | (description
|
| 130 | "ImageMagick is a software suite to create, edit, compose, or convert
|
| 131 | bitmap images. It can read and write images in a variety of formats (over 100)
|
| 132 | including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG,
|
| 133 | and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and
|
| 134 | transform images, adjust image colors, apply various special effects, or draw
|
| 135 | text, lines, polygons, ellipses and Bézier curves.")
|
| 136 | (license (license:fsf-free "http://www.imagemagick.org/script/license.php")))))
|
| 137 |
|
| 138 | (define-public imagemagick
|
| 139 | (package
|
| 140 | (inherit imagemagick/stable)
|
| 141 | (outputs '("out" "doc")) |
| 142 | (properties (alist-delete 'hidden? (package-properties imagemagick/stable)))
|
| 143 | |
| 144 | |
| 145 | |
| 146 | (version "6.9.13-5")
|
| 147 | (source (origin
|
| 148 | (method url-fetch)
|
| 149 | (uri (string-append "mirror://imagemagick/ImageMagick-"
|
| 150 | version ".tar.xz"))
|
| 151 | (sha256
|
| 152 | (base32
|
| 153 | "1j1chkw33vjc37509vdwss28qywfvckvs73pvscldj8d0wnwypa8"))))
|
| 154 | (arguments
|
| 155 | (substitute-keyword-arguments (package-arguments imagemagick/stable)
|
| 156 | ((#:configure-flags flags #~'())
|
| 157 | #~(delete "--disable-docs" #$flags))
|
| 158 | ((#:phases phases #~'%standard-phases)
|
| 159 | #~(modify-phases #$phases
|
| 160 | (add-before 'build 'set-doc-directory
|
| 161 | (lambda _
|
| 162 | (substitute* "Makefile"
|
| 163 | |
| 164 | |
| 165 | (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
|
| 166 | (string-append "DOCUMENTATION_PATH = "
|
| 167 | #$output:doc "/share/doc/"
|
| 168 | #$(package-name this-package) "-"
|
| 169 | #$(package-version this-package) "\n")))))))))))
|
| 170 |
|
| 171 | (define-public perl-image-magick
|
| 172 | (package
|
| 173 | (name "perl-image-magick")
|
| 174 | (version "6.89")
|
| 175 | (source
|
| 176 | (origin
|
| 177 | (method url-fetch)
|
| 178 | (uri (string-append "mirror://cpan/authors/id/J/JC/JCRISTY/"
|
| 179 | "PerlMagick-" version "-1.tar.gz"))
|
| 180 | (sha256
|
| 181 | (base32
|
| 182 | "0n9afy1z5bhf9phrbahnkwhgcmijn8jggpbzwrivw1zhliliiy68"))))
|
| 183 | (build-system perl-build-system)
|
| 184 | (native-inputs (list pkg-config))
|
| 185 | (inputs (list imagemagick))
|
| 186 | (arguments
|
| 187 | `(#:tests? #f |
| 188 | #:phases
|
| 189 | (modify-phases %standard-phases
|
| 190 | (add-before
|
| 191 | 'configure 'image-magick-flags
|
| 192 | (lambda* (#:key inputs #:allow-other-keys)
|
| 193 | (let ((im (assoc-ref inputs "imagemagick")))
|
| 194 | (substitute* "Makefile.PL"
|
| 195 | (("my \\$INC_magick = .*")
|
| 196 | "my $INC_magick = `pkg-config --cflags ImageMagick`;\n")
|
| 197 | (("my \\$LIBS_magick = .*")
|
| 198 | "my $LIBS_magick = `pkg-config --libs ImageMagick`;\n"))
|
| 199 | #t)))
|
| 200 | (add-before
|
| 201 | 'check 'skip-mpeg-tests
|
| 202 | (lambda _
|
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | (delete-file "t/mpeg/read.t")
|
| 208 | #t)))))
|
| 209 | (home-page "https://metacpan.org/release/PerlMagick")
|
| 210 | (synopsis "Perl interface to ImageMagick")
|
| 211 | (description "This Perl extension allows the reading, manipulation and
|
| 212 | writing of a large number of image file formats using the ImageMagick library.
|
| 213 | Use it to create, edit, compose, or convert bitmap images from within a Perl
|
| 214 | script.")
|
| 215 | |
| 216 | (license (package-license imagemagick))))
|
| 217 |
|
| 218 | (define-public graphicsmagick
|
| 219 | (package
|
| 220 | (name "graphicsmagick")
|
| 221 | (version "1.3.40")
|
| 222 | (source
|
| 223 | (origin
|
| 224 | (method url-fetch)
|
| 225 | (uri
|
| 226 | (list
|
| 227 | (string-append "mirror://sourceforge/graphicsmagick/graphicsmagick"
|
| 228 | "/" version "/GraphicsMagick-" version ".tar.xz")
|
| 229 | (string-append "ftp://ftp.graphicsmagick.org/pub/"
|
| 230 | "GraphicsMagick/" (version-major+minor version)
|
| 231 | "/GraphicsMagick-" version ".tar.xz")))
|
| 232 | (sha256
|
| 233 | (base32
|
| 234 | "0ikpza74p00hrs4z2cgykf7vhlqnzzkhaidjlcjppiw99sfimp4p"))))
|
| 235 | (build-system gnu-build-system)
|
| 236 | (arguments
|
| 237 | (list
|
| 238 | #:configure-flags
|
| 239 | #~(list "--with-frozenpaths"
|
| 240 | "--enable-shared=yes"
|
| 241 | "--with-x=yes"
|
| 242 | "--with-quantum-depth=16" |
| 243 | "--enable-quantum-library-names"
|
| 244 | (string-append "--with-gs-font-dir="
|
| 245 | (search-input-directory
|
| 246 | %build-inputs "share/fonts/type1/ghostscript")))))
|
| 247 | (inputs
|
| 248 | (list bzip2
|
| 249 | font-ghostscript
|
| 250 | freetype
|
| 251 | ghostscript
|
| 252 | graphviz
|
| 253 | lcms
|
| 254 | libjpeg-turbo
|
| 255 | libpng
|
| 256 | libtiff
|
| 257 | libwebp
|
| 258 | libxml2
|
| 259 | libx11
|
| 260 | xz
|
| 261 | zlib))
|
| 262 | (native-inputs
|
| 263 | (list pkg-config))
|
| 264 | (outputs '("out" |
| 265 | "doc")) |
| 266 | (home-page "http://www.graphicsmagick.org")
|
| 267 | (synopsis "Create, edit, compose, or convert bitmap images")
|
| 268 | (description
|
| 269 | "GraphicsMagick provides a comprehensive collection of utilities,
|
| 270 | programming interfaces, and GUIs, to support file format conversion, image
|
| 271 | processing, and 2D vector rendering.")
|
| 272 | (license license:expat)))
|