summary refs log tree commit diff
path: root/gnu/packages/imagemagick.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2021-03-12 14:39:36 -0500
committerLeo Famulari <leo@famulari.name>2021-03-12 14:41:17 -0500
commitbb5d84a0489a629d30bc2e978807caf20f46e329 (patch)
tree0d4f233291ab5cb2a91817b6fc44c0366e7a7736 /gnu/packages/imagemagick.scm
parenta39faf1abdac4ee518ed28bf6429e07eab0371ea (diff)
downloadguix-bb5d84a0489a629d30bc2e978807caf20f46e329.tar.gz
gnu: ImageMagick: Fix version number in build configuration of grafted replacement.
Fixes <https://bugs.gnu.org/47110>.

This is a followup to commits 852ba914a43da0977d4f53b53da7039cdd6706b2 and
82e887ba48c2ba91b17aa9b6b17501e3e0ef4aef.

* gnu/packages/imagemagick.scm (imagemagick/fixed)[name, arguments]: New
fields.
Diffstat (limited to 'gnu/packages/imagemagick.scm')
-rw-r--r--gnu/packages/imagemagick.scm43
1 files changed, 41 insertions, 2 deletions
diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index 1a5ddb63d4..8f6eddce0d 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -51,6 +51,7 @@
     ;; 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-48")
+    (replacement imagemagick/fixed)
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://imagemagick/ImageMagick-"
@@ -58,7 +59,6 @@
              (sha256
               (base32
                "0m8nkmywkqwyrr01q7aiakj6mi4rb2psjgzv8n0x82x3s1rpfyql"))))
-    (replacement imagemagick/fixed)
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch"
@@ -130,6 +130,7 @@ text, lines, polygons, ellipses and Bézier curves.")
 (define-public imagemagick/fixed
   (package
     (inherit imagemagick)
+    (name "imagemagick")
     (version "6.9.12-2g") ;; 'g' for 'guix', appended character to retain
     ;; version length so grafting works properly.
     (source (origin
@@ -140,7 +141,45 @@ text, lines, polygons, ellipses and Bézier curves.")
                                   ".tar.xz"))
               (sha256
                (base32
-                "17da5zihz58qm41y61sbvw626m5xfwr2nzszlikrvxyq1j1q7asa"))))))
+                "17da5zihz58qm41y61sbvw626m5xfwr2nzszlikrvxyq1j1q7asa"))))
+    (arguments
+     `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch"
+
+                           ;; Do not embed the build date in binaries.
+                           "--enable-reproducible-build")
+
+       ;; FIXME: The test suite succeeded before version 6.9.6-2.
+       ;; Try enabling it again with newer releases.
+       #:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (add-before
+                   'build 'pre-build
+                   (lambda* (#:key outputs #:allow-other-keys)
+                     (substitute* "Makefile"
+                       ;; Clear the `LIBRARY_PATH' setting, which otherwise
+                       ;; interferes with our own use.
+                       (("^LIBRARY_PATH[[:blank:]]*=.*$")
+                        "")
+
+                       ;; Since the Makefile overrides $docdir, modify it to
+                       ;; refer to what we want.
+                       (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
+                        (let ((doc (assoc-ref outputs "doc")))
+                          (string-append "DOCUMENTATION_PATH = "
+                                         doc "/share/doc/"
+                                         ,name "-" ,version "\n"))))
+                     #t))
+                  (add-before
+                   'configure 'strip-configure-xml
+                   (lambda _
+                     (substitute* "config/configure.xml.in"
+                       ;; Do not record 'configure' arguments in the
+                       ;; configure.xml file that gets installed: That would
+                       ;; include --docdir, and thus retain a reference to the
+                       ;; 'doc' output.
+                       (("@CONFIGURE_ARGS@")
+                        "not recorded"))
+                     #t)))))))
 
 (define-public perl-image-magick
   (package