From patchwork Mon Feb 25 01:25:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Geerinckx-Rice X-Patchwork-Id: 1238 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 776AC16CAD; Mon, 25 Feb 2019 01:26:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id E0CCD16CAA for ; Mon, 25 Feb 2019 01:26:19 +0000 (GMT) Received: from localhost ([127.0.0.1]:58340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gy52B-0008D3-0a for patchwork@mira.cbaines.net; Sun, 24 Feb 2019 20:26:19 -0500 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 X-Loop: help-debbugs@gnu.org Subject: [bug#34644] [PATCH] gnu: Add xsane. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Feb 2019 01:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34644 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34644@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155105794031035 (code B ref -1); Mon, 25 Feb 2019 01:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2019 01:25:40 +0000 Received: from localhost ([127.0.0.1]:50711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gy51U-00084R-8S for submit@debbugs.gnu.org; Sun, 24 Feb 2019 20:25:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gy51R-00084D-OR for submit@debbugs.gnu.org; Sun, 24 Feb 2019 20:25:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:38006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gy51M-0005mW-4J for submit@debbugs.gnu.org; Sun, 24 Feb 2019 20:25:28 -0500 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=2018; i=me@tobias.gr; bh=rXyAd2x2j Jh31hSCVv6W+Vp/+y+8D3RGkkpHavpfIYA=; b=c5GRKx882SpOJqdlvd2DLwTy/ SZTaGUpjKD3AwscASnh/a5mF0DUFEc/Ym8Az8Ch6PoyCF3jMccOxjUJDCO+nh1pf GyMmUSlHYVDGVO2VuX5hmJCm6sLTmY0hgXh/I6bj5dMp3a/f8tprCAYlzsD12RN+ qcGKcAwDPdCG7A+LqJK1ufmAuPlj+p30EKwhHMA1XYdRGfm7g1+rYmNRsvwqriw9 HcdRu+q7s7m8e+aL9faSIeClgO6qlbLskGxP4q5PVhQdoMvjMTsilR2s82yyVhBS S1ApnsJvLHdfsSOx+fCvFKmGmyyu47gEH3pZGfN6XeXKwCZ7wZMPi1CRNmsLA== 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> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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