guix-commits
[Top][All Lists]
Advanced

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

01/08: gnu: catimg: Simplify.


From: guix-commits
Subject: 01/08: gnu: catimg: Simplify.
Date: Thu, 24 Jan 2019 07:46:52 -0500 (EST)

rekado pushed a commit to branch master
in repository guix.

commit e2f47efee62010f6382fa5a4c43c6eb1b3c3d365
Author: Ricardo Wurmus <address@hidden>
Date:   Wed Jan 23 22:06:02 2019 +0100

    gnu: catimg: Simplify.
    
    * gnu/packages/image-viewers.scm (catimg)[arguments]: Rename custom
    "configure" phase to "patch-convert"; remove custom "build" phase; move
    "install-script" phase after "install"; simplify phases.
---
 gnu/packages/image-viewers.scm | 39 +++++++++++++--------------------------
 1 file changed, 13 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 4188ff2..895802c 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -301,37 +301,24 @@ your images.  Among its features are:
      `(#:tests? #f                      ; no tests
        #:phases
        (modify-phases %standard-phases
-         (replace 'configure
-           (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((magic (assoc-ref %build-inputs "imagemagick"))
-                    (convert (string-append magic "/bin/convert")))
-               (substitute* "catimg"
-                 ;; By replacing "convert", we also replace the "convert"
-                 ;; in the message 'The version of convert is too old, don't
-                 ;; expect good results :('.  This should not happen, but in
-                 ;; practice this error message should not affect us.
-                 (("convert") convert))
-               #t)))
-         (replace 'build
+         (add-after 'unpack 'patch-convert
            (lambda _
-             (let* ((out (assoc-ref %outputs "out"))
-                    (man (string-append out "/share/man/man1")))
-               (zero? (system* "cmake"
-                               (string-append "-DCMAKE_INSTALL_PREFIX=" out)
-                               (string-append "-DMAN_OUTPUT_PATH=" man)
-                               "."))
-               (zero? (system* "make")))))
-         (add-before 'install 'install-script
+             (substitute* "catimg"
+               ;; By replacing "convert", we also replace the "convert"
+               ;; in the message 'The version of convert is too old, don't
+               ;; expect good results :('.  This should not happen, but in
+               ;; practice this error message should not affect us.
+               (("convert") (which "convert")))
+             #t))
+         (add-after 'install 'install-script
            (lambda* (#:key outputs #:allow-other-keys)
              ;; The bash script lacks an file extension.  We have to rename
              ;; it so that the C program and the bash script can be happy
              ;; side by side.
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin")))
-               (install-file "catimg" bin)
-               (rename-file (string-append bin "/catimg")
-                            (string-append bin "/catimg.sh"))
-               #t))))))
+             (copy-file "../source/catimg"
+                        (string-append (assoc-ref outputs "out")
+                                       "/bin/catimg.sh"))
+             #t)))))
     (inputs
      `(("imagemagick" ,imagemagick))) ; for the bash script version
     (home-page "https://github.com/posva/catimg";)



reply via email to

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