diff mbox series

[bug#64751,core-updates,3/4] gnu: imagemagick: Update package style

Message ID 20230720184404.14172-1-saku@laesvuori.fi
State New
Headers show
Series [bug#64751,core-updates,1/4] gnu: imagemagick: Update to 6.9.12-91 | expand

Commit Message

Saku Laesvuori July 20, 2023, 6:41 p.m. UTC
* gnu/packages/imagemagick.scm
  (imagemagick/stable)[arguments]<phases>: Use G-exps.
  [inputs]: Use new style.
  (imagemagick)[inputs]: Use new style.
---
 gnu/packages/imagemagick.scm | 105 +++++++++++++++++------------------
 1 file changed, 50 insertions(+), 55 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm
index 55e100a71c..82ac9f5107 100644
--- a/gnu/packages/imagemagick.scm
+++ b/gnu/packages/imagemagick.scm
@@ -68,69 +68,65 @@  (define-public imagemagick/stable
      (version "6.9.11-48")
      (source (origin
                (method url-fetch)
-               (uri (string-append "mirror://imagemagick/ImageMagick-"
-                                   version ".tar.xz"))
+               (uri (string-append "mirror://imagemagick/ImageMagick-" version
+                                   ".tar.xz"))
                (sha256
                 (base32
                  "0m8nkmywkqwyrr01q7aiakj6mi4rb2psjgzv8n0x82x3s1rpfyql"))))
      (build-system gnu-build-system)
      (arguments
-      `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch"
+      (list
+       #:configure-flags ''("--with-frozenpaths" "--without-gcc-arch"
 
-                            ;; Do not embed the build date in binaries.
-                            "--enable-reproducible-build")
+                           ;; 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:]]*=.*$")
-                          "")
+       ;; 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* _
+                        (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 "-"
-                                           ,(package-version this-package) "\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)))))
+                          ;; Since the Makefile overrides $docdir, modify it to
+                          ;; refer to what we want.
+                          (("^DOCUMENTATION_PATH[[:blank:]]*=.*$")
+                           (string-append "DOCUMENTATION_PATH = "
+                                          #$output:doc
+                                          "/share/doc/imagemagick-"
+                                          #$(package-version this-package)
+                                          "\n")))))
+                    (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")))))))
      ;; TODO: Add Jasper etc.
-     (inputs `(("fftw" ,fftw)
-               ("graphviz" ,graphviz)
-               ("ghostscript" ,ghostscript)
-               ("lcms" ,lcms)
-               ("libx11" ,libx11)
-               ("zlib" ,zlib)
-               ("libxml2" ,libxml2)
-               ("libtiff" ,libtiff)
-               ("libpng" ,libpng)
-               ("libjpeg" ,libjpeg-turbo)
-               ("pango" ,pango)
-               ("freetype" ,freetype)
-               ("bzip2" ,bzip2)
-               ("xz" ,xz)))
+     (inputs (list fftw
+                   graphviz
+                   ghostscript
+                   lcms
+                   libx11
+                   zlib
+                   libxml2
+                   libtiff
+                   libpng
+                   libjpeg-turbo
+                   pango
+                   freetype
+                   bzip2
+                   xz))
      (native-inputs (list pkg-config))
-     (outputs '("out"
-                "doc"))                 ; 26 MiB of HTML documentation
+     (outputs '("out" "doc")) ;26 MiB of HTML documentation
      (home-page "https://www.imagemagick.org/")
      (synopsis "Create, edit, compose, or convert bitmap images")
      (description
@@ -158,8 +154,7 @@  (define-public imagemagick
                (base32
                 "0didbs10i9zb4dgripa851j7fivxb9jar7l3vvxz6i4kn6xvdv7r"))
               (patches (search-patches "imagemagick-Fix-tests.patch"))))
-    (inputs (cons `("libwebp" ,libwebp)
-                  (package-inputs imagemagick/stable)))
+    (inputs (cons libwebp (package-inputs imagemagick/stable)))
     (arguments
      (append (package-arguments imagemagick/stable)
              '(#:tests? #t)))))