sane-backends: update to 1.0.23

[florian: fix up missing cups dependency]

Signed-off-by: Jonathan Westerholt <joniw@t-online.de>
Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@34507 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-12-05 17:30:59 +00:00
parent 7bfb238d74
commit 84ed3b4e75
3 changed files with 6 additions and 105 deletions

View File

@ -8,13 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sane-backends
PKG_VERSION:=1.0.22
PKG_RELEASE:=3
PKG_VERSION:=1.0.23
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION) \
PKG_SOURCE_URL:=http://fossies.org/linux/misc \
ftp://ftp.sane-project.org/pub/sane/$(PKG_NAME)-$(PKG_VERSION) \
https://alioth.debian.org/frs/download.php/3503
PKG_MD5SUM:=fadf56a60f4776bfb24491f66b617cf5
PKG_MD5SUM:=e226a89c54173efea80e91e9a5eb6573
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
@ -47,7 +48,7 @@ define Package/sane-libs
$(call Package/sane-backends/Default)
SECTION:=libs
CATEGORY:=Libraries
DEPENDS:=+libjpeg +libtiff +libusb +libv4l
DEPENDS:=+libjpeg +libtiff +libusb +libv4l +cups
TITLE+= (libraries)
endef

View File

@ -1,32 +0,0 @@
--- 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;
--- 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>

View File

@ -1,68 +0,0 @@
From 5ea227caeacd504b64eef301e83fa63e0a25b3f7 Mon Sep 17 00:00:00 2001
From: Alex Belkin <abc@telekom.ru>
Date: Tue, 8 Mar 2011 17:57:19 +0300
Subject: [PATCH] keep usb device by default (correct for bug introduced by tcp sub-backend
---
backend/xerox_mfp.c | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
--- 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 devna
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 devna
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