diff mbox series

[bug#40209,v3] gnu: Add qiv.

Message ID 20200331110355.GA11085@tulip
State Accepted
Headers show
Series [bug#40209,v3] gnu: Add qiv. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

R Veera Kumar March 31, 2020, 11:03 a.m. UTC
* gnu/packages/image-viewers.scm (qiv): New variable.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
---
Changes in v3:
 - Commit msg as per changelog format.
 - Change quasi quote to normal in modify phases 'configure
 - Add lcms2 and jpeg support
Changes in v2:
 - Add into image-viewers instead of separate
 - Add reason for no make check as comments
 - Correct indentation using indent-code.el
---
 gnu/packages/image-viewers.scm | 45 ++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Comments

Danny Milosavljevic March 31, 2020, 11:17 a.m. UTC | #1
Hi Veera,

thanks!

> +       ;; make install runs the built qiv binary
> +       ;; which fails as no X in build env

But that should mean that this package should fail to install.

Doesn't it?

Also, you can just start an X server. (search for the text "Xvfb" in gnu/packages)

Everything else it fine.
R Veera Kumar March 31, 2020, 11:53 a.m. UTC | #2
On Tue, Mar 31, 2020 at 01:17:12PM +0200, Danny Milosavljevic wrote:
> Hi Veera,
> 
> thanks!
> 
> > +       ;; make install runs the built qiv binary
> > +       ;; which fails as no X in build env
> 
> But that should mean that this package should fail to install.
> 
> Doesn't it?
> 

I am running the build in X environment (Mate DM).

Package builds fine. And installs fine. And works fine.

The Makefile has this:

	@if ./qiv -f ./intro.jpg ; \
        then echo "-- Test Passed --" ; \
        else echo "-- Test Failed --" ; \
        fi

It justs echos this in build log which I saw.

> Also, you can just start an X server. (search for the text "Xvfb" in gnu/packages)
>

Is it neccessary?

Am finding about it. 
 
> Everything else it fine.

Thanks,
R Veera Kumar
diff mbox series

Patch

diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 8f3f61c4b1..bc2ad69473 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -13,6 +13,7 @@ 
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu@riseup.net>
+;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -596,3 +597,47 @@  with tiling window managers.  Features include:
 @end itemize\n")
     (home-page "https://github.com/eXeC64/imv")
     (license license:expat)))
+
+(define-public qiv
+  (package
+    (name "qiv")
+    (version "2.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://spiegl.de/qiv/download/qiv-"
+                           version ".tgz"))
+       (sha256
+        (base32 "1rlf5h67vhj7n1y7jqkm9k115nfnzpwngj3kzqsi2lg676srclv7"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("imlib2" ,imlib2)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+-2)
+       ("lcms" ,lcms)
+       ("libjpeg" ,libjpeg)
+       ("libtiff" ,libtiff)
+       ("libexif" ,libexif)
+       ("libx11" ,libx11)
+       ("libxext" ,libxext)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)) ;; no configure script
+       #:tests? #f            ;; there is no check target
+       ;; make install runs the built qiv binary
+       ;; which fails as no X in build env
+       #:make-flags
+       (list
+        (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+    (home-page "http://spiegl.de/qiv/")
+    (synopsis "Graphical image viewer for X")
+    (description
+     "Quick Image Viewer is a small and fast GDK/Imlib2 image viewer.
+Features include zoom, maxpect, scale down, fullscreen, slideshow, delete,
+brightness/contrast/gamma correction, pan with keyboard and mouse, flip,
+rotate left/right, jump/forward/backward images, filename filter and use it
+to set X desktop background.")
+    (license license:gpl2)))