summary refs log tree commit diff
path: root/gnu/packages/image-viewers.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
committerRicardo Wurmus <rekado@elephly.net>2019-02-06 13:03:26 +0100
commitba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d (patch)
tree75c68e44d3d76440f416552711b1a47ec83e411e /gnu/packages/image-viewers.scm
parentf380f9d55e6757c242acf6c71c4a3ccfcdb066b2 (diff)
parent4aeb7f34c948f32363f2ae29c6942c6328df758c (diff)
downloadguix-ba88eea2b3a8a33ecd7fc0ec64e3917c6c2fe21d.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/image-viewers.scm')
-rw-r--r--gnu/packages/image-viewers.scm63
1 files changed, 25 insertions, 38 deletions
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 62f6674691..895802cc94 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2017 nee <nee-git@hidamari.blue>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -54,6 +54,7 @@
   #:use-module (gnu packages photo)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages))
@@ -125,28 +126,25 @@ actions.")
 
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'autogen
+         (add-before 'bootstrap 'pre-bootstrap
            (lambda _
              (define (write-dummy-changelog port)
                (display "See Git history for a change log.\n" port))
-
-             (setenv "NOCONFIGURE" "true")
-
              ;; Create ChangeLog{,.html} to placate the makefile, which would
              ;; otherwise require access to the Git repo.
              (call-with-output-file "ChangeLog"
                write-dummy-changelog)
              (call-with-output-file "ChangeLog.html"
                write-dummy-changelog)
-
-             (zero? (system* "sh" "autogen.sh")))))))
+             (setenv "NOCONFIGURE" "true")
+             #t)))))
     (inputs
      `(("clutter" ,clutter)
        ("libchamplain" ,libchamplain)
        ("lcms" ,lcms)
        ("exiv2" ,exiv2)
        ("libpng" ,libpng)
-       ("gtk+" ,gtk+-2)))
+       ("gtk+" ,gtk+)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
@@ -238,12 +236,14 @@ it and customize it for your needs.")
     (version "1.7")
     (source
       (origin
-        (method url-fetch)
-        (uri (string-append "https://github.com/hellosiyan/Viewnior/archive/"
-                            name "-" version ".tar.gz"))
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/hellosiyan/Viewnior.git")
+               (commit (string-append name "-" version))))
+        (file-name (git-file-name name version))
         (sha256
          (base32
-          "1rpkk721s3xas125q3g0fl11b5zsrmzv9pzl6ddzcy4sj2rd7ymr"))))
+          "0y4hk3vq8psba5k615w18qj0kbdfp5w0lm98nv5apy6hmcpwfyig"))))
     (build-system meson-build-system)
     (arguments
      '(#:phases
@@ -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")