[30570] trunk/dports/devel/libusb

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 31 02:41:51 PDT 2007


Revision: 30570
          http://trac.macosforge.org/projects/macports/changeset/30570
Author:   ryandesign at macports.org
Date:     2007-10-31 02:41:50 -0700 (Wed, 31 Oct 2007)

Log Message:
-----------
libusb: add upstream patch that fixes some crashing issues on Intel Macs (and PPC ones if you try hard enough). Port is now maintained by rwilcox. See #12839.

Modified Paths:
--------------
    trunk/dports/devel/libusb/Portfile

Added Paths:
-----------
    trunk/dports/devel/libusb/files/
    trunk/dports/devel/libusb/files/patch-darwin.c.diff

Modified: trunk/dports/devel/libusb/Portfile
===================================================================
--- trunk/dports/devel/libusb/Portfile	2007-10-31 09:35:10 UTC (rev 30569)
+++ trunk/dports/devel/libusb/Portfile	2007-10-31 09:41:50 UTC (rev 30570)
@@ -1,10 +1,12 @@
 # $Id$
 
 PortSystem 1.0
+
 name             libusb
 version          0.1.12
+revision         1
 categories       devel
-maintainers      nomaintainer
+maintainers      rwilcox at wilcoxd.com
 description      Library providing access to USB devices
 long_description \
     A library originally developed under Linux to give userland programs \
@@ -14,3 +16,5 @@
 master_sites     sourceforge
 checksums        sha1 599a5168590f66bc6f1f9a299579fd8500614807
 configure.args   --disable-build-docs
+
+patchfiles       patch-darwin.c.diff

Added: trunk/dports/devel/libusb/files/patch-darwin.c.diff
===================================================================
--- trunk/dports/devel/libusb/files/patch-darwin.c.diff	                        (rev 0)
+++ trunk/dports/devel/libusb/files/patch-darwin.c.diff	2007-10-31 09:41:50 UTC (rev 30570)
@@ -0,0 +1,41 @@
+--- darwin.c.orig	2006-02-25 19:40:17.000000000 +0100
++++ darwin.c	2006-04-27 22:15:22.000000000 +0200
+@@ -189,6 +189,8 @@
+     return "invalid argument";
+   case kIOReturnAborted:
+     return "transaction aborted";
++  case kIOReturnNotResponding:
++    return "the device is not responding";
+   default:
+     return "unknown error";
+   }
+@@ -207,6 +209,7 @@
+   case kIOUSBNoAsyncPortErr:
+     return ENXIO;
+   case kIOReturnExclusiveAccess:
++  case kIOReturnNotResponding:
+     return EBUSY;
+   case kIOUSBPipeStalled:
+     return LUSBDARWINSTALL;
+@@ -838,19 +841,13 @@
+ 
+   if (result == kIOReturnSuccess) {
+     /* wait for write to complete */
+-    if (CFRunLoopRunInMode(kCFRunLoopDefaultMode, (timeout+999)/1000, true) == kCFRunLoopRunTimedOut) {
+-      (*(device->interface))->AbortPipe(device->interface, pipeRef);
+-      CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true); /* Pick up aborted callback */
+-      if (usb_debug)
+-	fprintf(stderr, "usb_bulk_read: input timed out\n");
+-    }
++    CFRunLoopRun();
+   }
+ 
+   CFRunLoopRemoveSource(CFRunLoopGetCurrent(), cfSource, kCFRunLoopDefaultMode);
+   
+   /* Check the return code of both the write and completion functions. */
+-  if (result != kIOReturnSuccess || (rw_arg.result != kIOReturnSuccess && 
+-      rw_arg.result != kIOReturnAborted) ) {
++  if (result != kIOReturnSuccess || rw_arg.result != kIOReturnSuccess) {
+     int error_code;
+     char *error_str;
+ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071031/b4b5e215/attachment.html


More information about the macports-changes mailing list