guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#61533] [PATCH 1/2] gnu: leptonica: Use new package style.


From: Simon South
Subject: [bug#61533] [PATCH 1/2] gnu: leptonica: Use new package style.
Date: Wed, 15 Feb 2023 11:44:10 -0500

* gnu/packages/image.scm (leptonica)[inputs]: Remove labels.
[arguments]<#:phases>: Use gexps; use "this-package-input" to locate package
input; do not explicitly return #t from phases.
---
 gnu/packages/image.scm | 50 ++++++++++++++++++++----------------------
 1 file changed, 24 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 42b7ee055e..af7f2e411b 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -619,33 +619,31 @@ (define-public leptonica
            libtool
            pkg-config))
     (inputs
-     `(("giflib" ,giflib)
-       ("libjpeg" ,libjpeg-turbo)
-       ("libpng" ,libpng)
-       ("libtiff" ,libtiff)
-       ("libwebp" ,libwebp)
-       ("openjpeg" ,openjpeg)
-       ("zlib" ,zlib)))
+     (list giflib
+           libjpeg-turbo
+           libpng
+           libtiff
+           libwebp
+           openjpeg
+           zlib))
     (arguments
-     '(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-reg-wrapper
-           (lambda _
-             (substitute* "prog/reg_wrapper.sh"
-               ((" /bin/sh ")
-                (string-append " " (which "sh") " "))
-               (("which gnuplot")
-                "true"))
-             #t))
-         (add-after 'install 'provide-absolute-giflib-reference
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (giflib (assoc-ref inputs "giflib")))
-               ;; Add an absolute reference to giflib to avoid propagation.
-               (with-directory-excursion (string-append out "/lib")
-                 (substitute* '("liblept.la" "pkgconfig/lept.pc")
-                   (("-lgif") (string-append "-L" giflib "/lib -lgif"))))
-               #t))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-reg-wrapper
+            (lambda _
+              (substitute* "prog/reg_wrapper.sh"
+                ((" /bin/sh ")
+                 (string-append " " (which "sh") " "))
+                (("which gnuplot")
+                 "true"))))
+          (add-after 'install 'provide-absolute-giflib-reference
+            (lambda _
+              (let ((giflib #$(this-package-input "giflib")))
+                ;; Add an absolute reference to giflib to avoid propagation.
+                (with-directory-excursion (string-append #$output "/lib")
+                  (substitute* '("liblept.la" "pkgconfig/lept.pc")
+                    (("-lgif") (string-append "-L" giflib "/lib 
-lgif"))))))))))
     (home-page "http://www.leptonica.com/";)
     (synopsis "Library and tools for image processing and analysis")
     (description
-- 
2.39.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]