summary refs log tree commit diff
path: root/gnu/packages/scanner.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-03-10 18:38:25 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-03-10 18:38:25 +0100
commit8c5533b582bc3fe1293469771d1a326926e84586 (patch)
tree7f71c4dd85489139a11897ee2668e26acdaf40b0 /gnu/packages/scanner.scm
parent2b0c755d195c79bfc95cdbe802e1e2dea1adb7a2 (diff)
parent41ce92501b53caa1dcf89fa81aed71dbf1f85d34 (diff)
downloadguix-8c5533b582bc3fe1293469771d1a326926e84586.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/scanner.scm')
-rw-r--r--gnu/packages/scanner.scm28
1 files changed, 19 insertions, 9 deletions
diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index d030d8ade5..6539756a6e 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
-;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -26,6 +26,7 @@
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages libusb)
   #:use-module ((guix licenses)
                 #:prefix licence:))
@@ -55,7 +56,7 @@
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("libusb-compat" ,libusb-compat)))
+     `(("libusb" ,libusb)))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -63,19 +64,27 @@
            (lambda _
              (setenv "BACKENDS" " ")
              #t))
-         ;; Disable unmaintained tests that that fail with errors resembling:
-         ;;
-         ;; < # by sane-desc 3.5 from sane-backends 1.0.24git on Jul 31 2013
-         ;; ---
-         ;; > # by sane-desc 3.5 from sane-backends 1.0.27 on 1970-01-01#
-         ;; FAIL: sane-desc -m usermap -s ./data
-         (add-before 'configure 'disable-failing-tests
+         (add-after 'unpack 'disable-failing-tests
            (lambda _
+             ;; Disable unmaintained tests that that fail with errors resembling:
+             ;;
+             ;; < # by sane-desc 3.5 from sane-backends 1.0.24git on Jul 31 2013
+             ;; ---
+             ;; > # by sane-desc 3.5 from sane-backends 1.0.27 on 1970-01-01#
+             ;; FAIL: sane-desc -m usermap -s ./data
              (for-each
               (lambda (pattern)
                 (substitute* "testsuite/tools/Makefile.in"
                   (((string-append " " pattern " ")) " ")))
               (list "usermap" "db" "udev" "udev\\+acl" "udev\\+hwdb" "hwdb"))
+
+             ;; Disable tests that try to connect to actual USB hardware & fail
+             ;; with the following error when no USB access is allowed at all:
+             ;;
+             ;; sanei_usb_test: sanei_usb_test.c:849: main: Assertion
+             ;; `test_init (1)' failed.
+             (substitute* "testsuite/sanei/Makefile.in"
+               (("sanei_usb_test\\$\\(EXEEXT\\) ") ""))
              #t))
          (add-after 'install 'install-udev-rules
            (lambda* (#:key outputs #:allow-other-keys)
@@ -104,6 +113,7 @@ package contains the library, but no drivers.")
     (name "sane-backends")
     (inputs
      `(("hplip" ,(@ (gnu packages cups) hplip-minimal))
+       ("libpng" ,libpng)               ; support ‘scanimage --format=png’
        ,@(package-inputs sane-backends-minimal)))
     (arguments
      (substitute-keyword-arguments (package-arguments sane-backends-minimal)