Index: libusb-compat/Portfile
===================================================================
--- libusb-compat/Portfile	(revision 92510)
+++ libusb-compat/Portfile	(working copy)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name            libusb-compat
-version         0.1.3
+version         0.1.4
 categories      devel
 
 description     library for USB device access
@@ -17,9 +17,9 @@
 maintainers     toby brett
 
 master_sites    sourceforge:libusb
-checksums       md5 570ac2ea085b80d1f74ddc7c6a93c0eb \
-                sha1 d5710d5bc4b67c5344e779475b76168c7ccc5e69 \
-                rmd160 d00e00b9f9733efc43eb4e44b84298540e896691
+checksums       md5     2ca521fffadd0c28fdf174e6ec73865b \
+                sha1    fdc1df6f5cf7b71de7a74292aeea1aa2a39552ae \
+                rmd160  84a7aa3a294a6065838fcb464935926b659e4fee
 
 use_bzip2       yes
 
Index: libusb/Portfile
===================================================================
--- libusb/Portfile	(revision 92510)
+++ libusb/Portfile	(working copy)
@@ -4,7 +4,7 @@
 
 name            libusb
 conflicts       libusb-devel
-version         1.0.8
+version         1.0.9
 categories      devel
 
 description     library for USB device access
@@ -18,9 +18,9 @@
 maintainers     wilcoxd.com:rwilcox toby brett
 
 master_sites    sourceforge
-checksums       md5 37d34e6eaa69a4b645a19ff4ca63ceef \
-                sha1 5484397860f709c9b51611d224819f8ed5994063 \
-                rmd160 5a413a77e240a15480ef1437d5f5393badbae985
+checksums       md5     7f5a02375ad960d4e33a6dae7d63cfcb \
+                sha1    025582ff2f6216e2dbc2610ae16b2e073e1b3346 \
+                rmd160  5410570f8ce31783044eb04aebaae7ade3b21a61
 
 use_bzip2       yes
 
