wok-stable rev 12307

sane-backends: update wget_url,bdeps,add patchs
author Richard Dunbar <mojo@slitaz.org>
date Mon Jul 02 10:27:36 2012 +0000 (2012-07-02)
parents bb5168bb79da
children 22f6aa7cdb64
files sane-backends/receipt sane-backends/stuff/libv4l-0.8.3.patch sane-backends/stuff/xerox_mfp_fix_usb_devices.patch
line diff
     1.1 --- a/sane-backends/receipt	Mon Jun 25 12:26:45 2012 +0000
     1.2 +++ b/sane-backends/receipt	Mon Jul 02 10:27:36 2012 +0000
     1.3 @@ -7,25 +7,30 @@
     1.4  MAINTAINER="pankso@slitaz.org"
     1.5  TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.6  WEB_SITE="http://www.sane-project.org/"
     1.7 -WGET_URL="ftp://ftp.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
     1.8 +WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
     1.9  
    1.10  DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl"
    1.11 +BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \
    1.12 +libgphoto2-dev libtool"
    1.13  
    1.14  # Rules to configure and make the package.
    1.15  compile_rules()
    1.16  {
    1.17  	cd $src
    1.18 +	patch -Np1 -i $stuff/libv4l-0.8.3.patch
    1.19 +	# fix https://bugs.archlinux.org/task/26114
    1.20 +	patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
    1.21  	./configure \
    1.22  		--prefix=/usr \
    1.23  		--sysconfdir=/etc \
    1.24  		--mandir=/usr/share/man \
    1.25  		$CONFIGURE_ARGS &&
    1.26  	make &&
    1.27 -	make -j 1 DESTDIR=$PWD/_pkg install
    1.28 +	make -j 1 DESTDIR=$DESTDIR install
    1.29  
    1.30  	# copy the missing udev rule
    1.31 -	[ ! -d $PWD/_pkg/etc/udev/rules.d ] && mkdir -p $PWD/_pkg/etc/udev/rules.d
    1.32 -	cp -a $src/tools/udev/libsane.rules $PWD/_pkg/etc/udev/rules.d/55-sane.rules
    1.33 +	[ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d
    1.34 +	cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules
    1.35  }
    1.36  
    1.37  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.38 @@ -54,11 +59,11 @@
    1.39  	local root
    1.40  	root=$1
    1.41  	
    1.42 -	tazpkg reconfigure udev --root=$1
    1.43 +	tazpkg reconfigure udev --root=$root
    1.44  	
    1.45  	# add group scanner
    1.46  	if ! grep -q scanner $root/etc/group ; then
    1.47 -		addgroup -g 96 scanner
    1.48 +		chroot "$root/" addgroup -g 96 scanner
    1.49  	fi
    1.50  	
    1.51  	echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
    1.52 @@ -66,5 +71,5 @@
    1.53  
    1.54  post_remove()
    1.55  {
    1.56 -	delgroup scanner & >/dev/null
    1.57 +	chroot "$1/" delgroup scanner & >/dev/null
    1.58  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/sane-backends/stuff/libv4l-0.8.3.patch	Mon Jul 02 10:27:36 2012 +0000
     2.3 @@ -0,0 +1,64 @@
     2.4 +From 26c69b228b29f612faf4b0cc85db969ee7cc4ea6 Mon Sep 17 00:00:00 2001
     2.5 +From: Nils Philippsen <nils@redhat.com>
     2.6 +Date: Mon, 14 Mar 2011 13:35:05 +0100
     2.7 +Subject: [PATCH] patch: v4l
     2.8 +
     2.9 +Squashed commit of the following:
    2.10 +
    2.11 +commit 23381932c76846191b42a48e505b37cd74711265
    2.12 +Author: Julien BLACHE <jb@jblache.org>
    2.13 +Date:   Wed Feb 16 19:37:43 2011 +0100
    2.14 +
    2.15 +    Fix v4l build with libv4l 0.8.3+
    2.16 +
    2.17 +    (cherry picked from commit c5ca46c2d1be78c651afb843cc834cf2b5b24953)
    2.18 +
    2.19 +    Conflicts:
    2.20 +
    2.21 +    	ChangeLog
    2.22 +
    2.23 +    Signed-off-by: Nils Philippsen <nils@redhat.com>
    2.24 +---
    2.25 + backend/v4l.c |    3 +--
    2.26 + backend/v4l.h |    3 ++-
    2.27 + 2 files changed, 3 insertions(+), 3 deletions(-)
    2.28 +
    2.29 +diff --git a/backend/v4l.c b/backend/v4l.c
    2.30 +index 6510ef0..38595ed 100644
    2.31 +--- a/backend/v4l.c
    2.32 ++++ b/backend/v4l.c
    2.33 +@@ -84,9 +84,8 @@
    2.34 + #include "../include/sane/sanei_config.h"
    2.35 + #define V4L_CONFIG_FILE "v4l.conf"
    2.36 + 
    2.37 +-#include "v4l.h"
    2.38 +-
    2.39 + #include <libv4l1.h>
    2.40 ++#include "v4l.h"
    2.41 + 
    2.42 + static const SANE_Device **devlist = NULL;
    2.43 + static int num_devices;
    2.44 +diff --git a/backend/v4l.h b/backend/v4l.h
    2.45 +index 588b96e..6aee586 100644
    2.46 +--- a/backend/v4l.h
    2.47 ++++ b/backend/v4l.h
    2.48 +@@ -29,6 +29,7 @@
    2.49 + #ifndef v4l_h
    2.50 + #define v4l_h
    2.51 + 
    2.52 ++#ifndef __LINUX_VIDEODEV_H
    2.53 + /* Kernel interface */
    2.54 + /* Only the stuff we need. For more features, more defines are needed */
    2.55 + 
    2.56 +@@ -165,7 +166,7 @@ struct video_channel
    2.57 + 
    2.58 + 
    2.59 + /* end of kernel interface */
    2.60 +-
    2.61 ++#endif /* !__LINUX_VIDEODEV_H */
    2.62 + 
    2.63 + #include <../include/sane/sane.h>
    2.64 + 
    2.65 +-- 
    2.66 +1.7.4
    2.67 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/sane-backends/stuff/xerox_mfp_fix_usb_devices.patch	Mon Jul 02 10:27:36 2012 +0000
     3.3 @@ -0,0 +1,67 @@
     3.4 +commit 5ea227caeacd504b64eef301e83fa63e0a25b3f7
     3.5 +Author: Alex Belkin <abc@telekom.ru>
     3.6 +Date:   Tue Mar 8 17:57:19 2011 +0300
     3.7 +
     3.8 +    keep usb device by default (correct for bug introduced by tcp sub-backend
     3.9 +
    3.10 +diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
    3.11 +index e08b50f..d4672a7 100644
    3.12 +--- a/backend/xerox_mfp.c
    3.13 ++++ b/backend/xerox_mfp.c
    3.14 +@@ -37,10 +37,10 @@
    3.15 + static const SANE_Device **devlist = NULL;	/* sane_get_devices array */
    3.16 + static struct device *devices_head = NULL;	/* sane_get_devices list */
    3.17 +
    3.18 +-transport available_transports[] = {
    3.19 ++enum { TRANSPORT_USB, TRANSPORT_TCP, TRANSPORTS_MAX };
    3.20 ++transport available_transports[TRANSPORTS_MAX] = {
    3.21 +     { "usb", usb_dev_request, usb_dev_open, usb_dev_close, usb_configure_device },
    3.22 +     { "tcp", tcp_dev_request, tcp_dev_open, tcp_dev_close, tcp_configure_device },
    3.23 +-    { 0 }
    3.24 + };
    3.25 +
    3.26 + static int resolv_state(int state)
    3.27 +@@ -824,7 +824,13 @@ free_devices (void)
    3.28 +   devices_head = NULL;
    3.29 + }
    3.30 +
    3.31 +-/* SANE API ignores return code of this callback */
    3.32 ++static transport *tr_from_devname(SANE_String_Const devname)
    3.33 ++{
    3.34 ++  if (strncmp("tcp", devname, 3) == 0)
    3.35 ++    return &available_transports[TRANSPORT_TCP];
    3.36 ++  return &available_transports[TRANSPORT_USB];
    3.37 ++}
    3.38 ++
    3.39 + static SANE_Status
    3.40 + list_one_device (SANE_String_Const devname)
    3.41 + {
    3.42 +@@ -839,12 +845,7 @@ list_one_device (SANE_String_Const devname)
    3.43 +       return SANE_STATUS_GOOD;
    3.44 +   }
    3.45 +
    3.46 +-  for (tr = available_transports; tr->ttype; tr++) {
    3.47 +-    if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
    3.48 +-      break;
    3.49 +-  }
    3.50 +-  if (!tr->ttype)
    3.51 +-    return SANE_STATUS_INVAL;
    3.52 ++  tr = tr_from_devname(devname);
    3.53 +
    3.54 +   dev = calloc (1, sizeof (struct device));
    3.55 +   if (dev == NULL)
    3.56 +@@ -878,13 +879,7 @@ list_one_device (SANE_String_Const devname)
    3.57 + static SANE_Status
    3.58 + list_conf_devices (UNUSED (SANEI_Config * config), const char *devname)
    3.59 + {
    3.60 +-    transport *tr;
    3.61 +-
    3.62 +-    for (tr = available_transports; tr->ttype; tr++) {
    3.63 +-	if (!strncmp (devname, tr->ttype, strlen(tr->ttype)))
    3.64 +-	    return tr->configure_device(devname, list_one_device);
    3.65 +-    }
    3.66 +-    return	SANE_STATUS_INVAL;
    3.67 ++  return tr_from_devname(devname)->configure_device(devname, list_one_device);
    3.68 + }
    3.69 +
    3.70 + SANE_Status