diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2017-02-04 07:41:56 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2017-02-04 07:41:56 +0000 |
commit | d3020eab78c95b9e02feb373ebfd772e9c44df2f (patch) | |
tree | 60bb2a3517ea190e18a5ec9193cba2d59a526fe0 /devel/py-libusb115 | |
parent | devel/py-adb: update to 1.1.1.37 (snapshot) (diff) |
devel/py-libusb1: update to 1.6.4
devel/py-adb stays on the old version due to google/python-adb#36
Changes: https://pypi.python.org/pypi/libusb1#id60
Diffstat (limited to 'devel/py-libusb115')
-rw-r--r-- | devel/py-libusb115/Makefile | 12 | ||||
-rw-r--r-- | devel/py-libusb115/distinfo | 3 | ||||
-rw-r--r-- | devel/py-libusb115/files/patch-usb1.py | 26 |
3 files changed, 41 insertions, 0 deletions
diff --git a/devel/py-libusb115/Makefile b/devel/py-libusb115/Makefile new file mode 100644 index 000000000000..a7fae3cc3585 --- /dev/null +++ b/devel/py-libusb115/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PORTVERSION= 1.5.3 +PKGNAMESUFFIX= 15 + +MASTERDIR= ${.CURDIR}/../py-libusb1 +DISTINFO_FILE= ${.CURDIR}/distinfo +PATCHDIR= ${.CURDIR}/files + +CONFLICTS_INSTALL= ${PKGNAMEPREFIX}${PORTNAME} + +.include "${MASTERDIR}/Makefile" diff --git a/devel/py-libusb115/distinfo b/devel/py-libusb115/distinfo new file mode 100644 index 000000000000..2faaafcdc2a9 --- /dev/null +++ b/devel/py-libusb115/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1474053011 +SHA256 (libusb1-1.5.3.tar.gz) = 85f6bbf9fcfe9421f99864f20a37eacb00f30b8a7c29adc6b2a163bde29649ea +SIZE (libusb1-1.5.3.tar.gz) = 53409 diff --git a/devel/py-libusb115/files/patch-usb1.py b/devel/py-libusb115/files/patch-usb1.py new file mode 100644 index 000000000000..a47c742bd960 --- /dev/null +++ b/devel/py-libusb115/files/patch-usb1.py @@ -0,0 +1,26 @@ +https://lists.freebsd.org/pipermail/freebsd-usb/2015-January/013586.html + +--- usb1.py.orig 2015-08-15 17:59:35 UTC ++++ usb1.py +@@ -1729,15 +1729,20 @@ class USBDevice(object): + """ + Get device's port number. + """ +- return libusb1.libusb_get_port_number(self.device_p) ++ try: ++ return libusb1.libusb_get_port_number(self.device_p) ++ except AttributeError: ++ return 0 + + def getPortNumberList(self): + """ + Get the port number of each hub toward device. + """ + port_list = (c_uint8 * PATH_MAX_DEPTH)() ++ temp_handle = self.open() + result = libusb1.libusb_get_port_numbers( + self.device_p, port_list, len(port_list)) ++ temp_handle.close() + mayRaiseUSBError(result) + return list(port_list[:result]) + |