Index: libusb-devel/files/patch-USBI_OS_HANDLES_TIMEOUT.diff
===================================================================
--- libusb-devel/files/patch-USBI_OS_HANDLES_TIMEOUT.diff	(revision 92510)
+++ libusb-devel/files/patch-USBI_OS_HANDLES_TIMEOUT.diff	(working copy)
@@ -1,132 +0,0 @@
---- a/libusb/libusbi.h
-+++ b/libusb/libusbi.h
-@@ -288,13 +288,21 @@ struct libusb_device_handle {
- 	unsigned char os_priv[0];
- };
- 
--#define USBI_TRANSFER_TIMED_OUT	 			(1<<0)
--
- enum {
-   USBI_CLOCK_MONOTONIC,
-   USBI_CLOCK_REALTIME
- };
- 
-+/* flags for struct usbi_transfer:
-+ *  USBI_TRANSFER_TIMED_OUT
-+ *  USBI_TRANSFER_OS_HANDLES_TIMEOUT - set in the backend submit_transfer if the os will handle the timeout
-+ */
-+enum {
-+  USBI_TRANSFER_TIMED_OUT          = (1 << 0),
-+  USBI_TRANSFER_OS_HANDLES_TIMEOUT = (1 << 1)
-+};
-+
-+
- /* in-memory transfer layout:
-  *
-  * 1. struct usbi_transfer
-diff --git a/libusb/os/darwin_usb.c b/libusb/os/darwin_usb.c
-index 646c938..79ba6c6 100644
---- a/libusb/os/darwin_usb.c
-+++ b/libusb/os/darwin_usb.c
-@@ -1137,6 +1137,8 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) {
-       ret = (*(cInterface->interface))->WritePipeAsync(cInterface->interface, pipeRef, transfer->buffer,
- 						       transfer->length, darwin_async_io_callback, itransfer);
-   } else {
-+    itransfer->flags |= USBI_TRANSFER_OS_HANDLES_TIMEOUT;
-+  
-     if (is_read)
-       ret = (*(cInterface->interface))->ReadPipeAsyncTO(cInterface->interface, pipeRef, transfer->buffer,
- 							transfer->length, transfer->timeout, transfer->timeout,
-@@ -1171,10 +1173,19 @@ static int submit_iso_transfer(struct usbi_transfer *itransfer) {
-   /* are we reading or writing? */
-   is_read = transfer->endpoint & LIBUSB_ENDPOINT_IN;
- 
--  /* construct an array of IOUSBIsocFrames */
--  tpriv->isoc_framelist = (IOUSBIsocFrame*) calloc (transfer->num_iso_packets, sizeof(IOUSBIsocFrame));
--  if (!tpriv->isoc_framelist)
--    return LIBUSB_ERROR_NO_MEM;
-+  /* construct an array of IOUSBIsocFrames, reuse the old one if possible */
-+  if (tpriv->isoc_framelist != NULL && tpriv->num_iso_packets != transfer->num_iso_packets)
-+  {
-+    free(tpriv->isoc_framelist);
-+    tpriv->isoc_framelist = NULL;
-+  }
-+  if (tpriv->isoc_framelist == NULL)
-+  {
-+    tpriv->isoc_framelist = (IOUSBIsocFrame*) calloc (transfer->num_iso_packets, sizeof(IOUSBIsocFrame));
-+    tpriv->num_iso_packets = transfer->num_iso_packets;
-+    if (!tpriv->isoc_framelist)
-+      return LIBUSB_ERROR_NO_MEM;
-+  }
- 
-   /* copy the frame list from the libusb descriptor (the structures differ only is member order) */
-   for (i = 0 ; i < transfer->num_iso_packets ; i++)
-@@ -1198,9 +1209,11 @@ static int submit_iso_transfer(struct usbi_transfer *itransfer) {
- 
-     return darwin_to_libusb (kresult);
-   }
--
-   /* schedule for a frame a little in the future */
--  frame += 2;
-+  frame += 4;
-+
-+  if(cInterface->frames[transfer->endpoint] && frame < cInterface->frames[transfer->endpoint])
-+    frame = cInterface->frames[transfer->endpoint];
- 
-   /* submit the request */
-   if (is_read)
-@@ -1211,6 +1224,7 @@ static int submit_iso_transfer(struct usbi_transfer *itransfer) {
-     kresult = (*(cInterface->interface))->WriteIsochPipeAsync(cInterface->interface, pipeRef, transfer->buffer, frame,
- 							      transfer->num_iso_packets, tpriv->isoc_framelist, darwin_async_io_callback,
- 							      itransfer);
-+  cInterface->frames[transfer->endpoint] = frame + transfer->num_iso_packets / 8;
- 
-   if (kresult != kIOReturnSuccess) {
-     usbi_err (TRANSFER_CTX (transfer), "isochronous transfer failed (dir: %s): %s", is_read ? "In" : "Out",
-@@ -1243,6 +1257,8 @@ static int submit_control_transfer(struct usbi_transfer *itransfer) {
-   tpriv->req.pData             = transfer->buffer + LIBUSB_CONTROL_SETUP_SIZE;
-   tpriv->req.completionTimeout = transfer->timeout;
-   tpriv->req.noDataTimeout     = transfer->timeout;
-+  
-+  itransfer->flags |= USBI_TRANSFER_OS_HANDLES_TIMEOUT;
- 
-   /* all transfers in libusb-1.0 are async */
-   kresult = (*(dpriv->device))->DeviceRequestAsyncTO(dpriv->device, &(tpriv->req), darwin_async_io_callback, itransfer);
-@@ -1358,6 +1374,9 @@ static void darwin_async_io_callback (void *refcon, IOReturn result, void *arg0)
- }
- 
- static int darwin_transfer_status (struct usbi_transfer *itransfer, kern_return_t result) {
-+	if (itransfer->flags & USBI_TRANSFER_TIMED_OUT)
-+		result = kIOUSBTransactionTimeout;
-+		
-   switch (result) {
-   case kIOReturnUnderrun:
-   case kIOReturnSuccess:
-@@ -1372,6 +1391,7 @@ static int darwin_transfer_status (struct usbi_transfer *itransfer, kern_return_
-     return LIBUSB_TRANSFER_OVERFLOW;
-   case kIOUSBTransactionTimeout:
-     usbi_err (ITRANSFER_CTX (itransfer), "transfer error: timed out");
-+	itransfer->flags |= USBI_TRANSFER_TIMED_OUT;
-     return LIBUSB_TRANSFER_TIMED_OUT;
-   default:
-     usbi_err (ITRANSFER_CTX (itransfer), "transfer error: %s (value = 0x%08x)", darwin_error_str (result), result);
-diff --git a/libusb/os/darwin_usb.h b/libusb/os/darwin_usb.h
-index a71d464..4aadf8c 100644
---- a/libusb/os/darwin_usb.h
-+++ b/libusb/os/darwin_usb.h
-@@ -139,6 +139,7 @@ struct darwin_device_handle_priv {
-     usb_interface_t    **interface;
-     uint8_t              num_endpoints;
-     CFRunLoopSourceRef   cfSource;
-+    UInt64               frames[256];
-     uint8_t            endpoint_addrs[USB_MAXENDPOINTS];
-   } interfaces[USB_MAXINTERFACES];
- };
-@@ -146,6 +147,7 @@ struct darwin_device_handle_priv {
- struct darwin_transfer_priv {
-   /* Isoc */
-   IOUSBIsocFrame *isoc_framelist;
-+  size_t num_iso_packets;
- 
-   /* Control */
- #if !defined (LIBUSB_NO_TIMEOUT_DEVICE)
\ No newline at end of file
Index: libusb-devel/Portfile
===================================================================
--- libusb-devel/Portfile	(revision 92510)
+++ libusb-devel/Portfile	(working copy)
@@ -3,8 +3,9 @@
 PortSystem 1.0
 
 name            libusb-devel
+replaced_by     libusb
 version         1.0.8.20101017
-revision        2
+revision        3
 categories      devel
 
 description         library for USB device access
@@ -13,22 +14,13 @@
                     
 homepage        http://www.libusb.org/
 
-platforms       darwin
-license         LGPL-2.1
-maintainers     adfernandes openmaintainer
+maintainers     nomaintainer
 
-conflicts       libusb
+distfiles
 
-fetch.type      git
-git.url         http://git.libusb.org/libusb.git
-git.branch      7da756e09fd97efad2b35b5cee0e2b2550aac2cb
-
-depends_build   port:autoconf port:automake port:libtool
-pre-configure   { system "cd ${worksrcpath}; ./autogen.sh" }
-configure.ldflags-append "-framework IOKit -framework CoreFoundation"
-
-                # This patch is required for the Kinect: http://openkinect.org/wiki/Getting_Started
-                # and is a known issue: <http://vimeo.com/16734124> and <http://www.libusb.org/ticket/31>
-patch.pre_args  -p1
-patchfiles      patch-USBI_OS_HANDLES_TIMEOUT.diff
+pre-configure {
+    ui_error "Please do not install this port since it has been replaced by 'libusb'."
+    return -code error
+}
         
+livecheck       none
