# HG changeset patch # User Richard Dunbar # Date 1341224856 0 # Node ID 2193b0a80ecf4e415414b88942acd32a9e584af4 # Parent bb5168bb79da47b7f7e4f46dbfae317c51b090f4 sane-backends: update wget_url,bdeps,add patchs diff -r bb5168bb79da -r 2193b0a80ecf sane-backends/receipt --- a/sane-backends/receipt Mon Jun 25 12:26:45 2012 +0000 +++ b/sane-backends/receipt Mon Jul 02 10:27:36 2012 +0000 @@ -7,25 +7,30 @@ MAINTAINER="pankso@slitaz.org" TARBALL="$PACKAGE-$VERSION.tar.gz" WEB_SITE="http://www.sane-project.org/" -WGET_URL="ftp://ftp.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL" +WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL" DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl" +BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \ +libgphoto2-dev libtool" # Rules to configure and make the package. compile_rules() { cd $src + patch -Np1 -i $stuff/libv4l-0.8.3.patch + # fix https://bugs.archlinux.org/task/26114 + patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ $CONFIGURE_ARGS && make && - make -j 1 DESTDIR=$PWD/_pkg install + make -j 1 DESTDIR=$DESTDIR install # copy the missing udev rule - [ ! -d $PWD/_pkg/etc/udev/rules.d ] && mkdir -p $PWD/_pkg/etc/udev/rules.d - cp -a $src/tools/udev/libsane.rules $PWD/_pkg/etc/udev/rules.d/55-sane.rules + [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d + cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules } # Rules to gen a SliTaz package suitable for Tazpkg. @@ -54,11 +59,11 @@ local root root=$1 - tazpkg reconfigure udev --root=$1 + tazpkg reconfigure udev --root=$root # add group scanner if ! grep -q scanner $root/etc/group ; then - addgroup -g 96 scanner + chroot "$root/" addgroup -g 96 scanner fi echo " ADD yourself to group scanner to use sane: addgroup tux scanner" @@ -66,5 +71,5 @@ post_remove() { - delgroup scanner & >/dev/null + chroot "$1/" delgroup scanner & >/dev/null } diff -r bb5168bb79da -r 2193b0a80ecf sane-backends/stuff/libv4l-0.8.3.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sane-backends/stuff/libv4l-0.8.3.patch Mon Jul 02 10:27:36 2012 +0000 @@ -0,0 +1,64 @@ +From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen +Date: Mon, 14 Mar 2011 13:35:05 +0100 +Subject: [PATCH] patch: v4l + +Squashed commit of the following: + +commit 23381932c76846191b42a48e505b37cd74711265 +Author: Julien BLACHE +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 +--- + 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 ++#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 + diff -r bb5168bb79da -r 2193b0a80ecf sane-backends/stuff/xerox_mfp_fix_usb_devices.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sane-backends/stuff/xerox_mfp_fix_usb_devices.patch Mon Jul 02 10:27:36 2012 +0000 @@ -0,0 +1,67 @@ +commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7 +Author: Alex Belkin +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