sane: update to 1.0.23.

This commit is contained in:
Juan RP 2012-08-30 09:16:54 +02:00
parent 2aaf353c44
commit c6e4583e86
4 changed files with 9 additions and 142 deletions

View File

@ -1,64 +0,0 @@
From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@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@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@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

View File

@ -1,67 +0,0 @@
commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
Author: Alex Belkin <abc@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

View File

@ -1,15 +1,12 @@
# Template file for 'sane-devel'.
#
depends="libsane>=1.0.22"
noarch=yes
depends="libsane>=${version}"
short_desc="${short_desc} - development files"
long_desc="${long_desc}
This package contains files for development, headers, static libs, etc."
noarch=yes
do_install() {
vmove usr/include usr
vmove usr/bin/sane-config usr/bin

View File

@ -1,22 +1,22 @@
# Template build file for 'sane'.
pkgname=sane
version=1.0.22
revision=6
patch_args="-Np1"
version=1.0.23
revision=1
wrksrc="sane-backends-${version}"
subpackages="lib${pkgname} $pkgname-devel"
build_style=gnu-configure
configure_args="--disable-locking --enable-avahi --with-docdir=/usr/share/doc/sane
--disable-latex --enable-libusb_1_0 --enable-pthread"
depends="net-snmp"
makedepends="pkg-config avahi-libs-devel jpeg-devel tiff-devel libgphoto2-devel v4l-utils-devel libusb-devel net-snmp-devel libieee1284-devel"
makedepends="pkg-config avahi-libs-devel jpeg-devel tiff-devel libgphoto2-devel
v4l-utils-devel libusb-devel net-snmp-devel libieee1284-devel"
systemd_services="saned.socket on"
short_desc="Scanner Access Now Easy"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.sane-project.org/"
license="GPL-2"
distfiles="ftp://ftp2.sane-project.org/pub/sane/sane-backends-${version}/sane-backends-${version}.tar.gz"
checksum=9f84a16800497f0b79a278531bb1a0f438de6ce8cf509fefc65a252e29f90c54
distfiles="http://distfiles.bsdfrog.org/sane-backends-${version}.tar.gz"
checksum=4d4f5b2881615af7fc0ed75fdde7dc623a749e80e40f3f792fe4010163cbb029
long_desc="
SANE stands for Scanner Access Now Easy and is an application programming
interface (API) that provides standardized access to any raster image scanner
@ -60,6 +60,7 @@ conf_files="
/etc/sane.d/hs2p.conf
/etc/sane.d/ibm.conf
/etc/sane.d/kodak.conf
/etc/sane.d/kodakaio.conf
/etc/sane.d/leo.conf
/etc/sane.d/lexmark.conf
/etc/sane.d/ma1509.conf