Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2016 15:30:29 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r411994 - in head/devel: . py-libusb1 py-libusb1/files
Message-ID:  <201603271530.u2RFUTcO074799@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Mar 27 15:30:29 2016
New Revision: 411994
URL: https://svnweb.freebsd.org/changeset/ports/411994

Log:
  devel/py-libusb1: add new port
  
  Pure-python wrapper for libusb-1.0.
  
  https://pypi.python.org/pypi/libusb1

Added:
  head/devel/py-libusb1/
  head/devel/py-libusb1/Makefile   (contents, props changed)
  head/devel/py-libusb1/distinfo   (contents, props changed)
  head/devel/py-libusb1/files/
  head/devel/py-libusb1/files/patch-usb1.py   (contents, props changed)
  head/devel/py-libusb1/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile   (contents, props changed)

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sun Mar 27 15:11:14 2016	(r411993)
+++ head/devel/Makefile	Sun Mar 27 15:30:29 2016	(r411994)
@@ -4162,6 +4162,7 @@
     SUBDIR += py-liblarch
     SUBDIR += py-libpeas
     SUBDIR += py-libplist
+    SUBDIR += py-libusb1
     SUBDIR += py-libvirt
     SUBDIR += py-libzfs
     SUBDIR += py-ll-core

Added: head/devel/py-libusb1/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libusb1/Makefile	Sun Mar 27 15:30:29 2016	(r411994)
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+PORTNAME=	libusb1
+PORTVERSION=	1.4.1
+CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	jbeich@FreeBSD.org
+COMMENT=	Pure-python wrapper for libusb-1.0
+
+LICENSE=	LGPL21+
+
+NO_ARCH=	yes
+USES=		python
+USE_PYTHON=	autoplist distutils
+
+do-test:
+		@${PYTHON_CMD} -m unittest discover -vs ${TEST_WRKSRC}
+
+.include <bsd.port.mk>

Added: head/devel/py-libusb1/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libusb1/distinfo	Sun Mar 27 15:30:29 2016	(r411994)
@@ -0,0 +1,2 @@
+SHA256 (libusb1-1.4.1.tar.gz) = 454230c59a3924754c6703e104e07f5b2ddb9e0a0f71cc6fa4f0a8ae2bd4aa1c
+SIZE (libusb1-1.4.1.tar.gz) = 43438

Added: head/devel/py-libusb1/files/patch-usb1.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libusb1/files/patch-usb1.py	Sun Mar 27 15:30:29 2016	(r411994)
@@ -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])
+ 

Added: head/devel/py-libusb1/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/py-libusb1/pkg-descr	Sun Mar 27 15:30:29 2016	(r411994)
@@ -0,0 +1,3 @@
+Pure-python wrapper for libusb-1.0.
+
+WWW: https://pypi.python.org/pypi/libusb1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603271530.u2RFUTcO074799>