Changeset 97840


Ignore:
Timestamp:
Sep 17, 2012, 2:00:02 PM (12 years ago)
Author:
michaelld@…
Message:

libusb-legacy : disable compiling with clang since it does not play nicely with +universal; fixes ticket #36170. Also, tweak Darwin code to better use OSX-native typedefs and avoid warnings.

Location:
trunk/dports/devel/libusb-legacy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/libusb-legacy/Portfile

    r84550 r97840  
    66name                libusb-legacy
    77version             0.1.12
    8 revision            2
     8revision            3
    99categories          devel
    1010license             LGPL-2.1
     
    6464}
    6565
     66# does not work with clang when +universal; just disable clang for now
     67compiler.blacklist  clang
     68
    6669configure.args      --disable-build-docs \
    6770                    --libdir=${prefix}/lib/libusb-legacy \
  • trunk/dports/devel/libusb-legacy/files/patch-darwin.c.diff

    r54873 r97840  
    1 --- darwin.c.orig       2006-02-25 19:40:17.000000000 +0100
    2 +++ darwin.c    2006-04-27 22:15:22.000000000 +0200
     1--- darwin.c.orig       2012-09-17 09:29:57.000000000 -0400
     2+++ darwin.c    2012-09-17 09:48:45.000000000 -0400
    33@@ -189,6 +189,8 @@
    44     return "invalid argument";
     
    1818   case kIOUSBPipeStalled:
    1919     return LUSBDARWINSTALL;
    20 @@ -838,19 +841,13 @@
     20@@ -247,7 +250,8 @@
     21   io_cf_plugin_ref_t *plugInInterface = NULL;
     22   usb_device_t **device;
     23   io_service_t usbDevice;
     24-  long result, score;
     25+  IOReturn result;
     26+  SInt32 score;
     27 
     28   if (!IOIteratorIsValid (deviceIterator) || !(usbDevice = IOIteratorNext(deviceIterator)))
     29     return NULL;
     30@@ -447,7 +451,7 @@
     31   IOUSBFindInterfaceRequest request;
     32 
     33   struct darwin_dev_handle *device;
     34-  long score;
     35+  SInt32 score;
     36   int current_interface;
     37 
     38   device = dev->impl_info;
     39@@ -768,8 +772,8 @@
     40   struct rw_complete_arg *rw_arg = (struct rw_complete_arg *)refcon;
     41 
     42   if (usb_debug > 2)
     43-    fprintf(stderr, "io async operation completed: %s, size=%lu, result=0x%08x\n", darwin_error_str(result),
     44-           (UInt32)io_size, result);
     45+    fprintf(stderr, "io async operation completed: %s, size=%llu, result=0x%08llx\n", darwin_error_str(result),
     46+           (UInt64)io_size, (SInt64) result);
     47 
     48   rw_arg->io_size = (UInt32)io_size;
     49   rw_arg->result  = result;
     50@@ -838,19 +842,13 @@
    2151 
    2252   if (result == kIOReturnSuccess) {
     
    4070     char *error_str;
    4171 
     72@@ -1064,7 +1062,7 @@
     73     result = (*(device))->GetDeviceAddress(device, (USBDeviceAddress *)&address);
     74 
     75     if (usb_debug >= 2)
     76-      fprintf(stderr, "usb_os_find_devices: Found USB device at location 0x%08lx\n", location);
     77+      fprintf(stderr, "usb_os_find_devices: Found USB device at location 0x%08llx\n", (UInt64) location);
     78 
     79     /* first byte of location appears to be associated with the device's bus */
     80     if (location >> 24 == bus_loc >> 24) {
     81@@ -1091,8 +1089,8 @@
     82       LIST_ADD(fdev, dev);
     83 
     84       if (usb_debug >= 2)
     85-       fprintf(stderr, "usb_os_find_devices: Found %s on %s at location 0x%08lx\n",
     86-               dev->filename, bus->dirname, location);
     87+       fprintf(stderr, "usb_os_find_devices: Found %s on %s at location 0x%08llx\n",
     88+               dev->filename, bus->dirname, (UInt64) location);
     89     }
     90 
     91     /* release the device now */
Note: See TracChangeset for help on using the changeset viewer.