GNU bug report logs - #40209
[PATCH] gnu: qiv: Add qiv image viewer for X

Previous Next

Package: guix-patches;

Reported by: R Veera Kumar <vkor <at> vkten.in>

Date: Tue, 24 Mar 2020 10:22:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40209 in the body.
You can then email your comments to 40209 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 24 Mar 2020 10:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to R Veera Kumar <vkor <at> vkten.in>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 24 Mar 2020 10:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: R Veera Kumar <vkor <at> vkten.in>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: qiv: Add qiv image viewer for X
Date: Tue, 24 Mar 2020 15:06:27 +0530
Hi,

Add Quick Image Viewer (qiv) for X. A new pkg submission.

Website: http://spiegl.de/qiv/

Regards,
R Veera Kumar
[Outreachy Contrib]
India




Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 24 Mar 2020 10:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: R Veera Kumar <vkor <at> vkten.in>
To: 40209 <at> debbugs.gnu.org
Subject: [PATCH] gnu: qiv: Add new pkg qiv an image viewer for X
Date: Tue, 24 Mar 2020 16:03:16 +0530
Add qiv an image viewer for X.

Signed-off-by: R Veera Kumar <vkor <at> vkten.in>
---
 gnu/packages/qiv.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 gnu/packages/qiv.scm

