aboutsummaryrefslogtreecommitdiff
path: root/devel/libusb
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2002-06-28 07:54:14 +0000
committerKevin Lo <kevlo@FreeBSD.org>2002-06-28 07:54:14 +0000
commita33196df5ea4ec7bc2af4c1b825c1cf7c0bf4ea6 (patch)
treeb50f4ce322e22efd65f9ae5d47e8d166152a1353 /devel/libusb
parent88e1615c5a6a146f2f42a14e623b0639a2cc42f3 (diff)
downloadports-a33196df5ea4ec7bc2af4c1b825c1cf7c0bf4ea6.tar.gz
ports-a33196df5ea4ec7bc2af4c1b825c1cf7c0bf4ea6.zip
Notes
Diffstat (limited to 'devel/libusb')
-rw-r--r--devel/libusb/Makefile2
-rw-r--r--devel/libusb/distinfo2
-rw-r--r--devel/libusb/files/patch-bsd.c92
3 files changed, 2 insertions, 94 deletions
diff --git a/devel/libusb/Makefile b/devel/libusb/Makefile
index aba53f719964..f4c64c6022d4 100644
--- a/devel/libusb/Makefile
+++ b/devel/libusb/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= libusb
-PORTVERSION= 0.1.5
+PORTVERSION= 0.1.6a
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/devel/libusb/distinfo b/devel/libusb/distinfo
index c201624b4ca9..1d3038e7ebaa 100644
--- a/devel/libusb/distinfo
+++ b/devel/libusb/distinfo
@@ -1 +1 @@
-MD5 (libusb-0.1.5.tar.gz) = 4eff055ee5e9cbcbf82604efbc74f76a
+MD5 (libusb-0.1.6a.tar.gz) = 4560835ac0168fa09f653043983f2d0a
diff --git a/devel/libusb/files/patch-bsd.c b/devel/libusb/files/patch-bsd.c
deleted file mode 100644
index 7fee0b2af9be..000000000000
--- a/devel/libusb/files/patch-bsd.c
+++ /dev/null
@@ -1,92 +0,0 @@
---- bsd.c.orig Thu Feb 7 06:43:25 2002
-+++ bsd.c Mon Mar 11 13:39:50 2002
-@@ -34,6 +34,7 @@
- #include <assert.h>
- #include <sys/time.h>
- #include <sys/ioctl.h>
-+#include <sys/param.h>
-
- #include <dev/usb/usb.h>
-
-@@ -151,8 +152,13 @@
- if (dev->interface < 0)
- USB_ERROR(-EINVAL);
-
-+#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001)
- intf.interface_index = dev->interface;
- intf.alt_no = alternate;
-+#else
-+ intf.uai_interface_index = dev->interface;
-+ intf.uai_alt_no = alternate;
-+#endif
-
- ret = ioctl(dev->fd, USB_SET_ALTINTERFACE, &intf);
- if (ret < 0)
-@@ -284,6 +290,7 @@
- fprintf(stderr, "usb_control_msg: %d %d %d %d %p %d %d\n",
- requesttype, request, value, index, bytes, size, timeout);
-
-+#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001)
- req.request.bmRequestType = requesttype;
- req.request.bRequest = request;
- USETW(req.request.wValue, value);
-@@ -292,6 +299,16 @@
-
- req.data = bytes;
- req.flags = 0;
-+#else
-+ req.ucr_request.bmRequestType = requesttype;
-+ req.ucr_request.bRequest = request;
-+ USETW(req.ucr_request.wValue, value);
-+ USETW(req.ucr_request.wIndex, index);
-+ USETW(req.ucr_request.wLength, size);
-+
-+ req.ucr_data = bytes;
-+ req.ucr_flags = 0;
-+#endif
-
- ret = ioctl(dev->fd, USB_SET_TIMEOUT, &timeout);
- if (ret < 0)
-@@ -303,7 +320,11 @@
- USB_ERROR_STR(ret, "error sending control message: %s",
- strerror(errno));
-
-+#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001)
- return UGETW(req.request.wLength);
-+#else
-+ return UGETW(req.ucr_request.wLength);
-+#endif
- }
-
- int usb_find_devices_on_bus(struct usb_bus *bus)
-@@ -321,18 +342,30 @@
- struct usb_device *dev;
- char buf[20];
-
-+#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001)
- di.addr = device;
-+#else
-+ di.udi_addr = device;
-+#endif
- if (ioctl(cfd, USB_DEVICEINFO, &di) < 0)
- continue;
-
- /* There's a device; is it one we should mess with? */
-
-+#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001)
- if (strncmp(di.devnames[0], "ugen", 4) != 0)
-+#else
-+ if (strncmp(di.udi_devnames[0], "ugen", 4) != 0)
-+#endif
- /* best not to play with things we don't understand */
- continue;
-
- #if __FreeBSD__
-+#if (__FreeBSD_version > 500000 && __FreeBSD_version < 500031) || (__FreeBSD_version < 450001)
- snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.devnames[0]);
-+#else
-+ snprintf(buf, sizeof(buf) - 1, "/dev/%s", di.udi_devnames[0]);
-+#endif
- #else
- snprintf(buf, sizeof(buf) - 1, "/dev/%s.00", di.devnames[0]);
- #endif