From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:35279) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJRrQ-0001iY-G9 for guix-patches@gnu.org; Tue, 31 Mar 2020 21:08:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJRrP-000170-4Q for guix-patches@gnu.org; Tue, 31 Mar 2020 21:08:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJRrP-00016H-0Q for guix-patches@gnu.org; Tue, 31 Mar 2020 21:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJRrO-0007II-S3 for guix-patches@gnu.org; Tue, 31 Mar 2020 21:08:02 -0400 Subject: [bug#40209] [PATCH v4] gnu: Add qiv. References: <20200324093627.GB3208@tulip> In-Reply-To: <20200324093627.GB3208@tulip> Resent-Message-ID: Date: Wed, 1 Apr 2020 06:37:03 +0530 From: R Veera Kumar Message-ID: <20200401010703.GA3180@tulip> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40209@debbugs.gnu.org * gnu/packages/image-viewers.scm (qiv): New variable. Signed-off-by: R Veera Kumar --- 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 ;;; Copyright © 2019 Pierre Langlois ;;; Copyright © 2020 Peng Mei Yu +;;; Copyright © 2020 R Veera Kumar ;;; ;;; 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