[arch-commits] Commit in sane/repos (26 files)

Dave Reisner dreisner at archlinux.org
Fri Jun 22 12:59:39 UTC 2012


    Date: Friday, June 22, 2012 @ 08:59:38
  Author: dreisner
Revision: 162163

db-move: moved sane from [testing] to [extra] ( i686,  x86_64)

Added:
  sane/repos/extra-i686/PKGBUILD
    (from rev 162156, sane/repos/testing-i686/PKGBUILD)
  sane/repos/extra-i686/libv4l-0.8.3.patch
    (from rev 162156, sane/repos/testing-i686/libv4l-0.8.3.patch)
  sane/repos/extra-i686/sane.install
    (from rev 162156, sane/repos/testing-i686/sane.install)
  sane/repos/extra-i686/sane.xinetd
    (from rev 162156, sane/repos/testing-i686/sane.xinetd)
  sane/repos/extra-i686/saned.service
    (from rev 162156, sane/repos/testing-i686/saned.service)
  sane/repos/extra-i686/saned.socket
    (from rev 162156, sane/repos/testing-i686/saned.socket)
  sane/repos/extra-i686/xerox_mfp_fix_usb_devices.patch
    (from rev 162156, sane/repos/testing-i686/xerox_mfp_fix_usb_devices.patch)
  sane/repos/extra-x86_64/PKGBUILD
    (from rev 162156, sane/repos/testing-x86_64/PKGBUILD)
  sane/repos/extra-x86_64/libv4l-0.8.3.patch
    (from rev 162156, sane/repos/testing-x86_64/libv4l-0.8.3.patch)
  sane/repos/extra-x86_64/sane.install
    (from rev 162156, sane/repos/testing-x86_64/sane.install)
  sane/repos/extra-x86_64/sane.xinetd
    (from rev 162156, sane/repos/testing-x86_64/sane.xinetd)
  sane/repos/extra-x86_64/saned.service
    (from rev 162156, sane/repos/testing-x86_64/saned.service)
  sane/repos/extra-x86_64/saned.socket
    (from rev 162156, sane/repos/testing-x86_64/saned.socket)
  sane/repos/extra-x86_64/xerox_mfp_fix_usb_devices.patch
    (from rev 162156, sane/repos/testing-x86_64/xerox_mfp_fix_usb_devices.patch)
Deleted:
  sane/repos/extra-i686/PKGBUILD
  sane/repos/extra-i686/libv4l-0.8.3.patch
  sane/repos/extra-i686/sane.install
  sane/repos/extra-i686/sane.xinetd
  sane/repos/extra-i686/xerox_mfp_fix_usb_devices.patch
  sane/repos/extra-x86_64/PKGBUILD
  sane/repos/extra-x86_64/libv4l-0.8.3.patch
  sane/repos/extra-x86_64/sane.install
  sane/repos/extra-x86_64/sane.xinetd
  sane/repos/extra-x86_64/xerox_mfp_fix_usb_devices.patch
  sane/repos/testing-i686/
  sane/repos/testing-x86_64/

----------------------------------------------+
 extra-i686/PKGBUILD                          |  133 +++++++++++++-----------
 extra-i686/libv4l-0.8.3.patch                |  128 +++++++++++------------
 extra-i686/sane.install                      |   14 +-
 extra-i686/sane.xinetd                       |   22 ++--
 extra-i686/saned.service                     |    8 +
 extra-i686/saned.socket                      |    9 +
 extra-i686/xerox_mfp_fix_usb_devices.patch   |  134 ++++++++++++-------------
 extra-x86_64/PKGBUILD                        |  133 +++++++++++++-----------
 extra-x86_64/libv4l-0.8.3.patch              |  128 +++++++++++------------
 extra-x86_64/sane.install                    |   14 +-
 extra-x86_64/sane.xinetd                     |   22 ++--
 extra-x86_64/saned.service                   |    8 +
 extra-x86_64/saned.socket                    |    9 +
 extra-x86_64/xerox_mfp_fix_usb_devices.patch |  134 ++++++++++++-------------
 14 files changed, 476 insertions(+), 420 deletions(-)

Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-i686/PKGBUILD	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
-# Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
-# Contributor: Simo L. <neotuli at yahoo.com>
-# Contributor: eric <eric at archlinux.org>
-
-pkgname=sane
-pkgver=1.0.22
-pkgrel=8
-pkgdesc="Scanner Access Now Easy"
-url="http://www.sane-project.org/"
-arch=('i686' 'x86_64')
-license=('GPL')
-depends=('libtiff>=4.0.0' 'libgphoto2>=2.4.7-2' 'libjpeg>=8' 'libieee1284' 'libusb-compat' 'v4l-utils' 'avahi' 'bash' 'net-snmp')
-makedepends=('texlive-latexextra')
-install=$pkgname.install
-backup=(etc/sane.d/{abaton.conf,agfafocus.conf,apple.conf,artec.conf,artec_eplus48u.conf,avision.conf,bh.conf,canon.conf,canon630u.conf,canon_dr.conf,canon_pp.conf,cardscan.conf,coolscan2.conf,coolscan3.conf,coolscan.conf,dc25.conf,dc210.conf,dc240.conf,dell1600n_net.conf,dll.conf,dmc.conf,epjitsu.conf,epson.conf,epson2.conf,fujitsu.conf,genesys.conf,gphoto2.conf,gt68xx.conf,hp.conf,hp3900.conf,hp4200.conf,hp5400.conf,hpsj5s.conf,hs2p.conf,ibm.conf,kodak.conf,leo.conf,lexmark.conf,ma1509.conf,magicolor.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,nec.conf,net.conf,p5.conf,pie.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,saned.conf,sceptre.conf,sharp.conf,sm3840.conf,snapscan.conf,sp15c.conf,st400.conf,stv680.conf,tamarack.conf,teco1.conf,teco2.conf,teco3.conf,test.conf,u12.conf,umax.conf,umax1220u.conf,umax_pp.conf,xerox_mfp.conf,v4l.conf} etc/xinetd.d/sane)
-source=(ftp://ftp2.sane-project.org/pub/sane/$pkgname-backends-$pkgver/$pkgname-backends-$pkgver.tar.gz
-        'sane.xinetd'
-        'libv4l-0.8.3.patch'
-        'xerox_mfp_fix_usb_devices.patch')
-md5sums=('fadf56a60f4776bfb24491f66b617cf5'
-         'da946cc36fb83612162cf9505986d4b2'
-         'e645a8921cff9f18ffbdabb2ed885060'
-         'cfef73e7db7c28308914d3db6767d852')
-options=(!libtool)
-
-build() {
-  cd "${srcdir}/${pkgname}-backends-${pkgver}"
-
-  patch -p1 -i "${srcdir}"/libv4l-0.8.3.patch
-  # fix https://bugs.archlinux.org/task/26114
-  patch -Np1 -i "${srcdir}"/xerox_mfp_fix_usb_devices.patch
-
-  ./configure --prefix=/usr \
-    --sysconfdir=/etc \
-    --localstatedir=/var \
-    --with-docdir=/usr/share/doc/sane \
-    --enable-avahi \
-    --disable-locking
-  make
-}
-
-package () {
-  cd "${srcdir}/${pkgname}-backends-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-  # fix hp officejets
-  echo "#hpaio" >> "${pkgdir}/etc/sane.d/dll.conf"
-  # install udev files
-  install -D -m0644 tools/udev/libsane.rules \
-    "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
-  # fix udev rules
-  sed -i 's|NAME="%k", ||g' "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
-  
-  # install xinetd file
-  install -D -m644 "${srcdir}/sane.xinetd" "${pkgdir}/etc/xinetd.d/sane"
-  
-  # Install the pkg-config file
-  install -D -m644 tools/sane-backends.pc \
-     "${pkgdir}/usr/lib/pkgconfig/sane-backends.pc"
-}

