[PATCH] gnu: qiv: Add qiv image viewer for X

  • Done
  • quality assurance status badge
Details
2 participants
  • Danny Milosavljevic
  • R Veera Kumar
Owner
unassigned
Submitted by
R Veera Kumar
Severity
normal

Debbugs page

R Veera Kumar wrote 5 years ago
(address . guix-patches@gnu.org)
20200324093627.GB3208@tulip
Hi,

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


Regards,
R Veera Kumar
[Outreachy Contrib]
India
R Veera Kumar wrote 5 years ago
[PATCH] gnu: qiv: Add new pkg qiv an image viewer for X
(address . 40209@debbugs.gnu.org)
20200324103316.GA3324@tulip
Add qiv an image viewer for X.

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

Toggle diff (61 lines)
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
Danny Milosavljevic wrote 5 years ago
(name . R Veera Kumar)(address . vkor@vkten.in)(address . 40209@debbugs.gnu.org)
20200324130435.53b67995@scratchpost.org
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 .

Toggle quote (2 lines)
>+ #: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?

Toggle quote (6 lines)
>+ #: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?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl5591MACgkQ5xo1VCww
uqVaPwf/YfAuHNKvU6/mY9AoPHXINg61Azd+1I5nBEtusKBTJUb5ezoa2jzN0uX7
3YTZ6JT7UOzYfO/HdYsn5osGZLlZyBUpvTJ/S4GzvpAiXMHmpK92SiuIOHsgbbjZ
JQS8n/e8jsTJldY/7DMrveiZSGsClhzMr6osSKqf/3YSsoyqJlrnudQqJ/efOoZB
8oWmCEGvTZ82kJOO/geZRxLcCyUmE1RMF50EarXEvhfAflO3uOuI81Om1WzlK8f5
MeS8vBcMxLY+wnsQ1gRv0O89VEakawgWt1jcoOPruj19Yv6sM6LaViJ0fUzGuMSn
QnhXqcDWbh9mhybnQzagg+stm4b0HA==
=zV0D
-----END PGP SIGNATURE-----


R Veera Kumar wrote 5 years ago
[PATCH v2] gnu: image-viewers: Add new pkg qiv an image viewer for X
(address . 40209@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20200325080858.GA1742@tulip
Add qiv (Quick Image Viewer) is a very small and fast GDK/Imlib2
image viewer for X.

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

Toggle diff (52 lines)
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
R Veera Kumar wrote 5 years ago
[PATCH v3] gnu: Add qiv.
(address . 40209@debbugs.gnu.org)
20200331110355.GA11085@tulip
* 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(+)

Toggle diff (62 lines)
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)))
--
2.26.0
Danny Milosavljevic wrote 5 years ago
(name . R Veera Kumar)(address . vkor@vkten.in)(address . 40209@debbugs.gnu.org)
20200331131712.5b0c7414@scratchpost.org
Hi Veera,

thanks!

Toggle quote (3 lines)
> + ;; 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.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6DJrgACgkQ5xo1VCww
uqWv1gf+OsaZbLbLavjpy/BIu+UWxdZ7ycDFp9woC/Q5fV7I8lAIN7bMa+kb+YRi
+9AglPC9c0BaBOsXg5CeC8HlWBrXIsPa+KECNULZN0JgLuyv6fF1thWodYYgRfry
LWzCIK6I2zgkG3ne0qzGtj0JQnHRaraP5RMPwAvmXEEpjGOo8RoGOaT2ocj/ckc1
E4wCm+S5Bdi5hLtEY5+3PzKq3iIC1Iy2kmFUegphBv2rOpiFjxaGj7HRnrcFO8lv
gxSc6HMzx+WrYY/0WLVoJ1WY5nzjuJ24GbSWyOt24XL7IYxc6nw+RU9nER5pgs/1
dIhAqX9e1rcKEOHuQOOfdm/WLlHcBQ==
=pEdj
-----END PGP SIGNATURE-----


R Veera Kumar wrote 5 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 40209@debbugs.gnu.org)
20200331115346.GA11075@tulip
On Tue, Mar 31, 2020 at 01:17:12PM +0200, Danny Milosavljevic wrote:
Toggle quote (12 lines)
> 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.

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

Is it neccessary?

Am finding about it.
Toggle quote (2 lines)
> Everything else it fine.

Thanks,
R Veera Kumar
Danny Milosavljevic wrote 5 years ago
Re: [PATCH v2] gnu: image-viewers: Add new pkg qiv an image viewer for X
(name . R Veera Kumar)(address . vkor@vkten.in)(address . 40209@debbugs.gnu.org)
20200331153815.37a77f5b@scratchpost.org
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
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6DR8cACgkQ5xo1VCww
uqWrLQf/U76MZva008puN3hpRznGNjcnAWrtFB73uHoKS9cP4XnhClU/zNRZOgl3
EjJrhIpDPfizuT1m6f1eFW1Kh8XTkeavTkXmp8CfQIfi0a67gMiQyDIw+4SqoyHG
5uIMvTK+eMXUPAYgOEDVOR3BO6mSHEX7/iWWMnKpbrV0apOp1hq3g4sI+TlVugjU
s2pxwEC7wJXnJU0sP++WgjII/j0By1YhjUYVv7r52hKgvYpX8iZ2ihukTjSDnjvC
VSMQJOqs68IJaDKZZ1L1jEezwOe7vFHNMfNWENZo4Uw2MT+LIE/VzvxPUvA5ngNj
/h2IigpW0hl0sCrJ16W0yzmMtmzsSQ==
=nK72
-----END PGP SIGNATURE-----


R Veera Kumar wrote 5 years ago
[PATCH v4] gnu: Add qiv.
(address . 40209@debbugs.gnu.org)
20200401010703.GA3180@tulip
* gnu/packages/image-viewers.scm (qiv): New variable.

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

Toggle diff (72 lines)
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@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,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
Danny Milosavljevic wrote 5 years ago
(name . R Veera Kumar)(address . vkor@vkten.in)(address . 40209-done@debbugs.gnu.org)
20200401122021.28d87758@scratchpost.org
Hi Veera,

Thanks for the patch!

pushed to guix master as commit e2bd0af373d3abfba645647e6ec674670f2bd1e4 with
tiny changes.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl6EauUACgkQ5xo1VCww
uqVYBQf/Z9jJeRQqBUX3MHyVrB2EVl5P0bVqBe5j+WuvzBnEMmH4fFDZxpQIeVRH
DvvaO5g1kEIo6fZ/xab0i3vzgLSPq/Jt5L3UR5cwGhsAnK2Os4knEZTPI4f4ExpJ
I9aewM8HJQsGQEXkILYbHhf2YRnvHHDmJ6K11sYM2xd5Nfl4couPBt/howxJ9PqI
2HS3UBqVjfUmkw8/WJS75DTYXX2tTVxgTEM+UYwrButbi5nKv3Xw2WCOnQh8L7Ty
a8U1oQGaMzK5W8oWF84g/B7GMwl4gitlLGaboRiBMCCJGo3QfsBH0ExJyArqrJBq
BWM4XBt271Gyy1caAH27kDYa4nKQRg==
=G1g9
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 40209@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40209
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help