[97840] trunk/dports/devel/libusb-legacy
michaelld at macports.org
michaelld at macports.org
Mon Sep 17 07:00:02 PDT 2012
Revision: 97840
http://trac.macports.org//changeset/97840
Author: michaelld at macports.org
Date: 2012-09-17 07:00:02 -0700 (Mon, 17 Sep 2012)
Log 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.
Modified Paths:
--------------
trunk/dports/devel/libusb-legacy/Portfile
trunk/dports/devel/libusb-legacy/files/patch-darwin.c.diff
Modified: trunk/dports/devel/libusb-legacy/Portfile
===================================================================
--- trunk/dports/devel/libusb-legacy/Portfile 2012-09-17 13:21:38 UTC (rev 97839)
+++ trunk/dports/devel/libusb-legacy/Portfile 2012-09-17 14:00:02 UTC (rev 97840)
@@ -5,7 +5,7 @@
name libusb-legacy
version 0.1.12
-revision 2
+revision 3
categories devel
license LGPL-2.1
maintainers snc michaelld openmaintainer
@@ -63,6 +63,9 @@
${worksrcpath}/configure
}
+# does not work with clang when +universal; just disable clang for now
+compiler.blacklist clang
+
configure.args --disable-build-docs \
--libdir=${prefix}/lib/libusb-legacy \
--includedir=${prefix}/include/libusb-legacy
Modified: trunk/dports/devel/libusb-legacy/files/patch-darwin.c.diff
===================================================================
--- trunk/dports/devel/libusb-legacy/files/patch-darwin.c.diff 2012-09-17 13:21:38 UTC (rev 97839)
+++ trunk/dports/devel/libusb-legacy/files/patch-darwin.c.diff 2012-09-17 14:00:02 UTC (rev 97840)
@@ -1,5 +1,5 @@
---- darwin.c.orig 2006-02-25 19:40:17.000000000 +0100
-+++ darwin.c 2006-04-27 22:15:22.000000000 +0200
+--- darwin.c.orig 2012-09-17 09:29:57.000000000 -0400
++++ darwin.c 2012-09-17 09:48:45.000000000 -0400
@@ -189,6 +189,8 @@
return "invalid argument";
case kIOReturnAborted:
@@ -17,8 +17,38 @@
return EBUSY;
case kIOUSBPipeStalled:
return LUSBDARWINSTALL;
-@@ -838,19 +841,13 @@
+@@ -247,7 +250,8 @@
+ io_cf_plugin_ref_t *plugInInterface = NULL;
+ usb_device_t **device;
+ io_service_t usbDevice;
+- long result, score;
++ IOReturn result;
++ SInt32 score;
+ if (!IOIteratorIsValid (deviceIterator) || !(usbDevice = IOIteratorNext(deviceIterator)))
+ return NULL;
+@@ -447,7 +451,7 @@
+ IOUSBFindInterfaceRequest request;
+
+ struct darwin_dev_handle *device;
+- long score;
++ SInt32 score;
+ int current_interface;
+
+ device = dev->impl_info;
+@@ -768,8 +772,8 @@
+ struct rw_complete_arg *rw_arg = (struct rw_complete_arg *)refcon;
+
+ if (usb_debug > 2)
+- fprintf(stderr, "io async operation completed: %s, size=%lu, result=0x%08x\n", darwin_error_str(result),
+- (UInt32)io_size, result);
++ fprintf(stderr, "io async operation completed: %s, size=%llu, result=0x%08llx\n", darwin_error_str(result),
++ (UInt64)io_size, (SInt64) result);
+
+ rw_arg->io_size = (UInt32)io_size;
+ rw_arg->result = result;
+@@ -838,19 +842,13 @@
+
if (result == kIOReturnSuccess) {
/* wait for write to complete */
- if (CFRunLoopRunInMode(kCFRunLoopDefaultMode, (timeout+999)/1000, true) == kCFRunLoopRunTimedOut) {
@@ -39,3 +69,23 @@
int error_code;
char *error_str;
+@@ -1064,7 +1062,7 @@
+ result = (*(device))->GetDeviceAddress(device, (USBDeviceAddress *)&address);
+
+ if (usb_debug >= 2)
+- fprintf(stderr, "usb_os_find_devices: Found USB device at location 0x%08lx\n", location);
++ fprintf(stderr, "usb_os_find_devices: Found USB device at location 0x%08llx\n", (UInt64) location);
+
+ /* first byte of location appears to be associated with the device's bus */
+ if (location >> 24 == bus_loc >> 24) {
+@@ -1091,8 +1089,8 @@
+ LIST_ADD(fdev, dev);
+
+ if (usb_debug >= 2)
+- fprintf(stderr, "usb_os_find_devices: Found %s on %s at location 0x%08lx\n",
+- dev->filename, bus->dirname, location);
++ fprintf(stderr, "usb_os_find_devices: Found %s on %s at location 0x%08llx\n",
++ dev->filename, bus->dirname, (UInt64) location);
+ }
+
+ /* release the device now */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120917/0373ae72/attachment-0001.html>
More information about the macports-changes
mailing list