Copied: sane/repos/extra-i686/PKGBUILD (from rev 162156, sane/repos/testing-i686/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD	                        (rev 0)
+++ extra-i686/PKGBUILD	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
+# Contributor: Simo L. <neotuli at yahoo.com>
+# Contributor: eric <eric at archlinux.org>
+
+pkgname=sane
+pkgver=1.0.22
+pkgrel=9
+pkgdesc="Scanner Access Now Easy"
+url="http://www.sane-project.org/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libtiff>=4.0.0' 'libgphoto2>=2.4.7-2' 'libjpeg>=8' 'libusb-compat' 'libieee1284' 'v4l-utils' 'avahi' 'bash' 'net-snmp')
+makedepends=('texlive-latexextra')
+install=$pkgname.install
+backup=(etc/sane.d/{abaton.conf,agfafocus.conf,apple.conf,artec.conf,artec_eplus48u.conf,avision.conf,bh.conf,canon.conf,canon630u.conf,canon_dr.conf,canon_pp.conf,cardscan.conf,coolscan2.conf,coolscan3.conf,coolscan.conf,dc25.conf,dc210.conf,dc240.conf,dell1600n_net.conf,dll.conf,dmc.conf,epjitsu.conf,epson.conf,epson2.conf,fujitsu.conf,genesys.conf,gphoto2.conf,gt68xx.conf,hp.conf,hp3900.conf,hp4200.conf,hp5400.conf,hpsj5s.conf,hs2p.conf,ibm.conf,kodak.conf,leo.conf,lexmark.conf,ma1509.conf,magicolor.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,mustek_usb2.conf,nec.conf,net.conf,p5.conf,pie.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,saned.conf,sceptre.conf,sharp.conf,sm3840.conf,snapscan.conf,sp15c.conf,st400.conf,stv680.conf,tamarack.conf,teco1.conf,teco2.conf,teco3.conf,test.conf,u12.conf,umax.conf,umax1220u.conf,umax_pp.conf,xerox_mfp.conf,v4l.conf} etc/xinetd.d/sane)
+source=(ftp://ftp2.sane-project.org/pub/sane/$pkgname-backends-$pkgver/$pkgname-backends-$pkgver.tar.gz
+        'sane.xinetd'
+        'libv4l-0.8.3.patch'
+        'xerox_mfp_fix_usb_devices.patch'
+        'saned.socket'
+        'saned.service')
+options=(!libtool)
+md5sums=('fadf56a60f4776bfb24491f66b617cf5'
+         'da946cc36fb83612162cf9505986d4b2'
+         'e645a8921cff9f18ffbdabb2ed885060'
+         'cfef73e7db7c28308914d3db6767d852'
+         'e57e9e15528f47f5f1b3f1411135ed5d'
+         'e44bd4c994a52d6f472463d1eb0a03be')
+
+build() {
+  cd "${srcdir}/${pkgname}-backends-${pkgver}"
+
+  patch -p1 -i "${srcdir}"/libv4l-0.8.3.patch
+  # fix https://bugs.archlinux.org/task/26114
+  patch -Np1 -i "${srcdir}"/xerox_mfp_fix_usb_devices.patch
+
+  ./configure --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --with-docdir=/usr/share/doc/sane \
+    --enable-avahi \
+    --enable-pthread \
+    --disable-rpath \
+    --disable-locking
+  make
+}
+
+package () {
+  cd "${srcdir}/${pkgname}-backends-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  # fix hp officejets
+  echo "#hpaio" >> "${pkgdir}/etc/sane.d/dll.conf"
+  # install udev files
+  install -D -m0644 tools/udev/libsane.rules \
+    "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
+  # fix udev rules
+  sed -i 's|NAME="%k", ||g' "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
+  
+  # install xinetd file
+  install -D -m644 "${srcdir}/sane.xinetd" "${pkgdir}/etc/xinetd.d/sane"
+  
+  # Install the pkg-config file
+  install -D -m644 tools/sane-backends.pc \
+     "${pkgdir}/usr/lib/pkgconfig/sane-backends.pc"
+  # install systemd files
+  install -D -m644 ${srcdir}/saned.socket \
+      "${pkgdir}/usr/lib/systemd/system/saned.socket"
+  install -D -m644 ${srcdir}/saned.service \
+      "${pkgdir}/usr/lib/systemd/system/saned at .service"
+}

Deleted: extra-i686/libv4l-0.8.3.patch
===================================================================
--- extra-i686/libv4l-0.8.3.patch	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-i686/libv4l-0.8.3.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,64 +0,0 @@
-From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
-From: Nils Philippsen <nils at redhat.com>
-Date: Mon, 14 Mar 2011 13:35:05 +0100
-Subject: [PATCH] patch: v4l
-
-Squashed commit of the following:
-
-commit 23381932c76846191b42a48e505b37cd74711265
-Author: Julien BLACHE <jb at jblache.org>
-Date:   Wed Feb 16 19:37:43 2011 +0100
-
-    Fix v4l build with libv4l 0.8.3+
-
-    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
-
-    Conflicts:
-
-    	ChangeLog
-
-    Signed-off-by: Nils Philippsen <nils at redhat.com>
----
- backend/v4l.c |    3 +--
- backend/v4l.h |    3 ++-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/backend/v4l.c b/backend/v4l.c
-index 6510ef0..38595ed 100644
---- a/backend/v4l.c
-+++ b/backend/v4l.c
-@@ -84,9 +84,8 @@
- #include "../include/sane/sanei_config.h"
- #define V4L_CONFIG_FILE "v4l.conf"
- 
--#include "v4l.h"
--
- #include <libv4l1.h>
-+#include "v4l.h"
- 
- static const SANE_Device **devlist = NULL;
- static int num_devices;
-diff --git a/backend/v4l.h b/backend/v4l.h
-index 588b96e..6aee586 100644
---- a/backend/v4l.h
-+++ b/backend/v4l.h
-@@ -29,6 +29,7 @@
- #ifndef v4l_h
- #define v4l_h
- 
-+#ifndef __LINUX_VIDEODEV_H
- /* Kernel interface */
- /* Only the stuff we need. For more features, more defines are needed */
- 
-@@ -165,7 +166,7 @@ struct video_channel
- 
- 
- /* end of kernel interface */
--
-+#endif /* !__LINUX_VIDEODEV_H */
- 
- #include <../include/sane/sane.h>
- 
--- 
-1.7.4
-

Copied: sane/repos/extra-i686/libv4l-0.8.3.patch (from rev 162156, sane/repos/testing-i686/libv4l-0.8.3.patch)
===================================================================
--- extra-i686/libv4l-0.8.3.patch	                        (rev 0)
+++ extra-i686/libv4l-0.8.3.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,64 @@
+From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Mon, 14 Mar 2011 13:35:05 +0100
+Subject: [PATCH] patch: v4l
+
+Squashed commit of the following:
+
+commit 23381932c76846191b42a48e505b37cd74711265
+Author: Julien BLACHE <jb at jblache.org>
+Date:   Wed Feb 16 19:37:43 2011 +0100
+
+    Fix v4l build with libv4l 0.8.3+
+
+    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
+
+    Conflicts:
+
+    	ChangeLog
+
+    Signed-off-by: Nils Philippsen <nils at redhat.com>
+---
+ backend/v4l.c |    3 +--
+ backend/v4l.h |    3 ++-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/backend/v4l.c b/backend/v4l.c
+index 6510ef0..38595ed 100644
+--- a/backend/v4l.c
++++ b/backend/v4l.c
+@@ -84,9 +84,8 @@
+ #include "../include/sane/sanei_config.h"
+ #define V4L_CONFIG_FILE "v4l.conf"
+ 
+-#include "v4l.h"
+-
+ #include <libv4l1.h>
++#include "v4l.h"
+ 
+ static const SANE_Device **devlist = NULL;
+ static int num_devices;
+diff --git a/backend/v4l.h b/backend/v4l.h
+index 588b96e..6aee586 100644
+--- a/backend/v4l.h
++++ b/backend/v4l.h
+@@ -29,6 +29,7 @@
+ #ifndef v4l_h
+ #define v4l_h
+ 
++#ifndef __LINUX_VIDEODEV_H
+ /* Kernel interface */
+ /* Only the stuff we need. For more features, more defines are needed */
+ 
+@@ -165,7 +166,7 @@ struct video_channel
+ 
+ 
+ /* end of kernel interface */
+-
++#endif /* !__LINUX_VIDEODEV_H */
+ 
+ #include <../include/sane/sane.h>
+ 
+-- 
+1.7.4
+

Deleted: extra-i686/sane.install
===================================================================
--- extra-i686/sane.install	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-i686/sane.install	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,7 +0,0 @@
-post_install() {
-	/bin/cat <<THEEND
-NOTE
-----
-Add your user to group 'scanner' to use scanner devices.
-THEEND
-}

Copied: sane/repos/extra-i686/sane.install (from rev 162156, sane/repos/testing-i686/sane.install)
===================================================================
--- extra-i686/sane.install	                        (rev 0)
+++ extra-i686/sane.install	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,7 @@
+post_install() {
+	/bin/cat <<THEEND
+NOTE
+----
+Add your user to group 'scanner' to use scanner devices.
+THEEND
+}

Deleted: extra-i686/sane.xinetd
===================================================================
--- extra-i686/sane.xinetd	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-i686/sane.xinetd	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,11 +0,0 @@
-service sane-port
-{
-	port        = 6566
-	socket_type = stream
-	wait        = no
-	user        = root
-	group       = scanner
-	server      = /usr/sbin/saned
-	# disabled by default!
-	disable     = yes
-		  }

Copied: sane/repos/extra-i686/sane.xinetd (from rev 162156, sane/repos/testing-i686/sane.xinetd)
===================================================================
--- extra-i686/sane.xinetd	                        (rev 0)
+++ extra-i686/sane.xinetd	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,11 @@
+service sane-port
+{
+	port        = 6566
+	socket_type = stream
+	wait        = no
+	user        = root
+	group       = scanner
+	server      = /usr/sbin/saned
+	# disabled by default!
+	disable     = yes
+		  }

Copied: sane/repos/extra-i686/saned.service (from rev 162156, sane/repos/testing-i686/saned.service)
===================================================================
--- extra-i686/saned.service	                        (rev 0)
+++ extra-i686/saned.service	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,8 @@
+[Unit]
+Description=Scanner Service
+
+[Service]
+Group=scanner
+ExecStart=/usr/sbin/saned
+StandardInput=socket
+StandardError=syslog

Copied: sane/repos/extra-i686/saned.socket (from rev 162156, sane/repos/testing-i686/saned.socket)
===================================================================
--- extra-i686/saned.socket	                        (rev 0)
+++ extra-i686/saned.socket	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,9 @@
+[Unit]
+Description=saned incoming socket
+
+[Socket]
+ListenStream=6566
+Accept=yes
+
+[Install]
+WantedBy=sockets.target

Deleted: extra-i686/xerox_mfp_fix_usb_devices.patch
===================================================================
--- extra-i686/xerox_mfp_fix_usb_devices.patch	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-i686/xerox_mfp_fix_usb_devices.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,67 +0,0 @@
-commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
-Author: Alex Belkin <abc at telekom.ru>
-Date:   Tue Mar 8 17:57:19 2011 +0300
-
-    keep usb device by default (correct for bug introduced by tcp sub-backend
-
-diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
-index e08b50f..d4672a7 100644
---- a/backend/xerox_mfp.c
-+++ b/backend/xerox_mfp.c
-@@ -37,10 +37,10 @@
- static const SANE_Device **devlist = NULL;	/* sane_get_devices array */
- static struct device *devices_head = NULL;	/* sane_get_devices list */
- 
--transport available_transports[] = {
-+enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
-+transport available_transports[TRANSPORTS_MAX] = {
-     { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
-     { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
--    { 0 }
- };
- 
- static int resolv_state(int state)
-@@ -824,7 +824,13 @@ free_devices (void)
-   devices_head = NULL;
- }
- 
--/* SANE API ignores return code of this callback */
-+static transport *tr_from_devname(SANE_String_Const devname)
-+{
-+  if (strncmp("tcp", devname, 3) == 0)
-+    return &available_transports[TRANSPORT_TCP];
-+  return &available_transports[TRANSPORT_USB];
-+}
-+
- static SANE_Status
- list_one_device (SANE_String_Const devname)
- {
-@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
-       return SANE_STATUS_GOOD;
-   }
- 
--  for (tr = available_transports; tr->ttype; tr++) {
--    if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
--      break;
--  }
--  if (!tr->ttype)
--    return SANE_STATUS_INVAL;
-+  tr = tr_from_devname(devname);
- 
-   dev = calloc (1, sizeof (struct device));
-   if (dev == NULL)
-@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
- static SANE_Status
- list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
- {
--    transport *tr;
--
--    for (tr = available_transports; tr->ttype; tr++) {
--	if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
--	    return tr->configure_device(devname, list_one_device);
--    }
--    return	SANE_STATUS_INVAL;
-+  return tr_from_devname(devname)->configure_device(devname, list_one_device);
- }
- 
- SANE_Status

Copied: sane/repos/extra-i686/xerox_mfp_fix_usb_devices.patch (from rev 162156, sane/repos/testing-i686/xerox_mfp_fix_usb_devices.patch)
===================================================================
--- extra-i686/xerox_mfp_fix_usb_devices.patch	                        (rev 0)
+++ extra-i686/xerox_mfp_fix_usb_devices.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,67 @@
+commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
+Author: Alex Belkin <abc at telekom.ru>
+Date:   Tue Mar 8 17:57:19 2011 +0300
+
+    keep usb device by default (correct for bug introduced by tcp sub-backend
+
+diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
+index e08b50f..d4672a7 100644
+--- a/backend/xerox_mfp.c
++++ b/backend/xerox_mfp.c
+@@ -37,10 +37,10 @@
+ static const SANE_Device **devlist = NULL;	/* sane_get_devices array */
+ static struct device *devices_head = NULL;	/* sane_get_devices list */
+ 
+-transport available_transports[] = {
++enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
++transport available_transports[TRANSPORTS_MAX] = {
+     { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
+     { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
+-    { 0 }
+ };
+ 
+ static int resolv_state(int state)
+@@ -824,7 +824,13 @@ free_devices (void)
+   devices_head = NULL;
+ }
+ 
+-/* SANE API ignores return code of this callback */
++static transport *tr_from_devname(SANE_String_Const devname)
++{
++  if (strncmp("tcp", devname, 3) == 0)
++    return &available_transports[TRANSPORT_TCP];
++  return &available_transports[TRANSPORT_USB];
++}
++
+ static SANE_Status
+ list_one_device (SANE_String_Const devname)
+ {
+@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
+       return SANE_STATUS_GOOD;
+   }
+ 
+-  for (tr = available_transports; tr->ttype; tr++) {
+-    if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
+-      break;
+-  }
+-  if (!tr->ttype)
+-    return SANE_STATUS_INVAL;
++  tr = tr_from_devname(devname);
+ 
+   dev = calloc (1, sizeof (struct device));
+   if (dev == NULL)
+@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
+ static SANE_Status
+ list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
+ {
+-    transport *tr;
+-
+-    for (tr = available_transports; tr->ttype; tr++) {
+-	if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
+-	    return tr->configure_device(devname, list_one_device);
+-    }
+-    return	SANE_STATUS_INVAL;
++  return tr_from_devname(devname)->configure_device(devname, list_one_device);
+ }
+ 
+ SANE_Status

Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-x86_64/PKGBUILD	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,61 +0,0 @@
-# $Id$
-# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
-# Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
-# Contributor: Simo L. <neotuli at yahoo.com>
-# Contributor: eric <eric at archlinux.org>
-
-pkgname=sane
-pkgver=1.0.22
-pkgrel=8
-pkgdesc="Scanner Access Now Easy"
-url="http://www.sane-project.org/"
-arch=('i686' 'x86_64')
-license=('GPL')
-depends=('libtiff>=4.0.0' 'libgphoto2>=2.4.7-2' 'libjpeg>=8' 'libieee1284' 'libusb-compat' 'v4l-utils' 'avahi' 'bash' 'net-snmp')
-makedepends=('texlive-latexextra')
-install=$pkgname.install
-backup=(etc/sane.d/{abaton.conf,agfafocus.conf,apple.conf,artec.conf,artec_eplus48u.conf,avision.conf,bh.conf,canon.conf,canon630u.conf,canon_dr.conf,canon_pp.conf,cardscan.conf,coolscan2.conf,coolscan3.conf,coolscan.conf,dc25.conf,dc210.conf,dc240.conf,dell1600n_net.conf,dll.conf,dmc.conf,epjitsu.conf,epson.conf,epson2.conf,fujitsu.conf,genesys.conf,gphoto2.conf,gt68xx.conf,hp.conf,hp3900.conf,hp4200.conf,hp5400.conf,hpsj5s.conf,hs2p.conf,ibm.conf,kodak.conf,leo.conf,lexmark.conf,ma1509.conf,magicolor.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,nec.conf,net.conf,p5.conf,pie.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,saned.conf,sceptre.conf,sharp.conf,sm3840.conf,snapscan.conf,sp15c.conf,st400.conf,stv680.conf,tamarack.conf,teco1.conf,teco2.conf,teco3.conf,test.conf,u12.conf,umax.conf,umax1220u.conf,umax_pp.conf,xerox_mfp.conf,v4l.conf} etc/xinetd.d/sane)
-source=(ftp://ftp2.sane-project.org/pub/sane/$pkgname-backends-$pkgver/$pkgname-backends-$pkgver.tar.gz
-        'sane.xinetd'
-        'libv4l-0.8.3.patch'
-        'xerox_mfp_fix_usb_devices.patch')
-md5sums=('fadf56a60f4776bfb24491f66b617cf5'
-         'da946cc36fb83612162cf9505986d4b2'
-         'e645a8921cff9f18ffbdabb2ed885060'
-         'cfef73e7db7c28308914d3db6767d852')
-options=(!libtool)
-
-build() {
-  cd "${srcdir}/${pkgname}-backends-${pkgver}"
-
-  patch -p1 -i "${srcdir}"/libv4l-0.8.3.patch
-  # fix https://bugs.archlinux.org/task/26114
-  patch -Np1 -i "${srcdir}"/xerox_mfp_fix_usb_devices.patch
-
-  ./configure --prefix=/usr \
-    --sysconfdir=/etc \
-    --localstatedir=/var \
-    --with-docdir=/usr/share/doc/sane \
-    --enable-avahi \
-    --disable-locking
-  make
-}
-
-package () {
-  cd "${srcdir}/${pkgname}-backends-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-  # fix hp officejets
-  echo "#hpaio" >> "${pkgdir}/etc/sane.d/dll.conf"
-  # install udev files
-  install -D -m0644 tools/udev/libsane.rules \
-    "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
-  # fix udev rules
-  sed -i 's|NAME="%k", ||g' "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
-  
-  # install xinetd file
-  install -D -m644 "${srcdir}/sane.xinetd" "${pkgdir}/etc/xinetd.d/sane"
-  
-  # Install the pkg-config file
-  install -D -m644 tools/sane-backends.pc \
-     "${pkgdir}/usr/lib/pkgconfig/sane-backends.pc"
-}

Copied: sane/repos/extra-x86_64/PKGBUILD (from rev 162156, sane/repos/testing-x86_64/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD	                        (rev 0)
+++ extra-x86_64/PKGBUILD	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,72 @@
+# $Id$
+# Maintainer: Tobias Powalowski <tpowa at archlinux.org>
+# Contributor: Sarah Hay <sarahhay at mb.sympatico.ca>
+# Contributor: Simo L. <neotuli at yahoo.com>
+# Contributor: eric <eric at archlinux.org>
+
+pkgname=sane
+pkgver=1.0.22
+pkgrel=9
+pkgdesc="Scanner Access Now Easy"
+url="http://www.sane-project.org/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libtiff>=4.0.0' 'libgphoto2>=2.4.7-2' 'libjpeg>=8' 'libusb-compat' 'libieee1284' 'v4l-utils' 'avahi' 'bash' 'net-snmp')
+makedepends=('texlive-latexextra')
+install=$pkgname.install
+backup=(etc/sane.d/{abaton.conf,agfafocus.conf,apple.conf,artec.conf,artec_eplus48u.conf,avision.conf,bh.conf,canon.conf,canon630u.conf,canon_dr.conf,canon_pp.conf,cardscan.conf,coolscan2.conf,coolscan3.conf,coolscan.conf,dc25.conf,dc210.conf,dc240.conf,dell1600n_net.conf,dll.conf,dmc.conf,epjitsu.conf,epson.conf,epson2.conf,fujitsu.conf,genesys.conf,gphoto2.conf,gt68xx.conf,hp.conf,hp3900.conf,hp4200.conf,hp5400.conf,hpsj5s.conf,hs2p.conf,ibm.conf,kodak.conf,leo.conf,lexmark.conf,ma1509.conf,magicolor.conf,matsushita.conf,microtek.conf,microtek2.conf,mustek.conf,mustek_pp.conf,mustek_usb.conf,mustek_usb2.conf,nec.conf,net.conf,p5.conf,pie.conf,pixma.conf,plustek.conf,plustek_pp.conf,qcam.conf,ricoh.conf,rts8891.conf,s9036.conf,saned.conf,sceptre.conf,sharp.conf,sm3840.conf,snapscan.conf,sp15c.conf,st400.conf,stv680.conf,tamarack.conf,teco1.conf,teco2.conf,teco3.conf,test.conf,u12.conf,umax.conf,umax1220u.conf,umax_pp.conf,xerox_mfp.conf,v4l.conf} etc/xinetd.d/sane)
+source=(ftp://ftp2.sane-project.org/pub/sane/$pkgname-backends-$pkgver/$pkgname-backends-$pkgver.tar.gz
+        'sane.xinetd'
+        'libv4l-0.8.3.patch'
+        'xerox_mfp_fix_usb_devices.patch'
+        'saned.socket'
+        'saned.service')
+options=(!libtool)
+md5sums=('fadf56a60f4776bfb24491f66b617cf5'
+         'da946cc36fb83612162cf9505986d4b2'
+         'e645a8921cff9f18ffbdabb2ed885060'
+         'cfef73e7db7c28308914d3db6767d852'
+         'e57e9e15528f47f5f1b3f1411135ed5d'
+         'e44bd4c994a52d6f472463d1eb0a03be')
+
+build() {
+  cd "${srcdir}/${pkgname}-backends-${pkgver}"
+
+  patch -p1 -i "${srcdir}"/libv4l-0.8.3.patch
+  # fix https://bugs.archlinux.org/task/26114
+  patch -Np1 -i "${srcdir}"/xerox_mfp_fix_usb_devices.patch
+
+  ./configure --prefix=/usr \
+    --sysconfdir=/etc \
+    --localstatedir=/var \
+    --with-docdir=/usr/share/doc/sane \
+    --enable-avahi \
+    --enable-pthread \
+    --disable-rpath \
+    --disable-locking
+  make
+}
+
+package () {
+  cd "${srcdir}/${pkgname}-backends-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  # fix hp officejets
+  echo "#hpaio" >> "${pkgdir}/etc/sane.d/dll.conf"
+  # install udev files
+  install -D -m0644 tools/udev/libsane.rules \
+    "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
+  # fix udev rules
+  sed -i 's|NAME="%k", ||g' "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"
+  
+  # install xinetd file
+  install -D -m644 "${srcdir}/sane.xinetd" "${pkgdir}/etc/xinetd.d/sane"
+  
+  # Install the pkg-config file
+  install -D -m644 tools/sane-backends.pc \
+     "${pkgdir}/usr/lib/pkgconfig/sane-backends.pc"
+  # install systemd files
+  install -D -m644 ${srcdir}/saned.socket \
+      "${pkgdir}/usr/lib/systemd/system/saned.socket"
+  install -D -m644 ${srcdir}/saned.service \
+      "${pkgdir}/usr/lib/systemd/system/saned at .service"
+}

Deleted: extra-x86_64/libv4l-0.8.3.patch
===================================================================
--- extra-x86_64/libv4l-0.8.3.patch	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-x86_64/libv4l-0.8.3.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,64 +0,0 @@
-From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
-From: Nils Philippsen <nils at redhat.com>
-Date: Mon, 14 Mar 2011 13:35:05 +0100
-Subject: [PATCH] patch: v4l
-
-Squashed commit of the following:
-
-commit 23381932c76846191b42a48e505b37cd74711265
-Author: Julien BLACHE <jb at jblache.org>
-Date:   Wed Feb 16 19:37:43 2011 +0100
-
-    Fix v4l build with libv4l 0.8.3+
-
-    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
-
-    Conflicts:
-
-    	ChangeLog
-
-    Signed-off-by: Nils Philippsen <nils at redhat.com>
----
- backend/v4l.c |    3 +--
- backend/v4l.h |    3 ++-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/backend/v4l.c b/backend/v4l.c
-index 6510ef0..38595ed 100644
---- a/backend/v4l.c
-+++ b/backend/v4l.c
-@@ -84,9 +84,8 @@
- #include "../include/sane/sanei_config.h"
- #define V4L_CONFIG_FILE "v4l.conf"
- 
--#include "v4l.h"
--
- #include <libv4l1.h>
-+#include "v4l.h"
- 
- static const SANE_Device **devlist = NULL;
- static int num_devices;
-diff --git a/backend/v4l.h b/backend/v4l.h
-index 588b96e..6aee586 100644
---- a/backend/v4l.h
-+++ b/backend/v4l.h
-@@ -29,6 +29,7 @@
- #ifndef v4l_h
- #define v4l_h
- 
-+#ifndef __LINUX_VIDEODEV_H
- /* Kernel interface */
- /* Only the stuff we need. For more features, more defines are needed */
- 
-@@ -165,7 +166,7 @@ struct video_channel
- 
- 
- /* end of kernel interface */
--
-+#endif /* !__LINUX_VIDEODEV_H */
- 
- #include <../include/sane/sane.h>
- 
--- 
-1.7.4
-

Copied: sane/repos/extra-x86_64/libv4l-0.8.3.patch (from rev 162156, sane/repos/testing-x86_64/libv4l-0.8.3.patch)
===================================================================
--- extra-x86_64/libv4l-0.8.3.patch	                        (rev 0)
+++ extra-x86_64/libv4l-0.8.3.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,64 @@
+From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Mon, 14 Mar 2011 13:35:05 +0100
+Subject: [PATCH] patch: v4l
+
+Squashed commit of the following:
+
+commit 23381932c76846191b42a48e505b37cd74711265
+Author: Julien BLACHE <jb at jblache.org>
+Date:   Wed Feb 16 19:37:43 2011 +0100
+
+    Fix v4l build with libv4l 0.8.3+
+
+    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
+
+    Conflicts:
+
+    	ChangeLog
+
+    Signed-off-by: Nils Philippsen <nils at redhat.com>
+---
+ backend/v4l.c |    3 +--
+ backend/v4l.h |    3 ++-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/backend/v4l.c b/backend/v4l.c
+index 6510ef0..38595ed 100644
+--- a/backend/v4l.c
++++ b/backend/v4l.c
+@@ -84,9 +84,8 @@
+ #include "../include/sane/sanei_config.h"
+ #define V4L_CONFIG_FILE "v4l.conf"
+ 
+-#include "v4l.h"
+-
+ #include <libv4l1.h>
++#include "v4l.h"
+ 
+ static const SANE_Device **devlist = NULL;
+ static int num_devices;
+diff --git a/backend/v4l.h b/backend/v4l.h
+index 588b96e..6aee586 100644
+--- a/backend/v4l.h
++++ b/backend/v4l.h
+@@ -29,6 +29,7 @@
+ #ifndef v4l_h
+ #define v4l_h
+ 
++#ifndef __LINUX_VIDEODEV_H
+ /* Kernel interface */
+ /* Only the stuff we need. For more features, more defines are needed */
+ 
+@@ -165,7 +166,7 @@ struct video_channel
+ 
+ 
+ /* end of kernel interface */
+-
++#endif /* !__LINUX_VIDEODEV_H */
+ 
+ #include <../include/sane/sane.h>
+ 
+-- 
+1.7.4
+

Deleted: extra-x86_64/sane.install
===================================================================
--- extra-x86_64/sane.install	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-x86_64/sane.install	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,7 +0,0 @@
-post_install() {
-	/bin/cat <<THEEND
-NOTE
-----
-Add your user to group 'scanner' to use scanner devices.
-THEEND
-}

Copied: sane/repos/extra-x86_64/sane.install (from rev 162156, sane/repos/testing-x86_64/sane.install)
===================================================================
--- extra-x86_64/sane.install	                        (rev 0)
+++ extra-x86_64/sane.install	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,7 @@
+post_install() {
+	/bin/cat <<THEEND
+NOTE
+----
+Add your user to group 'scanner' to use scanner devices.
+THEEND
+}

Deleted: extra-x86_64/sane.xinetd
===================================================================
--- extra-x86_64/sane.xinetd	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-x86_64/sane.xinetd	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,11 +0,0 @@
-service sane-port
-{
-	port        = 6566
-	socket_type = stream
-	wait        = no
-	user        = root
-	group       = scanner
-	server      = /usr/sbin/saned
-	# disabled by default!
-	disable     = yes
-		  }

Copied: sane/repos/extra-x86_64/sane.xinetd (from rev 162156, sane/repos/testing-x86_64/sane.xinetd)
===================================================================
--- extra-x86_64/sane.xinetd	                        (rev 0)
+++ extra-x86_64/sane.xinetd	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,11 @@
+service sane-port
+{
+	port        = 6566
+	socket_type = stream
+	wait        = no
+	user        = root
+	group       = scanner
+	server      = /usr/sbin/saned
+	# disabled by default!
+	disable     = yes
+		  }

Copied: sane/repos/extra-x86_64/saned.service (from rev 162156, sane/repos/testing-x86_64/saned.service)
===================================================================
--- extra-x86_64/saned.service	                        (rev 0)
+++ extra-x86_64/saned.service	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,8 @@
+[Unit]
+Description=Scanner Service
+
+[Service]
+Group=scanner
+ExecStart=/usr/sbin/saned
+StandardInput=socket
+StandardError=syslog

Copied: sane/repos/extra-x86_64/saned.socket (from rev 162156, sane/repos/testing-x86_64/saned.socket)
===================================================================
--- extra-x86_64/saned.socket	                        (rev 0)
+++ extra-x86_64/saned.socket	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,9 @@
+[Unit]
+Description=saned incoming socket
+
+[Socket]
+ListenStream=6566
+Accept=yes
+
+[Install]
+WantedBy=sockets.target

Deleted: extra-x86_64/xerox_mfp_fix_usb_devices.patch
===================================================================
--- extra-x86_64/xerox_mfp_fix_usb_devices.patch	2012-06-22 12:59:21 UTC (rev 162162)
+++ extra-x86_64/xerox_mfp_fix_usb_devices.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -1,67 +0,0 @@
-commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
-Author: Alex Belkin <abc at telekom.ru>
-Date:   Tue Mar 8 17:57:19 2011 +0300
-
-    keep usb device by default (correct for bug introduced by tcp sub-backend
-
-diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
-index e08b50f..d4672a7 100644
---- a/backend/xerox_mfp.c
-+++ b/backend/xerox_mfp.c
-@@ -37,10 +37,10 @@
- static const SANE_Device **devlist = NULL;	/* sane_get_devices array */
- static struct device *devices_head = NULL;	/* sane_get_devices list */
- 
--transport available_transports[] = {
-+enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
-+transport available_transports[TRANSPORTS_MAX] = {
-     { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
-     { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
--    { 0 }
- };
- 
- static int resolv_state(int state)
-@@ -824,7 +824,13 @@ free_devices (void)
-   devices_head = NULL;
- }
- 
--/* SANE API ignores return code of this callback */
-+static transport *tr_from_devname(SANE_String_Const devname)
-+{
-+  if (strncmp("tcp", devname, 3) == 0)
-+    return &available_transports[TRANSPORT_TCP];
-+  return &available_transports[TRANSPORT_USB];
-+}
-+
- static SANE_Status
- list_one_device (SANE_String_Const devname)
- {
-@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
-       return SANE_STATUS_GOOD;
-   }
- 
--  for (tr = available_transports; tr->ttype; tr++) {
--    if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
--      break;
--  }
--  if (!tr->ttype)
--    return SANE_STATUS_INVAL;
-+  tr = tr_from_devname(devname);
- 
-   dev = calloc (1, sizeof (struct device));
-   if (dev == NULL)
-@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
- static SANE_Status
- list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
- {
--    transport *tr;
--
--    for (tr = available_transports; tr->ttype; tr++) {
--	if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
--	    return tr->configure_device(devname, list_one_device);
--    }
--    return	SANE_STATUS_INVAL;
-+  return tr_from_devname(devname)->configure_device(devname, list_one_device);
- }
- 
- SANE_Status

Copied: sane/repos/extra-x86_64/xerox_mfp_fix_usb_devices.patch (from rev 162156, sane/repos/testing-x86_64/xerox_mfp_fix_usb_devices.patch)
===================================================================
--- extra-x86_64/xerox_mfp_fix_usb_devices.patch	                        (rev 0)
+++ extra-x86_64/xerox_mfp_fix_usb_devices.patch	2012-06-22 12:59:38 UTC (rev 162163)
@@ -0,0 +1,67 @@
+commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
+Author: Alex Belkin <abc at telekom.ru>
+Date:   Tue Mar 8 17:57:19 2011 +0300
+
+    keep usb device by default (correct for bug introduced by tcp sub-backend
+
+diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
+index e08b50f..d4672a7 100644
+--- a/backend/xerox_mfp.c
++++ b/backend/xerox_mfp.c
+@@ -37,10 +37,10 @@
+ static const SANE_Device **devlist = NULL;	/* sane_get_devices array */
+ static struct device *devices_head = NULL;	/* sane_get_devices list */
+ 
+-transport available_transports[] = {
++enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
++transport available_transports[TRANSPORTS_MAX] = {
+     { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
+     { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
+-    { 0 }
+ };
+ 
+ static int resolv_state(int state)
+@@ -824,7 +824,13 @@ free_devices (void)
+   devices_head = NULL;
+ }
+ 
+-/* SANE API ignores return code of this callback */
++static transport *tr_from_devname(SANE_String_Const devname)
++{
++  if (strncmp("tcp", devname, 3) == 0)
++    return &available_transports[TRANSPORT_TCP];
++  return &available_transports[TRANSPORT_USB];
++}
++
+ static SANE_Status
+ list_one_device (SANE_String_Const devname)
+ {
+@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
+       return SANE_STATUS_GOOD;
+   }
+ 
+-  for (tr = available_transports; tr->ttype; tr++) {
+-    if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
+-      break;
+-  }
+-  if (!tr->ttype)
+-    return SANE_STATUS_INVAL;
++  tr = tr_from_devname(devname);
+ 
+   dev = calloc (1, sizeof (struct device));
+   if (dev == NULL)
+@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
+ static SANE_Status
+ list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
+ {
+-    transport *tr;
+-
+-    for (tr = available_transports; tr->ttype; tr++) {
+-	if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
+-	    return tr->configure_device(devname, list_one_device);
+-    }
+-    return	SANE_STATUS_INVAL;
++  return tr_from_devname(devname)->configure_device(devname, list_one_device);
+ }
+ 
+ SANE_Status




More information about the arch-commits mailing list