From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:53187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gy51w-0008BC-2P for guix-patches@gnu.org; Sun, 24 Feb 2019 20:26:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gy51u-0006PR-Rm for guix-patches@gnu.org; Sun, 24 Feb 2019 20:26:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gy51t-0006PB-Ri for guix-patches@gnu.org; Sun, 24 Feb 2019 20:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gy51t-000855-Oq for guix-patches@gnu.org; Sun, 24 Feb 2019 20:26:01 -0500 Subject: [bug#34644] [PATCH] gnu: Add xsane. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:53082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gy51J-00086u-44 for guix-patches@gnu.org; Sun, 24 Feb 2019 20:25:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gy51H-0005ja-VT for guix-patches@gnu.org; Sun, 24 Feb 2019 20:25:25 -0500 Received: from tobias.gr ([2001:470:7405::1]:52620) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gy51H-0005gW-C8 for guix-patches@gnu.org; Sun, 24 Feb 2019 20:25:23 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 6e54a902 for ; Mon, 25 Feb 2019 01:25:17 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id fb82a0fb (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 25 Feb 2019 01:25:15 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Mon, 25 Feb 2019 02:25:02 +0100 Message-Id: <20190225012502.7244-1-me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: 34644@debbugs.gnu.org * gnu/packages/scanner.scm (xsane): New public variable. --- gnu/packages/scanner.scm | 70 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 920f2ede80..70106a7796 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 John Darrington ;;; Copyright © 2015 Andy Wingo ;;; Copyright © 2016 Andy Patterson -;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018 Efraim Flashner ;;; ;;; This file is part of GNU Guix. @@ -21,10 +21,14 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages scanner) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gtk) + #:use-module (gnu packages image) #:use-module (gnu packages libusb) #:use-module (gnu packages pkg-config) #:use-module (guix build-system gnu) #:use-module (guix download) + #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix licence:) #:use-module (guix packages) @@ -132,3 +136,67 @@ package contains the library, but no drivers.") proving access to any raster image scanner hardware (flatbed scanner, hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The package contains the library and drivers."))) + +(define-public xsane + (package + (name "xsane") + (version "0.999") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/sane-project/frontend/xsane.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "08zvxj7i1s88ckrsqldmsrikc3g62a6p3s3i5b5x4krcfpi3vs50")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "xsanedocdir=" (assoc-ref %outputs "out") + "/share/doc/" ,name "-" ,version)) + #:tests? #f ; no test suite + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-invalid-dereference + ;; Fix the following compilation error with libpng: + ;; xsane-save.c: In function ‘xsane_save_png’: + ;; xsane-save.c:4913:21: error: dereferencing pointer to + ;; incomplete type ‘png_struct {aka struct png_struct_def}’ + ;; if (setjmp(png_ptr->jmpbuf)) + ;; ^ + (lambda _ + (substitute* "src/xsane-save.c" + (("png_ptr->jmpbuf") "png_jmpbuf(png_ptr)")) + #t)) + (add-after 'unpack 'use-sane-help-browser + (lambda _ + (substitute* "src/xsane.h" + (("netscape") "xdg-open")) + #t)) + (add-after 'install 'delete-empty-/sbin + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (rmdir (string-append out "/sbin")) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("gtk+" ,gtk+-2) + ("lcms" ,lcms) + ("libjpeg" ,libjpeg) + ("libtiff" ,libtiff) + ("sane-backends" ,sane-backends))) + (home-page "https://gitlab.com/sane-project/frontend/xsane") + (synopsis "Featureful graphical interface for document and image scanners") + (description + "XSane is a graphical interface for controlling a scanner and acquiring +images from it. You can photocopy multi-page documents and save, fax, print, +or e-mail your scanned images. It is highly configurable and exposes all +device settings, letting you fine-tune the final result. It can also be used +as a GIMP plugin to aquire images directly from a scanner. + +XSane is a front-end for SANE, which means that almost any existing scanner is +supported: flatbed and hand-held scanners, video and still cameras, and frame +grabbers.") + (license licence:gpl2+))) ; lib/snprintf.c is under the ‘Artistic’ licence -- 2.20.1