gnu: imagemagick: Add 'imagemagick/stable' variant.
[jackhill/guix/guix.git] / gnu / packages / imagemagick.scm
index 74dfe5c..528fb9e 100644 (file)
@@ -7,6 +7,8 @@
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
-(define-public imagemagick
+;; This is a variant of the 'imagemagick' package that is not updated often.
+;; It is intended to be used as a native-input at build-time only, e.g. by
+;; 'gtk-doc' (via 'dblatex') for generating package documentation.  This
+;; allows the main 'imagemagick' package to be freely updated on the 'master'
+;; branch without triggering an excessive number of rebuilds.
+;;
+;; Normally the grafts mechanism would be used, but there are often
+;; difficulties grafting imagemagick, e.g. because upstream changes the ABI
+;; between micro version updates.  Also, the overwhelming majority of
+;; dependencies on imagemagick are via 'gtk-doc' in 'native-inputs', where
+;; grafting is ineffective.  See:
+;; <https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00381.html>.
+(define-public imagemagick/stable
   (package
     (name "imagemagick")
     ;; The 7 release series has an incompatible API, while the 6 series is still
     ;; maintained. Don't update to 7 until we've made sure that the ImageMagick
     ;; users are ready for the 7-series API.
-    (version "6.9.11-24")
+    (version "6.9.11-48")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://imagemagick/ImageMagick-"
                                  version ".tar.xz"))
              (sha256
               (base32
-               "1qxp8fpinh45y4fzdpqvwv2kgr8bh7dqfl08h9n24yadi5nxcqbk"))))
+               "0m8nkmywkqwyrr01q7aiakj6mi4rb2psjgzv8n0x82x3s1rpfyql"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch"
@@ -82,7 +96,8 @@
                         (let ((doc (assoc-ref outputs "doc")))
                           (string-append "DOCUMENTATION_PATH = "
                                          doc "/share/doc/"
-                                         ,name "-" ,version "\n"))))
+                                         ,name "-"
+                                         ,(package-version this-package) "\n"))))
                      #t))
                   (add-before
                    'configure 'strip-configure-xml
@@ -124,6 +139,9 @@ transform images, adjust image colors, apply various special effects, or draw
 text, lines, polygons, ellipses and Bézier curves.")
     (license (license:fsf-free "http://www.imagemagick.org/script/license.php"))))
 
+(define-public imagemagick
+  imagemagick/stable)
+
 (define-public perl-image-magick
   (package
     (name "perl-image-magick")
@@ -174,7 +192,7 @@ script.")
 (define-public graphicsmagick
   (package
     (name "graphicsmagick")
-    (version "1.3.35")
+    (version "1.3.36")
     (source
      (origin
        (method url-fetch)
@@ -187,7 +205,7 @@ script.")
                         "/GraphicsMagick-" version ".tar.xz")))
        (sha256
         (base32
-         "0l024l4hawm9s3jqrgi2j0lxgm61dqh8sgkj1017ma7y11hqv2hq"))))
+         "0ilg6fkppb4avzais1dvi3qf6ln7v3mzj7gjm83w7pwwfpg3ynsx"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -209,6 +227,7 @@ script.")
        ("libtiff" ,libtiff)
        ("libpng" ,libpng)
        ("libjpeg" ,libjpeg-turbo)
+       ("libwebp" ,libwebp)
        ("freetype" ,freetype)
        ("bzip2" ,bzip2)
        ("xz" ,xz)