Add DragonFly device names for probing. Bump revision.

From walt on DragonFly's submit list.
This commit is contained in:
joerg 2006-06-27 12:27:06 +00:00
parent b4f3862589
commit c6ae4768e4
5 changed files with 110 additions and 3 deletions

View file

@ -1,11 +1,11 @@
# $NetBSD: Makefile,v 1.32 2006/06/26 19:52:33 wiz Exp $
# $NetBSD: Makefile,v 1.33 2006/06/27 12:27:06 joerg Exp $
.include "Makefile.common"
COMMENT= API for access to scanners, digitals camera, frame grabbers etc.
DISTNAME= sane-backends-${SANE_VERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
PKGREVISION= 2
PKGREVISION= 3
USE_TOOLS+= msgfmt
USE_PKGLOCALEDIR= YES

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.20 2006/06/08 14:14:11 ben Exp $
$NetBSD: distinfo,v 1.21 2006/06/27 12:27:06 joerg Exp $
SHA1 (sane-backends-1.0.17.tar.gz) = a73e01575458a5fb7dc265cea50c6740555e1711
RMD160 (sane-backends-1.0.17.tar.gz) = 43e440712e9da676e235dc6148c5dda347c30e22
@ -8,3 +8,6 @@ RMD160 (hp3900-sane1017_src_0.5.tar.gz) = d37163c66888de11fff41a0d0af09b9439dda3
Size (hp3900-sane1017_src_0.5.tar.gz) = 119430 bytes
SHA1 (patch-aa) = fe4f9771d72512ac6a6c246971cb5940fba184cb
SHA1 (patch-ab) = e9ed0b400458308a5c6a2631bda475c59e9a4abd
SHA1 (patch-ac) = dc7e9a4c8b53af7a9054ac5228f0179cd5b2a7c7
SHA1 (patch-ad) = 386bd03ba2816bfcc630aa5899dda07fc7c34292
SHA1 (patch-ae) = 22a5311a745fb3adf6fb5f472a6bd6a6af9f9c73

View file

@ -0,0 +1,49 @@
$NetBSD: patch-ac,v 1.3 2006/06/27 12:27:06 joerg Exp $
--- sanei/sanei_ab306.c.orig 2006-06-20 01:54:43.000000000 -0700
+++ sanei/sanei_ab306.c
@@ -78,7 +78,7 @@ inb (u_long port)
#include "sane/sanei.h"
#include "sane/sanei_ab306.h"
-#if (defined(HAVE_IOPERM) || defined(__FreeBSD__)) && !defined(IO_SUPPORT_MISSING)
+#if (defined(HAVE_IOPERM) || defined(__FreeBSD__) || defined(__DragonFly__)) && !defined(IO_SUPPORT_MISSING)
#include <errno.h>
#include <fcntl.h>
@@ -99,7 +99,7 @@ inb (u_long port)
#define PORT_DEV "/dev/port"
#define AB306_CIO 0x379 /* control i/o port */
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
static int dev_io_fd = 0;
#endif
@@ -287,7 +287,7 @@ sanei_ab306_open (const char *dev, int *
status = sanei_ab306_get_io_privilege (i);
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
status = sanei_ab306_get_io_privilege (i);
if (status != SANE_STATUS_GOOD)
return status;
@@ -366,7 +366,7 @@ sanei_ab306_get_io_privilege (int fd)
{
if (port[fd].port_fd < 0)
{
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
if (dev_io_fd == 0)
dev_io_fd = open ("/dev/io", O_RDONLY);
if (dev_io_fd < 0)
@@ -517,7 +517,7 @@ sanei_ab306_exit (void)
/* power off the scanner: */
ab306_outb (port + i, port[i].base + 1, 0x00);
}
-#if defined(__FreeBSD)
+#if defined(__FreeBSD) || defined(__DragonFly__)
if (dev_io_fd >0)
close (dev_io_fd);
#endif /* defined(__FreeBSD__) */

View file

@ -0,0 +1,33 @@
$NetBSD: patch-ad,v 1.4 2006/06/27 12:27:06 joerg Exp $
--- sanei/sanei_usb.c.orig 2006-06-20 02:00:41.000000000 -0700
+++ sanei/sanei_usb.c
@@ -91,6 +91,10 @@ struct usb_descriptor_header *GetNextDes
#include <dev/usb/usb.h>
#endif /* __FreeBSD__ */
+#if defined(__DragonFly__)
+#include <bus/usb/usb.h>
+#endif
+
#define BACKEND_NAME sanei_usb
#include "../include/sane/sane.h"
#include "../include/sane/sanei_debug.h"
@@ -249,7 +253,7 @@ kernel_get_vendor_product (int fd, const
*vendorID = vendor;
*productID = product;
}
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
{
int controller;
int ctrl_fd;
@@ -301,7 +305,7 @@ sanei_usb_init (void)
#if defined(__linux__)
"/dev/", "usbscanner",
"/dev/usb/", "scanner",
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__) || defined(__DragonFly__)
"/dev/", "uscanner",
#elif defined(__BEOS__)
"/dev/scanner/usb/", "",

View file

@ -0,0 +1,22 @@
$NetBSD: patch-ae,v 1.4 2006/06/27 12:27:06 joerg Exp $
--- tools/sane-find-scanner.c.orig 2006-06-20 02:06:59.000000000 -0700
+++ tools/sane-find-scanner.c
@@ -1356,7 +1356,7 @@ main (int argc, char **argv)
"/dev/scanner", "/dev/scanner0", "/dev/scanner1",
"/dev/pass0", "/dev/pass1", "/dev/pass2", "/dev/pass3",
"/dev/pass4", "/dev/pass5", "/dev/pass6", "/dev/pass7",
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
"/dev/uk0", "/dev/uk1", "/dev/uk2", "/dev/uk3", "/dev/uk4",
"/dev/uk5", "/dev/uk6",
#elif defined(__NetBSD__)
@@ -1391,7 +1391,7 @@ main (int argc, char **argv)
"/dev/usbscanner10", "/dev/usbscanner11",
"/dev/usbscanner12", "/dev/usbscanner13",
"/dev/usbscanner14", "/dev/usbscanner15",
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
"/dev/uscanner",
"/dev/uscanner0", "/dev/uscanner1",
"/dev/uscanner2", "/dev/uscanner3",