diff --git a/gnu/packages/qiv.scm b/gnu/packages/qiv.scm
new file mode 100644
index 0000000000..76b3c5702c
--- /dev/null
+++ b/gnu/packages/qiv.scm
@@ -0,0 +1,53 @@
+(define-module (gnu packages qiv)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages image)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages photo)
+  #:use-module (gnu packages pkg-config))
+
+
+(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)
+       ("libtiff" ,libtiff)
+       ("libexif" ,libexif)
+       ("libpng" ,libpng)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete `configure))
+       #:tests? #f
+       #:make-flags
+        (list
+          "CC=gcc"
+          "LCMS="
+          (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 very small and fast GDK/Imlib image viewer.
+Features include zoom, maxpect, scale down, fullscreen, brightness/contrast/
+gamma correction, slideshow, pan with keyboard and mouse, rotate left/right,
+flip, delete, jump/forward/backward images, filename filter and use it to
+set X desktop background.")
+    (license license:gpl2)))
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 24 Mar 2020 12:05:01 GMT) Full text and rfc822 format available.

Message #11 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: R Veera Kumar <vkor <at> vkten.in>
Cc: 40209 <at> debbugs.gnu.org
Subject: Re: [bug#40209] [PATCH] gnu: qiv: Add new pkg qiv an image viewer
 for X
Date: Tue, 24 Mar 2020 13:04:35 +0100
[Message part 1 (text/plain, inline)]
Hi Veera,

in order to make this actually work in a Guix release, please refer to the new
file in gnu/local.mk in GNU_SYSTEM_MODULES .

Or better yet, in this case I would prefer if you just added qiv to the existing
file gnu/packages/image-viewers.scm .

>+       #:tests? #f

Why?  Please add a comment.

It seems that the changelog mentions that the tests are now in "make install".
Did the tests work?

>+       #:make-flags
>+        (list
>+          "CC=gcc"
>+          "LCMS="
>+          (string-append "PREFIX=" (assoc-ref %outputs "out")))))

Indentation is off.

Otherwise it looks good.

Could you send a v2 of your patch with these points addressed?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Wed, 25 Mar 2020 08:10:01 GMT) Full text and rfc822 format available.

Message #14 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: R Veera Kumar <vkor <at> vkten.in>
To: 40209 <at> debbugs.gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH v2] gnu: image-viewers: Add new pkg qiv an image viewer for X
Date: Wed, 25 Mar 2020 13:38:58 +0530
Add qiv (Quick Image Viewer) is a very small and fast GDK/Imlib2
image viewer for X.

Signed-off-by: R Veera Kumar <vkor <at> vkten.in>
---
Changes in v2:
 - Add into image-viewers instead of separate
 - Add reason for no make check as comments
 - Correct indentation using indent-code.el
 - remove libpng from inputs
---
 gnu/packages/image-viewers.scm | 42 ++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 8f3f61c4b1..133df4f741 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -596,3 +596,45 @@ 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)
+       ("libtiff" ,libtiff)
+       ("libexif" ,libexif)))
+    (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
+        "CC=gcc"
+        "LCMS=" ;; requires lcms2
+        (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 very small and fast GDK/Imlib2 image viewer.
+Features include zoom, maxpect, scale down, fullscreen, brightness/contrast/
+gamma correction, slideshow, pan with keyboard and mouse, rotate left/right,
+flip, delete, jump/forward/backward images, filename filter and use it to
+set X desktop background.")
+    (license license:gpl2)))
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 31 Mar 2020 11:05:02 GMT) Full text and rfc822 format available.

Message #17 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: R Veera Kumar <vkor <at> vkten.in>
To: 40209 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: Add qiv.
Date: Tue, 31 Mar 2020 16:33:55 +0530
* gnu/packages/image-viewers.scm (qiv): New variable.

Signed-off-by: R Veera Kumar <vkor <at> 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(+)

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 <at> gmail.com>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu <at> riseup.net>
+;;; Copyright © 2020 R Veera Kumar <vkor <at> 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)))
-- 
2.26.0





Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 31 Mar 2020 11:18:01 GMT) Full text and rfc822 format available.

Message #20 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: R Veera Kumar <vkor <at> vkten.in>
Cc: 40209 <at> debbugs.gnu.org
Subject: Re: [bug#40209] [PATCH v3] gnu: Add qiv.
Date: Tue, 31 Mar 2020 13:17:12 +0200
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 31 Mar 2020 11:55:02 GMT) Full text and rfc822 format available.

Message #23 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: R Veera Kumar <vkor <at> vkten.in>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 40209 <at> debbugs.gnu.org
Subject: Re: [bug#40209] [PATCH v3] gnu: Add qiv.
Date: Tue, 31 Mar 2020 17:23:46 +0530
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




Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Tue, 31 Mar 2020 13:39:02 GMT) Full text and rfc822 format available.

Message #26 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: R Veera Kumar <vkor <at> vkten.in>
Cc: 40209 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: image-viewers: Add new pkg qiv an image viewer
 for X
Date: Tue, 31 Mar 2020 15:38:15 +0200
[Message part 1 (text/plain, inline)]
There are different kinds of comments we use (by convention):

;; These comments are for sentences describing the next thing.
(foo...)


;;;
;;; These comments are for describing entire sections.
;;;



(foo...) ; these just for short trailing note
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#40209; Package guix-patches. (Wed, 01 Apr 2020 01:08:02 GMT) Full text and rfc822 format available.

Message #29 received at 40209 <at> debbugs.gnu.org (full text, mbox):

From: R Veera Kumar <vkor <at> vkten.in>
To: 40209 <at> debbugs.gnu.org
Subject: [PATCH v4] gnu: Add qiv.
Date: Wed, 1 Apr 2020 06:37:03 +0530
* gnu/packages/image-viewers.scm (qiv): New variable.

Signed-off-by: R Veera Kumar <vkor <at> vkten.in>
---
Changes in v4:
 - Make install check pass by setting up Xvfb for test
 - Patch Makefile so that qiv runs and exits by itself during test
 - Make proper guile comments
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 | 55 ++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index 8f3f61c4b1..6bbbf2a3b0 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon <at> gmail.com>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2020 Peng Mei Yu <pengmeiyu <at> riseup.net>
+;;; Copyright © 2020 R Veera Kumar <vkor <at> vkten.in>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -596,3 +597,57 @@ 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)
+       ;; for testing
+       ("xorg-server" ,xorg-server-for-tests)))
+    (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
+         (add-before 'install 'patch-file-start-xserver
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; patch the file so that qiv runs and exits by itself
+             (substitute* "Makefile"
+               (("./qiv -f ./intro.jpg") "./qiv -f -C -s ./intro.jpg"))
+             (let ((xorg-server (assoc-ref inputs "xorg-server")))
+               ;; There must be a running X server and make install doesn't start one.
+               ;; Therefore we must do it.
+               (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
+               (setenv "DISPLAY" ":1") ) #t)))
+       #:tests? #f                      ; there is no check target
+       #: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)))
-- 
2.26.0





Reply sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
You have taken responsibility. (Wed, 01 Apr 2020 10:21:02 GMT) Full text and rfc822 format available.

Notification sent to R Veera Kumar <vkor <at> vkten.in>:
bug acknowledged by developer. (Wed, 01 Apr 2020 10:21:02 GMT) Full text and rfc822 format available.

Message #34 received at 40209-done <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: R Veera Kumar <vkor <at> vkten.in>
Cc: 40209-done <at> debbugs.gnu.org
Subject: Re: [bug#40209] [PATCH v4] gnu: Add qiv.
Date: Wed, 1 Apr 2020 12:20:21 +0200
[Message part 1 (text/plain, inline)]
Hi Veera,

Thanks for the patch!

pushed to guix master as commit e2bd0af373d3abfba645647e6ec674670f2bd1e4 with
tiny changes.
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 29 Apr 2020 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.