all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#54978] [PATCH] gnu: Add utsushi.
@ 2022-04-17  0:31 joaog.bastos via Guix-patches via
  2022-05-18 20:35 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: joaog.bastos via Guix-patches via @ 2022-04-17  0:31 UTC (permalink / raw)
  To: 54978

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnu-add-utsushi.patch --]
[-- Type: text/x-patch; name=gnu-add-utsushi.patch, Size: 6411 bytes --]

From 9743540edfd9e87b7f8fc0057f9fb5acc6bd7917 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Gabriel?= <joaog.bastos@protonmail.ch>
Date: Sat, 16 Apr 2022 18:05:44 -0300
Subject: [PATCH] gnu: Add utsushi.

* gnu/packages/scanner.scm (utsushi): New variable.
(sane-backends)[inputs, arguments]: Add utsushi backend.
---
 gnu/packages/scanner.scm | 70 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 66 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm
index e7a5a2b..582b201 100644
--- a/gnu/packages/scanner.scm
+++ b/gnu/packages/scanner.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2017, 2019, 2020, 2022 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2022 João Gabriel <joaog.bastos@protonmail.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@ (define-module (gnu packages scanner)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages avahi)
+  #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -31,6 +33,7 @@ (define-module (gnu packages scanner)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pkg-config)
@@ -203,14 +206,16 @@ (define-public sane-backends-minimal
 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.
+;; This variant links in the hpaio backend provided by hplip and the
+;; utsushi backend, which adds support for some HP and EPSON scanners,
+;; respectively, whose backends are not maintained by the SANE project,
+;; and builds all of those backends.
 (define-public sane-backends
   (package/inherit sane-backends-minimal
     (name "sane-backends")
     (inputs
      `(("hplip" ,(@ (gnu packages cups) hplip-minimal))
+       ("utsushi" ,utsushi)
        ("libjpeg" ,libjpeg-turbo)       ; for pixma/epsonds/other back ends
        ("libpng" ,libpng)               ; support ‘scanimage --format=png’
        ("libxml2" ,libxml2)             ; for pixma back end
@@ -230,7 +235,8 @@ (define-public sane-backends
            (add-after 'unpack 'add-backends
              (lambda _
                (substitute* "backend/dll.conf.in"
-                 (("hp5590" all) (format #f "~a~%~a" all "hpaio")))
+                 (("hp5590" all) (format #f "~a~%~a" all "hpaio"))
+                 (("v4l" all) (format #f "~a~%~a" all "utsushi")))
                #t))
            (add-after 'install 'install-hpaio
              (lambda* (#:key inputs outputs #:allow-other-keys)
@@ -242,6 +248,17 @@ (define out (string-append (assoc-ref outputs "out")
                 (lambda (file)
                   (symlink file (string-append out "/" (basename file))))
                 (find-files hplip))
+               #t))
+           (add-after 'install-hpaio 'install-utsushi
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (define utsushi (string-append (assoc-ref inputs "utsushi")
+                                              "/lib/utsushi/sane"))
+               (define out (string-append (assoc-ref outputs "out")
+                                          "/lib/sane"))
+               (for-each
+                 (lambda (file)
+                   (symlink file (string-append out "/" (basename file))))
+                 (find-files utsushi))
                #t))))))
     (synopsis
      "Raster image scanner library and drivers, with scanner support")
@@ -393,3 +410,48 @@ (define-public xsane
 XSane talks to scanners through the @acronym{SANE, Scanner Access Now Easy}
 back-end library, which supports almost all existing scanners.")
     (license license:gpl2+)))
+
+(define-public utsushi
+  (let ((commit "839d06a5a80b353cb604eb9f7d352a1648ab1fdf"))
+    (package
+      (name "utsushi")
+      (version (git-version "0.65.0" "1" commit))
+      (source (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://gitlab.com/utsushi/utsushi")
+               (commit commit)))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0i6ipqy61abbsmqqqy5sii0vlib146snvp975sgjmv4nzy9mwf24"))))
+      (build-system gnu-build-system)
+      (arguments
+        `(#:tests? #f
+          #:configure-flags
+          (list (string-append "--with-boost-libdir="
+                               (assoc-ref %build-inputs "boost")
+                               "/lib")
+                "CXXFLAGS=-Wno-error")
+          #:phases
+          (modify-phases %standard-phases
+            (add-before 'bootstrap 'zap-unnecessary-git-dependency
+              (lambda _
+                (substitute* "configure.ac"
+                  (("-m4_esyscmd_s\\(\\[git describe --always\\]\\)") ""))))
+            (add-after 'install 'install-udev-rules
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((out (assoc-ref outputs "out")))
+                  (mkdir-p (string-append out "/lib/udev/rules.d"))
+                  (install-file "drivers/esci/utsushi-esci.rules"
+                                (string-append out "/lib/udev/rules.d"))))))))
+      (inputs (list boost eudev sane-backends-minimal libusb
+                    libjpeg-turbo imagemagick libtiff zlib))
+      (native-inputs (list util-linux autoconf autoconf-archive automake
+                           gettext-minimal libtool libxslt pkg-config))
+      (home-page "https://gitlab.com/utsushi/utsushi")
+      (synopsis "Image scanning software for EPSON devices")
+      (description "Utsushi is a set of applications for image scanning with
+support for a number of EPSON scanners, including a compatibility driver to
+interface with software built around the @acronym{SANE, Scanner Access Now Easy}
+standard.")
+      (license license:gpl3))))
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#54978] [PATCH] gnu: Add utsushi.
  2022-04-17  0:31 [bug#54978] [PATCH] gnu: Add utsushi joaog.bastos via Guix-patches via
@ 2022-05-18 20:35 ` Ludovic Courtès
  2023-09-01 23:48   ` Vagrant Cascadian
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2022-05-18 20:35 UTC (permalink / raw)
  To: joaog.bastos; +Cc: 54978

Hi João,

"joaog.bastos" <joaog.bastos@protonmail.ch> skribis:

> From 9743540edfd9e87b7f8fc0057f9fb5acc6bd7917 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Jo=C3=A3o=20Gabriel?= <joaog.bastos@protonmail.ch>
> Date: Sat, 16 Apr 2022 18:05:44 -0300
> Subject: [PATCH] gnu: Add utsushi.
>
> * gnu/packages/scanner.scm (utsushi): New variable.
> (sane-backends)[inputs, arguments]: Add utsushi backend.

I pushed the first part (adding utushi), with minor changes: the license
is ‘gpl3+’ (because source file headers say “or any later version”), ran
‘guix style’.

Unfortunately the second part with have to wait a little longer due to
the large number of packages that depend on sane-backends:

--8<---------------cut here---------------start------------->8---
$ guix refresh -l sane-backends
Building the following 1337 packages would ensure 2416 dependent packages are rebuilt: […]
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#54978] [PATCH] gnu: Add utsushi.
  2022-05-18 20:35 ` Ludovic Courtès
@ 2023-09-01 23:48   ` Vagrant Cascadian
  0 siblings, 0 replies; 3+ messages in thread
From: Vagrant Cascadian @ 2023-09-01 23:48 UTC (permalink / raw)
  To: Ludovic Courtès, joaog.bastos; +Cc: 54978, control

[-- Attachment #1: Type: text/plain, Size: 1290 bytes --]

retitle 54978 add support for utsushi to sane-backends
thanks

On 2022-05-18, Ludovic Courtès wrote:
> "joaog.bastos" <joaog.bastos@protonmail.ch> skribis:
>
>> From 9743540edfd9e87b7f8fc0057f9fb5acc6bd7917 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Jo=C3=A3o=20Gabriel?= <joaog.bastos@protonmail.ch>
>> Date: Sat, 16 Apr 2022 18:05:44 -0300
>> Subject: [PATCH] gnu: Add utsushi.
>>
>> * gnu/packages/scanner.scm (utsushi): New variable.
>> (sane-backends)[inputs, arguments]: Add utsushi backend.
>
> I pushed the first part (adding utushi), with minor changes: the license
> is ‘gpl3+’ (because source file headers say “or any later version”), ran
> ‘guix style’.
>
> Unfortunately the second part with have to wait a little longer due to
> the large number of packages that depend on sane-backends:
>
> --8<---------------cut here---------------start------------->8---
> $ guix refresh -l sane-backends
> Building the following 1337 packages would ensure 2416 dependent packages are rebuilt: […]
> --8<---------------cut here---------------end--------------->8---

When reviewing weather this bug was completed, it would appear that this
second part for sane-backends was never finished...

Retitling appropriately.

live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-01 23:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-17  0:31 [bug#54978] [PATCH] gnu: Add utsushi joaog.bastos via Guix-patches via
2022-05-18 20:35 ` Ludovic Courtès
2023-09-01 23:48   ` Vagrant Cascadian

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.