summaryrefslogtreecommitdiff
path: root/gnu/packages/scanner.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/scanner.scm')
-rw-r--r--gnu/packages/scanner.scm121
1 files changed, 50 insertions, 71 deletions
diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index 259e378b65..8db959c776 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -42,18 +42,20 @@
#:use-module (gnu packages tls)
#:use-module (gnu packages xml)
#:use-module (guix build-system gnu)
+ #:use-module (guix deprecation)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
#:use-module ((guix licenses)
#:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix search-paths)
#:use-module (guix utils))
(define-public sane-airscan
(package
(name "sane-airscan")
- (version "0.99.27")
+ (version "0.99.36")
(source
(origin
(method git-fetch)
@@ -62,7 +64,7 @@
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1syxsih1kdnz9slsg5a92bqnllagm4cybqk4n2y6mbkqn6h0zlnv"))))
+ (base32 "1dh7rq1g120gqhkr7ac3p7yizm330dj3xqrrg08dff7ra1jx955y"))))
(build-system gnu-build-system)
(arguments
(list #:make-flags
@@ -78,8 +80,9 @@
gnutls
libjpeg-turbo
libpng
+ libtiff
libxml2
- sane-backends))
+ sane))
(home-page "https://github.com/alexpevzner/sane-airscan")
(synopsis "SANE backend for eSCL (AirScan) and WSD document scanners")
(description ; no @acronym{eSCL} because the meaning isn't officially known
@@ -103,10 +106,11 @@ both WSD and eSCL.")
(license (list license:gpl2+ ; the combined work
license:expat)))) ; http_parser.[ch]
-(define-public sane-backends-minimal
+(define-deprecated/public-alias sane-backends-minimal sane)
+(define-public sane
(package
- (name "sane-backends-minimal")
- (version "1.3.1")
+ (name "sane")
+ (version "1.4.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -114,7 +118,9 @@ both WSD and eSCL.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1fb6shx9bz0svcyasmyqs93rbbwq7kzg6l0h1zh3kjvcwhchyv72"))
+ (base32 "09hcqrli127amdxjlj6xd9lvc0rhlhhm8vxrnldbd8c2mxss7dbv"))
+ (patches (search-patches
+ "sane-look-for-plugins-in-SANE_BACKEND_LIB_PATH.patch"))
(modules '((guix build utils)))
(snippet
;; Generated HTML files and udev rules normally embed a
@@ -186,6 +192,11 @@ both WSD and eSCL.")
(string-append out
"/lib/udev/rules.d/"
"60-libsane.rules")))))
+ (add-after 'install 'remove-dll.conf
+ (lambda _
+ ;; dll.conf lists enabled backends, so it should be removed as
+ ;; there are none in this package
+ (delete-file (string-append %output "/etc/sane.d/dll.conf"))))
(add-after 'install 'make-reproducible
;; XXX Work around an old bug <https://issues.guix.gnu.org/26247>.
;; Then work around "Throw to key `decoding-error' ..." by using sed.
@@ -197,6 +208,14 @@ both WSD and eSCL.")
(invoke "sed" "-i" "/^PO-Revision-Date:/d" file))
(list "en@boldquot/LC_MESSAGES/sane-backends.mo"
"en@quot/LC_MESSAGES/sane-backends.mo")))))))))
+ (native-search-paths
+ (list
+ (search-path-specification
+ (variable "SANE_CONFIG_DIR")
+ (files '("etc/sane.d")))
+ (search-path-specification
+ (variable "SANE_BACKEND_LIB_PATH")
+ (files '("lib/sane")))))
(home-page "http://www.sane-project.org")
(synopsis
"Raster image scanner library and drivers, without scanner support")
@@ -206,20 +225,16 @@ hand-held scanner, video- and still-cameras, frame-grabbers, etc.). The
package contains the library, but no drivers.")
(license license:gpl2+))) ; plus linking exception
-;; This variant links in the hpaio backend provided by hplip, which adds
-;; support for HP scanners whose backends are not maintained by the SANE
-;; project, and builds all of those backends.
(define-public sane-backends
- (package/inherit sane-backends-minimal
+ (package/inherit sane
(name "sane-backends")
(inputs
- `(("hplip" ,(@ (gnu packages cups) hplip))
- ("libjpeg" ,libjpeg-turbo) ; for pixma/epsonds/other back ends
+ `(("libjpeg" ,libjpeg-turbo) ; for pixma/epsonds/other back ends
("libpng" ,libpng) ; support ‘scanimage --format=png’
("libxml2" ,libxml2) ; for pixma back end
- ,@(package-inputs sane-backends-minimal)))
+ ,@(package-inputs sane)))
(arguments
- (substitute-keyword-arguments (package-arguments sane-backends-minimal)
+ (substitute-keyword-arguments (package-arguments sane)
((#:phases phases)
`(modify-phases ,phases
(delete 'disable-backends)
@@ -229,22 +244,6 @@ package contains the library, but no drivers.")
;; <https://bugs.gnu.org/39449>
(substitute* "testsuite/backend/genesys/Makefile.in"
((" genesys_unit_tests\\$\\(EXEEXT\\)") ""))
- #t))
- (add-after 'unpack 'add-backends
- (lambda _
- (substitute* "backend/dll.conf.in"
- (("hp5590" all) (format #f "~a~%~a" all "hpaio")))
- #t))
- (add-after 'install 'install-hpaio
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (define hplip (string-append (assoc-ref inputs "hplip")
- "/lib/sane"))
- (define out (string-append (assoc-ref outputs "out")
- "/lib/sane"))
- (for-each
- (lambda (file)
- (symlink file (string-append out "/" (basename file))))
- (find-files hplip))
#t))))))
(synopsis
"Raster image scanner library and drivers, with scanner support")
@@ -288,7 +287,7 @@ package contains the library and drivers.")))
"/lib/udev/rules.d")))))))
(inputs (list boost
eudev
- sane-backends-minimal
+ sane
libusb
libjpeg-turbo
imagemagick
@@ -350,11 +349,7 @@ standard.")
(native-inputs
(list pkg-config))
(inputs
- `(("dbus" ,dbus)
- ("libconfuse" ,libconfuse)
- ("sane-backends" ,sane-backends)
- ("udev" ,eudev)
- ("zlib" ,zlib)))
+ (list dbus libconfuse sane eudev zlib))
(home-page "https://scanbd.sourceforge.io")
(synopsis "Configurable scanner button monitor")
(description "Scanbd stands for scanner button daemon. It regularly polls
@@ -372,25 +367,20 @@ provided the driver also exposes the buttons.")
(license license:gpl2+)))
(define-public xsane
+ (let ((commit "87edc38e6886ad8f31c2b7b289ddf162c88099c8")
+ (revision "0"))
(package
(name "xsane")
- (version "0.999")
+ (version (git-version "0.0.0" revision commit))
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/sane-project/frontend/xsane.git")
- (commit version)))
+ (commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "08zvxj7i1s88ckrsqldmsrikc3g62a6p3s3i5b5x4krcfpi3vs50"))
- ;; Apply some important-looking fixes. There are many more unreleased
- ;; commits upstream. A 1.0 release is planned.
- (patches (search-patches "xsane-fix-memory-leak.patch"
- "xsane-fix-pdf-floats.patch"
- "xsane-fix-snprintf-buffer-length.patch"
- "xsane-support-ipv6.patch"
- "xsane-tighten-default-umask.patch"))
+ (base32 "0hgkpb5dfiwrhprsslahrkjfrkg8fgc8f8ssmqng1aywq3sqpd5l"))
(modules '((guix build utils)))
(snippet
#~(begin
@@ -399,43 +389,32 @@ provided the driver also exposes the buttons.")
;; by replacing it with a newer (free) copy. We let the build fall
;; back to the system version instead, which appears to work fine.
(delete-file "lib/snprintf.c")
- (substitute* "lib/Makefile.in"
- (("snprintf\\.o ") ""))))))
+ (substitute* "lib/Makefile.am"
+ (("snprintf\\.c ") ""))
+ (substitute* "po/POTFILES.in"
+ (("lib/snprintf\\.c") ""))))))
(build-system gnu-build-system)
(arguments
(list
- #:make-flags
- #~(list (string-append "xsanedocdir=" #$output
- "/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)"))))
(add-after 'unpack 'use-sane-help-browser
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "src/xsane.h"
- (("netscape") (search-input-file inputs "bin/xdg-open")))))
- (add-after 'install 'delete-empty-/sbin
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (rmdir (string-append out "/sbin"))))))))
+ (("netscape")
+ (search-input-file inputs "bin/xdg-open"))))))))
(native-inputs
- (list pkg-config))
+ (list autoconf-2.71
+ automake
+ gettext-minimal
+ pkg-config))
(inputs
- (list gtk+-2
+ (list gtk+
lcms
libjpeg-turbo
libtiff
- sane-backends
+ sane
xdg-utils)) ;to open the manual from the Help menu
(home-page "https://gitlab.com/sane-project/frontend/xsane")
(synopsis "Featureful graphical interface for document and image scanners")
@@ -448,4 +427,4 @@ as a GIMP plugin to acquire images directly from a scanner.
XSane talks to scanners through the @acronym{SANE, Scanner Access Now Easy}
back-end library, which supports almost all existing scanners.")
- (license license:gpl2+)))
+ (license license:gpl2+))))