summaryrefslogtreecommitdiff
path: root/extra/sane
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-07 17:33:04 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-07 17:33:04 -0300
commit2302f1d28510fadb2dcfa119f28ed28f164845bf (patch)
treee7040e1c743f46bc60a7844275516e4404f6ac30 /extra/sane
parent2a9d1292ab60e8a2356fb3eeb36b8c3cfc22759b (diff)
parent5442e9b8f357932ed5d6cb46e90fcbf6f453469f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/fotoxx/PKGBUILD community/gtkdialog/PKGBUILD community/hubbub/PKGBUILD community/libgdamm/PKGBUILD community/libparserutils/PKGBUILD community/mingw32-binutils/PKGBUILD community/mingw32-gcc-base/PKGBUILD community/mingw32-gcc/PKGBUILD community/mtpaint/PKGBUILD community/netsurf/PKGBUILD community/patchage/PKGBUILD community/qgo/PKGBUILD community/tomoyo-tools/PKGBUILD community/tre/PKGBUILD community/virtualbox/PKGBUILD core/net-tools/PKGBUILD core/openldap/PKGBUILD extra/epiphany/PKGBUILD extra/evince/PKGBUILD extra/evolution-data-server/PKGBUILD extra/evolution/PKGBUILD extra/exiv2/PKGBUILD extra/folks/PKGBUILD extra/gimp-ufraw/PKGBUILD extra/gnome-control-center/PKGBUILD extra/gnome-power-manager/PKGBUILD extra/gnome-python-desktop/PKGBUILD extra/gnome-python-extras/PKGBUILD extra/gvfs/PKGBUILD extra/jack/PKGBUILD extra/kdelibs/PKGBUILD extra/kdepim/PKGBUILD extra/koffice/PKGBUILD extra/libreoffice/PKGBUILD extra/libwebkit/PKGBUILD extra/mutter/PKGBUILD extra/nautilus/PKGBUILD extra/openmpi/PKGBUILD extra/pavucontrol/PKGBUILD extra/php/PKGBUILD extra/pidgin/PKGBUILD extra/postgresql/PKGBUILD extra/pulseaudio/PKGBUILD extra/pygobject2/PKGBUILD extra/swt/PKGBUILD extra/tomcat/PKGBUILD extra/totem/PKGBUILD extra/vigra/PKGBUILD extra/vte/PKGBUILD extra/xulrunner/PKGBUILD kde-unstable/calligra/PKGBUILD kde-unstable/kdebase-workspace/PKGBUILD multilib/lib32-atk/PKGBUILD multilib/lib32-gdk-pixbuf2/PKGBUILD multilib/lib32-glew/PKGBUILD multilib/lib32-glib2/PKGBUILD multilib/lib32-jack/PKGBUILD multilib/lib32-libpulse/PKGBUILD multilib/lib32-pango/PKGBUILD multilib/wine/PKGBUILD social/miniupnpc/PKGBUILD testing/icedtea-web-java7/PKGBUILD testing/sqlite3/PKGBUILD ~xihh/abiword/PKGBUILD
Diffstat (limited to 'extra/sane')
-rw-r--r--extra/sane/PKGBUILD12
-rw-r--r--extra/sane/xerox_mfp_fix_usb_devices.patch67
2 files changed, 75 insertions, 4 deletions
diff --git a/extra/sane/PKGBUILD b/extra/sane/PKGBUILD
index 03118b5a2..49d0f1480 100644
--- a/extra/sane/PKGBUILD
+++ b/extra/sane/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 123295 2011-05-09 20:29:22Z andrea $
+# $Id: PKGBUILD 140036 2011-10-05 21:49:29Z ibiru $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
# Contributor: Simo L. <neotuli@yahoo.com>
@@ -6,7 +6,7 @@
pkgname=sane
pkgver=1.0.22
-pkgrel=2
+pkgrel=4
pkgdesc="Scanner Access Now Easy"
url="http://www.sane-project.org/"
arch=('i686' 'x86_64' 'mips64el')
@@ -17,13 +17,16 @@ 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')
+ 'libv4l-0.8.3.patch'
+ 'xerox_mfp_fix_usb_devices.patch')
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
if [ ${CARCH} == 'mips64el' ]; then
export CFLAGS="${CFLAGS} -O1"
@@ -58,4 +61,5 @@ package () {
}
md5sums=('fadf56a60f4776bfb24491f66b617cf5'
'da946cc36fb83612162cf9505986d4b2'
- 'e645a8921cff9f18ffbdabb2ed885060')
+ 'e645a8921cff9f18ffbdabb2ed885060'
+ 'cfef73e7db7c28308914d3db6767d852')
diff --git a/extra/sane/xerox_mfp_fix_usb_devices.patch b/extra/sane/xerox_mfp_fix_usb_devices.patch
new file mode 100644
index 000000000..5ed29b974
--- /dev/null
+++ b/extra/sane/xerox_mfp_fix_usb_devices.patch
@@ -0,0 +1,67 @@
+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