From owner-svn-ports-all@freebsd.org Sun Mar 27 15:30:30 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A575DADF51F; Sun, 27 Mar 2016 15:30:30 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80DD31A3B; Sun, 27 Mar 2016 15:30:30 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2RFUTZj074805; Sun, 27 Mar 2016 15:30:29 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2RFUTcO074799; Sun, 27 Mar 2016 15:30:29 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201603271530.u2RFUTcO074799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 27 Mar 2016 15:30:29 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 15:30:30 -0000 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 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